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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Use `.env` for local development and remote secrets for server-side production values.
|
|
4
4
|
|
|
5
|
-
## 1.
|
|
5
|
+
## 1. Back up and consolidate values
|
|
6
6
|
|
|
7
7
|
Before changing any dotenv files, securely back up the production values you need to migrate outside the project directory. Keep them out of Git. Do not delete the original files until the upload and verification in step 3 succeed.
|
|
8
8
|
|
|
@@ -23,9 +23,9 @@ Ensure `.env` is ignored by Git:
|
|
|
23
23
|
.env
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
## 2.
|
|
26
|
+
## 2. Update `env.ts`
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Remove `.secret()` and `.public()` from `env.ts` before running secret commands.
|
|
29
29
|
|
|
30
30
|
Change:
|
|
31
31
|
|
|
@@ -45,9 +45,9 @@ export default defineEnv({
|
|
|
45
45
|
});
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Server
|
|
48
|
+
Server keys have no `VITE_` prefix; client keys do.
|
|
49
49
|
|
|
50
|
-
## 3.
|
|
50
|
+
## 3. Upload server secrets
|
|
51
51
|
|
|
52
52
|
For managed Void projects, upload each non-client schema key:
|
|
53
53
|
|
|
@@ -78,11 +78,11 @@ After the upload succeeds, confirm that all expected server names appear in the
|
|
|
78
78
|
void secret list
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
If an upload fails or a name is missing, keep the source values and retry before continuing.
|
|
82
82
|
|
|
83
83
|
For direct Cloudflare deployments, remove the migrated server keys from `cloudflare.vars` in `void.config.ts` after confirming the upload. Void now treats any schema-declared server key in Worker `vars` as an error.
|
|
84
84
|
|
|
85
|
-
## 4.
|
|
85
|
+
## 4. Set client build values
|
|
86
86
|
|
|
87
87
|
Move `VITE_*` production values to CI/build-shell variables, or make the value an explicit schema default:
|
|
88
88
|
|
|
@@ -92,13 +92,13 @@ export VITE_API_ORIGIN=https://api.example.com
|
|
|
92
92
|
|
|
93
93
|
Keep these variables set for the remote check and deployment in step 5. Client values are compiled into browser assets and are public.
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
These values are also available during server rendering. Do not upload them as remote secrets.
|
|
96
96
|
|
|
97
|
-
## 5. Remove
|
|
97
|
+
## 5. Remove old files and verify
|
|
98
98
|
|
|
99
|
-
Once the local values are in `.env`, the server values are uploaded and listed remotely, and the client values are available to the build, delete every `.env.*` file, `.env.example`, and `.dev.vars*` file from the project. Keep the secure backup until verification succeeds.
|
|
99
|
+
Once the local values are in `.env`, the server values are uploaded and listed remotely, and the client values are available to the build, delete every `.env.*` file, `.env.example`, and `.dev.vars*` file from the project. Keep the secure backup until verification succeeds. Environment checks and deployment reject these old files.
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
Use `env.ts` as the checked-in list of names, types, defaults, and requiredness. `void env example` is no longer supported.
|
|
102
102
|
|
|
103
103
|
Then verify:
|
|
104
104
|
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
# Environment variables
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- `env.ts` declares every application environment variable.
|
|
6
|
-
- `.env` supplies local development values only. It is never deployed.
|
|
7
|
-
- Production server values live in the platform's encrypted secret store.
|
|
8
|
-
- Client-prefixed values are embedded at build time, so they are public by definition.
|
|
9
|
-
|
|
10
|
-
This removes the distinction between “plain” and “secret-looking” server variables. Every server variable uses the same secure production path.
|
|
3
|
+
Declare your environment variables in `env.ts`, then read them through `env` from `void/env`. Use `.env` for local values and `void secret put` for production server values.
|
|
11
4
|
|
|
12
5
|
## Define the schema
|
|
13
6
|
|
|
@@ -24,7 +17,7 @@ export default defineEnv({
|
|
|
24
17
|
});
|
|
25
18
|
```
|
|
26
19
|
|
|
27
|
-
|
|
20
|
+
Import the typed `env` object in your app:
|
|
28
21
|
|
|
29
22
|
```ts
|
|
30
23
|
import { env } from 'void/env';
|
|
@@ -46,7 +39,7 @@ STRIPE_KEY=sk_test_example
|
|
|
46
39
|
VITE_API_ORIGIN=http://localhost:5173
|
|
47
40
|
```
|
|
48
41
|
|
|
49
|
-
`.env`
|
|
42
|
+
Keep `.env` out of Git. Other dotenv files, including `.env.local`, `.env.production`, `.env.example`, and Wrangler’s `.dev.vars*`, are not supported. See [Environment migration](./env-migration.md) if your app uses them.
|
|
50
43
|
|
|
51
44
|
Run the local check at any time:
|
|
52
45
|
|
|
@@ -71,26 +64,17 @@ For bulk upload, prepare a dotenv-formatted file containing only production serv
|
|
|
71
64
|
void secret sync production-secrets.txt
|
|
72
65
|
```
|
|
73
66
|
|
|
74
|
-
|
|
67
|
+
Secret commands validate values against `env.ts` before upload. Production values are encrypted and validated again at Worker startup.
|
|
75
68
|
|
|
76
69
|
Client-prefixed keys are rejected by secret commands. Keep local development credentials and `VITE_*` values out of the production secrets file.
|
|
77
70
|
|
|
78
|
-
`void deploy`
|
|
79
|
-
|
|
80
|
-
For direct Cloudflare deployment, select Cloudflare and use the same Void commands:
|
|
81
|
-
|
|
82
|
-
```sh
|
|
83
|
-
void connect --platform cloudflare
|
|
84
|
-
void secret put DATABASE_URL
|
|
85
|
-
void secret put STRIPE_KEY
|
|
86
|
-
void deploy --platform cloudflare
|
|
87
|
-
```
|
|
71
|
+
`void deploy` requires every required server key to exist remotely. It never uploads `.env` values.
|
|
88
72
|
|
|
89
|
-
|
|
73
|
+
The same secret commands work for direct Cloudflare deployments. Schema-declared server values must be Worker secrets, not plaintext `vars`.
|
|
90
74
|
|
|
91
75
|
## Client values
|
|
92
76
|
|
|
93
|
-
Keys beginning with `VITE_` are client values
|
|
77
|
+
Keys beginning with `VITE_` are client values, even if your framework customizes Vite's `envPrefix`.
|
|
94
78
|
|
|
95
79
|
Client values are embedded in browser JavaScript and are never secrets. Supply them through the build shell or use a schema default:
|
|
96
80
|
|
|
@@ -106,9 +90,7 @@ export default defineEnv({
|
|
|
106
90
|
|
|
107
91
|
Builds ignore client values from `.env`; this prevents a developer's local value from silently becoming production configuration.
|
|
108
92
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
Prerender path discovery can read route metadata without the deployed server secrets. Application requests, readiness checks, and actual page rendering still validate the runtime environment; a path generator that reads a required secret must have that value available.
|
|
93
|
+
Server rendering uses the same public build values as the browser.
|
|
112
94
|
|
|
113
95
|
## Validation and redaction
|
|
114
96
|
|
|
@@ -120,11 +102,9 @@ void env types # regenerate .void/env.d.ts
|
|
|
120
102
|
|
|
121
103
|
Invalid-value diagnostics redact the supplied value by default. Set `VOID_ENV_UNMASK=1` only for deliberate local debugging; Void prints a notice when redaction is disabled.
|
|
122
104
|
|
|
123
|
-
There are no `.secret()` or `.public()` schema modifiers. Storage now follows the server/client boundary, and diagnostics follow one redaction rule.
|
|
124
|
-
|
|
125
105
|
## Imports inside `env.ts`
|
|
126
106
|
|
|
127
|
-
|
|
107
|
+
Use relative imports or package names inside `env.ts`. TypeScript path aliases and imports that need Vite transforms are not supported.
|
|
128
108
|
|
|
129
109
|
## Migrating from the multi-file model
|
|
130
110
|
|
|
@@ -29,21 +29,6 @@ Deploy to [your own Cloudflare account](../integrations/cloudflare.md#deploy-to-
|
|
|
29
29
|
|
|
30
30
|
[Static assets](./edge/static-assets) are cached at the edge. [Prerendering](./edge/prerendering) builds pages ahead of time, while [incremental revalidation](./edge/revalidation) caches pages rendered on demand. Database, storage, secrets, and deployment commands are available through Void.
|
|
31
31
|
|
|
32
|
-
## How resource detection works
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
vite.config.ts → voidPlugin() (works with any Vite app)
|
|
36
|
-
import { db } → D1 database (auto-provisioned)
|
|
37
|
-
import { kv } → KV namespace (auto-provisioned)
|
|
38
|
-
import { storage } → R2 bucket (auto-provisioned)
|
|
39
|
-
import { ai } → Workers AI inference (metered)
|
|
40
|
-
db/schema.ts → Drizzle schema (source of truth for DB types)
|
|
41
|
-
db/migrations/*.sql → Applied to the selected database on deploy
|
|
42
|
-
void deploy → Deploy to the saved Cloudflare or Void target
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
The Vite plugin detects supported imports and adds the corresponding bindings. Void also detects your [app type](./app-types) to choose the build and deployment flow. Use `void.config.ts` when you need to control either choice.
|
|
46
|
-
|
|
47
32
|
## Next steps
|
|
48
33
|
|
|
49
34
|
- [Quickstart](./quickstart): get a running app in minutes
|
|
@@ -45,22 +45,9 @@ export default defineScheduled(async (controller, env) => {
|
|
|
45
45
|
|
|
46
46
|
## `defineScheduled`
|
|
47
47
|
|
|
48
|
-
Wrap a handler with `defineScheduled()` to
|
|
48
|
+
Wrap a handler with [`defineScheduled()`](../reference/api/handlers.md#definescheduled-handler) to type its scheduled event, environment, and execution context.
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
```ts
|
|
53
|
-
(controller: ScheduledController, env: CloudEnv['Bindings'], ctx: ExecutionContext) =>
|
|
54
|
-
unknown | Promise<unknown>;
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Notes:
|
|
58
|
-
|
|
59
|
-
- Jobs are matched by exact cron string.
|
|
60
|
-
- When jobs share an expression, each matching job runs once per invocation. Void waits for all matching jobs, even if one fails, then reports any failures. Native triggers and managed deliveries are deduplicated by expression.
|
|
61
|
-
- Job modules are lazy-loaded at runtime.
|
|
62
|
-
- Files or directories starting with `_` are ignored.
|
|
63
|
-
- Missing `cron` export causes an error during scan/build.
|
|
50
|
+
Jobs sharing a cron expression each run once per invocation. Void waits for all matching jobs and reports any failures. Files and directories starting with `_` are ignored.
|
|
64
51
|
|
|
65
52
|
## Local development
|
|
66
53
|
|
|
@@ -72,7 +59,7 @@ Content-Type: application/json
|
|
|
72
59
|
{ "cron": "<expression>", "scheduledTime": <unix_ms> }
|
|
73
60
|
```
|
|
74
61
|
|
|
75
|
-
|
|
62
|
+
Set `cron` to an expression exported by your job. A successful call returns `{ "ok": true }`.
|
|
76
63
|
|
|
77
64
|
The endpoint requires a local dev trigger token. Void prints a paste-ready curl command with the current token when the dev server starts.
|
|
78
65
|
|
|
@@ -89,6 +76,4 @@ The endpoint works in native Void apps and supported frameworks. Framework jobs
|
|
|
89
76
|
|
|
90
77
|
## Deployment behavior
|
|
91
78
|
|
|
92
|
-
On deploy, Void includes all discovered job schedules in the deploy manifest and configures worker cron triggers automatically.
|
|
93
|
-
|
|
94
79
|
Native scheduled events do not require a manual HTTP token. For framework deployments, HTTP requests to `/__void/scheduled` require a matching `x-void-internal` token: the managed platform supplies its proxy token, or you can explicitly configure `CRON_SECRET` for manual calls. An absent or mismatched token returns `401` without running a job.
|
|
@@ -4,7 +4,7 @@ outline: deep
|
|
|
4
4
|
|
|
5
5
|
# Key-Value Storage
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Read and write data in [Cloudflare Workers KV](https://developers.cloudflare.com/kv/) with `kv` from `void/kv`. Values are stored as JSON, and `kv.map()` gives a collection its own key prefix and value type.
|
|
8
8
|
|
|
9
9
|
## Basic Operations
|
|
10
10
|
|
|
@@ -25,7 +25,9 @@ Values are automatically parsed as JSON. If the stored value isn't valid JSON, t
|
|
|
25
25
|
await kv.put('user:123', { name: 'Alice', role: 'admin' });
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Values, including strings, are JSON-serialized. Reads preserve their types, so a string such as `"123"` or `"null"` comes back as a string.
|
|
29
|
+
|
|
30
|
+
If an older Void version stored a JSON-looking string as raw text, rewrite that key with `kv.put(key, originalString)`. Existing stored values keep their previous read behavior; Void cannot distinguish an old raw string such as `"123"` from a stored number. Use the original string or read its raw text through `c.env.KV.get(key)` when rewriting it.
|
|
29
31
|
|
|
30
32
|
Add a TTL (in seconds) or absolute expiration (Unix timestamp):
|
|
31
33
|
|
|
@@ -96,12 +98,4 @@ const result = await sessions.list();
|
|
|
96
98
|
|
|
97
99
|
Maps have the same methods as the base client (`get`, `put`, `delete`, `list`, `getWithMetadata`) but with a typed value and automatic prefixing.
|
|
98
100
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
The KV client is a thin wrapper over the Cloudflare KV API that adds two things:
|
|
102
|
-
|
|
103
|
-
1. **Auto serialization:** `put()` calls `JSON.stringify()` on non-string values. `get()` calls `JSON.parse()` with a fallback to the raw string for values that are not JSON. You can store and retrieve objects without manual serialization.
|
|
104
|
-
|
|
105
|
-
2. **Typed maps:** `kv.map<T>(prefix)` returns a scoped client where all keys are prefixed with `"prefix:"` and values are typed as `T`. This is useful for organizing related data such as sessions, cache entries, and feature flags without manually managing prefixes.
|
|
106
|
-
|
|
107
|
-
> **Escape hatch:** The `kv` client covers the most common KV operations. For advanced use cases like `getWithMetadata` with specific cache behaviors, you can access the raw `KVNamespace` binding via `c.env.KV` in a route handler.
|
|
101
|
+
For operations beyond this client, access the raw `KVNamespace` through `c.env.KV` in a route handler.
|
|
@@ -71,11 +71,7 @@ await unsubscribePost();
|
|
|
71
71
|
stream.close();
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
batched `POST` control operations. Subscription ids are scoped to the
|
|
76
|
-
connection. Reusing an id replaces the previous subscription with that id. If
|
|
77
|
-
the transport drops, the helper reconnects and resubmits active subscriptions
|
|
78
|
-
with their latest `eventId` as `lastEventId`.
|
|
74
|
+
Subscription IDs are scoped to a connection. Reusing an ID replaces its subscription. After reconnecting, the helper restores active subscriptions and sends their latest `eventId` as `lastEventId`.
|
|
79
75
|
|
|
80
76
|
## Publish
|
|
81
77
|
|
|
@@ -101,19 +97,7 @@ await live.withEnv(env).publish('post:12', { title: 'Updated title' });
|
|
|
101
97
|
|
|
102
98
|
## Authorization
|
|
103
99
|
|
|
104
|
-
|
|
105
|
-
control operations for that SSE connection. `connect()` resolves and stores the
|
|
106
|
-
owner; `control()` resolves the owner again and rejects the request if it does
|
|
107
|
-
not match.
|
|
108
|
-
|
|
109
|
-
The quickstart uses an anonymous stream:
|
|
110
|
-
|
|
111
|
-
```ts
|
|
112
|
-
export const live = defineLiveStream({
|
|
113
|
-
id: 'app',
|
|
114
|
-
allowAnonymousControl: true,
|
|
115
|
-
});
|
|
116
|
-
```
|
|
100
|
+
Only a connection's owner can change its subscriptions. The example above allows anonymous connections; authenticated streams use the current Void user by default.
|
|
117
101
|
|
|
118
102
|
For authenticated streams, pass the same owner key to `connect()` and
|
|
119
103
|
`control()`:
|
|
@@ -136,13 +120,6 @@ export const live = defineLiveStream({
|
|
|
136
120
|
});
|
|
137
121
|
```
|
|
138
122
|
|
|
139
|
-
Then the route handlers can stay thin:
|
|
140
|
-
|
|
141
|
-
```ts
|
|
142
|
-
export const GET = defineHandler((c) => live.connect(c));
|
|
143
|
-
export const POST = defineHandler((c) => live.control(c));
|
|
144
|
-
```
|
|
145
|
-
|
|
146
123
|
When `identifyConnection` returns `null` or `undefined`, Void falls back to the
|
|
147
124
|
current authenticated user and uses `user:${user.id}` when the user has a string
|
|
148
125
|
`id`. If neither path produces an owner and `allowAnonymousControl` is not set,
|
|
@@ -172,25 +149,7 @@ export const live = defineLiveStream({
|
|
|
172
149
|
- `100` queued events per connection
|
|
173
150
|
- `64 KiB` per encoded event envelope
|
|
174
151
|
|
|
175
|
-
|
|
176
|
-
`post:${postId}`, then each post can have up to `256` active live subscribers at
|
|
177
|
-
one time. Other posts use separate topics and have separate limits.
|
|
178
|
-
|
|
179
|
-
Streams can have many possible topics. Topics are created on demand when clients
|
|
180
|
-
subscribe or publishers send events, so an app with thousands of posts, rooms, or
|
|
181
|
-
documents can use one topic per entity without provisioning them ahead of time.
|
|
182
|
-
The limit applies to each active topic, not to the total number of topic names
|
|
183
|
-
your app might use.
|
|
184
|
-
|
|
185
|
-
For example, a blog with `10,000` posts can model its live capacity as
|
|
186
|
-
`10,000 posts × up to 256 active subscribers per post topic`.
|
|
187
|
-
|
|
188
|
-
That shape works because each post topic is independent. A single post with more
|
|
189
|
-
than `256` active live subscribers would need a larger broadcast design.
|
|
190
|
-
|
|
191
|
-
These limits apply to live subscriptions, not total users or total page views.
|
|
192
|
-
One user with two open tabs may count twice. Disconnected subscriptions are
|
|
193
|
-
pruned, but they can count until the runtime observes that they are stale.
|
|
152
|
+
Each active topic supports up to 256 subscriptions, regardless of how many topic names your app uses. For example, `post:${postId}` gives each post its own subscriber limit. A user with two open tabs can count twice.
|
|
194
153
|
|
|
195
154
|
You can lower limits per stream:
|
|
196
155
|
|
|
@@ -207,16 +166,6 @@ export const live = defineLiveStream({
|
|
|
207
166
|
|
|
208
167
|
## Delivery Semantics
|
|
209
168
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
- one SSE connection can hold many topic subscriptions
|
|
213
|
-
- publish cost is proportional to subscribers of the topic
|
|
214
|
-
- events are ordered within one topic
|
|
215
|
-
- clients using the raw HTTP protocol must resubscribe after reconnect
|
|
216
|
-
- deploys, rollbacks, Worker restarts, browser reconnects, and network changes
|
|
217
|
-
can drop live state
|
|
218
|
-
- your app handles replay, cache invalidation, live queries, and client state
|
|
169
|
+
Events are ordered within a topic and delivered at most once. Deploys, rollbacks, restarts, and reconnects can drop live state, so clients may miss events. Raw HTTP clients must resubscribe after reconnecting.
|
|
219
170
|
|
|
220
|
-
|
|
221
|
-
`eventId` and caller-provided `lastEventId` values as application protocol
|
|
222
|
-
fields when you build that layer.
|
|
171
|
+
For replay, store events in your application and use `eventId` and `lastEventId` to resume. Void does not store events or manage client state.
|