Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: look for URL in channel before falling back to default #440

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

travis
Copy link
Member

@travis travis commented Feb 21, 2023

This fixes #344 and makes it possible to connect to staging services with w3ui.

This PR obsoletes #404 per @alanshaw's suggestion in #404 (comment) based on reasoning in storacha/ucanto#214 (comment) which points out that some sort of conditional or casting is probably unavoidable here.

My solution casts the channel to have an optional url field and looks in that field for a URL before falling back to the default HOST.

Have tested this locally with w3ui and verified it makes it possible to connect to staging services from w3ui - huzzah!

This fixes #344 and makes it possible to connect to staging services with w3ui.

This PR obsoletes #404 per @alanshaw's suggestion in #404 (comment) based on reasoning in storacha/ucanto#214 (comment) which points out that some sort of conditional or casting is probably unavoidable here.

My solution casts the channel to have an optional `url` field and looks in that field for a URL before falling back to the default `HOST`.
@travis travis merged commit 0741295 into main Feb 21, 2023
@travis travis deleted the fix/ws-client-url branch February 21, 2023 09:07
travis added a commit that referenced this pull request Feb 21, 2023
🤖 I have created a release *beep* *boop*
---


##
[9.4.0](access-v9.3.0...access-v9.4.0)
(2023-02-21)


### Features

