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

feat: add getDeployStore method #68

Merged
merged 2 commits into from
Oct 18, 2023
Merged

feat: add getDeployStore method #68

merged 2 commits into from
Oct 18, 2023

Conversation

eduardoboucas
Copy link
Member

Which problem is this pull request solving?

Adds a getDeployStore method that can be used to create a deploy-scoped store. It can also read the deploy ID from the context object in the environment.

More information in the updated README.

@eduardoboucas eduardoboucas requested a review from a team as a code owner October 17, 2023 23:22
@netlify
Copy link

netlify bot commented Oct 17, 2023

Deploy Preview for blobs-js ready!

Name Link
🔨 Latest commit 3b792d4
🔍 Latest deploy log https://app.netlify.com/sites/blobs-js/deploys/652f1d614730e80008d9e363
😎 Deploy Preview https://deploy-preview-68--blobs-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Oct 17, 2023
Copy link
Contributor

@lukasholzer lukasholzer left a comment

Choose a reason for hiding this comment

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

LGTM!

const string = await deployStore.get(key)
expect(string).toBe(value)

const stream = await deployStore.get(key, { type: 'stream' })
Copy link
Contributor

Choose a reason for hiding this comment

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

we could make the types for deployStore.get better that if the type is stream it will return a NodeJS.ReadableStream but we can do this in a follow up

Copy link
Member Author

Choose a reason for hiding this comment

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

That's already the case:

Screenshot 2023-10-18 at 09 29 39

@eduardoboucas eduardoboucas merged commit 5135f3d into main Oct 18, 2023
8 checks passed
@cbosss
Copy link
Contributor

cbosss commented Oct 18, 2023

@eduardoboucas eduardoboucas deleted the feat/getdeploystore branch October 24, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants