Dashboard › craft › Distillation
b3a76ddb-b882-4e22-a2dc-d2d1ae65d5ed["14a16fcf857a2081011d3a06ba808de6"]
Date: Aug 3, 2026
CLOUDFLARE_API_TOKEN must always be passed via environment variables, never CLI arguments or logs.--help output, and official vendor documentation—before answering; user does not want guesses..lore.md records that Craft’s Cloudflare target changed the default deployType from pages to worker; Pages remains supported explicitly via deployType: pages..lore.md records that CLOUDFLARE_ACCOUNT_ID is optional and non-secret: Wrangler can auto-discover it for single-account tokens, while non-interactive multi-account cases may fail while listing account IDs; CLOUDFLARE_API_TOKEN remains the only required secret..lore.md records that no Cloudflare SDK was added; the implementation uses raw global fetch with a Node 24.18.0 baseline..lore.md records that Wrangler v4 has no built-in OIDC/keyless authentication; supported authentication paths are API token, deprecated legacy Global API Key, or wrangler login OAuth..lore.md records that the Cloudflare target work was introduced as a PR #843 follow-up and received an adversarial-review verdict of solid with no CRITICAL or MAJOR issues.result.production_branch and nested result.source.config.production_branch; the top-level field is authoritative, while the nested field describes the linked Git repository setting.deploy2() compares the top-level production branch with --branch to compute isProduction; a mismatch silently creates a preview deployment rather than returning an error.resolveProductionBranch() resolution order is: configured productionBranch; otherwise a raw fetch of the Cloudflare Pages project API; otherwise omit --branch, allowing a bare deploy from a non-git temporary directory to default to production.Account → Cloudflare Pages → Edit, because Wrangler performs the same GET internally.reportError; transient 5xx or network errors soft-fail by warning and omitting --branch.tsc, test runs, and git diff.