Skip to content

Releases: oablab/cfdrop

v0.7.0 — deploy into your own Cloudflare account (--own)

Choose a tag to compare

@github-actions github-actions released this 12 Sep 12:27

Deploy into your own Cloudflare account (--own)

Until now cfdrop only deployed to a temporary Cloudflare account that expires after 60 minutes unless claimed. 0.7.0 adds an explicit own-account mode: point it at your account with a single-permission API token and the site lives there permanently, no claim step.

export CLOUDFLARE_API_TOKEN=...            # Account API Token, Workers Scripts · Edit — that's all
cfdrop deploy -d ./site -n docs --own      # → https://docs.<your-subdomain>.workers.dev
cfdrop rm -n docs                          # delete it when you're done

What's new

  • --own, --account <id>, CLOUDFLARE_ACCOUNT_ID switch on own mode. A bare CLOUDFLARE_API_TOKEN in the environment (common for wrangler users) does not — a throwaway preview cannot land in a real account by accident. --temporary forces the default even when the account id is set.
  • Token from CLOUDFLARE_API_TOKEN or --token-file <path>; never from argv. If own mode is requested and no token is found, cfdrop errors instead of silently falling back to a temporary account.
  • Minimal permission: one Account API Token with Account · Workers Scripts · Edit, created at https://dash.cloudflare.com/<account id>/api-tokens. User tokens work too. The preflight only calls endpoints valid for both kinds (GET /accounts, GET /accounts/{id}/workers/subdomain) — never /user/*, where account tokens answer Invalid API Token.
  • Account inference: when the token sees exactly one account it is used; several → --account required; a requested account outside the token's scope is refused.
  • Overwrite protection: every cfdrop deploy is tagged cfdrop. A --name that collides with an existing Worker without that tag is refused unless you pass --force. Same rule for rm.
  • cfdrop rm -n <name> [--account <id>] [--force] deletes an own-account site.
  • cfdrop status now reports what the own-account environment would do (token + account set → deploy goes to your own account, token set, no account → still temporary, …).
  • Actionable errors for the common misconfigurations: missing Workers Scripts: Edit (API code 10000), no workers.dev subdomain registered yet (prints the PUT that registers one), multiple visible accounts.
  • --fresh with own mode is rejected (meaningless); --auth in own mode warns that a baked-in Basic Auth credential is preview-grade — use Cloudflare Access for permanent sites.

Docs

  • README: step-by-step guide — token creation, verification curls, account selection, deploy/update/delete, CI snippet, troubleshooting table keyed on the exact error strings (#2).
  • ELI5 walkthrough: https://eli5.openab.dev/howto-cfdrop-owned-account/
  • skills/cfdrop/SKILL.md: own-account usage block; --own needs ≥ 0.7.0.

Verified

Live against a real account with a Workers-Scripts-Edit-only account token: deploy → 200, same-name redeploy → updated in place, deploy onto a foreign untagged Worker → refused, rm foreign → refused, rm ours → 404 afterwards, own-without-token → error (no fallback), --fresh --own and --own --temporary rejected. Default temporary path unchanged. 42 unit tests, clippy -D warnings clean.

Compatibility

No breaking changes. Without any of the new flags/env vars, cfdrop deploy behaves exactly as 0.6.x (temporary account). Binaries: linux amd64/arm64 (static musl), macOS arm64.

Full Changelog: v0.6.1...v0.7.0

cfdrop v0.6.1

Choose a tag to compare

@github-actions github-actions released this 28 Aug 12:29

Full Changelog: v0.6.0...v0.6.1

cfdrop v0.6.0

Choose a tag to compare

@github-actions github-actions released this 28 Aug 03:46

Full Changelog: v0.5.0...v0.6.0

cfdrop v0.5.0

Choose a tag to compare

@github-actions github-actions released this 28 Aug 03:05

Full Changelog: v0.4.1...v0.5.0

cftmp v0.4.1

Choose a tag to compare

@github-actions github-actions released this 28 Aug 02:45

Full Changelog: v0.4.0...v0.4.1

cftmp v0.4.0

Choose a tag to compare

@github-actions github-actions released this 28 Aug 02:27

Full Changelog: v0.3.0...v0.4.0

cftmp v0.3.0

Choose a tag to compare

@github-actions github-actions released this 28 Aug 02:12

Full Changelog: v0.2.0...v0.3.0

cftmp v0.2.0

Choose a tag to compare

@github-actions github-actions released this 28 Aug 01:56

Full Changelog: v0.1.0...v0.2.0

cftmp v0.1.0

Choose a tag to compare

@github-actions github-actions released this 28 Aug 01:30