Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
29f609a
feat(deploy): add --backend cloudflare / --provision flags + early fo…
Brooooooklyn Jul 15, 2026
0cc7f15
fix(cli): make --backend token-aware and fix bare --backend error mes…
Brooooooklyn Jul 15, 2026
59c2bfd
feat(cli): add resolveWranglerCommand helper for local wrangler invoc…
Brooooooklyn Jul 15, 2026
075152d
fix(cli): shell-quote resolved executable path in resolveProjectCommand
Brooooooklyn Jul 15, 2026
5bca437
feat(cli): comment-preserving root wrangler.jsonc writer for provisio…
Brooooooklyn Jul 15, 2026
0c06307
fix(cli): fail-closed BOM-aware wrangler writer + framework-queue upsert
Brooooooklyn Jul 15, 2026
f967717
fix(cli): property-level queue upsert preserves user fields + comments
Brooooooklyn Jul 15, 2026
1ede2d4
fix(cli): reject duplicate wrangler config members before upsert
Brooooooklyn Jul 15, 2026
3160168
fix(cli): match wrangler queue producer upsert by queue name, not bin…
Brooooooklyn Jul 15, 2026
684137e
fix(cli): key queue producer upsert on binding + preserve trailing co…
Brooooooklyn Jul 16, 2026
858b0a1
fix(cli): keep trailing comments put across a separator comma + missi…
Brooooooklyn Jul 16, 2026
78ecd06
fix(cli): CR-only line endings + order-independent producer conflict …
Brooooooklyn Jul 16, 2026
ffbb22f
fix(cli): global comment-preservation invariant in wrangler writer
Brooooooklyn Jul 16, 2026
02a4482
fix(cli): worker-wide producer binding uniqueness + migrations_dir/pa…
Brooooooklyn Jul 16, 2026
df1ffad
fix(cli): complete worker-wide binding-name collector for queue-produ…
Brooooooklyn Jul 16, 2026
de6555f
feat(deploy): add Cloudflare resource provisioner + writer adopt fields
Brooooooklyn Jul 16, 2026
4119ff9
fix(cli): harden Cloudflare provisioner — argv seam, fail-closed chec…
Brooooooklyn Jul 16, 2026
1fda3c2
fix(provision): close 6 codex round-2 findings in the CF resource pro…
Brooooooklyn Jul 16, 2026
64a942a
fix(provision): unify fail-closed discovery + close 6 codex round-3 f…
Brooooooklyn Jul 16, 2026
aee906f
fix(provision): close 6 codex round-4 findings in the CF resource pro…
Brooooooklyn Jul 16, 2026
03e8f82
fix(provision): close codex round-5 F1-F5 in the CF resource provisioner
Brooooooklyn Jul 16, 2026
eccb1ca
fix(wrangler): close codex round-5 F6 — comprehensive strict binding-…
Brooooooklyn Jul 16, 2026
0de7919
fix(wrangler): close codex round-6 F2/F5 in the binding collector
Brooooooklyn Jul 16, 2026
46bb6c1
fix(provision): close codex round-6 F1/F2/F3/F4/F6 in the CF provisioner
Brooooooklyn Jul 16, 2026
769cc34
fix(provision): close codex round-7 F1/F2/F3 in the CF provisioner
Brooooooklyn Jul 16, 2026
40c7e86
fix(wrangler): close codex round-7 F4/F5 in the binding collector
Brooooooklyn Jul 16, 2026
78672c0
fix(wrangler): close codex round-8 F3 outer-container validation in t…
Brooooooklyn Jul 16, 2026
cc25b4d
fix(provision): close codex round-8 F1/F2/F4/F5 in the CF provisioner
Brooooooklyn Jul 16, 2026
8484958
fix(provision): close codex round-9 F1/F2 in the CF provisioner
Brooooooklyn Jul 16, 2026
90425ff
fix(provision): close codex round-9 F3 — realpath-canonicalize the lo…
Brooooooklyn Jul 16, 2026
b306372
fix(provision): close codex round-9 F4 — validate EVERY list member's…
Brooooooklyn Jul 16, 2026
e552204
fix(provision): close codex round-9 F5 — strict duplicate-safe bindin…
Brooooooklyn Jul 16, 2026
4dc21cf
fix(provision): close codex round-9 F6 — tighten the queue name grammar
Brooooooklyn Jul 16, 2026
6c18b13
fix(provision): close codex round-9 F7 — surface a leaked-mutex unloc…
Brooooooklyn Jul 16, 2026
1b60f30
fix(provision): close codex round-10 F7 — send_email/ratelimits ident…
Brooooooklyn Jul 16, 2026
844b829
fix(provision): close codex round-10 F1-F6 in the Cloudflare provisioner
Brooooooklyn Jul 16, 2026
bff0953
fix(provision): close codex round-11 F1 — wrangler-exact API base res…
Brooooooklyn Jul 16, 2026
e1e0841
fix(provision): close codex round-11 F4 — no Hyperdrive password in w…
Brooooooklyn Jul 16, 2026
9513aee
fix(provision): close codex round-11 F5 — dotenv fence file set + cas…
Brooooooklyn Jul 16, 2026
baec1ea
fix(provision): close codex round-11 F6 — migrations_dir fill-if-abse…
Brooooooklyn Jul 16, 2026
2483525
fix(provision): close codex round-11 F7 — read-first requires stored-…
Brooooooklyn Jul 16, 2026
252b61d
fix(provision): close codex round-11 F2 — never settle/release under …
Brooooooklyn Jul 16, 2026
9f286ac
fix(provision): close codex round-11 F3 — the lister deadline timer s…
Brooooooklyn Jul 16, 2026
22bc0b3
fix(provision): close codex round-12 F1+F2 — one termination/quaranti…
Brooooooklyn Jul 17, 2026
bb31063
fix(provision): close codex round-12 F3+F4+F5 — win32 env scrub, wran…
Brooooooklyn Jul 17, 2026
ca5db53
fix(provision): close codex round-12 F6+F7 — per-resource placeholder…
Brooooooklyn Jul 17, 2026
f1c586b
fix(provision): close codex round-12 F8 — a defined non-string migrat…
Brooooooklyn Jul 17, 2026
691e6d4
fix(provision): close codex round-12 F9 — dev-vars fence mirrors load…
Brooooooklyn Jul 17, 2026
e70cc5c
fix(provision): close codex round-13 F4 — one redaction carrier survi…
Brooooooklyn Jul 17, 2026
ba7174b
fix(provision): close codex round-13 F1+F3 — one atomic lock acquisit…
Brooooooklyn Jul 17, 2026
48299f3
fix(provision): close codex round-13 F2+F5 — one process-wide signal …
Brooooooklyn Jul 17, 2026
328afbd
style(provision): round-13 lint nits — omit unused catch binding, Arr…
Brooooooklyn Jul 17, 2026
8ae1a81
fix(provision): close codex round-14 F1+F2+F7 — at-most-one provision…
Brooooooklyn Jul 17, 2026
666354a
fix(provision): close codex round-14 F3 — one recovery mutex + genera…
Brooooooklyn Jul 17, 2026
0b81817
fix(provision): close codex round-14 F5+F6 — retention watchdog for u…
Brooooooklyn Jul 17, 2026
f066936
fix(provision): close codex round-14 F4 — one no-throw redaction boun…
Brooooooklyn Jul 17, 2026
a56c150
feat(deploy): add self-host secrets preflight units (warn + gate)
Brooooooklyn Jul 17, 2026
b548caa
fix(deploy): harden self-host preflight — values-free error report + …
Brooooooklyn Jul 17, 2026
f65ca9d
fix(deploy): close codex task-5 review round 1 — 5 self-host prefligh…
Brooooooklyn Jul 17, 2026
15bfe8a
fix(deploy): close codex task-5 review round 2 — 3 self-host prefligh…
Brooooooklyn Jul 17, 2026
703088b
fix(deploy): close codex task-5 review round 3 — 3 self-host prefligh…
Brooooooklyn Jul 17, 2026
05dcce5
fix(deploy): close codex round-4 F2a/F2b/F5 — authoritative empty gat…
Brooooooklyn Jul 17, 2026
78d2936
fix(deploy): close codex task-5 round-5 — self-host gate/WARN judge t…
Brooooooklyn Jul 17, 2026
0814002
fix(deploy): close codex task-5 round-6 F1 — JSON-valued wrangler var…
Brooooooklyn Jul 17, 2026
a4ed1a8
fix(deploy): close codex task-5 round-6 F2 — default WARN/GATE covers…
Brooooooklyn Jul 17, 2026
d6922c0
fix(deploy): close codex task-5 round-6 F3 — configured-empty error n…
Brooooooklyn Jul 17, 2026
406923f
test(provision): harden load-flaky provisioner suite — drain watchdog…
Brooooooklyn Jul 17, 2026
06e564f
feat(provision): add checkCloudflareProvisionDrift for the deploy dri…
Brooooooklyn Jul 17, 2026
f8f8354
feat(deploy): implement runCloudflareDeploy — wire the cloudflare bac…
Brooooooklyn Jul 17, 2026
10f96cc
feat(deploy): match runFullDeploy scan-dir expansion for framework SS…
Brooooooklyn Jul 17, 2026
1c259ec
docs(deploy): drop internal review-loop labels from comments
Brooooooklyn Jul 17, 2026
af3b06f
docs(provision): drop internal review-loop labels from comments
Brooooooklyn Jul 17, 2026
cab07f4
docs(test): drop internal review-loop labels from test comments
Brooooooklyn Jul 17, 2026
cebafae
docs(test): drop remaining review-loop labels from test titles/fixtures
Brooooooklyn Jul 17, 2026
17efdfe
docs(deploy): add --backend cloudflare / --provision to deploy help
Brooooooklyn Jul 17, 2026
e9cd0cb
docs(deploy): document the Cloudflare self-host deploy backend
Brooooooklyn Jul 17, 2026
250ce23
refactor(provision): export isRealD1Id for reuse by the deploy orches…
Brooooooklyn Jul 17, 2026
9e846a1
fix(deploy): harden the Cloudflare-backend deploy orchestrator
Brooooooklyn Jul 17, 2026
b365692
refactor(provision): export transport/fence/scrub helpers for deploy …
Brooooooklyn Jul 17, 2026
d52bc7e
fix(deploy): harden the Cloudflare backend against wrangler-implicit …
Brooooooklyn Jul 17, 2026
91e2194
fix(deploy): load the provision lifecycle only inside the Cloudflare …
Brooooooklyn Jul 17, 2026
634c5b2
fix(deploy): settle the app class and pointer before trusting a build
Brooooooklyn Jul 17, 2026
7c18371
fix(deploy): make the Cloudflare backend's migration + secret + uploa…
Brooooooklyn Jul 17, 2026
fa320c3
docs(deploy): narrow the Cloudflare backend to its honest v1 scope
Brooooooklyn Jul 17, 2026
a68c2ba
feat(deploy): narrow --backend cloudflare to full Void apps in v1
Brooooooklyn Jul 18, 2026
c09dc52
fix(deploy): make the remote D1 migration path match its gated set ex…
Brooooooklyn Jul 18, 2026
1dba266
fix(deploy): validate secrets against the build's effective mode + en…
Brooooooklyn Jul 18, 2026
cd2d3cd
fix(deploy): verify the real Better Auth schema, not CREATE TABLE tokens
Brooooooklyn Jul 18, 2026
462bcdb
docs(deploy): narrow the Cloudflare backend scope to full Void apps
Brooooooklyn Jul 18, 2026
9a1947a
fix(deploy): reject SSG (output:static) + websocket/DO apps pre-account
Brooooooklyn Jul 18, 2026
e233103
fix(deploy): reject custom migrations_pattern + enforce wrangler appl…
Brooooooklyn Jul 18, 2026
922c4a2
fix(deploy): validate secrets against the void:env HOOK-TIME envDir, …
Brooooooklyn Jul 18, 2026
993d110
fix(deploy): derive the auth schema in a scrubbed isolated subprocess…
Brooooooklyn Jul 18, 2026
7a641ec
docs(deploy): narrow the Cloudflare backend scope — no websockets/DO,…
Brooooooklyn Jul 18, 2026
c631d6d
fix(deploy): derive the Cloudflare-backend env context in one scrubbe…
Brooooooklyn Jul 18, 2026
66abc54
fix(deploy): reject a present-but-empty D1 migrations_pattern at both…
Brooooooklyn Jul 18, 2026
cdbc789
feat(deploy): validate the real Cloudflare build artifact instead of …
Brooooooklyn Jul 18, 2026
87bc07b
refactor(deploy): drop the pre-build worker-vars facsimile
Brooooooklyn Jul 18, 2026
eda5977
feat(deploy): read the emitted worker vars as ground truth + validate…
Brooooooklyn Jul 18, 2026
5d22dae
feat(deploy): restore the envDir/mode guards and harden the Cloudflar…
Brooooooklyn Jul 18, 2026
bea5f05
fix(deploy): fail closed on a shipped env value the runtime buckets a…
Brooooooklyn Jul 18, 2026
008c87a
fix(deploy): reject a custom envDir by the build's own computation an…
Brooooooklyn Jul 18, 2026
270b777
fix(deploy): report the missing Hyperdrive API token up front instead…
Brooooooklyn Jul 20, 2026
0470833
fix(deploy): reject --skip-build on the Cloudflare backend instead of…
Brooooooklyn Jul 20, 2026
81c6061
feat(deploy): probe queue existence before the build on the drift path
Brooooooklyn Jul 20, 2026
de009ab
fix(deploy): validate queue names on the drift path before the existe…
Brooooooklyn Jul 20, 2026
06142bd
fix(deploy): assert auth constraints, not just names, and reject igno…
Brooooooklyn Jul 20, 2026
0c6a173
docs(auth): scope the managed migration promise to the managed platform
Brooooooklyn Jul 20, 2026
def9391
fix(deploy): reserve the suffix budget when deriving Cloudflare resou…
Brooooooklyn Jul 20, 2026
e2aec76
fix(deploy): compare auth-schema identifiers case-insensitively
Brooooooklyn Jul 20, 2026
61a9d5f
fix(deploy): require auth table ids to be uniquely constrained and ke…
Brooooooklyn Jul 20, 2026
bd91431
fix(deploy): resolve implicit auth foreign keys against the parent's …
Brooooooklyn Jul 20, 2026
76af444
fix(deploy): let SQLite decide foreign-key validity and correct the d…
Brooooooklyn Jul 20, 2026
3e95cc1
fix(deploy): warn on credential-bearing var values and fence a string…
Brooooooklyn Jul 20, 2026
062095d
docs(deploy): record why the schema probe re-imports env.ts
Brooooooklyn Jul 20, 2026
a2d28c0
fix(deploy): detect the rowid alias by index origin and require singl…
Brooooooklyn Jul 20, 2026
e36b49e
test(deploy): describe cloudflare gate tests by behavior
Brooooooklyn Jul 20, 2026
c6b6f00
fix(deploy): pin id-bearing binding identities across the Cloudflare …
Brooooooklyn Jul 20, 2026
eb2feae
fix(deploy): pin the complete root-config id-bearing binding set acro…
Brooooooklyn Jul 21, 2026
5a325a9
fix(deploy): reject pg apps with migrations and pin passthrough bindi…
Brooooooklyn Jul 21, 2026
60a5140
fix(deploy): pin passthrough binding targets, derive the assert-set f…
Brooooooklyn Jul 21, 2026
79e2213
fix(deploy): close upload-config bypasses — pin unsafe/tail-consumers…
Brooooooklyn Jul 21, 2026
9bb19a4
fix(deploy): reject removed tail/unsafe controls, authorize the emitt…
Brooooooklyn Jul 21, 2026
4378b37
fix(deploy): reject dropped/removed bindings, pin routes, reject dest…
Brooooooklyn Jul 21, 2026
5d7360e
fix(deploy): reject dropped id-bindings and queues, and baseline the …
Brooooooklyn Jul 21, 2026
fb720a8
fix(deploy): pin the emitted container application against injection …
Brooooooklyn Jul 21, 2026
f817988
fix(deploy): pin the emitted cron trigger schedules against injection…
Brooooooklyn Jul 21, 2026
8cf1c7c
fix(deploy): pin the secrets-gate worker name and reject a pre-build …
Brooooooklyn Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/guide/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ Void manages Better Auth migrations as part of the normal Void migration flow:
- deploy runs auth migrations together with app migrations
- users do not run a separate Better Auth CLI path

