void 0.21.9 → 0.23.0
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 +5 -1
- package/dist/{account-cmd-DZZGK80W.mjs → account-cmd-C84Ee8cO.mjs} +5 -5
- package/dist/{scan-ClYmX3sa.mjs → application-analysis-BVsVqc11.mjs} +135 -18
- package/dist/application-routing-B7QEjqSR.mjs +27 -0
- package/dist/{auth-CZuiVsFh.mjs → auth-CCjt0hcq.mjs} +1 -1
- package/dist/{auth-DLNN0D3Z.mjs → auth-CSkdO2Bb.mjs} +4 -47
- package/dist/{auth-link-B_CeugBw.mjs → auth-link-CioEg6uY.mjs} +5 -5
- package/dist/{auth-router-BgEFRuvZ.mjs → auth-router-BsR981d4.mjs} +5 -5
- package/dist/{better-auth-shared-rsBGBvWJ.mjs → better-auth-shared-hy6RPh9W.mjs} +13 -2
- package/dist/{build-cmd-Dpt0jd-x.mjs → build-cmd-LzvNJORH.mjs} +19 -7
- package/dist/{cache-7_UeZdTk.mjs → cache-C4MvnrMH.mjs} +4 -4
- package/dist/{cancel-deploy-D23R1RXT.mjs → cancel-deploy-abUxpP2n.mjs} +4 -4
- package/dist/{cf-build-output-CGT03qCD.mjs → cf-build-output-BPqOT964.mjs} +141 -63
- package/dist/cf-build-output-_0HNWysu.mjs +2 -0
- package/dist/cli/cli.mjs +114 -460
- package/dist/cli/cloudflare-operation-process.mjs +1103 -0
- package/dist/cli/env-schema-probe.d.mts +2 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/client-Cu7jWiF1.mjs +2 -0
- package/dist/{client-QTl6ko_D.mjs → client-RV8NVeB8.mjs} +165 -21
- package/dist/{cloudflare-auth-C4_GPZr0.mjs → cloudflare-auth-Qdc7tw8F.mjs} +41 -43
- package/dist/{cloudflare-cmd-bSmZ1d5L.mjs → cloudflare-cmd-BcrVyTmJ.mjs} +9 -10
- package/dist/cloudflare-config-Bktvwtpf.mjs +182 -0
- package/dist/{cloudflare-connect-jAwacxxP.mjs → cloudflare-connect-B8uPZ4nx.mjs} +4 -4
- package/dist/{cloudflare-operations-BipGMJ5O.mjs → cloudflare-operations-AiWashgg.mjs} +1 -1
- package/dist/{cloudflare-operations-sMZXpk_S.mjs → cloudflare-operations-fxHb-byx.mjs} +118 -203
- package/dist/{preset-UHj9ARyP.mjs → cloudflare-process-B-wekeR6.mjs} +93 -6
- package/dist/{config-CF69HgXc.d.mts → config-BMHb8RCj.d.mts} +2 -2
- package/dist/{config-CafTW6Cz.mjs → config-Br_JZD6u.mjs} +2 -7
- package/dist/config-C_XRIPx2.mjs +89 -0
- package/dist/{config-s7Xj7tPb.mjs → config-CyQ-wVd7.mjs} +1 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-write-BSduPMY8.mjs → config-write-B1f88wJA.mjs} +1 -1
- package/dist/{connect-BsUSRzln.mjs → connect-Bd4kJd9U.mjs} +6 -6
- package/dist/{create-project-BniEV0OW.mjs → create-project-Boczwj5r.mjs} +1 -1
- package/dist/{create-project-DBfFSZKY.mjs → create-project-bMf6ffLZ.mjs} +9 -5
- package/dist/{db-hRrvZaq_.mjs → db-8uG64XLl.mjs} +26 -26
- package/dist/{delete-D6dZ9B6B.mjs → delete-NvbiyeJf.mjs} +4 -4
- package/dist/{deploy-WaAQez1O.mjs → deploy-DzAIwqNU.mjs} +944 -607
- package/dist/{deploy-DDz7c8LK.mjs → deploy-bjXdFCtn.mjs} +1 -1
- package/dist/{dist-BR1quN_w.mjs → dist-AoCzRTJE.mjs} +226 -60
- package/dist/{dist-C5fND3R0.mjs → dist-BuDuKZJv.mjs} +1 -1
- package/dist/{dist-Dn6nn2IU.mjs → dist-CTBk70IR.mjs} +42 -42
- package/dist/{domain-Dmhvb2oU.mjs → domain-y5Tvydvo.mjs} +5 -5
- package/dist/{email-DFi-s2t4.mjs → email-B3umsW75.mjs} +15 -30
- package/dist/{env-Csi-tMbT.mjs → env-BS6qYHDb.mjs} +6 -6
- package/dist/{env-public-D_6u46fX.d.mts → env-public-BX_r8HR6.d.mts} +2 -1
- package/dist/{env-validation-BB4GkLxn.mjs → env-validation-BPn7vk-V.mjs} +18 -71
- package/dist/{env-validation-BXge7uyK.mjs → env-validation-DbTg7-ar.mjs} +1 -1
- package/dist/{fetch-CXDChK7B.mjs → fetch-BIZJh7vR.mjs} +2 -2
- package/dist/{fetch-stream-AOByI7Ki.mjs → fetch-stream-IvCYKyQL.mjs} +24 -4
- package/dist/{gen-Dz3X1Qab.mjs → gen-B580--vC.mjs} +5 -5
- package/dist/gen-BVaUUumi.mjs +2 -0
- package/dist/{github-cmd-BED3_9JD.mjs → github-cmd-v45BdfKX.mjs} +6 -8
- package/dist/{handler-BXJTXd02.d.mts → handler-CZ4nAylQ.d.mts} +2 -1
- package/dist/{headers-BOg_velo.mjs → headers-DWi2IXWx.mjs} +1 -1
- package/dist/help-DofyZuY7.mjs +2 -0
- package/dist/{help-DC7gdz7L.mjs → help-daGKjXGk.mjs} +268 -666
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +305 -1490
- package/dist/info-B97bTX9N.mjs +113 -0
- package/dist/{init-WO0JlPx8.mjs → init-Bvy7zrBo.mjs} +51 -20
- package/dist/limits-Bq5LG8Id.d.mts +27 -0
- package/dist/limits-Cjuk2VPm.mjs +68 -0
- package/dist/{link-CsHOinF7.mjs → link-CDqqCjFl.mjs} +5 -5
- package/dist/{list-CDb-4bZ1.mjs → list-CZj0dzKY.mjs} +5 -5
- package/dist/{live-CKiJilLr.d.mts → live-Chw1eIMv.d.mts} +1 -1
- package/dist/{local-d1-CC8sKFGu.mjs → local-d1-2CMnpuW_.mjs} +2 -2
- package/dist/login-DYt_An22.mjs +2 -0
- package/dist/{login-DvqXsfGs.mjs → login-UZKFM_u7.mjs} +5 -5
- package/dist/{logs-BdfiOezj.mjs → logs-CUZ6t9t3.mjs} +5 -5
- package/dist/migrate-8_2u55MD.mjs +2 -0
- package/dist/{migrate-B8KuoYsO.mjs → migrate-DHul7PRV.mjs} +5 -4
- package/dist/{node-BM43oz4G.mjs → node-BkyRWRx8.mjs} +2 -2
- package/dist/operator-args-CLgKGlwU.mjs +690 -0
- package/dist/{operator-cmd-03819ATr.mjs → operator-cmd-DBA6dl0m.mjs} +69 -23
- package/dist/output-Dm_A4Tbv.mjs +81 -0
- package/dist/pages/client.d.mts +34 -2
- package/dist/pages/client.mjs +59 -3
- package/dist/pages/index.d.mts +1 -1
- package/dist/pages/index.mjs +3 -3
- package/dist/pages/islands-plugin.d.mts +16 -6
- package/dist/pages/islands-plugin.mjs +2 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -308
- package/dist/{parse-filename-DioPHiR9.mjs → parse-filename-CUbj-1MP.mjs} +35 -1
- package/dist/{output-CCH48AMM.mjs → picocolors-BTps1_gs.mjs} +2 -76
- package/dist/plan-D1Q5rf-r.mjs +2 -0
- package/dist/plan-NPpwZ_kc.mjs +58 -0
- package/dist/platform-args-BJdRtlLq.mjs +506 -0
- package/dist/platform-args-D3RXyR6h.mjs +2 -0
- package/dist/{platform-auth-config-z92h63q5.mjs → platform-auth-config-B56E9YP1.mjs} +4 -4
- package/dist/{platform-auth-protection-DeE3yr2R.mjs → platform-auth-protection-BDWO_aER.mjs} +3 -3
- package/dist/{platform-auth-recovery-o_340Ixx.mjs → platform-auth-recovery-1gg4CSRe.mjs} +4 -4
- package/dist/{platform-cmd-C4ZV3Vpy.mjs → platform-cmd-Bt-1w6pY.mjs} +1 -1
- package/dist/{platform-cmd-DNl8WosH.mjs → platform-cmd-DMcQStSc.mjs} +26 -5
- package/dist/{platform-domain-CU1JtJkW.mjs → platform-domain-BNkcz0OB.mjs} +36 -9
- package/dist/{platform-lifecycle-Bc047IeT.mjs → platform-lifecycle-9OyBALhH.mjs} +850 -276
- package/dist/{platform-lifecycle-Bs2qx1E3.mjs → platform-lifecycle-BE6C_jxh.mjs} +1 -1
- package/dist/{platform-management-CVpGI9Y5.mjs → platform-management-CjwLVQwN.mjs} +59 -11
- package/dist/{platform-management-C8tt6D8h.mjs → platform-management-CnyTdcWX.mjs} +1 -1
- package/dist/platform-plans-config-BNGKGr4P.mjs +359 -0
- package/dist/{platform-recovery-dvUaptLr.mjs → platform-recovery-D6KSpuFm.mjs} +2 -2
- package/dist/{plugin-inference-BMfKRSqE.mjs → plugin-inference-CXWnn79A.mjs} +174 -64
- package/dist/{prepare-DyZ-Yok5.mjs → prepare-B5Mkic5u.mjs} +3 -3
- package/dist/{prepare-C3kt3Rst.mjs → prepare-DOsL0CC9.mjs} +4 -20
- package/dist/prepare-cgvDMtSb.mjs +2 -0
- package/dist/{project-cmd-B44I8J_W.mjs → project-cmd-CNzrqvBv.mjs} +30 -16
- package/dist/{project-team-BkbYIsXN.mjs → project-team-DQOWPfQT.mjs} +4 -4
- package/dist/{project-token-C8xEEQnB.mjs → project-token-CTDYU0Cc.mjs} +4 -4
- package/dist/project-zero-trust-BNAkW-_0.mjs +63 -0
- package/dist/{protocol-ZH3jP4a7.d.mts → protocol-CjF_iI9X.d.mts} +2 -2
- package/dist/protocol-U7bfjHmA.mjs +331 -0
- package/dist/{provision-DNtrtaVD.mjs → provision-C4ORE7G7.mjs} +1 -1
- package/dist/{provision-BhreDAOS.mjs → provision-CJFgTZY8.mjs} +111 -215
- package/dist/{requests-DFyhBMaf.mjs → requests-MhxYnau8.mjs} +4 -4
- package/dist/resource-name-C7LVpcRm.mjs +11 -0
- package/dist/{rollback-DHHxXZiS.mjs → rollback-CJ6iSDoU.mjs} +5 -5
- package/dist/route-url-CG7U-cRN.mjs +15 -0
- package/dist/{runner-B8wXwWlo.mjs → runner-CXA9Fh8h.mjs} +1 -1
- package/dist/{runner-p-dMs2UN.mjs → runner-Ol0TNjk6.mjs} +2 -2
- package/dist/runtime/ai.d.mts +12 -8
- package/dist/runtime/ai.mjs +84 -17
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/durable.d.mts +3 -1
- package/dist/runtime/durable.mjs +4 -1
- package/dist/runtime/email/testing.mjs +1 -1
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/kv.mjs +0 -1
- package/dist/runtime/limits.d.mts +2 -0
- package/dist/runtime/limits.mjs +2 -0
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +25 -16
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +62 -42
- package/dist/runtime/route-url.d.mts +4 -0
- package/dist/runtime/route-url.mjs +2 -0
- package/dist/runtime/routing.d.mts +180 -0
- package/dist/runtime/routing.mjs +1082 -0
- package/dist/runtime/sandbox-container.d.mts +3 -0
- package/dist/runtime/sandbox-container.mjs +2 -0
- package/dist/runtime/sandbox.d.mts +4 -32
- package/dist/runtime/sandbox.mjs +151 -75
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +4 -2
- package/dist/runtime/ws-server.mjs +27 -2
- package/dist/runtime/ws.d.mts +2 -2
- package/dist/runtime/ws.mjs +8 -6
- package/dist/sandbox-XZAqzFlG.d.mts +52 -0
- package/dist/sandbox-container-Bo0eiFKz.d.mts +73 -0
- package/dist/sandbox-container-C6ItmVuN.mjs +281 -0
- package/dist/{scan-4tfN-PSn.mjs → scan-C7okrLyM.mjs} +4 -35
- package/dist/{secret-DN9sSNiV.mjs → secret-Dli5fP0B.mjs} +6 -6
- package/dist/{skills-O6FUaizK.mjs → skills-D1II1Juz.mjs} +1 -1
- package/dist/{sse-BaC1jXko.mjs → sse-CQNaDFFV.mjs} +6 -3
- package/dist/{subcommand-prompt-BuGYkAkC.mjs → subcommand-prompt-CY1C4fvl.mjs} +2 -2
- package/dist/validate-Dq_L3s0S.mjs +2 -0
- package/dist/{validate-CIUwFpjB.mjs → validate-ctOrgiS3.mjs} +2 -1
- package/dist/{wrangler-BymcxrRa.mjs → wrangler-7K-bW_DL.mjs} +14 -235
- package/dist/{ws-BwcqizuH.d.mts → ws-CL1w7GXU.d.mts} +13 -2
- package/package.json +48 -33
- package/sandbox.Dockerfile +4 -0
- package/schema.json +10 -22
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +34 -157
- package/skills/void/SKILL.md +50 -133
- package/skills/void/docs/guide/ai.md +94 -84
- package/skills/void/docs/guide/app-types.md +3 -32
- package/skills/void/docs/guide/auth.md +12 -116
- package/skills/void/docs/guide/database/d1.md +9 -54
- package/skills/void/docs/guide/database/mysql.md +1 -1
- package/skills/void/docs/guide/database/postgresql.md +5 -26
- package/skills/void/docs/guide/database.md +23 -75
- package/skills/void/docs/guide/deployment.md +27 -113
- package/skills/void/docs/guide/durable-state.md +43 -18
- package/skills/void/docs/guide/edge/headers.md +3 -47
- package/skills/void/docs/guide/edge/prerendering.md +5 -20
- package/skills/void/docs/guide/edge/redirects.md +11 -64
- package/skills/void/docs/guide/edge/revalidation.md +6 -19
- package/skills/void/docs/guide/edge/rewrites.md +56 -284
- package/skills/void/docs/guide/edge/static-assets.md +23 -72
- package/skills/void/docs/guide/email/domains.md +112 -0
- package/skills/void/docs/guide/email/receiving.md +139 -0
- package/skills/void/docs/guide/email/sending.md +231 -0
- package/skills/void/docs/guide/email.md +13 -619
- package/skills/void/docs/guide/env-migration.md +11 -11
- package/skills/void/docs/guide/env-vars.md +9 -29
- package/skills/void/docs/guide/index.md +0 -15
- package/skills/void/docs/guide/jobs.md +3 -18
- package/skills/void/docs/guide/kv.md +5 -11
- package/skills/void/docs/guide/live.md +5 -56
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +78 -125
- package/skills/void/docs/guide/pages-routing/head.md +10 -10
- package/skills/void/docs/guide/pages-routing/islands.md +6 -36
- package/skills/void/docs/guide/pages-routing/layouts.md +6 -128
- package/skills/void/docs/guide/pages-routing/loaders.md +3 -19
- package/skills/void/docs/guide/pages-routing/markdown.md +13 -171
- package/skills/void/docs/guide/pages-routing/overview.md +7 -17
- package/skills/void/docs/guide/pages-routing/view-transitions.md +1 -1
- package/skills/void/docs/guide/platform/administration/access.md +1 -4
- package/skills/void/docs/guide/platform/administration/email.md +35 -8
- package/skills/void/docs/guide/platform/administration/operations.md +26 -4
- package/skills/void/docs/guide/platform/administration/plans.md +126 -0
- package/skills/void/docs/guide/platform/administration/projects.md +5 -2
- package/skills/void/docs/guide/platform/administration/zero-trust.md +189 -0
- package/skills/void/docs/guide/platform/development/local.md +2 -2
- package/skills/void/docs/guide/platform/development/runtime.md +3 -13
- package/skills/void/docs/guide/platform/development/schema-ci.md +0 -58
- package/skills/void/docs/guide/platform/installation/credentials.md +6 -4
- package/skills/void/docs/guide/platform/installation/domains.md +31 -3
- package/skills/void/docs/guide/platform/installation/first-deployment.md +6 -0
- package/skills/void/docs/guide/platform/installation/maintenance.md +3 -1
- package/skills/void/docs/guide/platform/installation/prerequisites.md +21 -16
- package/skills/void/docs/guide/platform/installation/setup.md +9 -5
- package/skills/void/docs/guide/platform/installation/uninstall.md +17 -2
- package/skills/void/docs/guide/platform-administration.md +2 -0
- package/skills/void/docs/guide/queues.md +7 -9
- package/skills/void/docs/guide/quickstart.md +38 -37
- package/skills/void/docs/guide/remote-dev.md +4 -9
- package/skills/void/docs/guide/sandboxes.md +78 -41
- package/skills/void/docs/guide/server-routing.md +9 -72
- package/skills/void/docs/guide/sse.md +4 -18
- package/skills/void/docs/guide/ssg.md +3 -15
- package/skills/void/docs/guide/ssr.md +14 -62
- package/skills/void/docs/guide/storage.md +9 -4
- package/skills/void/docs/guide/type-safety.md +3 -14
- package/skills/void/docs/guide/typed-fetch.md +3 -7
- package/skills/void/docs/guide/websockets.md +68 -40
- package/skills/void/docs/integrations/agents.md +3 -3
- package/skills/void/docs/integrations/cloudflare.md +85 -316
- package/skills/void/docs/integrations/frameworks/analog.md +5 -64
- package/skills/void/docs/integrations/frameworks/astro.md +4 -73
- package/skills/void/docs/integrations/frameworks/nuxt.md +5 -62
- package/skills/void/docs/integrations/frameworks/overview.md +11 -54
- package/skills/void/docs/integrations/frameworks/react-router.md +5 -60
- package/skills/void/docs/integrations/frameworks/sveltekit.md +6 -65
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +4 -62
- package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -69
- package/skills/void/docs/reference/api/auth.md +156 -0
- package/skills/void/docs/reference/api/client.md +87 -0
- package/skills/void/docs/reference/api/database.md +95 -0
- package/skills/void/docs/reference/api/durable.md +46 -0
- package/skills/void/docs/reference/api/env.md +50 -0
- package/skills/void/docs/reference/api/handlers.md +254 -0
- package/skills/void/docs/reference/api/pages.md +241 -0
- package/skills/void/docs/reference/api/plugin.md +39 -0
- package/skills/void/docs/reference/api/resources.md +109 -0
- package/skills/void/docs/reference/api/rewrites.md +76 -0
- package/skills/void/docs/reference/api/types.md +92 -0
- package/skills/void/docs/reference/api.md +56 -1218
- package/skills/void/docs/reference/cli/auth.md +88 -0
- package/skills/void/docs/reference/cli/database.md +128 -0
- package/skills/void/docs/reference/cli/deploy.md +85 -0
- package/skills/void/docs/reference/cli/domains.md +41 -0
- package/skills/void/docs/reference/cli/email.md +129 -0
- package/skills/void/docs/reference/cli/generate.md +116 -0
- package/skills/void/docs/reference/cli/github.md +189 -0
- package/skills/void/docs/reference/cli/platform-config.md +92 -0
- package/skills/void/docs/reference/cli/platform-email.md +81 -0
- package/skills/void/docs/reference/cli/platform-installation.md +127 -0
- package/skills/void/docs/reference/cli/platform-operations.md +90 -0
- package/skills/void/docs/reference/cli/platform-users.md +89 -0
- package/skills/void/docs/reference/cli/platform-zero-trust.md +45 -0
- package/skills/void/docs/reference/cli/platform.md +70 -0
- package/skills/void/docs/reference/cli/project.md +214 -0
- package/skills/void/docs/reference/cli/secrets.md +76 -0
- package/skills/void/docs/reference/cli/setup.md +70 -0
- package/skills/void/docs/reference/cli.md +33 -1621
- package/skills/void/docs/reference/config.md +26 -32
- package/skills/void/docs/reference/resource-inference.md +3 -58
- package/skills/void/docs/reference/structure.md +14 -41
- package/dist/canonical-json-DuDiiUsQ.mjs +0 -13
- package/dist/cli/cf-compat.mjs +0 -968
- package/dist/client-4cDVv7BO.mjs +0 -2
- package/dist/gen-Vnv2f65C.mjs +0 -2
- package/dist/help-DQMfeKMz.mjs +0 -2
- package/dist/login-DFQk7rbW.mjs +0 -2
- package/dist/migrate-TsHGBnDA.mjs +0 -2
- package/dist/plan-BEZ8VJW0.mjs +0 -256
- package/dist/plan-DpuOr14e.mjs +0 -2
- package/dist/prepare-BZXkjdNe.mjs +0 -2
- package/dist/validate-EKmJWxmy.mjs +0 -2
- /package/dist/cli/{cf-compat.d.mts → cloudflare-operation-process.d.mts} +0 -0
|
@@ -21,6 +21,8 @@ void deploy --platform void --project my-first-app
|
|
|
21
21
|
|
|
22
22
|
`void connect` validates the platform and signs you in when needed. Confirm project creation when deploy asks. To use a project that already exists, run `void project link` instead. An app already linked to another platform keeps its existing destination; use a fresh app directory for your first test.
|
|
23
23
|
|
|
24
|
+
Once accepted by the platform, a deployment continues independently of the CLI connection. The CLI reconnects automatically after a connection failure. Use `void project status` to inspect a deployment after closing the CLI, or `void project cancel` to request cancellation.
|
|
25
|
+
|
|
24
26
|
The CLI stores login credentials in your system keychain, separately for each platform URL. With no URL, `void connect` offers Cloudflare or a Void platform; `void connect --platform void` offers saved platforms and an option to enter another URL.
|
|
25
27
|
|
|
26
28
|
For CI, create a bounded, project-scoped deploy credential while signed in as
|
|
@@ -80,3 +82,7 @@ Void shows the proposed access change and asks you to confirm it. Once approved,
|
|
|
80
82
|
To see who can join, run `void platform signup show`. You can also allow an email address or a domain such as `*@example.com`. For an OIDC user without verified email, use `void platform signup allow identity <connection-id> <subject>`; the subject match is exact and the provider's domain or group restrictions still apply. Remove that grant with `void platform signup disallow identity <connection-id> <subject>`. `void platform signup open` permits public signup; `void platform signup restrict` requires an allowlist match again.
|
|
81
83
|
|
|
82
84
|
Your administrator session lasts for one hour. Use it to inspect users, projects, logs, and platform health. The [Platform Administration guide](/guide/platform-administration) walks through those workflows, previews, and automation. You can also open `<API origin>/admin/login` to use the browser admin UI.
|
|
85
|
+
|
|
86
|
+
### Protect Project Hostnames with Zero Trust
|
|
87
|
+
|
|
88
|
+
After installation, an administrator can require Cloudflare Access on new project hostnames while allowing each project owner or project administrator to opt out. This is independent of Access login and protection for the platform API itself, and it needs its own Cloudflare API token. See [Project Zero Trust](/guide/platform/administration/zero-trust) for the requirements, setup command, and recovery.
|
|
@@ -56,6 +56,8 @@ Repair recreates missing infrastructure that the installer owns. It does not res
|
|
|
56
56
|
|
|
57
57
|
### Upgrade the platform
|
|
58
58
|
|
|
59
|
+
Keep the platform runtime current when updating the Void CLI. If a developer's CLI reports that project lookup requires an upgrade, upgrade the platform before retrying.
|
|
60
|
+
|
|
59
61
|
Use the installed CLI's packaged runtime to upgrade:
|
|
60
62
|
|
|
61
63
|
```sh
|
|
@@ -80,7 +82,7 @@ Database migrations only move forward. Void checks compatibility before upgradin
|
|
|
80
82
|
|
|
81
83
|
Upgrades automatically enable managed Sandboxes. The platform runtime token needs Account / Containers: Edit and Account / Cloudchamber: Edit, and the Cloudflare account must use Workers Paid before its first Sandbox application deploy. The upgrade itself does not probe Containers access, so platforms that do not deploy Sandbox applications need no additional plan or permissions.
|
|
82
84
|
|
|
83
|
-
When upgrading from a release that used tenant-owned Sandbox containers, the upgrade may first ask you to finish the legacy cleanup. Follow the [`sandbox-drain` instructions](
|
|
85
|
+
When upgrading from a release that used tenant-owned Sandbox containers, the upgrade may first ask you to finish the legacy cleanup. Follow the [`sandbox-drain` instructions](../../../reference/cli/platform-operations.md#operator-system), then rerun the upgrade. Administrator login remains available during that maintenance step.
|
|
84
86
|
|
|
85
87
|
After a successful upgrade, you can restore a declared-compatible earlier runtime without reversing migrations:
|
|
86
88
|
|
|
@@ -4,11 +4,16 @@ outline: deep
|
|
|
4
4
|
|
|
5
5
|
# Prerequisites
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
To run a Void platform, you need:
|
|
8
|
+
|
|
9
|
+
- A Cloudflare account with Workers for Platforms and R2 enabled.
|
|
10
|
+
- An empty hosted PostgreSQL database.
|
|
11
|
+
- An account with your chosen login provider. GitHub is the default; Google, OIDC, and Cloudflare Access are also supported.
|
|
12
|
+
- A domain for your apps, or `workers.dev` for testing. You can [add a domain later](/guide/platform/installation/domains#adding-a-domain).
|
|
8
13
|
|
|
9
14
|
Void creates the Workers, storage, queues, routing, and database tables through the CLI.
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
Workers for Platforms requires a paid plan. Your database and Cloudflare usage are billed separately.
|
|
12
17
|
|
|
13
18
|
## Prepare Your Cloudflare Account and Domain
|
|
14
19
|
|
|
@@ -31,15 +36,7 @@ pnpm add --global void
|
|
|
31
36
|
void platform install --plan
|
|
32
37
|
```
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
The installer first offers these choices, with the domain option selected:
|
|
37
|
-
|
|
38
|
-
```text
|
|
39
|
-
Where should your apps live?
|
|
40
|
-
Use a domain — recommended
|
|
41
|
-
Use workers.dev for testing — add a domain later
|
|
42
|
-
```
|
|
39
|
+
Sign in to Cloudflare when prompted, then choose an installation name and account. `--plan` previews the resources without changing them or requiring runtime secrets.
|
|
43
40
|
|
|
44
41
|
For a domain installation, use these answers. Testing mode skips the application domain, zone, and catch-all questions:
|
|
45
42
|
|
|
@@ -52,9 +49,9 @@ For a domain installation, use these answers. Testing mode skips the application
|
|
|
52
49
|
| Optional custom API hostname | Leave empty to use `workers.dev` |
|
|
53
50
|
| Dedicate all unmatched traffic to Void? | Yes only if this whole zone belongs to the platform |
|
|
54
51
|
|
|
55
|
-
|
|
52
|
+
Choose an unused installation name in your account. For example, `team` creates resources such as `void-team-api` and `void-team-proxy`.
|
|
56
53
|
|
|
57
|
-
The preview
|
|
54
|
+
The preview includes your login callback URL and links for creating credentials. Keep it open while following [Credentials](/guide/platform/installation/credentials), then run the install command printed at the end.
|
|
58
55
|
|
|
59
56
|
You can select either path directly:
|
|
60
57
|
|
|
@@ -69,11 +66,11 @@ void platform install --workers-dev --plan
|
|
|
69
66
|
|
|
70
67
|
Use an empty PostgreSQL database dedicated to this platform. It stores users, projects, and deployments; individual apps can still use D1. Void creates the tables and the Hyperdrive connection, but does not provision the PostgreSQL server.
|
|
71
68
|
|
|
72
|
-
|
|
69
|
+
Use any PostgreSQL provider that accepts connections from your computer and Cloudflare:
|
|
73
70
|
|
|
74
71
|
1. Create a fresh database or project dedicated to the platform, with no existing application tables. Use a database role that can create and manage its tables and schemas.
|
|
75
72
|
2. Open the provider's connection details and select the primary database. Use a direct connection or a session-mode pooler, not transaction pooling. The connection must work from both your computer and Cloudflare.
|
|
76
|
-
3. Copy the PostgreSQL connection URL, including the password and SSL settings, into your password manager. Paste only the URL—not a surrounding `psql` command—into Void's `PostgreSQL DATABASE_URL` prompt.
|
|
73
|
+
3. Copy the PostgreSQL connection URL, including the password and SSL settings, into your password manager. Paste only the URL—not a surrounding `psql` command—into Void's `PostgreSQL DATABASE_URL` prompt, as the provider gives it, including SSL settings such as `sslmode=verify-full`. A Hyperdrive that Void creates trusts only public certificate authorities, so if your database uses a private certificate authority, use a separately managed Hyperdrive, as described below.
|
|
77
74
|
|
|
78
75
|
| Provider | Connection setup |
|
|
79
76
|
| ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -85,4 +82,12 @@ For a dedicated Supabase project, [disable the Data API](https://supabase.com/do
|
|
|
85
82
|
|
|
86
83
|
Once installation claims the database, continue using that same database for resume and maintenance commands. Uninstall never deletes external PostgreSQL.
|
|
87
84
|
|
|
88
|
-
|
|
85
|
+
### Use an existing Hyperdrive
|
|
86
|
+
|
|
87
|
+
The installer can create Hyperdrive for you or use one you manage separately. For an existing configuration:
|
|
88
|
+
|
|
89
|
+
1. Point it at the dedicated platform database using a runtime user, and disable SQL result caching.
|
|
90
|
+
2. Select it in the installer and confirm the database, host, port, and runtime user.
|
|
91
|
+
3. Supply a database owner connection at the PostgreSQL URL prompt so Void can apply migrations.
|
|
92
|
+
|
|
93
|
+
To create one first, choose **Set up a separately managed Hyperdrive** and follow the printed instructions or [Cloudflare’s setup guide](https://developers.cloudflare.com/hyperdrive/get-started/). Rerun the installer once it is ready. Void leaves its configuration under your control. For unattended setup, use the Hyperdrive variables in [Install from CI](/guide/platform/installation/ci).
|
|
@@ -29,7 +29,7 @@ void platform install
|
|
|
29
29
|
|
|
30
30
|
:::
|
|
31
31
|
|
|
32
|
-
After `--plan`, run the
|
|
32
|
+
After reviewing `--plan`, run the command printed under **Next step: run this command to install**. It carries your choices into installation. Confirm the plan, then follow the credential prompts. Void opens the relevant setup pages and provides fallback links in the terminal. It reuses values you have already supplied.
|
|
33
33
|
|
|
34
34
|
## Choose login methods
|
|
35
35
|
|
|
@@ -131,7 +131,9 @@ ID, and secret, without a `cloudflareAccess` block or Cloudflare management toke
|
|
|
131
131
|
Follow Cloudflare's [OIDC application guide](https://developers.cloudflare.com/cloudflare-one/access-controls/applications/http-apps/saas-apps/generic-oidc-saas/)
|
|
132
132
|
and register the exact callback printed by Void.
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
### GitHub
|
|
135
|
+
|
|
136
|
+
For GitHub login:
|
|
135
137
|
|
|
136
138
|
1. The installer opens [GitHub's new OAuth App form](https://github.com/settings/applications/new) when it needs OAuth credentials. Sign in as the account that will own the login integration.
|
|
137
139
|
2. Set **Application name** to your platform's display name and **Homepage URL** to the API URL Void just printed.
|
|
@@ -140,9 +142,11 @@ For the default GitHub-only setup:
|
|
|
140
142
|
|
|
141
143
|
This OAuth App handles sign-in.
|
|
142
144
|
|
|
143
|
-
|
|
145
|
+
## Finish installation
|
|
146
|
+
|
|
147
|
+
The installer collects your runtime token, PostgreSQL URL, login-provider credentials, R2 credentials, and signing and encryption keys. It masks secret values and saves setup progress encrypted through your system keychain. Keep a password-manager copy for recovery on another machine.
|
|
144
148
|
|
|
145
|
-
|
|
149
|
+
Once installation finishes, open the printed admin dashboard link. For GitHub-only setup, sign in as the administrator selected during installation. For configurable login, use the one-time `/setup` code to confirm the administrator’s identity. Use the printed API URL to [connect and deploy an app](/guide/platform/installation/first-deployment).
|
|
146
150
|
|
|
147
151
|
Remove the management token from the shell when finished:
|
|
148
152
|
|
|
@@ -162,7 +166,7 @@ void platform install --resume --name <installation-id>
|
|
|
162
166
|
|
|
163
167
|
Keep the management token available for any remaining DNS changes. When using a source build, also pass the same `--runtime` directory. Resume uses the saved checkpoint and original secrets; do not start a second installation or generate replacement keys. If setup failed before a checkpoint was saved, rerun the original command.
|
|
164
168
|
|
|
165
|
-
|
|
169
|
+
You can also rerun `void platform install` and choose **Continue setup** for an unfinished installation. For non-interactive recovery, use `--resume --name <id>`. Manage completed platforms with `platform status`, `repair`, or `upgrade`.
|
|
166
170
|
|
|
167
171
|
If Cloudflare rejects a saved runtime token during continued credential setup, Void opens the token page and asks for a replacement in the same run. Network or service failures do not discard saved tokens. Tokens supplied through the environment must be corrected there instead.
|
|
168
172
|
|
|
@@ -31,7 +31,7 @@ void platform uninstall [id] --plan
|
|
|
31
31
|
void platform uninstall [id]
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
Uninstall blocks platform traffic, removes
|
|
34
|
+
Uninstall blocks platform traffic, removes Queues that no remaining platform Worker uses, and records the resources left for you to review. By default, Workers, the Queues they use, KV, R2, Hyperdrive, the dispatch namespace, and AI Gateway remain in your account. Adopted resources, external PostgreSQL, zones, DNS records, routes, custom domains, and Cloudflare Access resources are always retained.
|
|
35
35
|
|
|
36
36
|
To also remove eligible data resources owned by the installer:
|
|
37
37
|
|
|
@@ -39,10 +39,25 @@ To also remove eligible data resources owned by the installer:
|
|
|
39
39
|
void platform uninstall [id] --purge-data
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
Even with `--purge-data`, Void retains Workers, R2, AI Gateway, DNS records, routes, custom domains, Access resources, adopted resources, external PostgreSQL, and zones. Review those in the Cloudflare dashboard if you want to remove them.
|
|
42
|
+
Even with `--purge-data`, Void retains Workers, the Queues they use, R2, AI Gateway, DNS records, routes, custom domains, Access resources, adopted resources, external PostgreSQL, and zones. Review those in the Cloudflare dashboard if you want to remove them.
|
|
43
|
+
|
|
44
|
+
### Remove retained resources
|
|
45
|
+
|
|
46
|
+
Cloudflare refuses to delete a resource while a platform Worker still uses it. In the Cloudflare dashboard, remove what is left in this order, skipping anything already gone:
|
|
47
|
+
|
|
48
|
+
1. Delete the platform DNS record, Worker routes, and custom domains.
|
|
49
|
+
2. Open each platform Queue and remove the platform API Worker from its consumers.
|
|
50
|
+
3. Delete the platform Workers.
|
|
51
|
+
4. Delete the platform Queues.
|
|
52
|
+
5. Delete the application Workers in the dispatch namespace, then delete the namespace.
|
|
53
|
+
6. Delete the platform KV namespaces and Hyperdrive configuration.
|
|
54
|
+
7. Empty the R2 bucket, then delete it.
|
|
55
|
+
8. Delete the AI Gateway.
|
|
43
56
|
|
|
44
57
|
If installation configured Cloudflare Access, the uninstall plan lists its recorded applications and service tokens with their ownership and IDs. Review them in Zero Trust after uninstall. Remove installer-created resources only when nothing else uses them; resources connected from an existing company setup remain under their owner's control.
|
|
45
58
|
|
|
59
|
+
Uninstall does not remove the applications created for [project Zero Trust](/guide/platform/administration/zero-trust). While Zero Trust is enabled or still has Access applications, uninstall and `--plan` stop before any change and list those applications. Run `void platform zero-trust disable` first. Uninstall reads this from the installation database, so it also stops when the database cannot be reached.
|
|
60
|
+
|
|
46
61
|
::: details Why some resources require manual cleanup
|
|
47
62
|
|
|
48
63
|
Resources that may have been shared or repurposed require manual review before deletion. Void verifies ownership, keeps those resources in place, and blocks platform traffic.
|
|
@@ -12,5 +12,7 @@ The operator commands for users, projects, deployments, and system status requir
|
|
|
12
12
|
|
|
13
13
|
- [Sign-in and Access](/guide/platform/administration/access)
|
|
14
14
|
- [Users and Projects](/guide/platform/administration/projects)
|
|
15
|
+
- [Plans and Limits](/guide/platform/administration/plans)
|
|
16
|
+
- [Project Zero Trust](/guide/platform/administration/zero-trust)
|
|
15
17
|
- [Email](/guide/platform/administration/email)
|
|
16
18
|
- [Operations](/guide/platform/administration/operations)
|
|
@@ -8,13 +8,11 @@ Use queues to process work asynchronously, such as sending emails or handling up
|
|
|
8
8
|
|
|
9
9
|
## Defining queues
|
|
10
10
|
|
|
11
|
-
Create
|
|
11
|
+
Create a consumer in `queues/`. TypeScript and JavaScript files are supported (`.ts`, `.mts`, `.js`, `.mjs`). Its path determines the queue name: `queues/emails.ts` creates `emails`, and `queues/order/notifications.ts` creates `order-notifications`. Each queue must have a unique name.
|
|
12
12
|
|
|
13
13
|
The resulting name must follow Cloudflare's queue naming rules: 1–63 characters, only letters, digits, and `-`, beginning and ending with a letter or digit.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Each queue file should export a default handler wrapped with [`defineQueue`](../reference/api.md#definequeue-t-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.
|
|
15
|
+
Export a default handler wrapped with [`defineQueue<T>`](../reference/api/handlers.md#definequeue-t-handler). `T` defines the message body for both the consumer and calls to `send()`:
|
|
18
16
|
|
|
19
17
|
```ts
|
|
20
18
|
// queues/emails.ts
|
|
@@ -56,8 +54,6 @@ export const POST = defineHandler(async (c) => {
|
|
|
56
54
|
});
|
|
57
55
|
```
|
|
58
56
|
|
|
59
|
-
The binding name is derived automatically: `QUEUE_` + queue name uppercased with non-alphanumeric characters replaced by `_`. For example, `queues/emails.ts` creates binding `QUEUE_EMAILS`, while `queues/order/notifications.ts` creates binding `QUEUE_ORDER_NOTIFICATIONS`.
|
|
60
|
-
|
|
61
57
|
## Per-message acknowledgment
|
|
62
58
|
|
|
63
59
|
Each message in the batch has `ack()` and `retry()` methods matching the [Cloudflare Queues API](https://developers.cloudflare.com/queues/configuration/consumer-concurrency/):
|
|
@@ -111,12 +107,14 @@ export default defineQueue<Message>(async (batch, env) => {
|
|
|
111
107
|
|
|
112
108
|
- `maxBatchSize`: maximum number of messages per batch (default `10`)
|
|
113
109
|
- `maxBatchTimeout`: maximum seconds to wait before delivering an incomplete batch (default `5`)
|
|
114
|
-
- `maxRetries`: maximum number of retries before
|
|
110
|
+
- `maxRetries`: maximum number of retries before delivery is exhausted (default `3`)
|
|
115
111
|
- `retryDelay`: seconds to wait between retries (default `0`)
|
|
116
112
|
|
|
117
|
-
|
|
113
|
+
Void-managed queues do not configure a dead-letter queue. Cloudflare permanently
|
|
114
|
+
deletes messages that exhaust their retries without one; see
|
|
115
|
+
[Cloudflare's dead-letter queue guide](https://developers.cloudflare.com/queues/configuration/dead-letter-queues/).
|
|
118
116
|
|
|
119
|
-
|
|
117
|
+
Void provisions queues and connects their producers and consumers when you deploy.
|
|
120
118
|
|
|
121
119
|
## Local development
|
|
122
120
|
|
|
@@ -56,36 +56,9 @@ Void asks you to choose Vite+ or Vite, a UI framework, a starter, and a deployme
|
|
|
56
56
|
|
|
57
57
|
With pnpm, you can start with `pnpm create void my-app`. It configures native build permissions before installing Void.
|
|
58
58
|
|
|
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`.
|
|
60
|
-
|
|
61
59
|
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.
|
|
62
60
|
|
|
63
|
-
##
|
|
64
|
-
|
|
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.
|
|
66
|
-
|
|
67
|
-
## Meta Frameworks
|
|
68
|
-
|
|
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.
|
|
70
|
-
|
|
71
|
-
## Adding to an Existing Vite App
|
|
72
|
-
|
|
73
|
-
Install Void using the package manager command [above](#start-in-an-empty-directory).
|
|
74
|
-
|
|
75
|
-
Enable the plugin in `vite.config.ts`:
|
|
76
|
-
|
|
77
|
-
```ts
|
|
78
|
-
import { defineConfig } from 'vite';
|
|
79
|
-
import { voidPlugin } from 'void';
|
|
80
|
-
|
|
81
|
-
export default defineConfig({
|
|
82
|
-
plugins: [voidPlugin()],
|
|
83
|
-
});
|
|
84
|
-
```
|
|
85
|
-
|
|
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.
|
|
87
|
-
|
|
88
|
-
## Once You Have a Working App
|
|
61
|
+
## Run and deploy
|
|
89
62
|
|
|
90
63
|
### 1. Edit the generated API route
|
|
91
64
|
|
|
@@ -110,32 +83,60 @@ Then visit:
|
|
|
110
83
|
- App: `http://localhost:5173`
|
|
111
84
|
- API route: `http://localhost:5173/api/hello`
|
|
112
85
|
|
|
113
|
-
### 3.
|
|
86
|
+
### 3. Deploy
|
|
114
87
|
|
|
115
|
-
If you chose a deployment target during setup,
|
|
88
|
+
If you chose a deployment target during setup, run:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
void deploy
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
If you skipped deployment setup, select your Cloudflare account for the first deploy:
|
|
116
95
|
|
|
117
96
|
```sh
|
|
118
97
|
void deploy --platform cloudflare
|
|
119
98
|
```
|
|
120
99
|
|
|
121
|
-
Void opens your browser to sign in when needed. To use your team's platform, connect using the API URL from your administrator:
|
|
100
|
+
Void opens your browser to sign in when needed. To use your team's platform, connect using the API URL from your administrator, then link a project and deploy:
|
|
122
101
|
|
|
123
102
|
```sh
|
|
124
103
|
void connect https://platform.example.com
|
|
125
104
|
void project link
|
|
105
|
+
void deploy
|
|
126
106
|
```
|
|
127
107
|
|
|
128
|
-
|
|
108
|
+
Void builds the app, provisions its resources, applies pending migrations, and prints the deployed URL. If a production secret is missing, [set it](./env-vars.md) and deploy again. Later deploys use the saved target.
|
|
129
109
|
|
|
130
|
-
|
|
110
|
+
See [Deployment](./deployment.md) for CI setup and rollback.
|
|
131
111
|
|
|
132
|
-
|
|
133
|
-
|
|
112
|
+
## Using with Coding Agents
|
|
113
|
+
|
|
114
|
+
`void init` detects your coding agent and installs its instructions and skills. If no agent is detected, use the bundled docs linked in `AGENTS.md`. 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.
|
|
115
|
+
|
|
116
|
+
## Meta Frameworks
|
|
117
|
+
|
|
118
|
+
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.
|
|
119
|
+
|
|
120
|
+
## Adding to an Existing Vite App
|
|
121
|
+
|
|
122
|
+
Install Void using the package manager command [above](#start-in-an-empty-directory).
|
|
123
|
+
|
|
124
|
+
Enable the plugin in `vite.config.ts`:
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import { defineConfig } from 'vite';
|
|
128
|
+
import { voidPlugin } from 'void';
|
|
129
|
+
|
|
130
|
+
export default defineConfig({
|
|
131
|
+
plugins: [voidPlugin()],
|
|
132
|
+
});
|
|
134
133
|
```
|
|
135
134
|
|
|
136
|
-
|
|
135
|
+
Then run `void init` with your package manager to configure the remaining project files.
|
|
136
|
+
|
|
137
|
+
## Troubleshooting pnpm installs
|
|
137
138
|
|
|
138
|
-
|
|
139
|
+
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.
|
|
139
140
|
|
|
140
141
|
## Next steps
|
|
141
142
|
|
|
@@ -42,13 +42,9 @@ VOID_REMOTE=1 vite dev
|
|
|
42
42
|
| R2 | Local file-backed R2 | Remote R2 bucket |
|
|
43
43
|
| AI | Always proxied | Always proxied |
|
|
44
44
|
|
|
45
|
-
AI
|
|
45
|
+
AI requests use your platform’s account and allowance in both local and remote mode. There is no local AI simulator.
|
|
46
46
|
|
|
47
|
-
##
|
|
48
|
-
|
|
49
|
-
In remote mode, binding calls go through your platform's proxy, authenticated with your login token. The proxy uses the linked project's configuration to choose the D1 database, KV namespace, or R2 bucket.
|
|
50
|
-
|
|
51
|
-
You don't need to change any code. Imports like `import { db } from "void/db"` and direct binding access via `c.env.KV` both work transparently.
|
|
47
|
+
## Checking Remote Mode
|
|
52
48
|
|
|
53
49
|
When the dev server starts with remote mode active, it prints:
|
|
54
50
|
|
|
@@ -63,7 +59,6 @@ When the dev server starts with remote mode active, it prints:
|
|
|
63
59
|
|
|
64
60
|
- **Network latency:** each binding call makes a network request, so responses may be slower than local development.
|
|
65
61
|
- **R2 multipart uploads:** `createMultipartUpload()` and `resumeMultipartUpload()` are not supported in remote mode.
|
|
66
|
-
- **R2 conditional writes:** `put(..., { onlyIf })` requires a current Void platform and an active deployment with the native remote-binding handler. Update the platform and redeploy the project if this operation is unavailable. Failed preconditions return `null
|
|
62
|
+
- **R2 conditional writes:** `put(..., { onlyIf })` requires a current Void platform and an active deployment with the native remote-binding handler. Update the platform and redeploy the project if this operation is unavailable. Failed preconditions return `null`.
|
|
67
63
|
- **D1 dump:** `db.dump()` is not supported in remote mode.
|
|
68
|
-
- **D1
|
|
69
|
-
- **Writes affect real data:** remote mode connects to your actual deployed resources. Inserts, updates, and deletes are real, so use it carefully or point it at a staging project.
|
|
64
|
+
- **D1 batches:** `db.batch()` requires an updated platform and project deployment.
|
|
@@ -4,82 +4,119 @@ outline: deep
|
|
|
4
4
|
|
|
5
5
|
# Sandboxes
|
|
6
6
|
|
|
7
|
-
Use a Cloudflare Sandbox to run commands, work with files, and
|
|
7
|
+
Use a Cloudflare Sandbox to run commands, work with files, and connect to servers from server code. Each Sandbox ID selects an isolated container.
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
10
|
import { defineHandler } from 'void';
|
|
11
11
|
import { getSandbox } from 'void/sandbox';
|
|
12
12
|
|
|
13
13
|
export const POST = defineHandler(async (c) => {
|
|
14
|
-
const { command } = await c.req.json<{ command: string }>();
|
|
15
14
|
const sandbox = await getSandbox('default');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
return sandbox.run(['node', '--version']).match({
|
|
16
|
+
ok: (result) =>
|
|
17
|
+
c.json({
|
|
18
|
+
exitCode: result.exitCode,
|
|
19
|
+
stdout: new TextDecoder().decode(result.stdout),
|
|
20
|
+
}),
|
|
21
|
+
limited: (limit) => limit.response({ message: 'Execution is temporarily unavailable.' }),
|
|
22
|
+
});
|
|
19
23
|
});
|
|
20
24
|
```
|
|
21
25
|
|
|
22
|
-
Importing from `void/sandbox` enables the required
|
|
26
|
+
Importing from `void/sandbox` enables the required resources. Local development, native Cloudflare deployments, and Void Platform share the same runtime API.
|
|
23
27
|
|
|
24
28
|
## Configuration
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
The default environment provides Node.js 24 on Debian Trixie. Local development and native deploys need Docker running. Managed platform deploys use Cloudflare's managed Node.js image.
|
|
27
31
|
|
|
28
32
|
Use `void.config.ts` when you need a custom image or container size:
|
|
29
33
|
|
|
30
|
-
```
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
34
|
+
```ts
|
|
35
|
+
import { defineConfig } from 'void/config';
|
|
36
|
+
|
|
37
|
+
export default defineConfig({
|
|
38
|
+
sandbox: {
|
|
39
|
+
image: './Dockerfile.sandbox',
|
|
40
|
+
platformImage: 'registry.cloudflare.com/<account-id>/sandbox@sha256:<digest>',
|
|
41
|
+
instanceType: 'standard-1',
|
|
42
|
+
},
|
|
43
|
+
});
|
|
39
44
|
```
|
|
40
45
|
|
|
41
|
-
|
|
46
|
+
| Field | Default | Description |
|
|
47
|
+
| ------------------- | --------------------------- | -------------------------------------------------------------------- |
|
|
48
|
+
| `binding` | `SANDBOX` | Binding name for local and native Cloudflare use |
|
|
49
|
+
| `className` | `SandboxV1` | Durable Object class for local and native Cloudflare use |
|
|
50
|
+
| `containerName` | `void-sandbox-v1` | Cloudflare container application name |
|
|
51
|
+
| `image` | Packaged Node.js Dockerfile | Dockerfile or digest-pinned Cloudflare registry image for native use |
|
|
52
|
+
| `imageBuildContext` | Directory of `image` | Docker build context |
|
|
53
|
+
| `platformImage` | `cloudflare/debian-trixie` | Image used by managed platform deploys |
|
|
54
|
+
| `instanceType` | `lite` | `lite`, `standard-1`, `standard-2`, `standard-3`, or `standard-4` |
|
|
55
|
+
|
|
56
|
+
Custom images must include the helper matching Void's installed Sandbox SDK version. The SDK image supplies this binary, but is not a runnable environment itself:
|
|
57
|
+
|
|
58
|
+
```dockerfile
|
|
59
|
+
FROM node:24.21.0-trixie-slim
|
|
60
|
+
COPY --from=docker.io/cloudflare/sandbox:1.0.0 /usr/local/bin/sandbox-shim /usr/local/bin/sandbox-shim
|
|
61
|
+
WORKDIR /workspace
|
|
62
|
+
CMD ["sleep", "infinity"]
|
|
63
|
+
```
|
|
42
64
|
|
|
43
|
-
|
|
44
|
-
| ------------------- | -------------------------- | --------------------------------------------------------------------- |
|
|
45
|
-
| `binding` | `SANDBOX` | Binding name for local and native Cloudflare use |
|
|
46
|
-
| `className` | `Sandbox` | Durable Object class for local and native Cloudflare use |
|
|
47
|
-
| `containerName` | `void-sandbox` | Cloudflare container app name |
|
|
48
|
-
| `image` | Matching sandbox SDK image | Dockerfile path or registry image for local and native Cloudflare use |
|
|
49
|
-
| `imageBuildContext` | Directory of `image` | Docker build context for local and native Cloudflare use |
|
|
50
|
-
| `platformImage` | Matching sandbox SDK image | Registry image used by `void deploy` |
|
|
51
|
-
| `instanceType` | `lite` on Void deploy | Container size, such as `lite`, `basic`, `standard-1` |
|
|
52
|
-
| `maxInstances` | `20` on Void deploy | Maximum number of container instances |
|
|
65
|
+
For a managed platform, push your custom image to that platform account's Cloudflare registry and set `platformImage` to its digest-pinned reference. If `image` is already a Cloudflare registry reference, it also becomes the default `platformImage`. External registries and mutable tags are not supported. See [Cloudflare's image management guide](https://developers.cloudflare.com/containers/guides/image-management/#push-images-to-the-cloudflare-registry).
|
|
53
66
|
|
|
54
67
|
## Runtime API
|
|
55
68
|
|
|
56
|
-
`getSandbox(id, options)`
|
|
69
|
+
`getSandbox(id, options)` resolves a Sandbox without starting it. The first command, file operation, or port request starts the container. IDs contain 1–63 characters and are lowercased by default; pass `normalizeId: false` to preserve case.
|
|
57
70
|
|
|
58
71
|
```ts
|
|
59
72
|
import { getSandbox } from 'void/sandbox';
|
|
60
73
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
74
|
+
const sandbox = await getSandbox(`user-${user.id}`, {
|
|
75
|
+
inactivityTimeoutMs: 10 * 60 * 1000,
|
|
76
|
+
enableInternet: false,
|
|
77
|
+
});
|
|
78
|
+
const response = await sandbox
|
|
79
|
+
.run(['node', '--version'], {
|
|
80
|
+
signal: AbortSignal.timeout(5_000),
|
|
81
|
+
})
|
|
82
|
+
.match({
|
|
83
|
+
ok: (result) => Response.json({ exitCode: result.exitCode }),
|
|
84
|
+
limited: (limit) => limit.response(),
|
|
85
|
+
});
|
|
65
86
|
```
|
|
66
87
|
|
|
67
|
-
|
|
88
|
+
Commands take an executable and arguments as an array. For shell syntax, explicitly run `['sh', '-c', command]`. Execution options include `cwd` (default `/workspace`), `env`, `user`, `signal`, `pty`, `stdin`, `stdout`, and `stderr`.
|
|
68
89
|
|
|
69
|
-
|
|
90
|
+
`run()` collects command output and handles limits throughout execution with one required `.match({ ok, limited })`. Both handlers are required. Other failures still reject.
|
|
70
91
|
|
|
71
|
-
|
|
92
|
+
`exec()` returns a lazy operation yielding a process through its `ok` handler. Use `output()` to collect `stdout` and `stderr` as `ArrayBuffer`s with the exit code, or read the streams and match `exitCode`. Both `output()` and `exitCode` require their own `.match({ ok, limited })`. Matching `exitCode` keeps a long command active during pauses in its output; unattended background commands can stop when the Sandbox becomes idle.
|
|
72
93
|
|
|
73
|
-
`
|
|
94
|
+
Use `stdin: 'pipe'` for a writable input stream. `kill(signal?)` stops a process, and `resize(cols, rows)` resizes its terminal.
|
|
95
|
+
|
|
96
|
+
File operations live under `sandbox.files`: `readFile`, `writeFile`, `stat`, `lstat`, `readDirectory`, `mkdir`, `rename`, and `remove`. Each file operation requires `.match({ ok, limited })`. `readFile()` yields a streaming `Response` to `ok`; use `.text()`, `.arrayBuffer()`, or `.body`. `writeFile()` accepts text, binary data, or a byte stream. Relative file paths require an explicit `cwd` option.
|
|
97
|
+
|
|
98
|
+
To reach a server inside the container, call `sandbox.fetch(port, new Request(url)).match({ ok, limited })`. `sandbox.running()` checks whether the container is running; `sandbox.destroy()` stops it.
|
|
74
99
|
|
|
75
|
-
|
|
100
|
+
`getSandbox()` options include `inactivityTimeoutMs` (default ten minutes, maximum six hours), `enableInternet` (default `false`), and string `labels`. Internet access and labels take effect on the next container start. `binding` selects a custom native binding; managed platforms use the configured binding.
|
|
76
101
|
|
|
77
|
-
|
|
102
|
+
For code that runs on both deployment targets, use `getSandbox()`. Direct access through `c.env.SANDBOX` is available only on local and native Cloudflare deployments.
|
|
103
|
+
|
|
104
|
+
The `limited` handler receives `resource: 'sandbox'`, a `reason` of `concurrency` or `runtime_budget`, and `response({ message })` for a structured HTTP 429. Keep user input available so it can be retried. Resolving a Sandbox, checking `running()`, stopping a process, and `destroy()` do not need a quota handler; cleanup remains available after a limit.
|
|
105
|
+
|
|
106
|
+
## State persistence
|
|
107
|
+
|
|
108
|
+
`getSandbox(id)` selects the same Durable Object for that ID within a deployment. Native Cloudflare deployments preserve that namespace across Worker versions. Each managed platform deployment has its own namespace; rolling back to a retained deployment reconnects to that deployment's namespace.
|
|
109
|
+
|
|
110
|
+
Files, running processes, and listening servers last only as long as the container. It can stop after inactivity, crash, or restart. Save anything you need to keep in your database, KV, or R2. Deleting a project on a Void platform removes both its Durable Objects and containers.
|
|
78
111
|
|
|
79
112
|
## Deployment
|
|
80
113
|
|
|
81
|
-
|
|
114
|
+
Sandboxes require [Workers Paid](https://dash.cloudflare.com/?to=/:account/workers/plans) and Containers access. A managed platform's runtime token needs Account / Containers: Edit and Account / Cloudchamber: Edit.
|
|
115
|
+
|
|
116
|
+
`void deploy --platform cloudflare` builds native images and deploys the Sandbox alongside the application. `void deploy` on a connected Void Platform applies the platform's Sandbox concurrency and runtime limits. Upgrade the platform before deploying an application built with this Sandbox API.
|
|
117
|
+
|
|
118
|
+
## Moving from Sandbox SDK 0.x
|
|
82
119
|
|
|
83
|
-
|
|
120
|
+
Update string commands to argument arrays, move file calls under `.files`, and consume process output and file responses as shown above. Replace `sleepAfter` and `keepAlive` with `inactivityTimeoutMs`; remove `maxInstances` from configuration. The old `Sandbox` export, sessions, code interpreter, process-list helpers, and preview-URL helpers are no longer part of this API.
|
|
84
121
|
|
|
85
|
-
|
|
122
|
+
Existing native 0.x Sandboxes need a new Worker configuration and namespace. Back up container files and any Durable Object data, choose a fresh `worker.name`, and remove the old Sandbox bindings, containers, and migrations from that new configuration before deploying. The new default class is `SandboxV1`; existing state does not transfer automatically. Retain the old Worker until you have validated the replacement and restored your data, then clean up its resources. See [Cloudflare's scheduling-policy migration guide](https://developers.cloudflare.com/containers/guides/migrate-to-durable-object-scheduling-policy/).
|