* add support for access/authorize and update
([#392](#392))
([9c8ca0b](9c8ca0b)),
closes [#386](#386)


### Bug Fixes

* look for URL in channel before falling back to default
([#440](#440))
([0741295](0741295))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Travis Vachon <travis@dag.house>
travis pushed a commit that referenced this pull request Feb 23, 2023
🤖 I have created a release *beep* *boop*
---


##
[9.4.0](access-v9.3.0...access-v9.4.0)
(2023-02-23)


### Features

* add support for access/authorize and update
([#392](#392))
([9c8ca0b](9c8ca0b)),
closes [#386](#386)


### Bug Fixes

* look for URL in channel before falling back to default
([#440](#440))
([0741295](0741295))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
gobengo pushed a commit that referenced this pull request Apr 11, 2023
This fixes #344 and
makes it possible to connect to staging services with w3ui.

This PR obsoletes #404
per @alanshaw's suggestion in
#404 (comment)
based on reasoning in
storacha/ucanto#214 (comment)
which points out that some sort of conditional or casting is probably
unavoidable here.

My solution casts the channel to have an optional `url` field and looks
in that field for a URL before falling back to the default `HOST`.

Have tested this locally with w3ui and verified it makes it possible to
connect to staging services from w3ui - huzzah!
gobengo pushed a commit that referenced this pull request Apr 11, 2023
🤖 I have created a release *beep* *boop*
---


##
[9.4.0](access-v9.3.0...access-v9.4.0)
(2023-02-21)


### Features

* add support for access/authorize and update
([#392](#392))
([bf41071](bf41071)),
closes [#386](#386)


### Bug Fixes

* look for URL in channel before falling back to default
([#440](#440))
([6fa2cba](6fa2cba))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Travis Vachon <travis@dag.house>
gobengo pushed a commit that referenced this pull request Apr 11, 2023
🤖 I have created a release *beep* *boop*
---


##
[9.4.0](access-v9.3.0...access-v9.4.0)
(2023-02-23)


### Features

* add support for access/authorize and update
([#392](#392))
([bf41071](bf41071)),
closes [#386](#386)


### Bug Fixes

* look for URL in channel before falling back to default
([#440](#440))
([6fa2cba](6fa2cba))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.0.0](storacha/w3ui@react-uploads-list-v3.0.0...react-uploads-list-v3.0.0)
(2023-03-23)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([845a6b6](storacha/w3ui@845a6b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.0.0](storacha/w3ui@vue-uploads-list-v3.0.0...vue-uploads-list-v3.0.0)
(2023-03-23)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([845a6b6](storacha/w3ui@845a6b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.0.0](storacha/w3ui@vue-uploader-v4.0.0...vue-uploader-v4.0.0)
(2023-03-23)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([845a6b6](storacha/w3ui@845a6b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.0.0](storacha/w3ui@solid-uploads-list-v3.0.0...solid-uploads-list-v3.0.0)
(2023-03-23)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([845a6b6](storacha/w3ui@845a6b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.0.0](storacha/w3ui@solid-uploader-v4.0.0...solid-uploader-v4.0.0)
(2023-03-23)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([845a6b6](storacha/w3ui@845a6b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.0.1](storacha/w3ui@react-uploads-list-v3.0.0...react-uploads-list-v3.0.1)
(2023-03-30)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([845a6b6](storacha/w3ui@845a6b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.0.1](storacha/w3ui@vue-uploads-list-v3.0.0...vue-uploads-list-v3.0.1)
(2023-05-09)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([845a6b6](storacha/w3ui@845a6b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.1.0](storacha/w3ui@vue-uploader-v4.0.0...vue-uploader-v4.1.0)
(2023-05-09)


### Features

* upload progress
([storacha#499](storacha/w3ui#499))
([6c9de97](storacha/w3ui@6c9de97))
* w3console cleanup and updates to packages to support it
([storacha#507](storacha/w3ui#507))
([78aee2a](storacha/w3ui@78aee2a))


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([845a6b6](storacha/w3ui@845a6b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.1.0](storacha/w3ui@solid-uploader-v4.0.0...solid-uploader-v4.1.0)
(2023-05-09)


### Features

* upload progress
([storacha#499](storacha/w3ui#499))
([6c9de97](storacha/w3ui@6c9de97))
* w3console cleanup and updates to packages to support it
([storacha#507](storacha/w3ui#507))
([78aee2a](storacha/w3ui@78aee2a))


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([845a6b6](storacha/w3ui@845a6b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.1.0](storacha/w3ui@solid-uploads-list-v3.0.0...solid-uploads-list-v3.1.0)
(2023-05-09)


### Features

* update to latest version of ucanto and
[@web3-storage](https://github.com/web3-storage) libraries
([storacha#514](storacha/w3ui#514))
([e1ee301](storacha/w3ui@e1ee301))


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([845a6b6](storacha/w3ui@845a6b6))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.0.0](storacha/w3ui@react-uploads-list-v3.0.0...react-uploads-list-v3.0.0)
(2023-03-23)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([9b8a9c8](storacha/w3ui@9b8a9c8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.0.0](storacha/w3ui@vue-uploads-list-v3.0.0...vue-uploads-list-v3.0.0)
(2023-03-23)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([9b8a9c8](storacha/w3ui@9b8a9c8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.0.0](storacha/w3ui@vue-uploader-v4.0.0...vue-uploader-v4.0.0)
(2023-03-23)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([9b8a9c8](storacha/w3ui@9b8a9c8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.0.0](storacha/w3ui@solid-uploads-list-v3.0.0...solid-uploads-list-v3.0.0)
(2023-03-23)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([9b8a9c8](storacha/w3ui@9b8a9c8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.0.0](storacha/w3ui@solid-uploader-v4.0.0...solid-uploader-v4.0.0)
(2023-03-23)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([9b8a9c8](storacha/w3ui@9b8a9c8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.0.1](storacha/w3ui@react-uploads-list-v3.0.0...react-uploads-list-v3.0.1)
(2023-03-30)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([9b8a9c8](storacha/w3ui@9b8a9c8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alan Shaw <alan.shaw@protocol.ai>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.0.1](storacha/w3ui@vue-uploads-list-v3.0.0...vue-uploads-list-v3.0.1)
(2023-05-09)


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([9b8a9c8](storacha/w3ui@9b8a9c8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.1.0](storacha/w3ui@vue-uploader-v4.0.0...vue-uploader-v4.1.0)
(2023-05-09)


### Features

* upload progress
([storacha#499](storacha/w3ui#499))
([81ae196](storacha/w3ui@81ae196))
* w3console cleanup and updates to packages to support it
([storacha#507](storacha/w3ui#507))
([f6fdf8e](storacha/w3ui@f6fdf8e))


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([9b8a9c8](storacha/w3ui@9b8a9c8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[4.1.0](storacha/w3ui@solid-uploader-v4.0.0...solid-uploader-v4.1.0)
(2023-05-09)


### Features

* upload progress
([storacha#499](storacha/w3ui#499))
([81ae196](storacha/w3ui@81ae196))
* w3console cleanup and updates to packages to support it
([storacha#507](storacha/w3ui#507))
([f6fdf8e](storacha/w3ui@f6fdf8e))


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([9b8a9c8](storacha/w3ui@9b8a9c8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Peeja pushed a commit to storacha/upload-service that referenced this pull request Jan 29, 2025
🤖 I have created a release *beep* *boop*
---


##
[3.1.0](storacha/w3ui@solid-uploads-list-v3.0.0...solid-uploads-list-v3.1.0)
(2023-05-09)


### Features

* update to latest version of ucanto and
[@web3-storage](https://github.com/web3-storage) libraries
([storacha#514](storacha/w3ui#514))
([f70ca5f](storacha/w3ui@f70ca5f))


### Bug Fixes

* tweak READMEs for packages that release-please didn't release right
([storacha#440](storacha/w3ui#440))
([9b8a9c8](storacha/w3ui@9b8a9c8))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Travis Vachon <travis.vachon@protocol.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

access-client Agent.url defaults to HOST even when custom connection is used
2 participants