void 0.10.12 → 0.20.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/AGENTS_TEMPLATE.md +6 -0
- package/{skills/void/docs/node_modules/void/node_modules/pglite-server/LICENSE.md → LICENSE} +1 -1
- package/README.md +34 -8
- package/dist/{auth-qgMlYp7Z.d.mts → auth-DkcFflXV.d.mts} +10 -11
- package/dist/auth-W9WII-mN.mjs +630 -0
- package/dist/{auth-cmd-BqsdZJp5.mjs → auth-cmd-CYVhSNFy.mjs} +4 -3
- package/dist/{auth-migrations-BTZ-ATvQ.mjs → auth-migrations-9vif1uj8.mjs} +53 -12
- package/dist/{better-auth-shared-BQooDxbw.mjs → better-auth-shared-CYw1T3k4.mjs} +7 -10
- package/dist/{better-auth-shared-DealXecJ.d.mts → better-auth-shared-DSCeohOK.d.mts} +10 -5
- package/dist/{build-cmd-Bujrv5q-.mjs → build-cmd-CkVD1uOh.mjs} +6 -4
- package/dist/{cache-C11V8Fxq.mjs → cache-QcUfR-ff.mjs} +9 -5
- package/dist/{cancel-deploy-fwFYF04b.mjs → cancel-deploy-DsvWKFTe.mjs} +3 -2
- package/dist/cf-access-AJ1ehiFR.mjs +42 -0
- package/dist/cf-access-DsSsZUPr.mjs +67 -0
- package/dist/cli/cli.d.mts +1 -1
- package/dist/cli/cli.mjs +1592 -153
- package/dist/cli/env-schema-probe.d.mts +48 -61
- package/dist/cli/env-schema-probe.mjs +10 -58
- package/dist/{client-Gb71-XkG.mjs → client-CyCHWSO_.mjs} +61 -463
- package/dist/cloudflare-auth-DRkGe7-s.mjs +170 -0
- package/dist/cloudflare-cmd-D3ME2GAe.mjs +62 -0
- package/dist/cloudflare-connect-BivMefMA.mjs +56 -0
- package/dist/cloudflare-operations-CPTpRW6d.mjs +566 -0
- package/dist/{config-BkTvs43g.mjs → config-BQFq7QvD.mjs} +85 -41
- package/dist/{config-CutEMNGJ.mjs → config-NOG_U1aK.mjs} +10 -15
- package/dist/connect-D9Yr-T5f.mjs +79 -0
- package/dist/{create-project-DsYvl3TB.mjs → create-project-DMV-csEm.mjs} +26 -16
- package/dist/database-provider.d.mts +21 -0
- package/dist/database-provider.mjs +6 -0
- package/dist/{db-DOiJMRt2.mjs → db-BxoUWL0F.mjs} +600 -115
- package/dist/{delete-mh6p-zkQ.mjs → delete-iJOqxBz1.mjs} +9 -6
- package/dist/{deploy-u7Rv9q_q.mjs → deploy-CcDoeBIf.mjs} +3451 -1986
- package/dist/dev-inbox-DkgRWLkW.mjs +307 -0
- package/dist/{discover-CJHyvYfR.mjs → discover-xvfrgJeo.mjs} +3 -3
- package/dist/{magic-string.es-ZQjdJFFn.mjs → dist-BR1quN_w.mjs} +570 -216
- package/dist/{dist-DaKKDf8D.mjs → dist-BrsS7cai.mjs} +17 -2
- package/dist/{dist-BuiRJkTd.mjs → dist-m40_XgNh.mjs} +48 -33
- package/dist/{domain-DiaNQbrl.mjs → domain-gu_iaHmn.mjs} +41 -4
- package/dist/dotenv-VQxupEUv.mjs +181 -0
- package/dist/edge.d.mts +2 -0
- package/dist/edge.mjs +2 -0
- package/dist/email-Ce6SQq-i.mjs +182 -0
- package/dist/email-r6DHJyAB.mjs +262 -0
- package/dist/{entry-D7yy4xVH.mjs → entry-DU3oDoQ3.mjs} +2 -2
- package/dist/env-D4Emu-M_.mjs +95 -0
- package/dist/env-DmU2To0C.mjs +73 -0
- package/dist/env-helpers-CyKtOBpj.d.mts +22 -0
- package/dist/env-public-D_6u46fX.d.mts +135 -0
- package/dist/{env-types-QBj-ndax.mjs → env-types-BNPhro-M.mjs} +2 -2
- package/dist/{env-validation-Dea3v3ej.mjs → env-validation-ENpMy6Ez.mjs} +68 -122
- package/dist/{gen-o_w-8yI8.mjs → gen-BKw6qHIg.mjs} +70 -15
- package/dist/{github-cmd-DKcGUNsj.mjs → github-cmd-DJS5Ab-H.mjs} +39 -31
- package/dist/{handler-Cjh8uM3Y.d.mts → handler-D1hLsObx.d.mts} +124 -122
- package/dist/{head-nmvOgFjd.d.mts → head-Do8P4puT.d.mts} +9 -8
- package/dist/{headers-nsHIFixA.mjs → headers-D8QfRX9Y.mjs} +12 -10
- package/dist/inbound-BJ70in1n.d.mts +354 -0
- package/dist/inbound-CNKxb3FY.mjs +694 -0
- package/dist/index.d.mts +61 -34
- package/dist/index.mjs +1048 -321
- package/dist/{init-3rgHKBVi.mjs → init-Dx5cgKqK.mjs} +329 -271
- package/dist/link-D_rm5sRH.mjs +52 -0
- package/dist/{list-CPwFDZ_c.mjs → list-M8XShti7.mjs} +37 -5
- package/dist/{runner-kapo9aPs.mjs → local-d1-BE8KBbMy.mjs} +116 -6
- package/dist/{login-BT3H8PN3.mjs → login-C8-UuLnp.mjs} +17 -15
- package/dist/{logs-Bt313ax7.mjs → logs-DwFU7dMW.mjs} +16 -2
- package/dist/mime-BJD7d_qL.mjs +1216 -0
- package/dist/neon-DHwd2zvC.mjs +54 -0
- package/dist/{node-Da0UcsGA.mjs → node-BkaXcpAc.mjs} +29 -8
- package/dist/operator-cmd-DYWRbWUA.mjs +348 -0
- package/dist/{agents-CtgBYqld.mjs → output-tFQLLj26.mjs} +676 -211
- package/dist/{package-json-Cx1osYo6.mjs → package-json-CPoWX79C.mjs} +1 -1
- package/dist/pages/client.d.mts +43 -41
- package/dist/pages/client.mjs +40 -33
- package/dist/pages/head-client.d.mts +10 -12
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/index.d.mts +37 -14
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +25 -27
- package/dist/pages/islands-plugin.mjs +6 -4
- package/dist/pages/prefetch.d.mts +6 -7
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -1
- package/dist/pages/serialize.d.mts +7 -8
- package/dist/platform-cmd-BEOVv1PN.mjs +123 -0
- package/dist/platform-domain-BszUfiS8.mjs +228 -0
- package/dist/platform-lifecycle-CjSr6xf0.mjs +4450 -0
- package/dist/platform-management-W30iCaTL.mjs +698 -0
- package/dist/platform-recovery-pHHv4ZSg.mjs +99 -0
- package/dist/{plugin-inference-DMeavIJ6.mjs → plugin-inference-BDRfZngg.mjs} +35 -19
- package/dist/prepare-BfJvFUtJ.mjs +14 -0
- package/dist/{prepare-BoKHgMNx.mjs → prepare-CBetXvsN.mjs} +15 -24
- package/dist/{preset-BjyR3lzz.mjs → preset-lAy0B0BQ.mjs} +25 -212
- package/dist/{project-cmd-D_w-4w5B.mjs → project-cmd-DCpk1cDt.mjs} +25 -12
- package/dist/{project-paths-BQd7OmIo.mjs → project-paths-SK8nMHPp.mjs} +3 -1
- package/dist/{project-tsconfig-B-QtXjLQ.mjs → project-tsconfig-Ql2XsSQp.mjs} +2 -2
- package/dist/{protocol-Bnb0LFp3.d.mts → protocol-C-pqYJjE.d.mts} +3 -4
- package/dist/{provision-rShh6MKY.mjs → provision-Blnstcm2.mjs} +78 -45
- package/dist/r2-conditions-D1Wk8i7b.mjs +30 -0
- package/dist/{requests-B8sZxaFM.mjs → requests-Dn8Vheh1.mjs} +5 -3
- package/dist/{resolve-project-BBMtLLV9.mjs → resolve-project--Vxawf7z.mjs} +2 -2
- package/dist/rollback-CtlPXEBi.mjs +166 -0
- package/dist/{rolldown-runtime-DJK8HYOj.mjs → rolldown-runtime-rQ84J-ij.mjs} +1 -1
- package/dist/{route-types-COI2DsZv.mjs → route-types-Da-DpyUp.mjs} +85 -26
- package/dist/routes-stub.d.mts +22 -23
- package/dist/runner-mysql-CgRFl3s6.mjs +61 -0
- package/dist/{runner-pg-CHM76xuC.mjs → runner-pg-DCkWPsWS.mjs} +18 -6
- package/dist/runtime/ai.d.mts +21 -14
- package/dist/runtime/ai.mjs +5 -4
- package/dist/runtime/auth-client-react.d.mts +3 -5
- package/dist/runtime/auth-client-solid.d.mts +3 -5
- package/dist/runtime/auth-client-svelte.d.mts +3 -5
- package/dist/runtime/auth-client-vue.d.mts +3 -5
- package/dist/runtime/auth-client.d.mts +3 -5
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +10 -0
- package/dist/runtime/better-auth-mysql.mjs +49 -0
- package/dist/runtime/better-auth-pg.d.mts +8 -9
- package/dist/runtime/better-auth-pg.mjs +2 -2
- package/dist/runtime/better-auth.d.mts +8 -9
- package/dist/runtime/better-auth.mjs +2 -2
- package/dist/runtime/client-react.d.mts +1 -1
- package/dist/runtime/client-solid.d.mts +1 -1
- package/dist/runtime/client-svelte.d.mts +1 -1
- package/dist/runtime/client-vue.d.mts +1 -1
- package/dist/runtime/client.d.mts +1 -1
- package/dist/runtime/db-mysql.d.mts +2 -0
- package/dist/runtime/db-mysql.mjs +1 -0
- package/dist/runtime/db.d.mts +10 -11
- package/dist/runtime/durable.d.mts +47 -0
- package/dist/runtime/durable.mjs +146 -0
- package/dist/runtime/email/testing.d.mts +112 -0
- package/dist/runtime/email/testing.mjs +283 -0
- package/dist/runtime/email.d.mts +30 -0
- package/dist/runtime/email.mjs +573 -0
- package/dist/runtime/env-helpers.d.mts +2 -2
- package/dist/runtime/env-helpers.mjs +5 -42
- package/dist/runtime/env-public-client.d.mts +10 -11
- package/dist/runtime/env-public-client.mjs +1 -1
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +104 -49
- package/dist/runtime/env.d.mts +19 -18
- package/dist/runtime/env.mjs +15 -2
- package/dist/runtime/fetch-stream.d.mts +20 -21
- package/dist/runtime/fetch.d.mts +15 -16
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/isr.d.mts +21 -22
- package/dist/runtime/isr.mjs +26 -8
- package/dist/runtime/kv.d.mts +9 -10
- package/dist/runtime/live-client.d.mts +5 -7
- package/dist/runtime/live-client.mjs +9 -7
- package/dist/runtime/live-server.d.mts +4 -5
- package/dist/runtime/live.d.mts +22 -24
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/log.d.mts +16 -17
- package/dist/runtime/migration-handler-mysql.d.mts +4 -0
- package/dist/runtime/migration-handler-mysql.mjs +81 -0
- package/dist/runtime/migration-handler-pg.d.mts +2 -4
- package/dist/runtime/migration-handler.d.mts +5 -6
- package/dist/runtime/migration-handler.mjs +4 -3
- package/dist/runtime/queues.d.mts +3 -4
- package/dist/runtime/queues.mjs +2 -1
- package/dist/runtime/remote/binding-handler.d.mts +10 -12
- package/dist/runtime/remote/binding-handler.mjs +24 -3
- package/dist/runtime/remote/index.d.mts +5 -6
- package/dist/runtime/remote/index.mjs +21 -18
- package/dist/runtime/response.d.mts +10 -11
- package/dist/runtime/sandbox.d.mts +56 -55
- package/dist/runtime/sandbox.mjs +57 -49
- package/dist/runtime/schema-mysql.d.mts +1 -0
- package/dist/runtime/schema-mysql.mjs +2 -0
- package/dist/runtime/seed.d.mts +14 -9
- package/dist/runtime/sse-client.d.mts +6 -7
- package/dist/runtime/sse.d.mts +11 -12
- package/dist/runtime/storage.d.mts +3 -4
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +12 -12
- package/dist/runtime/ws-server.mjs +32 -4
- package/dist/runtime/ws.d.mts +19 -21
- package/dist/{scan-DYXkrasO.mjs → scan-BMH4rzlv.mjs} +53 -31
- package/dist/{scan-DEwlM_Xy.mjs → scan-CpK-57ug.mjs} +9 -5
- package/dist/{secret-Dt32J6RI.mjs → secret-BqTxGqki.mjs} +62 -5
- package/dist/{skills-CLjN0uUO.mjs → skills-Q46GZMO-.mjs} +6 -4
- package/dist/{standard-schema-DJ0HW7QP.d.mts → standard-schema-Fo_vCAZh.d.mts} +6 -6
- package/dist/{subcommand-prompt-BzV8iQZo.mjs → subcommand-prompt-WfySCQ7S.mjs} +67 -48
- package/dist/sveltekit.d.mts +12 -11
- package/dist/sveltekit.mjs +1 -1
- package/dist/types-BAp5AEBU.d.mts +79 -0
- package/dist/types-CKWnYgfy.d.mts +1 -0
- package/dist/{validate-Cw_RLeTj.mjs → validate-Bihr8WBi.mjs} +3 -3
- package/dist/wrangler--imS8n0d.mjs +1796 -0
- package/dist/{yarn-pnp-DJn3SAHF.mjs → yarn-pnp-DxSInkzL.mjs} +1 -1
- package/package.json +79 -65
- package/schema.json +35 -3
- package/skills/migrate-vite-cloudflare-to-void/SKILL.md +1 -1
- package/skills/void/SKILL.md +59 -2
- package/skills/void/docs/guide/ai.md +32 -14
- package/skills/void/docs/guide/app-types.md +6 -6
- package/skills/void/docs/guide/auth.md +14 -16
- package/skills/void/docs/guide/database/d1.md +6 -0
- package/skills/void/docs/guide/database/mysql.md +60 -0
- package/skills/void/docs/guide/database/postgresql.md +14 -9
- package/skills/void/docs/guide/database.md +39 -26
- package/skills/void/docs/guide/deployment.md +163 -22
- package/skills/void/docs/guide/durable-state.md +140 -0
- package/skills/void/docs/guide/edge/headers.md +5 -5
- package/skills/void/docs/guide/edge/prerendering.md +2 -0
- package/skills/void/docs/guide/edge/revalidation.md +21 -6
- package/skills/void/docs/guide/edge/rewrites.md +18 -14
- package/skills/void/docs/guide/edge/static-assets.md +23 -8
- package/skills/void/docs/guide/email.md +609 -0
- package/skills/void/docs/guide/env-migration.md +109 -0
- package/skills/void/docs/guide/env-vars.md +70 -248
- package/skills/void/docs/guide/index.md +15 -17
- package/skills/void/docs/guide/jobs.md +8 -5
- package/skills/void/docs/guide/live.md +7 -15
- package/skills/void/docs/guide/pages-routing/actions-and-forms.md +8 -4
- package/skills/void/docs/guide/pages-routing/islands.md +3 -3
- package/skills/void/docs/guide/pages-routing/loaders.md +6 -4
- package/skills/void/docs/guide/pages-routing/overview.md +7 -7
- package/skills/void/docs/guide/platform-administration.md +212 -0
- package/skills/void/docs/guide/platform-development.md +235 -0
- package/skills/void/docs/guide/queues.md +10 -10
- package/skills/void/docs/guide/quickstart.md +46 -67
- package/skills/void/docs/guide/remote-dev.md +8 -6
- package/skills/void/docs/guide/sandboxes.md +33 -16
- package/skills/void/docs/guide/self-hosted-platform.md +553 -0
- package/skills/void/docs/guide/server-routing.md +25 -5
- package/skills/void/docs/guide/sse.md +4 -4
- package/skills/void/docs/guide/ssg.md +5 -3
- package/skills/void/docs/guide/storage.md +2 -2
- package/skills/void/docs/guide/websockets.md +18 -7
- package/skills/void/docs/index.md +3 -3
- package/skills/void/docs/integrations/agents.md +6 -64
- package/skills/void/docs/integrations/cloudflare.md +165 -146
- package/skills/void/docs/integrations/frameworks/analog.md +4 -4
- package/skills/void/docs/integrations/frameworks/astro.md +5 -5
- package/skills/void/docs/integrations/frameworks/nuxt.md +5 -5
- package/skills/void/docs/integrations/frameworks/overview.md +3 -3
- package/skills/void/docs/integrations/frameworks/react-router.md +3 -3
- package/skills/void/docs/integrations/frameworks/sveltekit.md +3 -3
- package/skills/void/docs/integrations/frameworks/tanstack-start.md +2 -2
- package/skills/void/docs/integrations/nodejs-bun-deno.md +11 -4
- package/skills/void/docs/reference/api.md +42 -6
- package/skills/void/docs/reference/cli.md +637 -159
- package/skills/void/docs/reference/config.md +80 -25
- package/skills/void/docs/reference/resource-inference.md +13 -9
- package/skills/void/docs/reference/structure.md +10 -11
- package/AGENT_PROMPT.md +0 -19
- package/dist/cf-access-Bqw81xAf.mjs +0 -22
- package/dist/env-CZy5MorI.mjs +0 -299
- package/dist/env-helpers-z4stu8uc.d.mts +0 -52
- package/dist/env-mask-Dd47NbR6.mjs +0 -90
- package/dist/env-public-BfiLcMBk.d.mts +0 -140
- package/dist/link-CdGHSIy-.mjs +0 -45
- package/dist/mcp-DoM3_nhd.mjs +0 -377
- package/dist/project-paths-GpziKeQQ.d.mts +0 -25
- package/dist/providers-BNKRacMr.d.mts +0 -7
- package/dist/proxy-D-3_D-Gl.mjs +0 -5
- package/dist/rollback-CkvTFXx5.mjs +0 -90
- package/dist/runtime/isr-cache.d.mts +0 -207
- package/dist/runtime/isr-cache.mjs +0 -523
- package/dist/types-lLjNE9Qp.d.mts +0 -51
- package/getting-started-prompt.txt +0 -28
- package/skills/void/command/void.md +0 -7
- package/skills/void/docs/integrations/auth-providers.md +0 -0
- package/skills/void/docs/integrations/payment-processors.md +0 -0
- package/skills/void/docs/node_modules/@iconify/vue/README.md +0 -408
- package/skills/void/docs/node_modules/@iconify/vue/offline/readme.md +0 -5
- package/skills/void/docs/node_modules/@voidzero-dev/vitepress-theme/README.md +0 -103
- package/skills/void/docs/node_modules/oxc-minify/README.md +0 -78
- package/skills/void/docs/node_modules/reka-ui/README.md +0 -80
- package/skills/void/docs/node_modules/vitepress/README.md +0 -28
- package/skills/void/docs/node_modules/vitepress/template/api-examples.md +0 -49
- package/skills/void/docs/node_modules/vitepress/template/index.md +0 -28
- package/skills/void/docs/node_modules/vitepress/template/markdown-examples.md +0 -85
- package/skills/void/docs/node_modules/vitepress-plugin-group-icons/README.md +0 -101
- package/skills/void/docs/node_modules/void/AGENT_PROMPT.md +0 -19
- package/skills/void/docs/node_modules/void/CLAUDE.md +0 -219
- package/skills/void/docs/node_modules/void/README.md +0 -90
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/CHANGELOG.md +0 -685
- package/skills/void/docs/node_modules/void/node_modules/@clack/prompts/README.md +0 -396
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/sandbox/README.md +0 -219
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/vite-plugin/README.md +0 -37
- package/skills/void/docs/node_modules/void/node_modules/@cloudflare/workers-types/README.md +0 -135
- package/skills/void/docs/node_modules/void/node_modules/@electric-sql/pglite/README.md +0 -189
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/CHANGELOG.md +0 -143
- package/skills/void/docs/node_modules/void/node_modules/@hono/oauth-providers/README.md +0 -1272
- package/skills/void/docs/node_modules/void/node_modules/@napi-rs/keyring/README.md +0 -19
- package/skills/void/docs/node_modules/void/node_modules/@types/better-sqlite3/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@types/node/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@types/pg/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@types/proper-lockfile/README.md +0 -51
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/README.md +0 -22
- package/skills/void/docs/node_modules/void/node_modules/@typescript/native-preview/vendor/vscode-jsonrpc/README.md +0 -69
- package/skills/void/docs/node_modules/void/node_modules/@void/md/README.md +0 -153
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/engine-javascript/README.md +0 -9
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@shikijs/transformers/README.md +0 -9
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/@types/node/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/CHANGELOG.md +0 -24
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/gray-matter/README.md +0 -565
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-exit/README.md +0 -127
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-anchor/README.md +0 -600
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-attrs/README.md +0 -386
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-container/README.md +0 -95
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-emoji/README.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/markdown-it-footnote/README.md +0 -135
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/pathslash/README.md +0 -64
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/shiki/README.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/tinyglobby/README.md +0 -25
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/AGENTS.md +0 -16
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/README.md +0 -220
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/build.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/check.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/create.md +0 -70
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/fmt.md +0 -20
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/index.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/lint.md +0 -26
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/pack.md +0 -17
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/run.md +0 -364
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/staged.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/config/test.md +0 -18
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +0 -145
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/build.md +0 -40
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/cache.md +0 -107
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/check.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ci.md +0 -62
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/commit-hooks.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/create.md +0 -341
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/dev.md +0 -24
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/docker.md +0 -175
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/env.md +0 -167
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/fmt.md +0 -41
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/github-actions-cache.md +0 -165
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/ide-integration.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/implode.md +0 -23
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/index.md +0 -134
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/install.md +0 -199
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/lint.md +0 -50
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate-rules.md +0 -347
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/migrate.md +0 -197
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/monorepo.md +0 -176
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/pack.md +0 -69
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/run.md +0 -356
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/test.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/troubleshooting.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/upgrade.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/vpx.md +0 -66
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/guide/why.md +0 -39
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/index.md +0 -12
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/docs/team.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/generator/README.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vite-plus/templates/monorepo/README.md +0 -29
- package/skills/void/docs/node_modules/void/node_modules/@void/md/node_modules/vue/README.md +0 -58
- package/skills/void/docs/node_modules/void/node_modules/arktype/README.md +0 -165
- package/skills/void/docs/node_modules/void/node_modules/better-auth/LICENSE.md +0 -20
- package/skills/void/docs/node_modules/void/node_modules/better-auth/README.md +0 -32
- package/skills/void/docs/node_modules/void/node_modules/better-sqlite3/README.md +0 -99
- package/skills/void/docs/node_modules/void/node_modules/blake3-jit/README.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/drizzle-arktype/README.md +0 -51
- package/skills/void/docs/node_modules/void/node_modules/drizzle-kit/README.md +0 -79
- package/skills/void/docs/node_modules/void/node_modules/drizzle-orm/README.md +0 -44
- package/skills/void/docs/node_modules/void/node_modules/drizzle-valibot/README.md +0 -51
- package/skills/void/docs/node_modules/void/node_modules/drizzle-zod/README.md +0 -65
- package/skills/void/docs/node_modules/void/node_modules/es-module-lexer/README.md +0 -403
- package/skills/void/docs/node_modules/void/node_modules/estree-walker/README.md +0 -48
- package/skills/void/docs/node_modules/void/node_modules/hono/README.md +0 -85
- package/skills/void/docs/node_modules/void/node_modules/ignore/README.md +0 -452
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/CHANGELOG.md +0 -76
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/LICENSE.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/README.md +0 -364
- package/skills/void/docs/node_modules/void/node_modules/jsonc-parser/SECURITY.md +0 -41
- package/skills/void/docs/node_modules/void/node_modules/magic-string/README.md +0 -325
- package/skills/void/docs/node_modules/void/node_modules/ofetch/README.md +0 -398
- package/skills/void/docs/node_modules/void/node_modules/pathslash/README.md +0 -64
- package/skills/void/docs/node_modules/void/node_modules/pg/README.md +0 -96
- package/skills/void/docs/node_modules/void/node_modules/pglite-server/README.md +0 -135
- package/skills/void/docs/node_modules/void/node_modules/picocolors/README.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/CHANGELOG.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/proper-lockfile/README.md +0 -183
- package/skills/void/docs/node_modules/void/node_modules/tinyglobby/README.md +0 -25
- package/skills/void/docs/node_modules/void/node_modules/valibot/LICENSE.md +0 -9
- package/skills/void/docs/node_modules/void/node_modules/valibot/README.md +0 -94
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/AGENTS.md +0 -16
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/README.md +0 -220
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/build.md +0 -21
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/check.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/create.md +0 -70
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/fmt.md +0 -20
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/index.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/lint.md +0 -26
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/pack.md +0 -17
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/run.md +0 -364
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/staged.md +0 -15
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/config/test.md +0 -18
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/automatic-data-tracking.md +0 -145
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/build.md +0 -40
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/cache.md +0 -107
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/check.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ci.md +0 -62
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/commit-hooks.md +0 -60
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/create.md +0 -341
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/dev.md +0 -24
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/docker.md +0 -175
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/env.md +0 -167
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/fmt.md +0 -41
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/github-actions-cache.md +0 -165
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/ide-integration.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/implode.md +0 -23
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/index.md +0 -134
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/install.md +0 -199
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/lint.md +0 -50
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate-rules.md +0 -347
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/migrate.md +0 -197
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/monorepo.md +0 -176
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/pack.md +0 -69
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/run.md +0 -356
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/test.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/troubleshooting.md +0 -108
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/upgrade.md +0 -101
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/vpx.md +0 -66
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/guide/why.md +0 -39
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/index.md +0 -12
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/docs/team.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/generator/README.md +0 -35
- package/skills/void/docs/node_modules/void/node_modules/vite-plus/templates/monorepo/README.md +0 -29
- package/skills/void/docs/node_modules/void/node_modules/wrangler/README.md +0 -63
- package/skills/void/docs/node_modules/void/node_modules/zod/README.md +0 -191
- package/skills/void/docs/node_modules/void/skills/migrate-vite-cloudflare-to-void/SKILL.md +0 -175
- package/skills/void/docs/node_modules/void/skills/void/SKILL.md +0 -76
- package/skills/void/docs/node_modules/void/skills/void/command/void.md +0 -7
- package/skills/void/docs/node_modules/void/test/e2e/README.md +0 -85
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Environment migration
|
|
2
|
+
|
|
3
|
+
The environment model now uses `.env` for local development only and remote secrets for every server-side production value. There are no compatibility shims for the previous four-file behavior.
|
|
4
|
+
|
|
5
|
+
## 1. Preserve production values and consolidate local development values
|
|
6
|
+
|
|
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
|
+
|
|
9
|
+
Merge the values you still need locally into `.env`:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
.env.local
|
|
13
|
+
.env.development
|
|
14
|
+
.env.development.local
|
|
15
|
+
→ .env
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Keep the legacy files for now. You will remove them in step 5, after migrating their values.
|
|
19
|
+
|
|
20
|
+
Ensure `.env` is ignored by Git:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
.env
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 2. Remove masking modifiers
|
|
27
|
+
|
|
28
|
+
Update `env.ts` before running any secret commands: they import the schema to validate values, and the removed modifiers cause that import to fail.
|
|
29
|
+
|
|
30
|
+
Change:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
export default defineEnv({
|
|
34
|
+
STRIPE_KEY: string().secret(),
|
|
35
|
+
VITE_API_ORIGIN: url().public(),
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
to:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
export default defineEnv({
|
|
43
|
+
STRIPE_KEY: string(),
|
|
44
|
+
VITE_API_ORIGIN: url(),
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Server storage is selected by the absence of the client prefix, not a modifier. Invalid input is redacted uniformly.
|
|
49
|
+
|
|
50
|
+
## 3. Move production server values remotely
|
|
51
|
+
|
|
52
|
+
For managed Void projects, upload each non-client schema key:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
void secret put DATABASE_URL
|
|
56
|
+
void secret put STRIPE_KEY
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
To migrate a production file in one pass, prepare a copy outside the project directory containing only server keys declared in `env.ts`, then upload it:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
void secret sync /secure/path/production-secrets.txt
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The sync command validates every entry against `env.ts`. It rejects undeclared names, invalid values, and client-prefixed names. Keep client-prefixed values for step 4 instead of including them in this file.
|
|
66
|
+
|
|
67
|
+
For direct Cloudflare deployments, select Cloudflare and use the same commands:
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
void connect --platform cloudflare
|
|
71
|
+
void secret put DATABASE_URL
|
|
72
|
+
void secret put STRIPE_KEY
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
After the upload succeeds, confirm that all expected server names appear in the remote store:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
void secret list
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Remote stores return names only; plaintext values are validated during upload and again at worker startup. If an upload fails or a name is missing, retain the source values and retry before continuing.
|
|
82
|
+
|
|
83
|
+
For direct Cloudflare deployments, remove the migrated server keys from `vars` in `wrangler.jsonc` after confirming the upload. Void now treats any schema-declared server key in Worker `vars` as an error.
|
|
84
|
+
|
|
85
|
+
## 4. Supply client values at build time
|
|
86
|
+
|
|
87
|
+
Move `VITE_*` production values to CI/build-shell variables, or make the value an explicit schema default:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
export VITE_API_ORIGIN=https://api.example.com
|
|
91
|
+
```
|
|
92
|
+
|
|
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
|
+
|
|
95
|
+
The same public values are embedded in the server bundle for boot validation and `env.VITE_*` reads during server rendering. Do not upload them as remote secrets.
|
|
96
|
+
|
|
97
|
+
## 5. Remove legacy files and verify
|
|
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. Void's environment checks and deployment fail fast when they find a legacy file, rather than silently applying a precedence order.
|
|
100
|
+
|
|
101
|
+
`void env example` was removed because `.env.example` created a second dotenv source. Treat `env.ts` as the checked-in list of names, types, defaults, and requiredness.
|
|
102
|
+
|
|
103
|
+
Then verify:
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
void env check
|
|
107
|
+
void env check --remote
|
|
108
|
+
void deploy
|
|
109
|
+
```
|
|
@@ -1,309 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
outline: deep
|
|
3
|
-
---
|
|
1
|
+
# Environment variables
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
Void uses one schema, one local dotenv file, and one production rule:
|
|
6
4
|
|
|
7
|
-
|
|
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.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
2. **TypeScript** — `env.X` and `c.env.X` become typed automatically (no manual interface to maintain)
|
|
11
|
-
3. **Deploy safety** — `void deploy` refuses to upload if a required key is missing from `.env*` files or remote secrets
|
|
10
|
+
This removes the distinction between “plain” and “secret-looking” server variables. Every server variable uses the same secure production path.
|
|
12
11
|
|
|
13
|
-
##
|
|
12
|
+
## Define the schema
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
::: tip Scaffolded on `void init`
|
|
18
|
-
If you already have `.env` or `.env.example` files when you run `void init`, Void generates an `env.ts` seeded from those keys. Inference is conservative — values that unambiguously parse as a boolean (`true`/`false`), an `http(s)://` URL, or a small integer get typed accordingly; everything else stays `string()`. The generated file carries a banner comment asking you to review and tighten types before running dev.
|
|
19
|
-
:::
|
|
14
|
+
Create `env.ts` at the project root:
|
|
20
15
|
|
|
21
16
|
```ts
|
|
22
|
-
|
|
23
|
-
import { defineEnv, string, number, boolean, oneOf, url } from 'void/env';
|
|
17
|
+
import { defineEnv, number, string, url } from 'void/env';
|
|
24
18
|
|
|
25
19
|
export default defineEnv({
|
|
20
|
+
DATABASE_URL: url(),
|
|
26
21
|
STRIPE_KEY: string(),
|
|
27
22
|
PORT: number().default(3000),
|
|
28
|
-
|
|
29
|
-
WEBHOOK_URL: url(),
|
|
30
|
-
DEBUG: boolean().optional(),
|
|
31
|
-
VITE_APP_TITLE: string(),
|
|
23
|
+
VITE_API_ORIGIN: url(),
|
|
32
24
|
});
|
|
33
25
|
```
|
|
34
26
|
|
|
35
|
-
|
|
27
|
+
Void generates `.void/env.d.ts`, validates values, and provides the typed `env` proxy:
|
|
36
28
|
|
|
37
29
|
```ts
|
|
38
30
|
import { env } from 'void/env';
|
|
39
31
|
|
|
40
|
-
|
|
41
|
-
console.log(env.PORT); // typed as number
|
|
32
|
+
const databaseUrl = env.DATABASE_URL;
|
|
42
33
|
```
|
|
43
34
|
|
|
44
|
-
`
|
|
45
|
-
|
|
46
|
-
### Built-in helpers
|
|
35
|
+
The built-in helpers are `string()`, `number()`, `boolean()`, `url()`, `email()`, `oneOf([...])`, and `json<T>()`. They support `.optional()` and `.default(value)`. Any [Standard Schema](https://standardschema.dev/) validator can also be used directly.
|
|
47
36
|
|
|
48
|
-
|
|
37
|
+
Defaults are source-code constants. They are appropriate for non-sensitive fallback behavior; do not put credentials in a default.
|
|
49
38
|
|
|
50
|
-
|
|
39
|
+
## Local development
|
|
51
40
|
|
|
52
|
-
|
|
53
|
-
import * as v from 'valibot';
|
|
41
|
+
Put local values in a single root `.env` file:
|
|
54
42
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
```ini
|
|
44
|
+
DATABASE_URL=postgres://localhost/my-app
|
|
45
|
+
STRIPE_KEY=sk_test_example
|
|
46
|
+
VITE_API_ORIGIN=http://localhost:5173
|
|
59
47
|
```
|
|
60
48
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Keys matching Vite's `envPrefix` (default `VITE_`) are exposed to client code; Vite enforces this at the bundler level. All other keys are server-only — referencing one from a client module fails the build with a file:line:col error from `void:env-client-guard`, and the runtime proxy still throws as a backstop.
|
|
64
|
-
|
|
65
|
-
If your project sets a custom `envPrefix` (e.g. `'PUBLIC_'` or an array like `['PUBLIC_', 'NEXT_PUBLIC_']`) in `vite.config.ts`, the build guard honours it automatically. Schema keys that match any configured prefix pass the client check.
|
|
49
|
+
`.env` should be gitignored. Void rejects legacy `.env.local`, `.env.development`, `.env.production`, `.env.example`, other `.env.*` files, and Wrangler `.dev.vars*` files so there is no hidden precedence order.
|
|
66
50
|
|
|
67
|
-
|
|
51
|
+
Run the local check at any time:
|
|
68
52
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```ts
|
|
72
|
-
// source
|
|
73
|
-
import { env } from 'void/env';
|
|
74
|
-
if (env.MODE === 'production') {
|
|
75
|
-
initAnalytics();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// production client bundle (after folding + DCE)
|
|
79
|
-
initAnalytics();
|
|
53
|
+
```sh
|
|
54
|
+
void env check
|
|
80
55
|
```
|
|
81
56
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
- **Client bundles only.** Server / SSR / worker code keeps the full runtime proxy so secrets, runtime-injected vars, and HMR keep working.
|
|
85
|
-
- **Prefix-gated.** Only keys matching Vite's `envPrefix` (default `VITE_`, honours custom string or array config) are ever folded — server-only keys never appear as literals in client output.
|
|
86
|
-
- **Static access only.** `env.FOO` and `env["FOO"]` get folded. Dynamic access (`env[key]`), destructuring, and reassignment fall back to the runtime proxy.
|
|
87
|
-
- **Values come from** the same source Vite already uses for `import.meta.env`: `.env*` files (respecting `envDir`) plus schema `.default(x)` values for missing keys. Unknown keys are left untouched and the proxy serves them at runtime.
|
|
88
|
-
- **Build-only.** Dev keeps going through the proxy so editing `.env.local` takes effect without a full rebuild.
|
|
89
|
-
- **Zero-config.** No flags, no opt-in — just works.
|
|
90
|
-
|
|
91
|
-
### Vite `define` interop
|
|
92
|
-
|
|
93
|
-
Vite's `define` option performs build-time literal replacement (e.g. `define: { 'process.env.VERSION': '"1.0"' }`). It does **not** flow through schema validation or the typed `env` proxy — using both `define` and `defineEnv` for the same name causes silent skew (compiled client code sees the define value, runtime proxy and validation see the schema source). Void emits a warning at config time when this overlap is detected.
|
|
57
|
+
Local database, migration, auth, and dev-server tooling all read the same `.env` file. Shell values override it.
|
|
94
58
|
|
|
95
|
-
|
|
59
|
+
## Production server values
|
|
96
60
|
|
|
97
|
-
|
|
61
|
+
Every schema key that is not client-prefixed is a server value. Set it remotely:
|
|
98
62
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
- **tsconfig path aliases are not resolved.** Writing `import { X } from "@/shared/env-keys"` or `import { Y } from "~/foo"` inside `env.ts` fails to load; Void detects this and re-throws with a hint pointing at the offending specifier. Use a relative import instead.
|
|
104
|
-
- **Custom Vite plugins don't run.** Anything that needs Vite's transform pipeline (SVG-as-component, GraphQL loaders, virtual modules, etc.) won't apply to `env.ts`. Keep this file to pure TS + schema declarations.
|
|
105
|
-
|
|
106
|
-
In practice `env.ts` should only import schema helpers from `void/env` and — at most — a shared constants file via a relative path.
|
|
107
|
-
|
|
108
|
-
## `.env` files
|
|
109
|
-
|
|
110
|
-
Void uses Vite's standard `.env` convention to populate the schema:
|
|
111
|
-
|
|
112
|
-
Whether a file's values ship depends on which deploy path you use:
|
|
113
|
-
|
|
114
|
-
| File | Loaded in dev | Shipped by `void deploy` | Shipped by `--backend cloudflare` |
|
|
115
|
-
| ----------------------- | ------------- | ------------------------ | --------------------------------- |
|
|
116
|
-
| `.env` | yes | yes (`plain_text`) | yes (worker `vars`) |
|
|
117
|
-
| `.env.local` | yes | no | **yes** (worker `vars`) |
|
|
118
|
-
| `.env.production` | yes | yes (`plain_text`) | yes (worker `vars`) |
|
|
119
|
-
| `.env.production.local` | yes | no | **yes** (worker `vars`) |
|
|
120
|
-
|
|
121
|
-
`.local` files are gitignored by convention — use them for secrets you don't want in source control.
|
|
122
|
-
|
|
123
|
-
::: warning `.local` files are not deploy-excluded on `--backend cloudflare`
|
|
124
|
-
Managed `void deploy` reads only `.env` and `.env.production`, so a `.local` file keeps secrets off the platform. The self-host `void deploy --backend cloudflare` path instead runs Vite's production env loading, which reads all four files and bakes them into the worker's `vars` as plaintext. A value that is also `export`ed in the shell with the same value is stripped back out, so this bites hardest in CI, where the variable usually only exists in the file.
|
|
125
|
-
|
|
126
|
-
On that path, keep real secrets out of every `.env*` file and use `wrangler secret put <NAME>` instead. See [Cloudflare deploy](/integrations/cloudflare).
|
|
127
|
-
:::
|
|
128
|
-
|
|
129
|
-
### Dotenv variable expansion
|
|
130
|
-
|
|
131
|
-
Values can reference other keys defined in the same (or earlier-precedence) `.env` file using `${VAR}` or `$VAR`:
|
|
132
|
-
|
|
133
|
-
```ini
|
|
134
|
-
# .env
|
|
135
|
-
BASE_URL=https://api.example.com
|
|
136
|
-
API_URL=${BASE_URL}/v1 # → "https://api.example.com/v1"
|
|
137
|
-
BUILD=$BASE_URL/build.json # bare form also works
|
|
138
|
-
LITERAL=\$NOT_EXPANDED # → "$NOT_EXPANDED" (backslash-escape)
|
|
63
|
+
```sh
|
|
64
|
+
void secret put DATABASE_URL
|
|
65
|
+
void secret put STRIPE_KEY
|
|
139
66
|
```
|
|
140
67
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
Expansion runs identically across every path that reads your `.env*` files: the runtime typed `env` proxy, `void env check`, `void deploy`, and the `void init` scaffold inference. Importantly, references **only** resolve against values declared in the `.env*` files themselves — shell `process.env` values are not substituted in. This stops a developer-machine variable from silently materialising in committed examples or deploy manifests. (Vite's own `loadEnv` does consult `process.env` during expansion for the dev-server path; Void filters the shell pollution back out via `filterLoadedEnv` so the observable surface stays the same.)
|
|
68
|
+
For bulk upload, prepare a dotenv-formatted file containing only production server values:
|
|
144
69
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
For values that should never live in a `.env` file (Stripe keys, OAuth secrets, etc.), upload them as encrypted secret bindings on your deployed worker:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
void secret put STRIPE_KEY # prompts for value
|
|
151
|
-
void secret put STRIPE_KEY < key.txt # from stdin
|
|
152
|
-
void secret sync .env.production # bulk upload from a dotenv file
|
|
153
|
-
void secret list
|
|
154
|
-
void secret delete STRIPE_KEY
|
|
70
|
+
```sh
|
|
71
|
+
void secret sync production-secrets.txt
|
|
155
72
|
```
|
|
156
73
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
## Defaults
|
|
160
|
-
|
|
161
|
-
Schema defaults from `defineEnv({ PORT: number().default(3000) })` flow into:
|
|
162
|
-
|
|
163
|
-
- The typed `env` proxy: `env.PORT` returns `3000` when no value is set.
|
|
164
|
-
- Worker bindings (`c.env.PORT`, `process.env.PORT` on Node target): the
|
|
165
|
-
default value is injected as a stringified `var` in dev, in `void deploy`
|
|
166
|
-
manifests, and in prerender bindings, so any code path that reads the raw
|
|
167
|
-
env sees the same fallback.
|
|
168
|
-
- Client-exposed keys (`VITE_*` by default, or your configured `envPrefix`):
|
|
169
|
-
defaults are added to Vite's client env, so browser code reading
|
|
170
|
-
`env.VITE_APP_TITLE` sees the same fallback.
|
|
171
|
-
|
|
172
|
-
User-provided `.env` / shell values always win — defaults only fill gaps.
|
|
173
|
-
|
|
174
|
-
## Validation behavior
|
|
175
|
-
|
|
176
|
-
| Phase | Behavior |
|
|
177
|
-
| -------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
178
|
-
| Dev server start | Warns about missing/invalid keys (does not block). |
|
|
179
|
-
| First runtime access | Throws `EnvValidationError` with the failing key and reason. |
|
|
180
|
-
| `void env check` | Validates `.env` + `.env.production` (and optionally remote secrets with `--remote`); exits non-zero on failure. |
|
|
181
|
-
| `void deploy` | Hard-errors before upload if any required key is missing from the union of `.env*` and remote secrets. |
|
|
74
|
+
`void secret put` and `void secret sync` validate the plaintext against `env.ts` before upload. The remote store encrypts the accepted value and only returns its name later, so subsequent deploy checks can prove presence but cannot re-read the plaintext. The worker validates the real value again at runtime.
|
|
182
75
|
|
|
183
|
-
|
|
76
|
+
Client-prefixed keys are rejected by secret commands. Keep local development credentials and `VITE_*` values out of the production secrets file.
|
|
184
77
|
|
|
185
|
-
|
|
78
|
+
`void deploy` never adds `.env` values to its manifest. It requires every required server key to exist remotely before upload.
|
|
186
79
|
|
|
187
|
-
|
|
80
|
+
For direct Cloudflare deployment, select Cloudflare and use the same Void commands:
|
|
188
81
|
|
|
189
|
-
```
|
|
190
|
-
void
|
|
82
|
+
```sh
|
|
83
|
+
void connect --platform cloudflare
|
|
84
|
+
void secret put DATABASE_URL
|
|
85
|
+
void secret put STRIPE_KEY
|
|
86
|
+
void deploy --platform cloudflare
|
|
191
87
|
```
|
|
192
88
|
|
|
193
|
-
|
|
89
|
+
Void stores the values as encrypted Worker secrets, emits the required server names through `secrets.required`, and refuses to deploy a schema-declared server key as a plaintext Worker `vars` entry.
|
|
194
90
|
|
|
195
|
-
|
|
91
|
+
## Client values
|
|
196
92
|
|
|
197
|
-
|
|
198
|
-
void env example # creates or refreshes the void-managed block
|
|
199
|
-
void env example --force # silences the "appended block" notice (use in CI)
|
|
200
|
-
```
|
|
93
|
+
Keys beginning with `VITE_` are client values. This boundary is fixed, so the CLI, build, and secret commands always classify a name the same way even when a framework customizes Vite's own `envPrefix`.
|
|
201
94
|
|
|
202
|
-
|
|
95
|
+
Client values are embedded in browser JavaScript and are never secrets. Supply them through the build shell or use a schema default:
|
|
203
96
|
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
# Run `void env example` to refresh.
|
|
207
|
-
# required
|
|
208
|
-
STRIPE_KEY=
|
|
209
|
-
# with defaults
|
|
210
|
-
PORT=3000
|
|
211
|
-
# >>> end void env <<<
|
|
97
|
+
```sh
|
|
98
|
+
VITE_API_ORIGIN=https://api.example.com void deploy
|
|
212
99
|
```
|
|
213
100
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
Env validation errors, dev-server warnings, and CLI reports automatically replace secret-looking values with `<redacted>` before they surface. This keeps tokens out of Discord screenshots, GitHub issues, and CI logs when you paste an `EnvValidationError` stack.
|
|
221
|
-
|
|
222
|
-
Redaction is belt-and-braces:
|
|
223
|
-
|
|
224
|
-
1. **Explicit override.** The built-in helpers support `.secret()` and `.public()` modifiers, and they win over every heuristic:
|
|
225
|
-
|
|
226
|
-
```ts
|
|
227
|
-
export default defineEnv({
|
|
228
|
-
STRIPE_KEY: string().secret(), // always redacted
|
|
229
|
-
PUBLIC_KEY: string().public(), // never redacted (opts out of the KEY heuristic)
|
|
230
|
-
PORT: number(),
|
|
231
|
-
});
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
Third-party Standard Schema validators (valibot, zod, arktype) can't carry this flag — they fall back to the heuristics below.
|
|
235
|
-
|
|
236
|
-
2. **Key-name heuristic.** Values for keys matching `/KEY|TOKEN|SECRET|PASSWORD|PASS(WD)?|CREDENTIAL|PRIVATE|AUTH|BEARER|APIKEY|DSN/i` are redacted by default.
|
|
237
|
-
|
|
238
|
-
3. **Value-content heuristic.** Even on neutral keys, values that start with `sk_` / `pk_` / `ghp_` / `xoxb-` / `AKIA` or look like a ≥24-char high-entropy string are redacted. This catches wrong-file typos like `PORT=sk_live_abc123`, where the key is innocent but the value is a Stripe key.
|
|
239
|
-
|
|
240
|
-
The **key name itself is never masked** — you need it to locate the offending entry.
|
|
241
|
-
|
|
242
|
-
For local debugging, set `VOID_ENV_UNMASK=1` in your shell to see raw values in error output. On activation Void prints a one-shot notice to stderr so the loosened output is visibly attributed; unset it before sharing logs.
|
|
243
|
-
|
|
244
|
-
## Using `env.ts` with a meta-framework
|
|
245
|
-
|
|
246
|
-
The full env story works on every framework `voidPlugin()` supports — typegen, leak guard, folding, runtime reads on both server and client, plus all CLI-level features.
|
|
247
|
-
|
|
248
|
-
| Framework | `env.ts` typegen | Client leak guard | Constant folding | `env` on server | `env` on client | `void env check` + deploy gate |
|
|
249
|
-
| ----------------- | :--------------: | :---------------: | :--------------: | :-----------------: | :---------------------: | :----------------------------: |
|
|
250
|
-
| Void (Pages mode) | yes | yes | yes | yes | yes (`VITE_*`) | yes |
|
|
251
|
-
| TanStack Start | yes | yes | yes | yes | yes (`VITE_*`) | yes |
|
|
252
|
-
| React Router v7 | yes | yes | yes | yes (in `loader()`) | yes (`VITE_*`) | yes |
|
|
253
|
-
| SvelteKit | yes | yes | yes | yes (runtime proxy) | yes (`VITE_*`) | yes |
|
|
254
|
-
| Nuxt | yes | yes | yes | yes | yes (`VITE_*`) | yes |
|
|
255
|
-
| Analog | yes | yes | yes | yes | yes (`VITE_*`) | yes |
|
|
256
|
-
| Astro | yes | yes | yes | yes | yes (`envPrefix`-gated) | yes |
|
|
101
|
+
```ts
|
|
102
|
+
export default defineEnv({
|
|
103
|
+
VITE_API_ORIGIN: url().default('https://api.example.com'),
|
|
104
|
+
});
|
|
105
|
+
```
|
|
257
106
|
|
|
258
|
-
|
|
107
|
+
Builds ignore client values from `.env`; this prevents a developer's local value from silently becoming production configuration.
|
|
259
108
|
|
|
260
|
-
|
|
261
|
-
- `void deploy` hard-fails before upload when any required key is missing.
|
|
262
|
-
- `void env example` generates the marker-delimited `.env.example` block.
|
|
263
|
-
- `void init` scaffolds `env.ts` from existing dotenv files.
|
|
264
|
-
- Typed `.void/env.d.ts` so `env.X` autocompletes in editors.
|
|
265
|
-
- `void:env-client-guard` fails the build with a file:line:col error when a server-only key is referenced from a client module.
|
|
266
|
-
- Build-time constant folding for `envPrefix`-matched reads in the client bundle.
|
|
109
|
+
The server bundle embeds those same public build values. Worker boot validation and server-side `env.VITE_*` reads use them without requiring remote secrets, keeping server rendering consistent with the browser. Server-only keys still come from runtime bindings and are validated at boot.
|
|
267
110
|
|
|
268
|
-
|
|
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.
|
|
269
112
|
|
|
270
|
-
##
|
|
113
|
+
## Validation and redaction
|
|
271
114
|
|
|
272
|
-
|
|
115
|
+
```sh
|
|
116
|
+
void env check # validate .env + shell for local development
|
|
117
|
+
void env check --remote # validate build-time client values and remote server names
|
|
118
|
+
void env types # regenerate .void/env.d.ts
|
|
119
|
+
```
|
|
273
120
|
|
|
274
|
-
|
|
121
|
+
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.
|
|
275
122
|
|
|
276
|
-
|
|
123
|
+
There are no `.secret()` or `.public()` schema modifiers. Storage now follows the server/client boundary, and diagnostics follow one redaction rule.
|
|
277
124
|
|
|
278
|
-
|
|
125
|
+
## Imports inside `env.ts`
|
|
279
126
|
|
|
280
|
-
|
|
281
|
-
| ----------------------------------------------- | :-----------: | :-----------: | :---------------: | :--------------: | :--------------------: | :------------------: | :--------------------: |
|
|
282
|
-
| Single schema file | yes | yes | yes (config) | no | no | partial | yes |
|
|
283
|
-
| Runtime validation | yes | yes | yes | no | no | no | yes |
|
|
284
|
-
| Auto-generated types | yes | yes | yes | yes | manual `env.d.ts` | yes (aug.) | manual |
|
|
285
|
-
| Bring-your-own validator (Standard Schema) | yes | yes | no | no | no | no | yes |
|
|
286
|
-
| Built-in helpers without installing a validator | yes | no | yes | — | — | — | no |
|
|
287
|
-
| Build-time guard against leaking server env | yes | yes | yes | yes | prefix only | prefix only | no |
|
|
288
|
-
| Custom `envPrefix` honoured | yes | yes | n/a | n/a | yes | n/a | n/a |
|
|
289
|
-
| Schema defaults flow into runtime bindings | yes | partial | yes | no | no | partial | manual |
|
|
290
|
-
| Async validators | yes | no | no | no | no | no | yes |
|
|
291
|
-
| `.env.example` scaffolding from schema | yes | no | no | no | no | no | no |
|
|
292
|
-
| Deploy-time check (local + remote secrets) | yes | no | no | no | no | no | no |
|
|
293
|
-
| Automatic secret redaction in validation errors | yes | no | no | no | no | no | no |
|
|
294
|
-
| Cloudflare secret store integration | yes | no | no | no | no | no | no |
|
|
295
|
-
| Zero-config (auto-discovered, no plugin wiring) | yes | no | yes | yes | yes | yes | no |
|
|
296
|
-
| Schema scaffolded from existing `.env` files | yes | no | no | no | no | no | no |
|
|
297
|
-
| `${VAR}` expansion, no `process.env` leakage | yes | no | no | no | partial (leaks) | no | needs plugin |
|
|
127
|
+
Void loads `env.ts` through Node's native `import()` before Vite transforms application code. Use relative imports or package names for schema helpers and shared constants. TypeScript path aliases and imports requiring custom Vite transforms are not supported in this file.
|
|
298
128
|
|
|
299
|
-
|
|
129
|
+
## Migrating from the multi-file model
|
|
300
130
|
|
|
301
|
-
|
|
302
|
-
- **Helpers _and_ Standard Schema, mixable.** Most solutions force a choice: either Zod-only (t3-env, many DIY setups), or a bespoke helper DSL with no escape hatch (Astro, SvelteKit). Void ships `string()`, `number()`, `boolean()`, `url()`, `email()`, `oneOf()`, `json<T>()` so a small project pulls in zero validator dependencies, and any [Standard Schema](https://standardschema.dev) library (valibot, zod, arktype) drops into the same object for richer rules.
|
|
303
|
-
- **Build-time leak prevention with source locations.** The `void:env-client-guard` plugin walks client module graphs and fails the build with a file:line:col pointer when a non-prefixed key is imported from the browser bundle. Vite on its own only enforces this through the _prefix convention_ — a renamed variable silently leaks. Void enforces both the prefix rule and the schema's server/client split.
|
|
304
|
-
- **Build-time constant folding for client reads.** Production client builds inline static `env.VITE_FOO` reads as literals so `if (env.MODE === 'production') { … }` branches tree-shake the same way `import.meta.env.MODE` already does. Server / SSR / worker code keeps the runtime proxy untouched, and only prefix-matching keys are ever folded — no schema-required validation is bypassed because the same values still flow through `defineEnv` on boot.
|
|
305
|
-
- **Defaults propagate everywhere.** `PORT: number().default(3000)` fills the typed proxy, the worker `vars` block in dev, the deploy manifest, and the prerender bindings — so `process.env.PORT`, `c.env.PORT`, and `env.PORT` all return `3000` when unset. t3-env and Nuxt only surface defaults in the typed object; the raw `process.env` still reads `undefined`.
|
|
306
|
-
- **Deploy is the enforcement point.** `void deploy` unions `.env*` with the remote secret list and hard-fails on any missing required key _before_ upload. No competing solution in the table treats deploy as a validation gate — the closest substitute is a handwritten CI script calling `zod.parse(process.env)`, which doesn't know about the target platform's remote secrets.
|
|
307
|
-
- **`.env.example` is generated, not maintained by hand.** `void env example` writes a marker-delimited block grouped into `required`, `with defaults`, `optional`, with enum hints for `oneOf` keys. Everything outside the markers (team CI tokens, comments) survives refresh. No other tool in the comparison ships this.
|
|
308
|
-
- **Async validators.** A validator can return a `Promise` — useful for probing a URL, fetching a JWKS, or resolving a secret reference at startup. t3-env and schema-based systems assume synchronous parsing.
|
|
309
|
-
- **Onboarding from an existing `.env`.** `void init` detects pre-existing dotenv files and writes a seeded `env.ts` with conservative type inference (boolean/URL/number/string) and a banner comment prompting you to tighten the guesses. Every other solution in the table requires you to hand-write the schema from scratch even when your team already has a `.env.example` committed.
|
|
131
|
+
See [Environment migration](/guide/env-migration) for the breaking-change checklist.
|
|
@@ -4,9 +4,11 @@ outline: deep
|
|
|
4
4
|
|
|
5
5
|
# What is Void?
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Void is a fullstack SDK for Vite apps. It connects your server code, database, and frontend types, and deploys your app to Cloudflare Workers. To try it, start with the [Quickstart](./quickstart).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Add the Vite plugin to your app. As you use features such as a database, key-value storage, or queues, Void detects what you need and sets up the corresponding resources.
|
|
10
|
+
|
|
11
|
+
The CLI and build tools require Node.js 24.21.0 or later.
|
|
10
12
|
|
|
11
13
|
```sh
|
|
12
14
|
npm install -D vite void
|
|
@@ -22,34 +24,30 @@ export default defineConfig({
|
|
|
22
24
|
```
|
|
23
25
|
|
|
24
26
|
```sh
|
|
27
|
+
void init # choose your framework and deployment target
|
|
25
28
|
void deploy
|
|
26
|
-
# app live at <your-subdomain>.void.app!
|
|
27
29
|
```
|
|
28
30
|
|
|
29
31
|
## The idea
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
Your code often already describes the resources it needs. Import `db` from `void/db`, for example, and Void provides a database for local development and provisions its production resource when you deploy. The same pattern applies to `kv`, `storage`, queues, and AI.
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
Types follow your data through the app: from a Drizzle schema to a route handler, then to the frontend calling that route. You can change a field in one place and let TypeScript show you the code that needs updating.
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
Void brings these pieces together:
|
|
36
38
|
|
|
37
|
-
- **
|
|
39
|
+
- **Resources from your code:** imports tell Void which supported resources to provision. Use `void.json` or your Cloudflare config when you need to customize them.
|
|
38
40
|
- **Types from database to frontend:** your Drizzle schema defines DB types, route handlers infer return types, and the [typed fetch client](./typed-fetch.md) checks calls at the usage site. One [Standard Schema](https://standardschema.dev/) validator can drive both runtime validation and compile-time types.
|
|
39
|
-
- **
|
|
41
|
+
- **Local Cloudflare development:** native Void apps run server code in `workerd`, with local database, KV, and storage.
|
|
40
42
|
- **Deploy that understands the app:** `void deploy` reads your migrations, provisions the resources you actually use, and ships the result to the edge.
|
|
41
43
|
|
|
42
44
|
## The platform
|
|
43
45
|
|
|
44
|
-
Void deploys to [Cloudflare Workers](https://developers.cloudflare.com/workers/).
|
|
46
|
+
Void deploys to [Cloudflare Workers](https://developers.cloudflare.com/workers/). You can use your own Cloudflare account or connect to a Void platform managed by your team. Both use the same SDK and CLI.
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
- Database reads are fast everywhere via D1's read replication.
|
|
48
|
-
- Custom domains with automatic TLS.
|
|
49
|
-
- Secrets and environment variables managed via CLI or dashboard, scoped per project.
|
|
50
|
-
- A dashboard for deployments, usage metrics, and project settings.
|
|
48
|
+
[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.
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
For a single app, [deploy to your own account](../integrations/cloudflare#deploy-to-your-own-cloudflare-account). To give a team a shared deployment service, [install a Void platform](./self-hosted-platform.md), then let developers connect to its URL.
|
|
53
51
|
|
|
54
52
|
## How it works
|
|
55
53
|
|
|
@@ -61,7 +59,7 @@ import { storage } → R2 bucket (auto-provisioned)
|
|
|
61
59
|
import { ai } → Workers AI inference (metered)
|
|
62
60
|
db/schema.ts → Drizzle schema (source of truth for DB types)
|
|
63
61
|
db/migrations/*.sql → Applied to D1 on deploy
|
|
64
|
-
void deploy →
|
|
62
|
+
void deploy → Deploy to the saved Cloudflare or Void target
|
|
65
63
|
```
|
|
66
64
|
|
|
67
65
|
The plugin scans your source code at build time, detects which imports you use, and provisions the corresponding Cloudflare bindings on deploy.
|
|
@@ -70,7 +68,7 @@ Void also works with existing frameworks. [TanStack Start](/integrations/framewo
|
|
|
70
68
|
|
|
71
69
|
If you are building a full-stack app without a meta-framework, Void also gives you [file-based server routing](./server-routing) with method exports, dynamic params, middleware, and validation. It also includes [pages routing](./pages-routing/overview) for server-rendered UI, SPA navigation, co-located data loading, and typed forms across React, Vue, Svelte, and Solid.
|
|
72
70
|
|
|
73
|
-
Void
|
|
71
|
+
Void detects your [app type](./app-types) and chooses the appropriate build and deployment flow.
|
|
74
72
|
|
|
75
73
|
## Next steps
|
|
76
74
|
|