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: re-enable support for multiple providers #217

Merged
merged 7 commits into from
Aug 14, 2023
Merged

Conversation

travis
Copy link
Member

@travis travis commented Aug 11, 2023

we lost this in the D1 migration work - go back to parsing the PROVIDERS env var and use the result as the list of supported providers

we lost this in the D1 migration work - go back to parsing the PROVIDERS env var
and use the result as the list of supported providers
I've cleaned this up in a different PR
local was in a weird state, finally bit the bullet and clean/installed
good idea to make sure these are actually ServiceDIDs since that's what the types want
@seed-deploy seed-deploy bot temporarily deployed to pr217 August 11, 2023 22:07 Inactive
@seed-deploy
Copy link

seed-deploy bot commented Aug 11, 2023

View stack outputs

* @param {string} providersEnvVar
* @returns {import('@web3-storage/upload-api').ServiceDID[]}
*/
export function parseProviders(providersEnvVar) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really have anything to do with providers - it's parsing a CSV of did:web prefixed DIDs. I'd call it something to that effect.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool - renamed to parseServiceDids since that's what feels natural for the types. I think this could be further generalized to parseDidWebs or something but I do want to return ServiceDIDs in this case and have a ServiceDID-specific error message and don't feel like diving down the generics rabbithole right this sec, so feel pretty good about this level of abstraction for now.

per PR comment, make the name better reflect the implementation
@seed-deploy seed-deploy bot temporarily deployed to pr217 August 14, 2023 16:28 Inactive
@travis travis merged commit 1d7370f into main Aug 14, 2023
1 check passed
@travis travis deleted the fix/multiple-providers branch August 14, 2023 16:32
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.

2 participants