The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | /** |
| 2 | * Email Routing is scoped separately from the rest of the Cloudflare API. |
| 3 | * A credential without it — notably Cloudflare OAuth, which carries no |
| 4 | * Email Routing scope at all — is refused before any resource logic runs: |
| 5 | * |
| 6 | * Unauthorized: Authentication error |
| 7 | * at provider.create (packages/alchemy/src/Apply.ts) |
| 8 | * |
| 9 | * Every suite below drives real Email Routing resources (routing settings, |
| 10 | * rules, catch-alls, destination addresses, sending subdomains) against the |
| 11 | * standing test zone, so all of them need the scope. |
| 12 | * |
| 13 | * The standing testing credential (an API token carrying `Zone.Email Routing |
| 14 | * Rules` (edit) plus account-level `Email Routing Addresses`) has the scope, |
| 15 | * so the suites run by default. Set `CLOUDFLARE_TEST_EMAIL_ROUTING=0` to skip |
| 16 | * them skip-clean under a credential without it (e.g. Cloudflare OAuth). |
| 17 | */ |
| 18 | export const emailRoutingScoped = process.env.CLOUDFLARE_TEST_EMAIL_ROUTING !== "0"; |
| 19 | |
| 20 | /** |
| 21 | * Exclusive label for every test that touches zone Email Routing. The suites |
| 22 | * share Email Routing on the standing test zone, and `Email.Routing`'s destroy |
| 23 | * turns routing off for the whole zone, so they must not overlap. |
| 24 | */ |
| 25 | export const EMAIL_ROUTING_ZONE = "cloudflare:email-routing-zone"; |