void 0.20.3 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/agents-gni4eqBu.mjs +111 -0
- package/dist/auth-3sGB0zJ1.mjs +22 -0
- package/dist/{auth-DPl6kck4.mjs → auth-B9_D6ygs.mjs} +6 -241
- package/dist/auth-CAw7zHqj.mjs +2 -0
- package/dist/auth-client-BWBT8HLp.mjs +6 -0
- package/dist/auth-client-Bawdj38n.d.mts +7 -0
- package/dist/auth-client-react-7GFffu8R.d.mts +7 -0
- package/dist/auth-client-react-CMLwT2xI.mjs +6 -0
- package/dist/auth-client-solid-DyTFL4cq.d.mts +7 -0
- package/dist/auth-client-solid-UoreJWZG.mjs +6 -0
- package/dist/auth-client-svelte-Cv_WvrRk.mjs +6 -0
- package/dist/auth-client-svelte-zetW0KIH.d.mts +7 -0
- package/dist/auth-client-vue-CFk7Xbv3.mjs +6 -0
- package/dist/auth-client-vue-bChShbQP.d.mts +7 -0
- package/dist/{auth-cmd-CzwquNiP.mjs → auth-cmd-g_ymMkUe.mjs} +5 -5
- package/dist/{auth-link-ElDTgF7j.mjs → auth-link-DFvxIyZi.mjs} +5 -5
- package/dist/{better-auth-shared-DSCeohOK.d.mts → better-auth-shared-BoVwA5Vm.d.mts} +1 -6
- package/dist/{better-auth-shared-CYw1T3k4.mjs → better-auth-shared-syGYYmnY.mjs} +1 -1
- package/dist/{build-cmd-BpJe6boP.mjs → build-cmd-wJAv808h.mjs} +6 -4
- package/dist/{cache-D98YTqeE.mjs → cache-Be0Fu5Ka.mjs} +6 -4
- package/dist/{cancel-deploy-CPbEQLMG.mjs → cancel-deploy-BgmyOwhe.mjs} +5 -3
- package/dist/cf-access-rAZxzMkL.mjs +181 -0
- package/dist/cf-build-output-CTdlo6Rt.mjs +520 -0
- package/dist/cli/cf-compat.d.mts +1 -0
- package/dist/cli/cf-compat.mjs +944 -0
- package/dist/cli/cli.mjs +60 -38
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-DAAivdid.mjs +2 -0
- package/dist/{client-BQBrZoCX.mjs → client-PdAJ-F0t.mjs} +6 -12
- package/dist/{cloudflare-auth-6M5llVPC.mjs → cloudflare-auth-BCmTc1X_.mjs} +13 -44
- package/dist/{cloudflare-cmd-4RPGN3KB.mjs → cloudflare-cmd-D6PrKn7o.mjs} +4 -7
- package/dist/{cloudflare-connect-t1UU5svD.mjs → cloudflare-connect-DloREDlc.mjs} +6 -6
- package/dist/cloudflare-operations-BHNJVDbN.mjs +2 -0
- package/dist/{cloudflare-operations-BzWnlC1_.mjs → cloudflare-operations-CPEdHYhM.mjs} +37 -39
- package/dist/cloudflare-user-output-Q-k0QoNQ.mjs +20 -0
- package/dist/collect-DAUItMDS.mjs +2 -0
- package/dist/collect-DXHNWHcT.mjs +48 -0
- package/dist/config--T87TD8T.mjs +2 -0
- package/dist/{config-NOG_U1aK.mjs → config-BSe70f4T.mjs} +4 -6
- package/dist/config-DDIFxQYx.mjs +2 -0
- package/dist/{config-uNGuFsI2.mjs → config-Dxr6cTXn.mjs} +22 -37
- package/dist/config-DywxBLQC.d.mts +185 -0
- package/dist/config-entry.d.mts +6 -0
- package/dist/config-entry.mjs +7 -0
- package/dist/config-uP7ZDtVZ.mjs +21 -0
- package/dist/config-write-y3CBI_ux.mjs +60 -0
- package/dist/{connect-WCQZ_u3m.mjs → connect-LnvW4HKx.mjs} +8 -6
- package/dist/{create-project-D0oXA090.mjs → create-project-BZBl_gQ0.mjs} +8 -23
- package/dist/create-project-JV9-6ICF.mjs +2 -0
- package/dist/database-provider-Cx525bwX.mjs +6 -0
- package/dist/database-provider.mjs +1 -5
- package/dist/{db-DJ-9qs3S.mjs → db-Mzv88E1C.mjs} +48 -44
- package/dist/{delete-BZ4-WaGm.mjs → delete-Ri6JemSU.mjs} +6 -4
- package/dist/deploy-DAH2-m_-.mjs +2 -0
- package/dist/{deploy-BAhhcg5q.mjs → deploy-DEsMVrCY.mjs} +796 -198
- package/dist/discover-BBzDZe_o.mjs +2 -0
- package/dist/{discover-xvfrgJeo.mjs → discover-C4O6YxVS.mjs} +3 -8
- package/dist/{dist-BrsS7cai.mjs → dist-4WkAWhWx.mjs} +1 -15
- package/dist/{dist-m40_XgNh.mjs → dist-Bn8Kodjp.mjs} +1 -1
- package/dist/dist-C5fND3R0.mjs +2 -0
- package/dist/dist-D7-nEOXi.mjs +2 -0
- package/dist/{output-B0cfNSx5.mjs → dist-Dn6nn2IU.mjs} +3 -926
- package/dist/{domain-BxAyhxXN.mjs → domain-BA37Ye7T.mjs} +7 -5
- package/dist/{route-types-Da-DpyUp.mjs → drizzle-Beb2Am5S.mjs} +1 -280
- package/dist/{email-Bj7Cvdwp.mjs → email-C5NsxrQG.mjs} +14 -12
- package/dist/{email-Ce6SQq-i.mjs → email-C5kaZXzJ.mjs} +2 -2
- package/dist/{entry-DU3oDoQ3.mjs → entry-DdRFGK0y.mjs} +2 -2
- package/dist/{env-DBKmK4vc.mjs → env-DX_v-Q-v.mjs} +1 -1
- package/dist/{env-DP_EErve.mjs → env-U_ohASB0.mjs} +9 -7
- package/dist/env-Yz4HcvHs.mjs +78 -0
- package/dist/env-helpers--wFmQ_5Q.mjs +136 -0
- package/dist/{env-types-BNPhro-M.mjs → env-types-CWDtqHgw.mjs} +6 -2
- package/dist/{env-validation-CF6KvTRf.mjs → env-validation-BsFEXps5.mjs} +19 -28
- package/dist/env-validation-DIDGM7h4.mjs +2 -0
- package/dist/fetch-CXDChK7B.mjs +18 -0
- package/dist/fetch-_SeGZao9.d.mts +57 -0
- package/dist/fetch-stream-AOByI7Ki.mjs +81 -0
- package/dist/fetch-stream-Bjf0hoZb.d.mts +49 -0
- package/dist/gen-B87rlalt.mjs +2 -0
- package/dist/{gen-B_wPnVTK.mjs → gen-pg-Ojg8Y.mjs} +13 -11
- package/dist/{generate-RTK8_kK1.mjs → generate-C0VY6RVf.mjs} +2 -2
- package/dist/{github-cmd-C-z_xRrQ.mjs → github-cmd-DsrkweIl.mjs} +6 -4
- package/dist/{handler-D1hLsObx.d.mts → handler-BXJTXd02.d.mts} +6 -1
- package/dist/handler-DghKr6dU.mjs +150 -0
- package/dist/head-D_QRR5Yd.mjs +112 -0
- package/dist/head-client-DzmJGN4C.mjs +90 -0
- package/dist/{headers-BAHwgHdW.mjs → headers-B_HBMgi0.mjs} +2 -2
- package/dist/help-B403BLBB.mjs +2 -0
- package/dist/{help-CwOX-zmI.mjs → help-sBhFH6pi.mjs} +17 -12
- package/dist/index.d.mts +2 -20
- package/dist/index.mjs +116 -60
- package/dist/{init-BGktCXgA.mjs → init-C--Yyj1b.mjs} +49 -50
- package/dist/{link-D2kbqhWb.mjs → link-BC-mNG9-.mjs} +7 -5
- package/dist/{list-CvkK_G7k.mjs → list-DHU1Wj6c.mjs} +7 -5
- package/dist/live-CB1y5IuC.mjs +411 -0
- package/dist/live-CKiJilLr.d.mts +105 -0
- package/dist/local-d1-DzykTWY8.mjs +104 -0
- package/dist/login-BwiopVdg.mjs +2 -0
- package/dist/{login-WIjNc77c.mjs → login-jKe_0QZL.mjs} +6 -11
- package/dist/{logs-dLUFCapG.mjs → logs-BG11f5PR.mjs} +6 -4
- package/dist/migrate-BV8qHiCb.mjs +285 -0
- package/dist/migrate-BXY3B3m7.mjs +2 -0
- package/dist/migration-handler-DM4clYj5.d.mts +51 -0
- package/dist/{neon-DHwd2zvC.mjs → neon-n74ta1Pr.mjs} +1 -1
- package/dist/{node-Ez5KW5rn.mjs → node-Cupyf7-s.mjs} +6 -6
- package/dist/{operator-auth-B3e08unv.mjs → operator-auth-BkVgJqv-.mjs} +2 -2
- package/dist/{operator-client-LUZnlnYk.mjs → operator-client-A0iex2yi.mjs} +2 -1
- package/dist/{operator-cmd-CKJ7xIRs.mjs → operator-cmd-BwAS2XZt.mjs} +6 -6
- package/dist/output-CCH48AMM.mjs +146 -0
- package/dist/{package-json-CPoWX79C.mjs → package-json-iCbMg5XF.mjs} +1 -1
- package/dist/pages/client.d.mts +5 -2
- package/dist/pages/client.mjs +5 -3
- package/dist/pages/head-client.mjs +1 -89
- package/dist/pages/head.mjs +1 -111
- package/dist/pages/index.d.mts +2 -3
- package/dist/pages/index.mjs +7 -7
- package/dist/pages/islands-plugin.mjs +2 -2
- package/dist/pages/prefetch.d.mts +2 -30
- package/dist/pages/prefetch.mjs +1 -89
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +3 -3
- package/dist/pages/serialize.d.mts +2 -9
- package/dist/pages/serialize.mjs +1 -13
- package/dist/plan-BEZ8VJW0.mjs +256 -0
- package/dist/plan-DpuOr14e.mjs +2 -0
- package/dist/{platform-auth-config-CdVWRRJr.mjs → platform-auth-config-C-hv-_Ok.mjs} +6 -6
- package/dist/{platform-auth-protection-Drl0qhrn.mjs → platform-auth-protection-DjTE5Hj-.mjs} +7 -5
- package/dist/{platform-auth-recovery-CmKEWpDo.mjs → platform-auth-recovery-Cr0r8TEb.mjs} +6 -5
- package/dist/{platform-cmd-5q_k56xS.mjs → platform-cmd-0tEh2ZtA.mjs} +8 -5
- package/dist/platform-cmd-DE6dw45v.mjs +2 -0
- package/dist/{platform-domain-4GiDlcqx.mjs → platform-domain-B_7x6Iqx.mjs} +4 -3
- package/dist/platform-lifecycle-Dhx9Pnub.mjs +2 -0
- package/dist/{platform-lifecycle-R9xAxvtG.mjs → platform-lifecycle-Di0LbhPM.mjs} +208 -37
- package/dist/platform-management-B9LUtMt9.mjs +2 -0
- package/dist/{platform-management-BfWsXHEW.mjs → platform-management-eaiaU3uM.mjs} +8 -5
- package/dist/{platform-recovery-CbK-I1FB.mjs → platform-recovery-BxfA8E5C.mjs} +3 -3
- package/dist/platform-registry-BJbgZLS1.mjs +431 -0
- package/dist/{plugin-inference-BDRfZngg.mjs → plugin-inference-DsvtJLll.mjs} +4 -4
- package/dist/prefetch-Bsc_Pb6c.mjs +90 -0
- package/dist/prefetch-Ce6la4EI.d.mts +31 -0
- package/dist/prepare-D4CkM3_v.mjs +2 -0
- package/dist/{prepare-blNRQvQl.mjs → prepare-_T-Haxrr.mjs} +3 -2
- package/dist/{prepare-CtDJjoOj.mjs → prepare-pcWcxSCh.mjs} +13 -11
- package/dist/prerender-render-Cf_WDE9W.mjs +111 -0
- package/dist/prerender-render.mjs +1 -110
- package/dist/{preset-lAy0B0BQ.mjs → preset-Dowh9tTt.mjs} +16 -118
- package/dist/project-BEBFDFLz.mjs +2 -0
- package/dist/project-CWNIPoXc.mjs +209 -0
- package/dist/{project-cmd-CTdmnzvc.mjs → project-cmd-DrnRJdep.mjs} +18 -16
- package/dist/{project-paths-SK8nMHPp.mjs → project-paths-CKQ-Q5JS.mjs} +47 -14
- package/dist/project-slug-23TpquG4.mjs +8 -0
- package/dist/project-slug-DofjTFd-.mjs +2 -0
- package/dist/{project-team-CGxsQe3_.mjs → project-team-CzRbO_kA.mjs} +6 -4
- package/dist/{project-token-Cirx7uwZ.mjs → project-token-Bwxjf4y6.mjs} +6 -4
- package/dist/{project-tsconfig-Ql2XsSQp.mjs → project-tsconfig-CwfqUnVp.mjs} +2 -2
- package/dist/{protocol-C-pqYJjE.d.mts → protocol-ZH3jP4a7.d.mts} +1 -1
- package/dist/providers-BNKRacMr.d.mts +7 -0
- package/dist/provision-CNgEBkVA.mjs +3 -0
- package/dist/{provision-CSJOjjQk.mjs → provision-Cck2m3jJ.mjs} +11 -25
- package/dist/queues-BWKt1Xo4.d.mts +7 -0
- package/dist/{requests-4Nq59hOr.mjs → requests-DwrqUQZ8.mjs} +5 -3
- package/dist/resolve-project-BTotl8Nn.mjs +2 -0
- package/dist/{resolve-project--Vxawf7z.mjs → resolve-project-Xvis70DG.mjs} +2 -8
- package/dist/response-Tn7rU0MV.mjs +30 -0
- package/dist/{rollback-Dr7u0Ljx.mjs → rollback-B4tFWmkN.mjs} +6 -4
- package/dist/{rolldown-runtime-rQ84J-ij.mjs → rolldown-runtime-DXIUcv95.mjs} +1 -10
- package/dist/route-types-Id82-veQ.mjs +280 -0
- package/dist/{local-d1-D2I6Ox5F.mjs → runner-BGVsGgkb.mjs} +6 -114
- package/dist/runner-CQs_cDSG.mjs +2 -0
- package/dist/runner-mysql-1o47achK.mjs +2 -0
- package/dist/{runner-mysql-7BPUNGmL.mjs → runner-mysql-BhwMk2Bm.mjs} +2 -9
- package/dist/{runner-pg-BkEza-dX.mjs → runner-pg-CJ_JeGF6.mjs} +2 -9
- package/dist/runner-pg-D7z01mQS.mjs +2 -0
- package/dist/runtime/ai.mjs +1 -1
- package/dist/runtime/auth-client-react.d.mts +2 -6
- package/dist/runtime/auth-client-react.mjs +1 -5
- package/dist/runtime/auth-client-solid.d.mts +2 -6
- package/dist/runtime/auth-client-solid.mjs +1 -5
- package/dist/runtime/auth-client-svelte.d.mts +2 -6
- package/dist/runtime/auth-client-svelte.mjs +1 -5
- package/dist/runtime/auth-client-vue.d.mts +2 -6
- package/dist/runtime/auth-client-vue.mjs +1 -5
- package/dist/runtime/auth-client.d.mts +2 -6
- package/dist/runtime/auth-client.mjs +1 -5
- package/dist/runtime/auth.mjs +1 -21
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.d.mts +3 -3
- package/dist/runtime/client-react.mjs +3 -3
- package/dist/runtime/client-solid.d.mts +3 -3
- package/dist/runtime/client-solid.mjs +3 -3
- package/dist/runtime/client-svelte.d.mts +3 -3
- package/dist/runtime/client-svelte.mjs +3 -3
- package/dist/runtime/client-vue.d.mts +3 -3
- package/dist/runtime/client-vue.mjs +3 -3
- package/dist/runtime/client.d.mts +3 -3
- package/dist/runtime/client.mjs +3 -3
- package/dist/runtime/db.mjs +1 -1
- package/dist/runtime/durable.mjs +1 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/env-helpers.mjs +1 -135
- package/dist/runtime/env-public-client.mjs +1 -1
- package/dist/runtime/env-public.mjs +2 -2
- package/dist/runtime/env.mjs +1 -77
- package/dist/runtime/fetch-stream.d.mts +2 -49
- package/dist/runtime/fetch-stream.mjs +2 -80
- package/dist/runtime/fetch.d.mts +2 -57
- package/dist/runtime/fetch.mjs +2 -17
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -149
- package/dist/runtime/kv.mjs +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +2 -2
- package/dist/runtime/live.d.mts +2 -104
- package/dist/runtime/live.mjs +1 -410
- package/dist/runtime/migration-handler-mysql.d.mts +1 -1
- package/dist/runtime/migration-handler-pg.d.mts +1 -1
- package/dist/runtime/migration-handler.d.mts +2 -50
- package/dist/runtime/queues.d.mts +2 -6
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/response.mjs +1 -29
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/sse.mjs +1 -171
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -71
- package/dist/runtime/ws-server.d.mts +2 -2
- package/dist/runtime/ws-server.mjs +2 -2
- package/dist/runtime/ws.d.mts +2 -121
- package/dist/{scan-CpK-57ug.mjs → scan-DJbooZm2.mjs} +3 -3
- package/dist/{scan-BMH4rzlv.mjs → scan-DdDvRCU1.mjs} +8 -26
- package/dist/{secret-AcPi-FoA.mjs → secret-UtrRjhEO.mjs} +8 -6
- package/dist/serialize-BPvnNQuA.mjs +14 -0
- package/dist/serialize-CfSwWfF2.d.mts +10 -0
- package/dist/{skills-C0RvGjeE.mjs → skills-B-690E7h.mjs} +3 -2
- package/dist/sse-BaC1jXko.mjs +172 -0
- package/dist/{subcommand-prompt-Bmyn5Rlc.mjs → subcommand-prompt-BuGYkAkC.mjs} +2 -1
- package/dist/sveltekit.d.mts +2 -1
- package/dist/sveltekit.mjs +3 -2
- package/dist/validate-DqJ33oHj.mjs +2 -0
- package/dist/validate-qNhV00PD.mjs +180 -0
- package/dist/validator-BTOu0fB0.mjs +72 -0
- package/dist/{wrangler--imS8n0d.mjs → wrangler-D01qs6VB.mjs} +259 -71
- package/dist/ws-BwcqizuH.d.mts +122 -0
- package/dist/{yarn-pnp-DxSInkzL.mjs → yarn-pnp-CVEc3gE7.mjs} +1 -1
- package/package.json +19 -8
- package/skills/void/SKILL.md +6 -4
- package/skills/void/docs/guide/ai.md +3 -3
- package/skills/void/docs/guide/app-types.md +12 -11
- package/skills/void/docs/guide/auth.md +2 -2
- package/skills/void/docs/guide/database/d1.md +1 -1
- package/skills/void/docs/guide/database/mysql.md +1 -1
- package/skills/void/docs/guide/database/postgresql.md +3 -3
- package/skills/void/docs/guide/deployment.md +8 -15
- package/skills/void/docs/guide/durable-state.md +2 -2
- package/skills/void/docs/guide/edge/headers.md +3 -3
- package/skills/void/docs/guide/edge/prerendering.md +1 -1
- package/skills/void/docs/guide/edge/redirects.md +4 -4
- package/skills/void/docs/guide/edge/revalidation.md +6 -6
- package/skills/void/docs/guide/edge/rewrites.md +28 -27
- package/skills/void/docs/guide/edge/static-assets.md +1 -1
- package/skills/void/docs/guide/email.md +60 -66
- package/skills/void/docs/guide/env-migration.md +1 -1
- package/skills/void/docs/guide/index.md +15 -41
- package/skills/void/docs/guide/pages-routing/head.md +1 -1
- package/skills/void/docs/guide/platform/administration/access.md +13 -5
- package/skills/void/docs/guide/platform/administration/projects.md +3 -1
- package/skills/void/docs/guide/platform/installation/ci.md +3 -0
- package/skills/void/docs/guide/platform/installation/credentials.md +15 -5
- package/skills/void/docs/guide/platform/installation/prerequisites.md +2 -0
- package/skills/void/docs/guide/platform/installation/setup.md +1 -1
- package/skills/void/docs/guide/quickstart.md +11 -78
- package/skills/void/docs/guide/remote-dev.md +2 -2
- package/skills/void/docs/guide/sandboxes.md +1 -1
- package/skills/void/docs/guide/ssg.md +1 -1
- package/skills/void/docs/guide/websockets.md +1 -1
- package/skills/void/docs/index.md +17 -17
- package/skills/void/docs/integrations/cloudflare.md +91 -96
- package/skills/void/docs/integrations/frameworks/analog.md +14 -9
- package/skills/void/docs/integrations/frameworks/astro.md +14 -10
- package/skills/void/docs/integrations/frameworks/nuxt.md +14 -9
- package/skills/void/docs/integrations/frameworks/overview.md +35 -29
- package/skills/void/docs/integrations/frameworks/react-router.md +1 -1
- package/skills/void/docs/integrations/frameworks/sveltekit.md +33 -30
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +1 -1
- package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -5
- package/skills/void/docs/reference/api.md +21 -4
- package/skills/void/docs/reference/cli.md +40 -25
- package/skills/void/docs/reference/config.md +58 -35
- package/skills/void/docs/reference/structure.md +2 -2
- package/dist/validate-tBBN_dXH.mjs +0 -505
|
@@ -4,15 +4,11 @@ outline: deep
|
|
|
4
4
|
|
|
5
5
|
# Quickstart
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Use Node.js 24.21.0 or later. New projects pin the SDK's tested Workers
|
|
10
|
-
compatibility date, so the bundled local runtime can start them. An existing
|
|
11
|
-
compatibility date in your project is preserved.
|
|
7
|
+
Create a Void app, run it locally, and deploy it. You can also [add Void to an existing Vite app](#adding-to-an-existing-vite-app). Use Node.js 24.21.0 or later.
|
|
12
8
|
|
|
13
9
|
## Start in an Empty Directory
|
|
14
10
|
|
|
15
|
-
Install Void in
|
|
11
|
+
Install Void in an empty project directory:
|
|
16
12
|
|
|
17
13
|
::: code-group
|
|
18
14
|
|
|
@@ -34,17 +30,7 @@ bun add -D void
|
|
|
34
30
|
|
|
35
31
|
:::
|
|
36
32
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
With pnpm, you can also start with `pnpm create void my-app`; the scaffolder sets
|
|
40
|
-
up the required native build permissions before installing Void. If a manual
|
|
41
|
-
installation reports blocked build scripts, approve `esbuild`, `sharp`, and
|
|
42
|
-
`workerd` with `pnpm approve-builds`. Set `better-sqlite3: false` in
|
|
43
|
-
`pnpm-workspace.yaml`'s `allowBuilds`: Void uses version 13's bundled binaries,
|
|
44
|
-
so it does not need a native rebuild.
|
|
45
|
-
|
|
46
|
-
The setup install updates the pnpm lockfile to match the generated dependencies,
|
|
47
|
-
including when setup runs in CI. Later builds can use `pnpm install --frozen-lockfile`.
|
|
33
|
+
Run setup:
|
|
48
34
|
|
|
49
35
|
::: code-group
|
|
50
36
|
|
|
@@ -66,58 +52,25 @@ bunx void init
|
|
|
66
52
|
|
|
67
53
|
:::
|
|
68
54
|
|
|
69
|
-
Void asks you to choose Vite+ or
|
|
70
|
-
|
|
71
|
-
Setup also asks where you want to deploy. Choose Cloudflare to use your own account, or Void to connect to your team's platform. You can skip this and decide later.
|
|
72
|
-
|
|
73
|
-
<details>
|
|
74
|
-
<summary style="cursor:pointer">
|
|
75
|
-
💡 <b>Notes on <code>void</code> binary usage</b>
|
|
76
|
-
</summary>
|
|
77
|
-
|
|
78
|
-
The docs use `void` for brevity. Because it's installed in your project, run it through your package manager outside package scripts: `npx void`, `pnpm void`, `yarn void`, or `bunx void`.
|
|
55
|
+
Void asks you to choose Vite+ or Vite, a UI framework, a starter, and a deployment target. Vite+ is the default. D1 needs no local database server; choose PostgreSQL or MySQL if you use an external database. You can skip deployment setup and decide later.
|
|
79
56
|
|
|
80
|
-
|
|
57
|
+
With pnpm, you can start with `pnpm create void my-app`. It configures native build permissions before installing Void.
|
|
81
58
|
|
|
82
|
-
|
|
83
|
-
Install `void` locally so the CLI and your app use the same version.
|
|
84
|
-
:::
|
|
59
|
+
If a manual pnpm install reports blocked build scripts, run `pnpm approve-builds` for `esbuild`, `sharp`, and `workerd`. Set `better-sqlite3: false` in `pnpm-workspace.yaml`'s `allowBuilds`; Void uses its bundled binaries. Setup updates the pnpm lockfile, including in CI. Later installs can use `pnpm install --frozen-lockfile`.
|
|
85
60
|
|
|
86
|
-
|
|
61
|
+
The examples below use `void` for brevity. Outside package scripts, run the local binary with `npx void`, `pnpm void`, `yarn void`, or `bunx void`. Keep Void installed in the project so the CLI and app use the same version.
|
|
87
62
|
|
|
88
63
|
## Using with Coding Agents
|
|
89
64
|
|
|
90
|
-
`void init` detects your coding agent and
|
|
91
|
-
|
|
92
|
-
If auto-detection fails, `void init` asks you to choose from a short list (Claude, Cursor, Codex, Gemini CLI, Generic).
|
|
93
|
-
|
|
94
|
-
In agents that support it, use the `/void` skill to load the relevant guidance, then describe the app you want to build. See [Coding Agents](../integrations/agents) for setup details.
|
|
65
|
+
`void init` detects your coding agent and installs its instructions and skills. If detection fails, choose an agent when prompted. In agents that support it, load the `/void` skill and describe the app you want to build. See [Coding Agents](../integrations/agents) for setup details.
|
|
95
66
|
|
|
96
67
|
## Meta Frameworks
|
|
97
68
|
|
|
98
|
-
|
|
69
|
+
Use Void's [Pages routing](./pages-routing/overview) or keep a framework such as TanStack Start, React Router, or SvelteKit. Follow the [framework guides](../integrations/frameworks/overview) for setup.
|
|
99
70
|
|
|
100
71
|
## Adding to an Existing Vite App
|
|
101
72
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
```sh [npm]
|
|
105
|
-
npm install -D void
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
```sh [pnpm]
|
|
109
|
-
pnpm add -D void
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
```sh [yarn]
|
|
113
|
-
yarn add -D void
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
```sh [bun]
|
|
117
|
-
bun add -D void
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
:::
|
|
73
|
+
Install Void using the package manager command [above](#start-in-an-empty-directory).
|
|
121
74
|
|
|
122
75
|
Enable the plugin in `vite.config.ts`:
|
|
123
76
|
|
|
@@ -130,27 +83,7 @@ export default defineConfig({
|
|
|
130
83
|
});
|
|
131
84
|
```
|
|
132
85
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
::: code-group
|
|
136
|
-
|
|
137
|
-
```sh [npm]
|
|
138
|
-
npx void init
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
```sh [pnpm]
|
|
142
|
-
pnpm void init
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
```sh [yarn]
|
|
146
|
-
yarn void init
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
```sh [bun]
|
|
150
|
-
bunx void init
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
:::
|
|
86
|
+
Then run `void init` with your package manager to configure the remaining project files. Existing compatibility dates are preserved; new projects use Void's tested Workers compatibility date.
|
|
154
87
|
|
|
155
88
|
## Once You Have a Working App
|
|
156
89
|
|
|
@@ -17,7 +17,7 @@ Before enabling remote mode, you need:
|
|
|
17
17
|
|
|
18
18
|
## Enabling Remote Mode
|
|
19
19
|
|
|
20
|
-
### In `void.
|
|
20
|
+
### In `void.config.ts` (persistent)
|
|
21
21
|
|
|
22
22
|
```json
|
|
23
23
|
{
|
|
@@ -31,7 +31,7 @@ Before enabling remote mode, you need:
|
|
|
31
31
|
VOID_REMOTE=1 vite dev
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
`VOID_REMOTE=0` disables remote mode even if `void.
|
|
34
|
+
`VOID_REMOTE=0` disables remote mode even if `void.config.ts` has `"remote": true`.
|
|
35
35
|
|
|
36
36
|
## Supported Bindings
|
|
37
37
|
|
|
@@ -25,7 +25,7 @@ Importing from `void/sandbox` enables the required Sandbox resources. Native Clo
|
|
|
25
25
|
|
|
26
26
|
Most apps do not need config. The default binding is `SANDBOX`, the Durable Object class is `Sandbox`, and local development, native Cloudflare deploys, and Void Platform all use the published image matching the installed `@cloudflare/sandbox` version.
|
|
27
27
|
|
|
28
|
-
Use `void.
|
|
28
|
+
Use `void.config.ts` when you need a custom image or container size:
|
|
29
29
|
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
@@ -196,6 +196,6 @@ Each socket connects to one route instance. Applications that need to switch roo
|
|
|
196
196
|
|
|
197
197
|
## Deployment
|
|
198
198
|
|
|
199
|
-
`void deploy --platform cloudflare` persists the required binding and append-only SQLite class migration in `
|
|
199
|
+
`void deploy --platform cloudflare` persists the required binding and append-only SQLite class migration in `void.lock.json`, then deploys the generated Worker directly to your account. Commit this migration history and never delete or reorder a step after deployment.
|
|
200
200
|
|
|
201
201
|
`void deploy --platform void` uses the same shared migration planner in the hosted uploader. Existing hosted WebSocket classes created on legacy storage remain there; only genuinely new classes use SQLite.
|
|
@@ -3,9 +3,9 @@ layout: home
|
|
|
3
3
|
theme: dark
|
|
4
4
|
|
|
5
5
|
hero:
|
|
6
|
-
name: Void
|
|
7
|
-
text:
|
|
8
|
-
tagline:
|
|
6
|
+
name: Void
|
|
7
|
+
text: Full-stack apps with Vite
|
|
8
|
+
tagline: Add server routes, data, and Cloudflare resources to your app. Deploy with one command.
|
|
9
9
|
actions:
|
|
10
10
|
- theme: brand
|
|
11
11
|
text: Get Started
|
|
@@ -16,26 +16,26 @@ hero:
|
|
|
16
16
|
|
|
17
17
|
features:
|
|
18
18
|
- iconify: lucide:terminal
|
|
19
|
-
title: One Command
|
|
20
|
-
details: '`void deploy` builds your app,
|
|
19
|
+
title: Deploy with One Command
|
|
20
|
+
details: '`void deploy` builds your app, provisions resources, applies migrations, and deploys it.'
|
|
21
21
|
- iconify: lucide:layers
|
|
22
|
-
title:
|
|
23
|
-
details:
|
|
22
|
+
title: Full-Stack Features
|
|
23
|
+
details: Use a database, KV, object storage, AI, authentication, queues, and cron jobs as your app needs them.
|
|
24
24
|
- iconify: lucide:wand-sparkles
|
|
25
|
-
title:
|
|
26
|
-
details: Void detects supported resources from your
|
|
25
|
+
title: Resources from Your Code
|
|
26
|
+
details: Void detects supported resources from your imports and provisions them on deploy. Configure existing resources explicitly.
|
|
27
27
|
- iconify: lucide:shield-check
|
|
28
|
-
title:
|
|
29
|
-
details:
|
|
28
|
+
title: Deploy with Confidence
|
|
29
|
+
details: Run on Cloudflare Workers with checked migrations, versioned deployments, logs, and rollback.
|
|
30
30
|
- iconify: lucide:blocks
|
|
31
|
-
title: Your Framework
|
|
32
|
-
details: React, Vue, Svelte, Solid, Vite
|
|
31
|
+
title: Choose Your Framework
|
|
32
|
+
details: Use React, Vue, Svelte, Solid, or a supported Vite framework with SSR, SSG, ISR, and islands.
|
|
33
33
|
- iconify: lucide:bot
|
|
34
|
-
title:
|
|
35
|
-
details:
|
|
34
|
+
title: Work with Coding Agents
|
|
35
|
+
details: Void provides project instructions and skills to help coding agents build and deploy your app.
|
|
36
36
|
|
|
37
|
-
footer_heading: Deploy
|
|
38
|
-
footer_subheading:
|
|
37
|
+
footer_heading: Build with Vite. Deploy with Void.
|
|
38
|
+
footer_subheading: Server code, resources, and deployment in one workflow.
|
|
39
39
|
---
|
|
40
40
|
|
|
41
41
|
<script setup>
|
|
@@ -4,11 +4,11 @@ outline: deep
|
|
|
4
4
|
|
|
5
5
|
# Cloudflare
|
|
6
6
|
|
|
7
|
-
Void runs on Cloudflare Workers.
|
|
7
|
+
Void runs on Cloudflare Workers. Use this guide to access bindings, configure your Worker, and deploy to your own account.
|
|
8
8
|
|
|
9
9
|
## Bindings
|
|
10
10
|
|
|
11
|
-
Void
|
|
11
|
+
Void detects supported resource use in your source and provisions the corresponding bindings. How you access them depends on your framework.
|
|
12
12
|
|
|
13
13
|
### Via Hono context (`c.env`)
|
|
14
14
|
|
|
@@ -94,14 +94,16 @@ This augments the `Cloudflare.Env` interface with `DB`, `KV`, `STORAGE`, `AI`, a
|
|
|
94
94
|
| `QUEUE_*` | `Queue<T>` | `defineQueue()` or `import { queues } from "void/queues"` |
|
|
95
95
|
| filename-derived | `DurableObjectNamespace` | module in `durable-objects/` |
|
|
96
96
|
|
|
97
|
-
Bindings are [inferred automatically](../reference/resource-inference.md) by scanning your source files for import and access patterns. You can also set them explicitly in `void.
|
|
97
|
+
Bindings are [inferred automatically](../reference/resource-inference.md) by scanning your source files for import and access patterns. You can also set them explicitly in `void.config.ts`:
|
|
98
98
|
|
|
99
|
-
```
|
|
100
|
-
{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
99
|
+
```ts
|
|
100
|
+
import { defineConfig } from 'void/config';
|
|
101
|
+
|
|
102
|
+
export default defineConfig({
|
|
103
|
+
inference: {
|
|
104
|
+
bindings: { db: true, kv: true, storage: false, ai: 'MY_AI' },
|
|
105
|
+
},
|
|
106
|
+
});
|
|
105
107
|
```
|
|
106
108
|
|
|
107
109
|
`db`, `kv`, `storage`, and `ai` accept a string to customize the binding name (for example, `"db": "MY_DB"` or `"ai": "MY_AI"`). `email` is a boolean feature switch.
|
|
@@ -110,15 +112,17 @@ See [Configuration](../reference/config.md) for details.
|
|
|
110
112
|
|
|
111
113
|
### Cloudflare configuration passthrough
|
|
112
114
|
|
|
113
|
-
You can set non-binding Cloudflare fields like `compatibility_date` and `compatibility_flags` in `void.
|
|
115
|
+
You can set non-binding Cloudflare fields like `compatibility_date` and `compatibility_flags` in `void.config.ts`:
|
|
114
116
|
|
|
115
|
-
```
|
|
116
|
-
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
```ts
|
|
118
|
+
import { defineConfig } from 'void/config';
|
|
119
|
+
|
|
120
|
+
export default defineConfig({
|
|
121
|
+
worker: {
|
|
122
|
+
compatibility_date: '2026-02-24',
|
|
123
|
+
compatibility_flags: ['nodejs_compat'],
|
|
124
|
+
},
|
|
125
|
+
});
|
|
122
126
|
```
|
|
123
127
|
|
|
124
128
|
For environment variables, declare the schema in `env.ts` and put local values in the single root `.env` file. Void loads `.env` into local development bindings only; it never becomes production configuration:
|
|
@@ -128,71 +132,62 @@ For environment variables, declare the schema in `env.ts` and put local values i
|
|
|
128
132
|
API_URL=https://api.example.com
|
|
129
133
|
```
|
|
130
134
|
|
|
131
|
-
Binding arrays such as `d1_databases`, `kv_namespaces`, and `r2_buckets`
|
|
135
|
+
Binding arrays such as `d1_databases`, `kv_namespaces`, and `r2_buckets` belong in the `cloudflare` field. Void adds inferred bindings that are missing by name and preserves custom bindings with real resource IDs. See [Cloudflare Configuration](#cloudflare-configuration) for details.
|
|
132
136
|
|
|
133
|
-
For non-secret plain-text defaults, you can also set `worker.vars` in `void.
|
|
137
|
+
For non-secret plain-text defaults, you can also set `worker.vars` in `void.config.ts`. Local `.env` values override `worker.vars` during development. Production builds reject any `worker.vars` name that is declared as a server key in `env.ts`; store those values remotely with `void secret put` instead.
|
|
134
138
|
|
|
135
|
-
## Cloudflare
|
|
139
|
+
## Cloudflare Configuration
|
|
136
140
|
|
|
137
|
-
|
|
141
|
+
Set Worker options in `void.config.ts`. Void combines its `cloudflare` settings with resource IDs in `void.lock.json` for development and deployment. `void init` and `void deploy` migrate root `wrangler.jsonc` or `wrangler.json` files from existing apps.
|
|
138
142
|
|
|
139
|
-
|
|
143
|
+
Commit `void.lock.json` when Void records resource IDs or Durable Object migration history.
|
|
140
144
|
|
|
141
145
|
### Void-only mode and Vite-based frameworks
|
|
142
146
|
|
|
143
|
-
In
|
|
147
|
+
In native Void apps, TanStack Start, and React Router, Void manages the Cloudflare Vite plugin. It merges inferred bindings with your `cloudflare` settings:
|
|
144
148
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
4. The merged config is used for both `vite dev` (Miniflare) and `vite build` (output `wrangler.json` in `dist/`).
|
|
149
|
+
- An existing binding with the same name stays unchanged.
|
|
150
|
+
- Missing inferred bindings get local placeholder IDs for development. Deploy replaces them with provisioned IDs.
|
|
151
|
+
- Other `cloudflare` settings, such as routes, services, variables, and compatibility settings, pass through.
|
|
149
152
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
Fields that Void always sets (`main`, `triggers`, `assets`) don't need to be in your Cloudflare config -- they're added programmatically based on your project structure.
|
|
153
|
-
|
|
154
|
-
In this mode, normal inferred bindings are merged purely in memory. Typed state modules in `durable-objects/` are the exception: Void persists their bindings and `new_sqlite_classes` entries to `wrangler.jsonc` because Cloudflare Durable Object migration history must remain append-only across builds. Commit those entries.
|
|
153
|
+
Void sets `main`, `triggers`, and `assets` from your project structure. It also records typed Durable Object bindings and migration history from `durable-objects/` in `void.lock.json`.
|
|
155
154
|
|
|
156
155
|
### Adapter-based frameworks (SvelteKit, Nuxt, Astro)
|
|
157
156
|
|
|
158
|
-
|
|
157
|
+
SvelteKit, Nuxt, and Astro build Workers through their own adapters. Void provides database types, migrations, and binding sync without replacing those adapters.
|
|
159
158
|
|
|
160
|
-
|
|
159
|
+
At dev startup, Void updates the framework's generated Cloudflare config:
|
|
161
160
|
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
- Also ensures the `nodejs_als` compatibility flag is present.
|
|
165
|
-
- The framework adapter then reads this `wrangler.jsonc` normally.
|
|
161
|
+
- It adds missing bindings by name without changing existing ones.
|
|
162
|
+
- It copies `worker.compatibility_date`, when set, and adds the `nodejs_als` compatibility flag.
|
|
166
163
|
|
|
167
|
-
|
|
164
|
+
`void deploy --platform cloudflare` provisions production resources for inferred bindings.
|
|
168
165
|
|
|
169
166
|
### Merge precedence
|
|
170
167
|
|
|
171
|
-
| Source
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
| `void.
|
|
175
|
-
| Void inference
|
|
168
|
+
| Source | Priority | What it controls |
|
|
169
|
+
| ------------------------------- | ----------------------------- | ------------------------------------------------------------------- |
|
|
170
|
+
| `void.config.ts` `cloudflare` | Highest for authored settings | Resource IDs, service bindings, routes, vars, environments |
|
|
171
|
+
| `void.config.ts` `worker` field | Highest for compat | `compatibility_date`, `compatibility_flags`, `vars` |
|
|
172
|
+
| Void inference | Fills gaps only | Adds placeholder bindings for inferred resources not in your config |
|
|
176
173
|
|
|
177
|
-
If no date is found in `void.
|
|
174
|
+
If no date is found in `void.config.ts` or the generated build config, Void records the latest known-good date and uses it for that run.
|
|
178
175
|
|
|
179
176
|
### Example
|
|
180
177
|
|
|
181
|
-
If your code uses `c.env.DB` and `c.env.KV`, and
|
|
178
|
+
If your code uses `c.env.DB` and `c.env.KV`, and `cloudflare` only defines D1:
|
|
182
179
|
|
|
183
|
-
```
|
|
184
|
-
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
],
|
|
193
|
-
|
|
194
|
-
"services": [{ "binding": "API", "service": "my-api-worker" }],
|
|
195
|
-
}
|
|
180
|
+
```ts
|
|
181
|
+
// Inside defineConfig({ ... })
|
|
182
|
+
cloudflare: {
|
|
183
|
+
name: 'my-app',
|
|
184
|
+
d1_databases: [{
|
|
185
|
+
binding: 'DB',
|
|
186
|
+
database_name: 'my-app-db',
|
|
187
|
+
database_id: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
|
|
188
|
+
}],
|
|
189
|
+
services: [{ binding: 'API', service: 'my-api-worker' }],
|
|
190
|
+
},
|
|
196
191
|
```
|
|
197
192
|
|
|
198
193
|
Void sees that `DB` is already configured and leaves it alone (including your real `database_id`), but adds a local placeholder for `KV` since it's missing. The `services` array passes through unchanged.
|
|
@@ -203,7 +198,7 @@ This means `pnpm dev` works out of the box (Miniflare creates local instances of
|
|
|
203
198
|
|
|
204
199
|
After `vite build`, the Cloudflare Vite plugin writes a merged `wrangler.json` to the `dist/` directory. This file contains:
|
|
205
200
|
|
|
206
|
-
- All fields from
|
|
201
|
+
- All `cloudflare` fields from `void.config.ts` (bindings with real IDs, routes, services, vars, environments)
|
|
207
202
|
- Any inferred bindings Void added (local placeholders during development; provisioned IDs during deploy)
|
|
208
203
|
- Fields set by Void (`main`, `assets`, `triggers`)
|
|
209
204
|
|
|
@@ -221,7 +216,7 @@ Choose Cloudflare during `void init`, then deploy:
|
|
|
221
216
|
void deploy
|
|
222
217
|
```
|
|
223
218
|
|
|
224
|
-
Void opens your browser to sign in when needed. If you have access to several accounts, it asks which one to use and
|
|
219
|
+
Void opens your browser to sign in when needed. If you have access to several accounts, it asks which one to use and records the account in `void.lock.json`. Credentials are stored in your operating system's keychain. Press Ctrl+C to cancel login, or manage your session with `void cloudflare login`, `status`, and `logout`.
|
|
225
220
|
|
|
226
221
|
To configure deployment separately from project setup, run `void connect --platform cloudflare`. It uses the same browser login and account selection as `void init`, and saves Cloudflare as the target for subsequent `void deploy` commands.
|
|
227
222
|
|
|
@@ -237,7 +232,7 @@ This deploys directly to your account. You don't need a Void platform connection
|
|
|
237
232
|
|
|
238
233
|
### Deploy an existing Worker
|
|
239
234
|
|
|
240
|
-
This handoff is for the existing source of an app already built with Void and previously deployed directly to Cloudflare. Keep its `wrangler.jsonc` or `wrangler.json
|
|
235
|
+
This handoff is for the existing source of an app already built with Void and previously deployed directly to Cloudflare. Keep its `wrangler.jsonc` or `wrangler.json` for the first deploy; Void migrates it to `void.config.ts` and `void.lock.json` after linking the Worker. Then run:
|
|
241
236
|
|
|
242
237
|
```sh
|
|
243
238
|
void deploy
|
|
@@ -247,20 +242,20 @@ If the project has no deployment destination, Void asks whether to link and depl
|
|
|
247
242
|
|
|
248
243
|
The first handoff preserves resource bindings, production variables, encrypted secrets, event handlers, and existing routes and schedules. It builds the app, checks the uploaded version's bindings and handler set, and verifies readiness before activating it. Void saves `keep_vars: true` in your config so later deployments retain dashboard-only variables too. The active version must also be the latest uploaded version; activate or remove an unpublished candidate in Cloudflare before retrying so secret inheritance has an unambiguous source.
|
|
249
244
|
|
|
250
|
-
Keep this first deployment focused on the existing site. Apart from the explicit ISR cache choice below, new resources, auth setup, runtime features, database migrations, and secret overrides stop the handoff before activation. A later code-only deploy continues to preserve dashboard-managed routes and visibility. Before adding a cron, queue consumer, workflow, or visibility change when those values exist only in the dashboard, add the current `routes`, `workers_dev`, and `preview_urls` values
|
|
245
|
+
Keep this first deployment focused on the existing site. Apart from the explicit ISR cache choice below, new resources, auth setup, runtime features, database migrations, and secret overrides stop the handoff before activation. A later code-only deploy continues to preserve dashboard-managed routes and visibility. Before adding a cron, queue consumer, workflow, or visibility change when those values exist only in the dashboard, add the current `routes`, `workers_dev`, and `preview_urls` values under `cloudflare` in `void.config.ts`. If the build fails, fix it and rerun `void deploy`; Void remembers the destination and checks the existing Worker again.
|
|
251
246
|
|
|
252
|
-
Pages with `prerender = true` (including automatically prerendered Markdown pages) also request ISR caching. When the existing Worker has no cache, Void asks whether to enable it and saves the choice as `routing.isr` in `void.
|
|
247
|
+
Pages with `prerender = true` (including automatically prerendered Markdown pages) also request ISR caching. When the existing Worker has no cache, Void asks whether to enable it and saves the choice as `routing.isr` in `void.config.ts`:
|
|
253
248
|
|
|
254
249
|
- **Yes:** provisions the KV cache and enables ISR in this deployment. The uploaded Worker must retain every existing binding and use exactly the approved cache namespace.
|
|
255
250
|
- **No:** saves `routing.isr: false`. Pages render on each request, and later deployments keep ISR disabled until you change that setting.
|
|
256
251
|
|
|
257
|
-
You can keep your page-level prerender and revalidate exports with either choice. The same saved choice applies to retries, other machines, and CI; completing the handoff does not change it. To choose ahead of time, set `routing.isr` to `true` or `false`. A non-interactive handoff with no saved choice stops with instructions to set it. Existing caches keep their namespace IDs. Commit `void.
|
|
252
|
+
You can keep your page-level prerender and revalidate exports with either choice. The same saved choice applies to retries, other machines, and CI; completing the handoff does not change it. To choose ahead of time, set `routing.isr` to `true` or `false`. A non-interactive handoff with no saved choice stops with instructions to set it. Existing caches keep their namespace IDs. Commit `void.config.ts` and `void.lock.json` when it changes.
|
|
258
253
|
|
|
259
|
-
If linking reports other missing inferred resources, the error lists each binding and why the app needs it. Check that
|
|
254
|
+
If linking reports other missing inferred resources, the error lists each binding and why the app needs it. Check that `cloudflare` in `void.config.ts` uses the existing Worker's binding names and resource IDs, and that `inference.bindings` in `void.config.ts` matches those names. An application KV binding explicitly named `ISR_CACHE` is still required. An existing D1 binding without checked-in migrations can keep its current `migrations_dir`, including an omitted value; linking does not provision a database or change its migration settings. Keep `.void/cloudflare-link.json` when retrying so the handoff checks remain in place.
|
|
260
255
|
|
|
261
256
|
Declining the initial link-and-deploy prompt leaves the project unchanged. Explicit platform choices and existing project links take precedence. In CI, select the destination with `--platform cloudflare` and provide Cloudflare credentials.
|
|
262
257
|
|
|
263
|
-
Direct deployment uses the top-level
|
|
258
|
+
Direct deployment uses the top-level `cloudflare` settings in `void.config.ts`; convert a `wrangler.toml` to JSON/JSONC before linking. Named environments need a separate Void project config. If previews are disabled, include the existing production hostname in your config so Void can check the candidate through it.
|
|
264
259
|
|
|
265
260
|
### What happens during deploy
|
|
266
261
|
|
|
@@ -276,7 +271,7 @@ Void reads your app's configuration and source, then:
|
|
|
276
271
|
|
|
277
272
|
The secret and migration checks need the built Worker, so they happen after provisioning and building. If a check fails, resources may already exist, but Void has not applied remote D1 migrations or uploaded the application Worker.
|
|
278
273
|
|
|
279
|
-
Resource IDs are saved in `
|
|
274
|
+
Resource IDs are saved in `void.lock.json` for the next deploy. Commit the lock so other machines and CI can reuse the same resources. The old `--provision` flag is still accepted, but provisioning is now automatic.
|
|
280
275
|
|
|
281
276
|
Run the first deploy from one machine at a time. The provisioning lock protects a local config file; it cannot coordinate two fresh CI runners, which could create duplicate resources.
|
|
282
277
|
|
|
@@ -284,7 +279,7 @@ Run the first deploy from one machine at a time. The provisioning lock protects
|
|
|
284
279
|
|
|
285
280
|
Set `CLOUDFLARE_API_TOKEN` in your CI secrets. The token needs Workers Scripts: Edit and read access to bound resources, plus edit permission for each product Void needs to provision. Set `CLOUDFLARE_ACCOUNT_ID` if the token can access more than one account.
|
|
286
281
|
|
|
287
|
-
Email setup needs a browser session from `void cloudflare login`, which carries the Email Routing and Email Sending scopes, or a `CLOUDFLARE_API_TOKEN` that also has Email Routing Edit and Email Sending Edit. A Global API Key pair is refused. In CI the email step never prompts: run `void email setup --platform cloudflare` once locally, commit `
|
|
282
|
+
Email setup needs a browser session from `void cloudflare login`, which carries the Email Routing and Email Sending scopes, or a `CLOUDFLARE_API_TOKEN` that also has Email Routing Edit and Email Sending Edit. A Global API Key pair is refused. In CI the email step never prompts: run `void email setup --platform cloudflare` once locally, commit `void.lock.json`, then deploy with `--require-email`.
|
|
288
283
|
|
|
289
284
|
When a Worker has no version preview URL, such as a Worker with Durable Objects, also set `CLOUDFLARE_WORKERS_SUBDOMAIN`. Use the account subdomain, for example `my-team` or `my-team.workers.dev`. Local deploys cache this value in ignored `.void/cloudflare.json` after Cloudflare reports a deployment URL; a fresh CI checkout has no such cache.
|
|
290
285
|
|
|
@@ -304,7 +299,7 @@ If Access blocks a version preview but allows the stable Worker hostname, Void c
|
|
|
304
299
|
|
|
305
300
|
PostgreSQL and MySQL apps need a production `DATABASE_URL` in the deploy process environment. Void uses it for Hyperdrive provisioning and migrations, and never writes it to generated config. PostgreSQL migrations are transactional; MySQL schema changes may partially apply before an error.
|
|
306
301
|
|
|
307
|
-
Creating a Hyperdrive config for the first time also requires `CLOUDFLARE_API_TOKEN` with Hyperdrive edit permission. Void needs the REST API to find existing configurations, and the current provisioning path can't use browser OAuth for that lookup. Alternatively, create the config in the Cloudflare dashboard and add its ID to the `hyperdrive` binding in `
|
|
302
|
+
Creating a Hyperdrive config for the first time also requires `CLOUDFLARE_API_TOKEN` with Hyperdrive edit permission. Void needs the REST API to find existing configurations, and the current provisioning path can't use browser OAuth for that lookup. Alternatively, create the config in the Cloudflare dashboard and add its ID to the `cloudflare.hyperdrive` binding in `void.config.ts`. An app with an existing Hyperdrive binding can deploy through browser login.
|
|
308
303
|
|
|
309
304
|
For auth-enabled apps, run `void db generate` and commit the migrations. Void includes the production Better Auth schema, including renamed tables and plugin tables, and checks it against your migration history during deploy. D1 also gets an in-memory schema check before remote migration. A mismatch stops deployment and asks you to regenerate the SQL.
|
|
310
305
|
|
|
@@ -339,7 +334,7 @@ Void supports Worker apps, static sites, SPAs, known SSGs, `--dir` deploys, and
|
|
|
339
334
|
|
|
340
335
|
Static sites use a small Worker in front of Workers Assets to handle redirects, rewrites, fallbacks, and headers. Hybrid and SSR apps keep their application Worker. A page that opts out of prerendering, a dynamic page without `getPrerenderPaths()`, or another runtime feature keeps the app on a Worker even with `output: "static"`.
|
|
341
336
|
|
|
342
|
-
Native Void applications apply `void.
|
|
337
|
+
Native Void applications apply `void.config.ts` routing rules in their Worker.
|
|
343
338
|
Framework-owned Workers do not yet support those Void redirects, rewrites,
|
|
344
339
|
fallbacks, or headers on the direct target. The CLI rejects such configuration
|
|
345
340
|
before provisioning or building; configure the rules in the framework or its
|
|
@@ -348,15 +343,13 @@ Worker instead. This restriction does not change an explicit asset policy for
|
|
|
348
343
|
|
|
349
344
|
Worker apps support D1, KV, R2, Queues, typed state, PostgreSQL and MySQL through Hyperdrive, auth, WebSockets, AI, cron jobs, and ISR. The main limits are:
|
|
350
345
|
|
|
351
|
-
- **Sandbox needs Workers Paid and Docker.** Importing `void/sandbox` or enabling `sandbox` in `void.
|
|
346
|
+
- **Sandbox needs Workers Paid and Docker.** Importing `void/sandbox` or enabling `sandbox` in `void.config.ts` adds a Container application. Void checks access before provisioning or building. [Enable Workers Paid](https://dash.cloudflare.com/?to=/:account/workers/plans) and sign in again if needed. API tokens need Account / Containers: Edit and Account / Cloudchamber: Edit. See [Containers pricing](https://developers.cloudflare.com/containers/pricing/). Apps without Sandbox skip this check and remain compatible with Workers Free within its quotas.
|
|
352
347
|
- **Worker apps need a fresh build.** `--skip-build` works for existing static, SPA, and SSG output. Worker validation needs the current build's vars and auth schema.
|
|
353
|
-
- **Named Cloudflare environments aren't supported.** Direct commands use the top-level
|
|
348
|
+
- **Named Cloudflare environments aren't supported.** Direct commands use the top-level `cloudflare` settings and reject `CLOUDFLARE_ENV`, `CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH`, and project-local name overrides. Use a separate Void project config per deployment target.
|
|
354
349
|
- **Node.js, Bun, and Deno use a different deployment path.** See their [integration guide](./nodejs-bun-deno.md).
|
|
355
|
-
- **Email is set up on the first deploy, on a zone you own.** Put `email.from` in `void.
|
|
356
|
-
|
|
357
|
-
WebSocket routes and typed state use SQLite-backed Durable Objects. Commit the bindings and `new_sqlite_classes` migration history in `wrangler.jsonc`; don't delete or reorder deployed migration steps. Older hosted classes using `new_classes` keep their existing storage.
|
|
350
|
+
- **Email is set up on the first deploy, on a zone you own.** Put `email.from` in `void.config.ts`; the deploy reads your account, prints a checklist of what it would change, and asks once. See [Your own Cloudflare account](../guide/email.md#your-own-cloudflare-account). Outside Void's reach: `email/_default.ts` and dynamic local parts (`email/[user].ts`) need a catch-all, which exists only on a zone apex, so on a mail subdomain they get no rule; a mail domain that already has non-Cloudflare MX records is refused, never routed over; `sendEmail()` to arbitrary recipients needs Workers Paid (Email Sending onboarding), otherwise verified destinations only; Void owns the top-level `addresses` array in the generated Cloudflare config, so hand-written `cloudflare.addresses` entries skip the email step; and `void email usage`, `logs`, `allow`, and `destinations` are platform-only.
|
|
358
351
|
|
|
359
|
-
|
|
352
|
+
WebSocket routes and typed state use SQLite-backed Durable Objects. Commit `void.lock.json` when Void adds bindings or `new_sqlite_classes` migration history; don't delete or reorder deployed migration steps. Older hosted classes using `new_classes` keep their existing storage.
|
|
360
353
|
|
|
361
354
|
ISR uses the shared cache protocol. Entries are scoped to a deployment and hostname, and `routing.revalidateQueryAllowlist` adds bounded query variants. `revalidate()` purges matching entries and variants from KV and the local edge cache. See [ISR](#isr-self-host) below for cache behavior across regions.
|
|
362
355
|
|
|
@@ -378,22 +371,23 @@ These checks detect changes to the deployment target or uploader, but they don't
|
|
|
378
371
|
|
|
379
372
|
### Local development
|
|
380
373
|
|
|
381
|
-
`pnpm dev` continues to work as before -- Miniflare creates local instances of all bindings regardless of the IDs in
|
|
374
|
+
`pnpm dev` continues to work as before -- Miniflare creates local instances of all bindings regardless of the IDs in `void.config.ts`. Your real resource IDs are only used during direct Cloudflare deployment.
|
|
382
375
|
|
|
383
376
|
### AI on your Cloudflare account {#ai-self-host}
|
|
384
377
|
|
|
385
378
|
`void/ai` works on your own Cloudflare account, along two paths:
|
|
386
379
|
|
|
387
|
-
- **Workers AI** (`ai.run`, `ai.stream`, `ai.image`) works out of the box. When your app imports `void/ai`, `vite build` infers that you need AI and adds a Workers AI binding (`env.AI`) to the generated
|
|
388
|
-
- **Provider models** (`ai.provider("openai").fetch(...)`) route through _your own_ Cloudflare AI Gateway. Set its id in `void.
|
|
380
|
+
- **Workers AI** (`ai.run`, `ai.stream`, `ai.image`) works out of the box. When your app imports `void/ai`, `vite build` infers that you need AI and adds a Workers AI binding (`env.AI`) to the generated build config automatically. Set `inference.bindings.ai` to a string to use a custom name.
|
|
381
|
+
- **Provider models** (`ai.provider("openai").fetch(...)`) route through _your own_ Cloudflare AI Gateway. Set its id in `void.config.ts` and add the provider's API key as a Worker secret.
|
|
389
382
|
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
383
|
+
```ts
|
|
384
|
+
import { defineConfig } from 'void/config';
|
|
385
|
+
|
|
386
|
+
export default defineConfig({
|
|
387
|
+
ai: {
|
|
388
|
+
gateway: 'my-gateway', // an AI Gateway in your Cloudflare account
|
|
395
389
|
},
|
|
396
|
-
}
|
|
390
|
+
});
|
|
397
391
|
```
|
|
398
392
|
|
|
399
393
|
```bash
|
|
@@ -408,7 +402,7 @@ import { ai } from 'void/ai';
|
|
|
408
402
|
|
|
409
403
|
export const POST = defineHandler(async (c) => {
|
|
410
404
|
// Workers AI -- uses the inferred or configured AI binding directly
|
|
411
|
-
const summary = await ai.run('@cf/meta/llama-3.
|
|
405
|
+
const summary = await ai.run('@cf/meta/llama-3.3-70b-instruct-fp8-fast', {
|
|
412
406
|
prompt: 'Summarize the changelog.',
|
|
413
407
|
});
|
|
414
408
|
|
|
@@ -428,22 +422,23 @@ Set `ai.gateway` before calling `ai.provider().fetch()`; otherwise it returns `5
|
|
|
428
422
|
Notes:
|
|
429
423
|
|
|
430
424
|
- **Account-owned usage.** Direct deployments use your own [Cloudflare AI Gateway analytics](https://developers.cloudflare.com/ai-gateway/). A team platform meters requests through its shared proxy; those usage records do not automatically bill application developers.
|
|
431
|
-
- **Custom AI binding names are supported.**
|
|
425
|
+
- **Custom AI binding names are supported.** Set `inference.bindings.ai` to `MY_AI`, or declare `cloudflare.ai.binding` in `void.config.ts`; the generated worker records the resolved name for `void/ai` automatically.
|
|
432
426
|
- **Workers AI runs remotely during development.** After `void connect --platform cloudflare`, an app importing `void/ai` uses your account's remote AI binding with your Cloudflare login or API token. Development and preview calls consume that account's allowance. Apps without AI imports add no AI binding or authentication probe.
|
|
433
427
|
|
|
434
428
|
### ISR on your Cloudflare account {#isr-self-host}
|
|
435
429
|
|
|
436
|
-
[Revalidation (ISR)](../guide/edge/revalidation.md) works self-hosted. `void deploy --platform cloudflare` automatically creates or reuses the cache KV namespace and
|
|
430
|
+
[Revalidation (ISR)](../guide/edge/revalidation.md) works self-hosted. `void deploy --platform cloudflare` automatically creates or reuses the cache KV namespace and records its `ISR_CACHE` binding in `void.lock.json`, just like the other inferred resources.
|
|
437
431
|
|
|
438
|
-
Configure revalidation exactly as on the platform -- globally or per-path in `void.
|
|
432
|
+
Configure revalidation exactly as on the platform -- globally or per-path in `void.config.ts`:
|
|
439
433
|
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
434
|
+
```ts
|
|
435
|
+
import { defineConfig } from 'void/config';
|
|
436
|
+
|
|
437
|
+
export default defineConfig({
|
|
438
|
+
routing: {
|
|
439
|
+
revalidate: { '/blog/*': 3600, '*': 60 },
|
|
445
440
|
},
|
|
446
|
-
}
|
|
441
|
+
});
|
|
447
442
|
```
|
|
448
443
|
|
|
449
444
|
...or per page with an exported `revalidate` literal in a `.server.ts` companion (Pages mode):
|