This applies to `void deploy` (the managed platform), which creates the Better Auth
tables at runtime after dispatch. Deploying to your own Cloudflare account with
[`--backend cloudflare`](/integrations/cloudflare) does **not** run that step: there,
your checked-in `db/migrations/*.sql` must already produce the Better Auth schema, and
deploy fails closed if they do not. Define the tables in `db/schema.ts` and run
`void db generate` — Drizzle's `.unique()` and `.references()` are opt-in, and the
constraints are verified too. See [#274](https://github.com/voidzero-dev/void/issues/274).

## Unsupported Modes

Void-managed Better Auth is supported only for Cloudflare Void apps in v1.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ Connect the repository to your project once with `void github connect <project>

## Other Targets

If you prefer to deploy directly to your own Cloudflare account instead of using Void's managed platform, see the [Cloudflare integration guide](../integrations/cloudflare.md).
If you prefer to deploy directly to your own Cloudflare account instead of using Void's managed platform, run `void deploy --backend cloudflare` (add `--provision` on the first deploy to create the D1/KV/R2/Queues/Hyperdrive resources your app needs). This uses your local wrangler auth and root `wrangler.jsonc` -- pin an account (`account_id` or `CLOUDFLARE_ACCOUNT_ID`) and keep real secrets in `wrangler secret put` rather than `.env`. `wrangler login` is enough to authenticate, with one exception: provisioning a **Hyperdrive** config for the first time needs `CLOUDFLARE_API_TOKEN`, because wrangler exposes no machine-readable Hyperdrive list for Void to check against (an already-provisioned Hyperdrive app deploys fine under `wrangler login`). In v1 it deploys **full Void apps on the Cloudflare Workers target** (D1/KV/R2/Queues/Hyperdrive; auth and ISR on D1/SQLite); framework SSR (TanStack Start, React Router, vinext, SvelteKit, Nuxt, Analog, Astro), static/SPA/SSG apps (including `output: "static"`), WebSocket/Durable Object apps (`*.ws.ts`), a custom `migrations_pattern`, `--skip-build`, `node`/`bun`/`deno` targets, and PostgreSQL apps with auth all fail closed with guidance. Auth apps must ship checked-in migrations that produce the Better Auth schema. Provision is a single-operator, dev-machine step and is disabled in CI. See the [Cloudflare integration guide](../integrations/cloudflare.md#deploy-to-your-own-cloudflare-account) for the full walk-through and scope.

To deploy to Node.js, Bun, or Deno instead of Cloudflare, set [`target`](../reference/config.md) in `void.json`. This builds a standalone server you can run anywhere, including Docker, Railway, and Fly.io. These targets do not have access to Void platform features such as D1, KV, R2, built-in auth, Workers AI, or cron scheduling. See the [Node.js, Bun, and Deno guide](../integrations/nodejs-bun-deno.md).
20 changes: 14 additions & 6 deletions docs/guide/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,23 @@ In practice `env.ts` should only import schema helpers from `void/env` and — a

Void uses Vite's standard `.env` convention to populate the schema:

| File | Loaded in dev | Shipped on deploy |
| ----------------------- | ------------- | ------------------ |
| `.env` | yes | yes (`plain_text`) |
| `.env.local` | yes | no |
| `.env.production` | yes | yes (`plain_text`) |
| `.env.production.local` | yes | no |
Whether a file's values ship depends on which deploy path you use:

| File | Loaded in dev | Shipped by `void deploy` | Shipped by `--backend cloudflare` |
| ----------------------- | ------------- | ------------------------ | --------------------------------- |
| `.env` | yes | yes (`plain_text`) | yes (worker `vars`) |
| `.env.local` | yes | no | **yes** (worker `vars`) |
| `.env.production` | yes | yes (`plain_text`) | yes (worker `vars`) |
| `.env.production.local` | yes | no | **yes** (worker `vars`) |

`.local` files are gitignored by convention — use them for secrets you don't want in source control.

::: warning `.local` files are not deploy-excluded on `--backend cloudflare`
Managed `void deploy` reads only `.env` and `.env.production`, so a `.local` file keeps secrets off the platform. The self-host `void deploy --backend cloudflare` path instead runs Vite's production env loading, which reads all four files and bakes them into the worker's `vars` as plaintext. A value that is also `export`ed in the shell with the same value is stripped back out, so this bites hardest in CI, where the variable usually only exists in the file.

On that path, keep real secrets out of every `.env*` file and use `wrangler secret put <NAME>` instead. See [Cloudflare deploy](/integrations/cloudflare).
:::

### Dotenv variable expansion

Values can reference other keys defined in the same (or earlier-precedence) `.env` file using `${VAR}` or `$VAR`:
Expand Down
4 changes: 4 additions & 0 deletions docs/guide/queues.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Void supports Cloudflare Queues for asynchronous message processing from a top-l

Create files in `queues/**/*.ts`; `.mts`, `.js`, and `.mjs` also work. The queue name is inferred from the filename. For example, `queues/emails.ts` creates a queue named `"emails"`, and `queues/order/notifications.ts` creates `"order/notifications"`.

::: warning Nested files produce a name that cannot be deployed
Cloudflare queue names allow only letters, digits and `-`, so a name containing `/` is rejected when the queue is provisioned — on both the managed platform and a self-hosted `--backend cloudflare` deploy. Nested files work in local development, but keep queue files flat (`queues/order-notifications.ts` → `"order-notifications"`) for any app you intend to deploy.
:::

Each queue file should export a default handler wrapped with [`defineQueue`](../reference/api.md#definequeuet-handler). The generic `<T>` parameter defines the message body type. That is the type of each `msg.body` in the batch, and it is also used by the typed `queues` proxy for `send()` calls.

```ts
Expand Down
Loading