-
Notifications
You must be signed in to change notification settings - Fork 735
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: secrets + environments #523
Conversation
🦋 Changeset detectedLatest commit: ff8ea80 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 |
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/1892950702/npm-package-wrangler-523 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/523/npm-package-wrangler-523 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/1892950702/npm-package-wrangler-523 dev path/to/script.js |
await fetchResult( | ||
`/accounts/${config.account_id}/workers/scripts/${scriptName}`, | ||
!args["legacy-env"] && args.env |
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.
filed #524 to write tests for this codepath, looks like I missed it last time around
This implements environment support for `wrangler secret` (both legacy and services). We now consistently generate the right script name across commands with the `getScriptName()` helper.
41bbf9a
to
ff8ea80
Compare
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.
LGTM
I tested this pretty decently, and it works ok. There's one bug I discovered with the api, I'll file that internally. Landing this. |
Similar to #475, we weren't deleting the `MF-Original-URL` header from incoming requests, leading to incorrect URLs in the loopback server when the incoming request was passed-through as the cache key. Tests also needed to be updated as the storage location is now based off the actual URL passed to `dispatchFetch()`.
Similar to #475, we weren't deleting the `MF-Original-URL` header from incoming requests, leading to incorrect URLs in the loopback server when the incoming request was passed-through as the cache key. Tests also needed to be updated as the storage location is now based off the actual URL passed to `dispatchFetch()`.
Similar to #475, we weren't deleting the `MF-Original-URL` header from incoming requests, leading to incorrect URLs in the loopback server when the incoming request was passed-through as the cache key. Tests also needed to be updated as the storage location is now based off the actual URL passed to `dispatchFetch()`.
Similar to #475, we weren't deleting the `MF-Original-URL` header from incoming requests, leading to incorrect URLs in the loopback server when the incoming request was passed-through as the cache key. Tests also needed to be updated as the storage location is now based off the actual URL passed to `dispatchFetch()`.
This implements environment support for
wrangler secret
(both legacy and services). We now consistently generate the right script name across commands with thegetScriptName()
helper.