-
Notifications
You must be signed in to change notification settings - Fork 787
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: dev+envs #532
feat: dev+envs #532
Conversation
🦋 Changeset detectedLatest commit: b3654be 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/1924516548/npm-package-wrangler-532 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/532/npm-package-wrangler-532 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/1924516548/npm-package-wrangler-532 dev path/to/script.js |
dd5fa5a
to
fe5a9d9
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.
This all looks like it should work, although I have not run it locally :-)
There doesn't seem to be much point in separate CfAccount
and CfWorkerContext
interfaces any more. They are always used as a pair, AFAICT. So how about just join them up into a single CfWorkerContext
interface?
This implements service environments + `wrangler dev`. Fairly simple, it just needed the right url when creating the edge preview token. I tested this by publishing a service under one env, adding secrets under it in the dashboard, and then trying to dev under another env, and verifying that the secrets didn't leak.
Agreed about the type, and I'll merge the CfAccount and CfWorkerContext types in a followup PR. |
Wait for control messages using the new `--control-fd` flag for signalling when `workerd` is ready to receive requests, and the port it's listening on. This allows us to pass port `0` directly to workerd, and have it allocate a free port, preventing races. It also allows us to remove the repeated readiness probes. 🎉
Wait for control messages using the new `--control-fd` flag for signalling when `workerd` is ready to receive requests, and the port it's listening on. This allows us to pass port `0` directly to workerd, and have it allocate a free port, preventing races. It also allows us to remove the repeated readiness probes. 🎉
Wait for control messages using the new `--control-fd` flag for signalling when `workerd` is ready to receive requests, and the port it's listening on. This allows us to pass port `0` directly to workerd, and have it allocate a free port, preventing races. It also allows us to remove the repeated readiness probes. 🎉
Wait for control messages using the new `--control-fd` flag for signalling when `workerd` is ready to receive requests, and the port it's listening on. This allows us to pass port `0` directly to workerd, and have it allocate a free port, preventing races. It also allows us to remove the repeated readiness probes. 🎉
This implements service environments +
wrangler dev
. Fairly simple, it just needed the right url when creating the edge preview token.I tested this by publishing a service under one env, adding secrets under it in the dashboard, and then trying to dev under another env, and verifying that the secrets didn't leak.
(This uncovered an issue where we can't set the right host incl. the env prefix, but it's not critical right now, following up internally.)