-
Notifications
You must be signed in to change notification settings - Fork 736
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 support for publishing workers with r2 bucket bindings #452
Conversation
🦋 Changeset detectedLatest commit: 69639d1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
wrangler prerelease is available for testing: npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/1836269986/wrangler |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Could you add it to wrangler dev
as well? That would be needed to close the issue.
@@ -203,6 +203,15 @@ export type Config = { | |||
preview_id?: string; | |||
}[]; | |||
|
|||
r2_buckets?: { | |||
/** The binding name used to refer to the R2 bucket in the worker. */ | |||
binding: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really dislike "binding" bah. I'll make some noise about it later.
You could also add |
That is so weird. I actually ran |
Looking through the code where |
This change adds the ability to define bindings in your `wrangler.toml` file for R2 buckets. These buckets will then be available in the environment passed to the worker at runtime. Closes #365
f11b056
to
69639d1
Compare
Added the bindings to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is scary. I hope R2 bindings aren't being exposed if they're simply published. We should verify this next week. |
Probably! It'll also force people to ship support for both whenever they make a new type of binding. |
This change adds the ability to define bindings in your
wrangler.toml
filefor R2 buckets. These buckets will then be available in the environment
passed to the worker at runtime.
Closes #365