feat(cloudflare/Worker): add Zone Routes - #438
Merged
sam-goodwin merged 6 commits intoJul 8, 2026
Merged
Conversation
utopyin
force-pushed
the
feat/cloudflare-worker-routes
branch
from
May 26, 2026 11:21
ba92c66 to
a305c73
Compare
utopyin
marked this pull request as draft
May 26, 2026 11:24
utopyin
force-pushed
the
feat/cloudflare-worker-routes
branch
from
May 26, 2026 11:27
58a3b95 to
42dc4bc
Compare
utopyin
force-pushed
the
feat/cloudflare-worker-routes
branch
from
June 8, 2026 18:16
42dc4bc to
f7b92f0
Compare
utopyin
force-pushed
the
feat/cloudflare-worker-routes
branch
from
June 8, 2026 18:17
f7b92f0 to
2346c35
Compare
Contributor
Author
|
@Mkassabov I see that recent commits have added the Cloudflare.WorkerRoute resource. yield* Cloudflare.Worker("Api", {
main: import.meta.filename,
routes: [
{ pattern: "api.example.com/*", zoneName: "example.com" },
{ pattern: "example.com/api/*", zoneId: "<YOUR_ZONE_ID>" },
],
}); |
Contributor
|
@claude please merge main into this PR and resolve merge conflicts |
Resolve conflicts by taking main's structure (provider moved to WorkerProvider.ts) and porting the PR's inline zone-routes reconciliation into it. Rename WorkerRouteProps -> WorkerRouteConfig to avoid colliding with the standalone Workers Route resource. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- no-op redeploy keeps the same route id - pattern change (delete+create) + added route with inferred zone - explicit zoneId, zoneName, and inference spellings - removal via omitting the routes prop - out-of-band drift removal with observed state as baseline - destroy detaches routes from the zone - refusal to steal a pattern attached to another Worker Also fix LocalWorkerProvider precreate attrs (routes: []) and the CloudflareEnvironment double-yield idiom. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Workers routes only serve on proxied hostnames; the standing test zone lost its apex record (and universal cert) to a nuke. Ensure a proxied AAAA 100:: placeholder exists out-of-band before the HTTP assertions, and fix the conflict-test assertion to compare physical worker names. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sam-goodwin
marked this pull request as ready for review
July 8, 2026 06:12
Probed live: creating a route for a not-yet-propagated script rejects with code 10019, now typed as WorkerNotFound via distilled patch (alchemy-run/distilled#368). Drop the speculative InternalServerError / UnknownCloudflareError retry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tFound tag Scoped tag instead of widening the shared WorkerNotFound matchers (alchemy-run/distilled#368). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
thank you for taking care of this @sam-goodwin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Wrangler-style zone routes to
Cloudflare.Workervia a newroutesprop.Each entry accepts
zoneName/zoneId(Wrangler equivalents) orzone(ZoneReference). When the zone is omitted, it is inferred from the pattern hostname. Routes are reconciled on deploy, returned asrouteson the worker output, and cleaned up on destroy.