feat(cloudflare/ruleset): add Ruleset resource#240
Conversation
|
Verification update:
|
|
Marking this ready for review now. One dependency remains for full live-test verification: alchemy-run/distilled#257 needs to land or be otherwise consumed by this repo so the generated Rulesets client uses the correct phase-entrypoint path. The current implementation and focused tests are ready for review, and the live-test blocker is documented above. |
856d990 to
75823a2
Compare
|
@Mkassabov we need to figure out what we want to do for alchemy-run/distilled#257 SO we can get this merged. It's a high demand/high utility resource |
75823a2 to
98f74c3
Compare
|
Update: Distilled Verified:
The previous live-test path issue is resolved by the new Distilled package. Full live create/update/delete still needs a Cloudflare token with Zone Rulesets read/write for the test zone; the earlier token reached the correct endpoint but Cloudflare returned |
…ipping Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
pushing some fixes rn, testing with my own zone |
|
Thanks. Please make sure we have adequate regression tests for anything you find on your zone |
|
small dependency note from live testing: create/update/delete with a real Cloudflare token and the remaining failure is after delete / emptying the entrypoint. Cloudflare returns 200 with a valid ruleset result but no opened alchemy-run/distilled#289 to fix that at the generated SDK layer. once released, this PR can stay idiomatic and just treat missing |
|
@sam-goodwin seems good to go now! one thing i noticed while working in both distilled and alchemy effect repos is that having two repos is slowing down agentic work quite a bit, might be worth exploring a single monorepo |
|
I am upstreaming the distilled change and then will merge into this PR |
Adds a first-class Cloudflare Ruleset resource for zone phase entrypoints.
rulesets.putPhas{ zoneId }, zone ID strings, and hostname strings for zone selectionCLOUDFLARE_TEST_RULESET_ZONE_IDDepends on alchemy-run/distilled#257 for generated Rulesets phase path support.
Verification run:
bun vitest run packages/alchemy/test/Cloudflare/Ruleset/Ruleset.test.tsbun tsc -b --pretty falsegit diff --check