void 1.12.2 → 1.13.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 +1 -0
- package/dist/{account-cmd-CdJQba_Q.mjs → account-cmd-4fQiXYX7.mjs} +6 -6
- package/dist/{application-analysis-DVeN8yoi.mjs → application-analysis-BjEwHTV2.mjs} +19 -13
- package/dist/{application-routing-KKw4Y84h.mjs → application-routing-COCfD2yc.mjs} +1 -1
- package/dist/args-DrnTI35r.mjs +88 -0
- package/dist/args-MnQnqypt.mjs +1 -0
- package/dist/{auth-CqwJwItO.mjs → auth-CeBmolb-.mjs} +3 -3
- package/dist/{auth-A7cZ8aXA.mjs → auth-CvaDxOMi.mjs} +1 -1
- package/dist/{auth-link-D9MWA_dj.mjs → auth-link-I4omV0pL.mjs} +6 -6
- package/dist/{auth-router-FskgTU3B.mjs → auth-router-CXq4q7bb.mjs} +6 -5
- package/dist/{better-auth-shared-BS3pDQbT.d.mts → better-auth-shared-CrIkcN8I.d.mts} +2 -1
- package/dist/bindings-C7zOgxT3.d.mts +28 -0
- package/dist/browser-run-BKgZVwLk.mjs +124 -0
- package/dist/{build-cmd-B7OJ0U5R.mjs → build-cmd-Biz6u4rn.mjs} +6 -6
- package/dist/{cache-wSpi3aeM.mjs → cache-WkLMUrjQ.mjs} +6 -6
- package/dist/{cancel-deploy-DMWzkAlb.mjs → cancel-deploy-BRsrmyTk.mjs} +6 -5
- package/dist/{cf-access-DHklo7Rg.mjs → cf-access-B21j-nd6.mjs} +1 -1
- package/dist/{cf-build-output-Cso7Vh-t.mjs → cf-build-output-G-7Tdd8b.mjs} +6 -5
- package/dist/cf-build-output-Qc43LWzE.mjs +1 -0
- package/dist/{cf-command-values-5BPBRc9Z.mjs → cf-command-values-cUnJwCyG.mjs} +24 -1
- package/dist/{cf-config-migrate-D271BTiw.mjs → cf-config-migrate-CsbQGzMf.mjs} +200 -94
- package/dist/cf-user-agent-HHTRzfud.mjs +15 -0
- package/dist/cf-version-api-BWHMVtzw.mjs +1 -0
- package/dist/cf-version-api-XEEK2B9A.mjs +856 -0
- package/dist/cf-worker-settings-DJKdy97k.mjs +127 -0
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/cloudflare-operation-process.mjs +111 -47
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/cli/json-command-process.d.mts +6 -0
- package/dist/cli/json-command-process.mjs +91 -0
- package/dist/{cli-main-DaLrQfPS.mjs → cli-main-CJTGhcYN.mjs} +84 -113
- package/dist/{client-eLZwqkPH.mjs → client-0um7Lzze.mjs} +1 -1
- package/dist/{client-DE2m2ldh.mjs → client-BEHI4UWn.mjs} +14 -8
- package/dist/{cloudflare-auth-eWfhdZCk.mjs → cloudflare-auth-iOgRurWm.mjs} +1 -1
- package/dist/{cloudflare-cmd-SsFlJe2B.mjs → cloudflare-cmd-DsSlXbNy.mjs} +5 -5
- package/dist/{cloudflare-config-D9UFH_A5.mjs → cloudflare-config-KPHKf57C.mjs} +2 -2
- package/dist/{cloudflare-connect-BgpHcSg3.mjs → cloudflare-connect-bEtneBjT.mjs} +5 -4
- package/dist/{cloudflare-operations-ByjFGats.mjs → cloudflare-operations-BmICrRnm.mjs} +1 -1
- package/dist/{cloudflare-operations-BIRQkYwL.mjs → cloudflare-operations-D-9psgPQ.mjs} +19 -11
- package/dist/cloudflare-preview-8eLSQPdO.mjs +1 -0
- package/dist/cloudflare-preview-BaeU-m74.mjs +112 -0
- package/dist/{cloudflare-process-60r4Z2Zf.mjs → cloudflare-process-DFNpqV_m.mjs} +57 -29
- package/dist/cloudflare-user-output-DFbD0l4l.mjs +36 -0
- package/dist/collect-Aam0GwAU.mjs +1 -0
- package/dist/{collect-rNLybAnF.mjs → collect-KC4cizWM.mjs} +6 -1
- package/dist/{config-DA6ZbLXO.d.mts → config-BdmM5ZzP.d.mts} +12 -2
- package/dist/{config-BFX5ZB1J.mjs → config-CUYGZqdN.mjs} +2 -2
- package/dist/{config-BSoW3QCB.mjs → config-C_UjzkVS.mjs} +3 -3
- package/dist/{config-DtjrUtPo.mjs → config-Ge-MytMU.mjs} +1 -1
- package/dist/{config-Dv5jri1-.mjs → config-KZAiI3gG.mjs} +32 -6
- package/dist/config-entry.d.mts +1 -1
- package/dist/config-write-dKLINlm2.mjs +80 -0
- package/dist/{connect-WG4TcR_d.mjs → connect-Bqq3b9sX.mjs} +10 -9
- package/dist/{create-project-CbuDH5Hv.mjs → create-project-MXoP_rte.mjs} +1 -1
- package/dist/{create-project-8FdN6D2i.mjs → create-project-T-9AIQDe.mjs} +7 -6
- package/dist/{db-BSuWV1PI.mjs → db-B3eoVDNA.mjs} +50 -47
- package/dist/{db-args-CiQVg8SJ.mjs → db-args-BcvTZ8KE.mjs} +1 -1
- package/dist/db-args-Cx1y4vZn.mjs +1 -0
- package/dist/{db-types-B4Cf9dzR.mjs → db-types-BpgXVtQZ.mjs} +1 -1
- package/dist/{delete-WtLEfap2.mjs → delete-Cf6SroAw.mjs} +7 -6
- package/dist/deploy-DZ9j7MC4.mjs +2 -0
- package/dist/{deploy-DtJeunLF.mjs → deploy-UojYUEWr.mjs} +803 -1415
- package/dist/{deploy-managed-static-BWBsxOww.mjs → deploy-managed-static-DV_OmTWf.mjs} +54 -393
- package/dist/{deploy-security-notice-IRGy6Edf.mjs → deploy-security-notice-3jX71IeP.mjs} +6 -4
- package/dist/deploy-summary-Dkl0zvQy.mjs +377 -0
- package/dist/{deploy-transport-BKP_oV9q.mjs → deploy-transport-4ISWxx8n.mjs} +4 -3
- package/dist/deploy.mjs +14 -10
- package/dist/discover-BZWVWeQs.mjs +1 -0
- package/dist/{discover-IcspacCg.mjs → discover-BeFs7OPS.mjs} +1 -1
- package/dist/{dispatch-DIhDA3NI.mjs → dispatch-BUKbPdqb.mjs} +7 -7
- package/dist/{dist-Cr_xGE_K.mjs → dist-BngS28id.mjs} +6 -6
- package/dist/{dist-C47zy_kJ.mjs → dist-x99fIj4n.mjs} +1 -1
- package/dist/{domain-mweyYXSw.mjs → domain-BK6NWkWK.mjs} +7 -7
- package/dist/{drizzle-BJDMPrj7.mjs → drizzle-CnSbVeiZ.mjs} +12 -13
- package/dist/{drizzle-CQ5jWuDL.mjs → drizzle-CrkwVwK8.mjs} +1 -1
- package/dist/{email-DoDqRH6i.mjs → email-BBSDV0J5.mjs} +13 -12
- package/dist/{email-cloudflare-DeYH3Ke7.mjs → email-cloudflare-C-guKEbz.mjs} +10 -8
- package/dist/{env-DaAoYR2-.mjs → env-BVnKiGYJ.mjs} +8 -8
- package/dist/{env-EjHqc7m9.mjs → env-CU2tMDdO.mjs} +6 -1
- package/dist/{env-types-D2hBodXP.mjs → env-types-B33fEHRH.mjs} +1 -1
- package/dist/{env-validation-j9pjCDfA.mjs → env-validation-BnAsx6gz.mjs} +1 -1
- package/dist/{env-validation-D-v5_CWL.mjs → env-validation-SXsjd6-Z.mjs} +4 -4
- package/dist/{fetch-CiEsvjpP.mjs → fetch-DL7OCgwB.mjs} +1 -1
- package/dist/{fetch-stream-BIG5lHW6.mjs → fetch-stream-DEilLTCc.mjs} +2 -2
- package/dist/{gen-aOtHhZLD.mjs → gen-BxuIN1bz.mjs} +10 -9
- package/dist/gen-DaayFP9v.mjs +1 -0
- package/dist/{generate-Dq2Bgw75.mjs → generate-Ck-L3e0e.mjs} +1 -1
- package/dist/{generate-C3ZAqCy-.mjs → generate-t1dDUYZZ.mjs} +1 -1
- package/dist/{github-cmd-BR19Ffdz.mjs → github-cmd-B7U9Hjmi.mjs} +7 -6
- package/dist/{handler-DCrDLzw2.mjs → handler-2wAywJgj.mjs} +11 -9
- package/dist/{headers-DqBsjDxg.mjs → headers-DPI4MDGC.mjs} +1 -1
- package/dist/{help-DvClCzqL.mjs → help-Bgiu5PMX.mjs} +36 -4
- package/dist/help-DWGHmt_n.mjs +1 -0
- package/dist/html-5sfGLjiI.d.mts +3 -0
- package/dist/html-DPSOBDCh.mjs +1 -0
- package/dist/{index-Dn2mkPr2.d.mts → index-CqF8_p9C.d.mts} +5 -105
- package/dist/index-Cvqotnhc.d.mts +91 -0
- package/dist/{index-BQ5qYiAw.d.mts → index-DAinHkj8.d.mts} +1 -1
- package/dist/{index-8cAgNdb6.d.mts → index-lnEWwVAS.d.mts} +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +536 -170
- package/dist/{info-P6MBiVJi.mjs → info-7COlpAfY.mjs} +32 -20
- package/dist/{init-B2VZ2Hut.mjs → init-DftAx3L4.mjs} +237 -88
- package/dist/input-jcps6lAn.mjs +64 -0
- package/dist/interactive-prompts-EK0dilFu.mjs +43 -0
- package/dist/{limits-BCoQLpn3.mjs → limits-3I3VdX2E.mjs} +4 -1
- package/dist/{link-Dyz9IGcM.mjs → link-C3WMNFTG.mjs} +7 -7
- package/dist/{list-VGYBMjmx.mjs → list-K4EGVUZN.mjs} +9 -9
- package/dist/{load-user-env-B8qC0Q2Y.mjs → load-user-env-uMmQJ-Th.mjs} +1 -1
- package/dist/{local-d1-CYOYkVwO.mjs → local-d1-BtLCVC1p.mjs} +2 -2
- package/dist/login-BJwPhV_S.mjs +1 -0
- package/dist/{login-jUBgfvzk.mjs → login-DaugBfBG.mjs} +6 -5
- package/dist/{logs-kS1wuR4b.mjs → logs-BR2szdN5.mjs} +6 -6
- package/dist/migrate-BHD46A31.mjs +1 -0
- package/dist/{migrate-BNZL1hee.mjs → migrate-Dtlg8fC6.mjs} +7 -7
- package/dist/nitro.mjs +3 -3
- package/dist/{node-DVJWfV6s.mjs → node-BbKlLpHa.mjs} +5 -5
- package/dist/{operator-ai-logging-DD0n6zc2.mjs → operator-ai-logging-4Nvs6Ut3.mjs} +5 -5
- package/dist/{operator-args-nvetCWuz.mjs → operator-args-DWvqq3Ws.mjs} +31 -15
- package/dist/{operator-auth-DMvn-y9X.mjs → operator-auth-DtRMGXYY.mjs} +2 -2
- package/dist/{operator-client-dFNnXfyB.mjs → operator-client-BG0VIMMM.mjs} +2 -2
- package/dist/operator-cmd-CR3Q9k4c.mjs +1 -0
- package/dist/{operator-cmd-wML5HNfS.mjs → operator-cmd-D4YcMKO-.mjs} +9 -9
- package/dist/{operator-security-D5MToU0p.mjs → operator-security-nVLo8vDt.mjs} +11 -5
- package/dist/{output-BZLnu0z8.mjs → output-DhJgS6Ve.mjs} +1 -1
- package/dist/output-OYwcEwok.mjs +1 -0
- package/dist/pages/client.d.mts +34 -20
- package/dist/pages/client.mjs +172 -74
- package/dist/pages/index.d.mts +11 -4
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +2 -2
- package/dist/pages/islands-plugin.mjs +5 -3
- package/dist/pages/protocol.d.mts +3 -3
- package/dist/pages/protocol.mjs +3 -3
- package/dist/pages/serialize.d.mts +2 -2
- package/dist/pages/serialize.mjs +1 -1
- package/dist/parse-filename-DIPUjoCh.d.mts +2 -0
- package/dist/platform-C3Q44RJ8.mjs +250 -0
- package/dist/platform-args-BSyVZESg.mjs +1 -0
- package/dist/{platform-args-CvZSuhYS.mjs → platform-args-BnocJDC_.mjs} +1 -1
- package/dist/{platform-auth-config-Bv3oQ2gE.mjs → platform-auth-config-BbfNhjBc.mjs} +9 -9
- package/dist/{platform-auth-protection-OqzfhXwx.mjs → platform-auth-protection-BHPV4MUf.mjs} +9 -8
- package/dist/{platform-auth-recovery-rmIYjXST.mjs → platform-auth-recovery-DE0nArYy.mjs} +8 -7
- package/dist/{platform-cmd-D_4z2Ijv.mjs → platform-cmd-CLRU3BRb.mjs} +11 -10
- package/dist/{platform-cmd-B3rO4RhU.mjs → platform-cmd-Cs2LkT5L.mjs} +1 -1
- package/dist/{platform-discovery-CLxtixHJ.mjs → platform-discovery-CKeeeD82.mjs} +1 -1
- package/dist/{platform-domain-CUq9odbd.mjs → platform-domain-kn3WuKPG.mjs} +6 -5
- package/dist/{platform-lifecycle-DOSYo0UI.mjs → platform-lifecycle-BoCEYy2w.mjs} +1 -1
- package/dist/{platform-lifecycle-DuoVruij.mjs → platform-lifecycle-CKwOg8wz.mjs} +164 -72
- package/dist/{platform-management-D_gt3qLb.mjs → platform-management-CaSdFthX.mjs} +1 -1
- package/dist/{platform-management-MmO9IubR.mjs → platform-management-fyrsq2Ra.mjs} +27 -14
- package/dist/{platform-plans-config-DiydtNKY.mjs → platform-plans-config-BSI-6Inu.mjs} +11 -5
- package/dist/{platform-recovery-P_FVslfd.mjs → platform-recovery-PwJ54AIZ.mjs} +3 -3
- package/dist/{platform-registry-DHH6fivm.mjs → platform-registry-zHH3RiIm.mjs} +2 -1
- package/dist/{platform-setup-Lph9i-rh.mjs → platform-setup-DwYITHfY.mjs} +3 -3
- package/dist/{plugin-inference-COlq96WJ.mjs → plugin-inference-D5MjBVMB.mjs} +60 -142
- package/dist/prepare-CLl_TA_r.mjs +1 -0
- package/dist/{prepare-WvijE289.mjs → prepare-DZEs5AGr.mjs} +3 -3
- package/dist/{prepare-co1o1FFd.mjs → prepare-DhVzN7CB.mjs} +14 -12
- package/dist/{project-uXKua1it.mjs → project-BXpm-vgG.mjs} +1 -1
- package/dist/{project-dh9431bN.mjs → project-DC-BqHef.mjs} +1 -1
- package/dist/{project-cmd-BWJTplpc.mjs → project-cmd-BKN3qT4R.mjs} +31 -21
- package/dist/{project-paths-2ENfCCih.mjs → project-paths-BeAxxqGh.mjs} +1 -1
- package/dist/{project-security-BV1xfj1K.mjs → project-security-B-SHxprt.mjs} +1 -1
- package/dist/{project-security-CY_aahvW.mjs → project-security-BWTd6cTU.mjs} +87 -46
- package/dist/{project-team-BlIFXlmT.mjs → project-team-jcn9reIB.mjs} +6 -6
- package/dist/{project-token-CMsB7I1-.mjs → project-token-BHkBKtzt.mjs} +6 -6
- package/dist/{project-tsconfig-BOA4ym99.mjs → project-tsconfig-LjgxDdj_.mjs} +1 -1
- package/dist/{project-zero-trust-BI6pdpx4.mjs → project-zero-trust-2t_qI6xa.mjs} +4 -4
- package/dist/{protocol-4rEnumif.mjs → protocol-DhMbnxzy.mjs} +120 -35
- package/dist/{protocol-ERy-n3jf.d.mts → protocol-wG7JP5Mm.d.mts} +27 -4
- package/dist/{provision-DFv7SJDn.mjs → provision-C04aXE3a.mjs} +1 -1
- package/dist/{provision-Bh44omGA.mjs → provision-CQykn8gu.mjs} +8 -4
- package/dist/{redirect-Dyvuil0Q.mjs → redirect-DjyA_hx_.mjs} +1 -1
- package/dist/{requests-CfmJxNYg.mjs → requests-BznxnxTT.mjs} +5 -5
- package/dist/resolve-project-Bob_rEi2.mjs +1 -0
- package/dist/{resolve-project-8WZ3iVmr.mjs → resolve-project-s_FGWyr-.mjs} +2 -2
- package/dist/resource-binding-5nI30acw.mjs +20 -0
- package/dist/{resource-name-DlJ9QXzg.mjs → resource-name-D_gw36kh.mjs} +5 -1
- package/dist/{rollback-DL5HuAsM.mjs → rollback-CLiINtpt.mjs} +25 -14
- package/dist/{route-types-CSed9-Dp.mjs → route-types-DxvqN5bL.mjs} +59 -9
- package/dist/{route-url-B41eQ8QI.mjs → route-url-CRC8yR_2.mjs} +2 -3
- package/dist/{route-url-Bd6IX-JZ.d.mts → route-url-zDfC-7DD.d.mts} +33 -5
- package/dist/routes-stub.d.mts +18 -2
- package/dist/routes-stub.mjs +1 -1
- package/dist/{runner-CeguHWJx.mjs → runner-CnUrhc8H.mjs} +1 -1
- package/dist/{runner-mysql-DOjbj-N1.mjs → runner-mysql-CW6bFa67.mjs} +1 -1
- package/dist/{runner-mysql-D549vGGm.mjs → runner-mysql-DSLGFOlC.mjs} +1 -1
- package/dist/{runner-pg-Buzw17hl.mjs → runner-pg-BcGF7iBR.mjs} +1 -1
- package/dist/{runner-pg-DMJquR3d.mjs → runner-pg-OeP0JpEo.mjs} +1 -1
- package/dist/{runner-Bf94YVJK.mjs → runner-rnXCGa20.mjs} +1 -1
- package/dist/runtime/ai/index.mjs +1 -1
- package/dist/runtime/auth/better-auth-d1.d.mts +1 -1
- package/dist/runtime/auth/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/auth/better-auth-postgres.d.mts +1 -1
- package/dist/runtime/client/fetch-server.mjs +1 -1
- package/dist/runtime/client/fetch-stream.mjs +1 -1
- package/dist/runtime/client/fetch.mjs +1 -1
- package/dist/runtime/client/index.mjs +2 -2
- 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/durable/index.mjs +11 -26
- package/dist/runtime/env/runtime.d.mts +2 -10
- package/dist/runtime/handler/index.d.mts +3 -2
- package/dist/runtime/handler/index.mjs +2 -2
- package/dist/runtime/handler/validator.d.mts +1 -1
- package/dist/runtime/handler/validator.mjs +1 -1
- package/dist/runtime/html.d.mts +2 -0
- package/dist/runtime/html.mjs +1 -0
- package/dist/runtime/image/index.d.mts +103 -0
- package/dist/runtime/image/index.mjs +89 -0
- package/dist/runtime/jsx/index.d.mts +3 -0
- package/dist/runtime/jsx/index.mjs +2 -0
- package/dist/runtime/jsx/jsx-dev-runtime.d.mts +1 -0
- package/dist/runtime/jsx/jsx-dev-runtime.mjs +2 -0
- package/dist/runtime/jsx/jsx-runtime.d.mts +1 -0
- package/dist/runtime/jsx/jsx-runtime.mjs +2 -0
- package/dist/runtime/limits/index.mjs +1 -1
- package/dist/runtime/live/client.d.mts +2 -2
- package/dist/runtime/live/index.d.mts +1 -1
- package/dist/runtime/routing/index.d.mts +87 -4
- package/dist/runtime/routing/index.mjs +59 -20
- package/dist/runtime/routing/route-url.d.mts +2 -2
- package/dist/runtime/routing/route-url.mjs +1 -1
- package/dist/runtime/sandbox/index.mjs +1 -1
- package/dist/runtime/sse/client.d.mts +1 -1
- package/dist/runtime/workflows/entry.d.mts +8 -0
- package/dist/runtime/workflows/entry.mjs +49 -0
- package/dist/runtime/workflows/index.d.mts +3 -0
- package/dist/runtime/workflows/index.mjs +77 -0
- package/dist/runtime/ws/index.d.mts +1 -1
- package/dist/runtime/ws/index.mjs +2 -2
- package/dist/runtime/ws/room.d.mts +1 -1
- package/dist/runtime/ws/server.d.mts +2 -2
- package/dist/runtime-Db72hLY-.d.mts +11 -0
- package/dist/scan-BxhB4BA-.mjs +946 -0
- package/dist/scan-D2ISAobj.mjs +308 -0
- package/dist/{secret-C-WBaUSS.mjs → secret-Ck9N5xbU.mjs} +9 -8
- package/dist/{security-sarif-ClyYwtAW.mjs → security-sarif-DzTIqNwZ.mjs} +1 -1
- package/dist/{serialize-DN-envGQ.d.mts → serialize-Dr9B-0yV.d.mts} +10 -1
- package/dist/{serialize-BmB4BfKu.mjs → serialize-nW4IeEBI.mjs} +23 -2
- package/dist/{skills-C-csz78e.mjs → skills-BR7YHAF7.mjs} +1 -1
- package/dist/{scan-Ct_SEzH4.mjs → source-analysis-cache-Ccm_JSOl.mjs} +340 -902
- package/dist/standard-schema-DvMcZGMK.mjs +8 -0
- package/dist/{subcommand-prompt-B4LOLosl.mjs → subcommand-prompt-AFf2LcrC.mjs} +2 -2
- package/dist/{types-FDH6NuY1.d.mts → types-RYVujNS6.d.mts} +4 -2
- package/dist/{version-metadata-DqgLa6gc.mjs → untrusted-env-4oW0TdBP.mjs} +1 -23
- package/dist/{url-DBQluotE.mjs → url-DAQ1c3lh.mjs} +45 -1
- package/dist/{validate-CtBWCzez.mjs → validate-B1PsQ_mt.mjs} +1 -1
- package/dist/validate-p9b3r1k4.mjs +1 -0
- package/dist/{validation-error-CtcAvyI7.mjs → validation-error-EKI0wMWX.mjs} +2 -2
- package/dist/{validator-Dfh9kCDm.mjs → validator-JJcf9E48.mjs} +5 -8
- package/dist/version-metadata-CEla0kgi.mjs +23 -0
- package/dist/{wrangler-DVe5KV5G.mjs → wrangler-AyMfdVJK.mjs} +34 -69
- package/dist/wrangler-BT7qrzWc.mjs +1 -0
- package/dist/{wrapper-CcMYpOS8.mjs → wrapper-DPlTBVOx.mjs} +5 -5
- package/docs/guide/ai.md +1 -1
- package/docs/guide/app-types.md +6 -23
- package/docs/guide/auth.md +2 -4
- package/docs/guide/database/d1.md +21 -67
- package/docs/guide/database/mysql.md +8 -0
- package/docs/guide/database/postgresql.md +2 -2
- package/docs/guide/database.md +1 -1
- package/docs/guide/deployment.md +18 -0
- package/docs/guide/edge/prerendering.md +3 -7
- package/docs/guide/edge/redirects.md +1 -1
- package/docs/guide/edge/revalidation.md +8 -17
- package/docs/guide/edge/rewrites.md +1 -1
- package/docs/guide/edge/static-assets.md +10 -22
- package/docs/guide/email/domains.md +3 -1
- package/docs/guide/email/receiving.md +2 -2
- package/docs/guide/email/sending.md +3 -1
- package/docs/guide/env-vars.md +2 -0
- package/docs/guide/image-generation.md +142 -0
- package/docs/guide/index.md +17 -15
- package/docs/guide/jobs.md +2 -4
- package/docs/guide/kv.md +1 -1
- package/docs/guide/og-images.md +83 -0
- package/docs/guide/pages-routing/actions-and-forms.md +6 -4
- package/docs/guide/pages-routing/errors.md +20 -4
- package/docs/guide/pages-routing/head.md +5 -5
- package/docs/guide/pages-routing/islands.md +4 -14
- package/docs/guide/pages-routing/markdown.md +2 -2
- package/docs/guide/pages-routing/overview.md +129 -15
- package/docs/guide/platform/administration/plans.md +47 -16
- package/docs/guide/platform/administration/projects.md +10 -0
- package/docs/guide/platform/administration/security-audits.md +76 -30
- package/docs/guide/platform/administration/zero-trust.md +1 -1
- package/docs/guide/platform/installation/ci.md +0 -4
- package/docs/guide/platform/installation/credentials.md +1 -1
- package/docs/guide/platform/installation/maintenance.md +10 -10
- package/docs/guide/platform/installation/prerequisites.md +3 -1
- package/docs/guide/platform/installation/setup.md +7 -15
- package/docs/guide/platform/installation/uninstall.md +6 -12
- package/docs/guide/project-collaboration.md +1 -4
- package/docs/guide/queues.md +6 -8
- package/docs/guide/quickstart.md +6 -8
- package/docs/guide/sandboxes.md +1 -1
- package/docs/guide/self-hosted-platform.md +4 -7
- package/docs/guide/server-routing.md +5 -3
- package/docs/guide/ssg.md +1 -1
- package/docs/guide/type-safety.md +74 -10
- package/docs/guide/websockets.md +5 -7
- package/docs/guide/workflows.md +122 -0
- package/docs/index.md +2 -3
- package/docs/integrations/agents.md +3 -16
- package/docs/integrations/cloudflare.md +98 -2
- package/docs/integrations/frameworks/analog.md +9 -11
- package/docs/integrations/frameworks/astro.md +16 -17
- package/docs/integrations/frameworks/nuxt.md +11 -13
- package/docs/integrations/frameworks/overview.md +18 -20
- package/docs/integrations/frameworks/react-router.md +55 -6
- package/docs/integrations/frameworks/sveltekit.md +8 -6
- package/docs/integrations/frameworks/tanstack-start.md +10 -6
- package/docs/integrations/hono.md +27 -12
- package/docs/integrations/nodejs-bun-deno.md +10 -2
- package/docs/reference/api/database.md +8 -10
- package/docs/reference/api/env.md +2 -2
- package/docs/reference/api/handlers.md +1 -1
- package/docs/reference/api/html.md +45 -0
- package/docs/reference/api/pages.md +118 -167
- package/docs/reference/api/rewrites.md +5 -5
- package/docs/reference/api/types.md +13 -6
- package/docs/reference/api/workflows.md +48 -0
- package/docs/reference/api.md +7 -1
- package/docs/reference/cli/database.md +22 -10
- package/docs/reference/cli/deploy.md +49 -4
- package/docs/reference/cli/domains.md +7 -3
- package/docs/reference/cli/email.md +3 -1
- package/docs/reference/cli/platform-installation.md +9 -53
- package/docs/reference/cli/platform-security.md +36 -8
- package/docs/reference/cli/platform-users.md +11 -1
- package/docs/reference/cli/platform-zero-trust.md +1 -1
- package/docs/reference/cli/project.md +52 -11
- package/docs/reference/cli/setup.md +8 -10
- package/docs/reference/cli.md +49 -47
- package/docs/reference/config.md +22 -8
- package/docs/reference/resource-inference.md +8 -1
- package/docs/reference/structure.md +5 -0
- package/package.json +52 -25
- package/schema.json +20 -1
- package/skills/void/SKILL.md +60 -54
- package/dist/cf-build-output-Wpk_e5CI.mjs +0 -1
- package/dist/cf-worker-settings-BBdlhm9U.mjs +0 -41
- package/dist/cli/db-execute-process.d.mts +0 -2
- package/dist/cli/db-execute-process.mjs +0 -57
- package/dist/cloudflare-user-output-CCR99eQY.mjs +0 -19
- package/dist/collect-B6nlSnsb.mjs +0 -1
- package/dist/db-args-BvMwAber.mjs +0 -1
- package/dist/deploy-GT4CW5fs.mjs +0 -2
- package/dist/discover-D2KGP3cR.mjs +0 -1
- package/dist/entry-Bwb9ev8K.mjs +0 -113
- package/dist/gen-vhBDHs3q.mjs +0 -1
- package/dist/help-fKPzcTJv.mjs +0 -1
- package/dist/isr-config-DiTnL9Tb.mjs +0 -115
- package/dist/login-BbSQTZ6d.mjs +0 -1
- package/dist/migrate-C9aoWLvY.mjs +0 -1
- package/dist/operator-cmd-jnjzuJKX.mjs +0 -1
- package/dist/output-D7K9TWIA.mjs +0 -1
- package/dist/platform-args-CMwMoiLp.mjs +0 -1
- package/dist/prepare-DcwigRUS.mjs +0 -1
- package/dist/providers-D5P8j_8D.d.mts +0 -5
- package/dist/resolve-project-YsTH-U9I.mjs +0 -1
- package/dist/static-exports-s7P86Ngp.mjs +0 -354
- package/dist/validate-CZYUIfR-.mjs +0 -1
- package/dist/wrangler-Dq269bjx.mjs +0 -1
- package/docs/guide/platform/development/local.md +0 -120
- package/docs/guide/platform/development/runtime.md +0 -115
- package/docs/guide/platform/development/schema-ci.md +0 -44
- package/docs/guide/platform-development.md +0 -16
|
@@ -41,23 +41,7 @@ await db.batch([
|
|
|
41
41
|
|
|
42
42
|
## Read replication
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
Void **0.21.3** introduced automatic D1 read replication. If you deployed with that version or a later version before replication became opt-in, your database may already have replicas enabled. Replicas can serve stale data between requests.
|
|
46
|
-
|
|
47
|
-
Unless your app intentionally uses replicas with the consistency handling described below, we recommend upgrading to a Void version that supports `database.readReplication`, setting it to `false` in `void.config.ts`, and running `void deploy`:
|
|
48
|
-
|
|
49
|
-
```ts
|
|
50
|
-
import { defineConfig } from 'void/config';
|
|
51
|
-
|
|
52
|
-
export default defineConfig({
|
|
53
|
-
database: { readReplication: false },
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
If you self-host the Void platform, upgrade it as well before deploying. When the platform cannot apply `database.readReplication`, `void deploy` stops with an error before uploading anything. Upgrading alone or omitting the option does **not** disable existing replication.
|
|
58
|
-
:::
|
|
59
|
-
|
|
60
|
-
[D1 read replication](https://developers.cloudflare.com/d1/best-practices/read-replication/) is opt-in. Enable it in `void.config.ts`, then run `void deploy`:
|
|
44
|
+
If someone in Tokyo opens a profile stored in a D1 database in Europe, [read replication](https://developers.cloudflare.com/d1/best-practices/read-replication/) lets D1 read from a nearby replica. To enable it, set `readReplication` in `void.config.ts` and run `void deploy`.
|
|
61
45
|
|
|
62
46
|
```ts
|
|
63
47
|
import { defineConfig } from 'void/config';
|
|
@@ -67,17 +51,15 @@ export default defineConfig({
|
|
|
67
51
|
});
|
|
68
52
|
```
|
|
69
53
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
When you omit `readReplication`, deployment leaves the database's replication setting unchanged. New databases default to replication off. Removing the option from a database that already has replication enabled keeps it enabled.
|
|
54
|
+
New databases start with replication off. On both Cloudflare and a Void platform, deploying with `true` enables replicas for an existing database too. Set it to `false` and deploy to turn them off. Omitting the option keeps the current setting.
|
|
73
55
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
::: warning
|
|
77
|
-
Replicas can lag between requests. [Carry a bookmark](#cross-request-bookmarks) to preserve previously observed database state, or use a [primary-first session](#reading-from-the-primary) when you need the latest primary data.
|
|
56
|
+
::: warning Previously deployed databases
|
|
57
|
+
Void 0.21.3 started enabling replicas automatically. If you deployed while that was the default, your database may already have them. To turn them off, upgrade Void, set `database: { readReplication: false }`, and deploy. For a self-hosted platform, upgrade the platform first. If it cannot apply the setting, the CLI stops before uploading your app.
|
|
78
58
|
:::
|
|
79
59
|
|
|
80
|
-
|
|
60
|
+
Inside a Void request, queries through `db` share a session. Later reads in the same session see at least what the first query saw. A new request can reach a replica that hasn’t caught up yet. You can [read from the primary](#reading-from-the-primary) when you need the latest data, or [carry a bookmark](#cross-request-bookmarks) to see a change you just saved.
|
|
61
|
+
|
|
62
|
+
In a framework handler outside Void’s request scope, each operation on `db` starts on the primary. Use `createDb(binding)` to start a session that can read from a replica. For raw D1 queries or another query library, call `binding.withSession()`. A query on the bare binding reads from the primary.
|
|
81
63
|
|
|
82
64
|
### Avoid stale reads with a primary-first session {#reading-from-the-primary}
|
|
83
65
|
|
|
@@ -99,29 +81,9 @@ With `session: 'first-primary'`, the first query reads from the primary and late
|
|
|
99
81
|
|
|
100
82
|
### See your writes in subsequent requests {#cross-request-bookmarks}
|
|
101
83
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
Keep saved bookmarks scoped to the database that issued them. Use separate cookie names or browser-storage keys for different databases and environments, and clear saved bookmarks when switching to a different database. Clearing a bookmark starts a new consistency chain; subsequent requests no longer carry the previous bookmark's guarantee. Treat bookmarks as opaque strings rather than parsing or constructing them.
|
|
84
|
+
Suppose you change your name on `/profile`. When the form redirects back to your profile, you want to see the name you just saved. A [D1 bookmark](https://developers.cloudflare.com/d1/best-practices/read-replication/#start-a-session-from-previous-context-bookmark) from the save tells D1 how far a replica must have caught up before it can serve that next read.
|
|
105
85
|
|
|
106
|
-
|
|
107
|
-
Bookmarks constrain database queries, not cached responses. A cached response can predate your save without running a query. Disable ISR for participating pages (`export const revalidate = 0` in the page's `.server.ts` file) and bypass any existing response caches for these routes. Setting response headers alone does not bypass an ISR cache hit.
|
|
108
|
-
:::
|
|
109
|
-
|
|
110
|
-
Use middleware to set the default `db` session before your handlers or Pages loaders run, and return its bookmark after their queries. For a browser app, a cookie carries it through redirects and navigation:
|
|
111
|
-
|
|
112
|
-
This example opts `/profile` and its subpaths into bookmark handling and `Cache-Control: private, no-store`, preventing browser and shared response-cache storage. Change the path to cover your participating reads, saves, and redirect destinations. Routes outside this scope keep their existing cache policies.
|
|
113
|
-
|
|
114
|
-
Local server-side requests through `void/client` share that session. If middleware runs again, repeating an already satisfied session requirement preserves the session and its database progress. For an independent primary-first read or a newer bookmark after using `db`, use `createDb` instead.
|
|
115
|
-
|
|
116
|
-
Await consistency-critical database work before returning from your handler or loader. Deferred or background queries that finish after middleware captures the response bookmark are not guaranteed to be reflected in it.
|
|
117
|
-
|
|
118
|
-
::: warning
|
|
119
|
-
Concurrent responses can overwrite this cookie with an older bookmark. The [header-based recipe](#api-requests-with-concurrent-clients) retains the newest bookmark across concurrent API responses. Clearing or expiring bookmark storage starts a new bookmark chain.
|
|
120
|
-
:::
|
|
121
|
-
|
|
122
|
-
::: note
|
|
123
|
-
To use cookies and API headers together, see [Supporting both transports](#supporting-both-transports).
|
|
124
|
-
:::
|
|
86
|
+
For a browser form, a cookie can carry the bookmark across a redirect. This middleware reads the cookie before the handler runs and sets it again after the query finishes.
|
|
125
87
|
|
|
126
88
|
```ts
|
|
127
89
|
// middleware/01.database.ts
|
|
@@ -153,19 +115,17 @@ export default defineMiddleware(async (c, next) => {
|
|
|
153
115
|
});
|
|
154
116
|
```
|
|
155
117
|
|
|
156
|
-
|
|
118
|
+
The middleware covers `/profile` and its subpaths. Include every route that saves or displays the profile, including redirect destinations. Await the database work in your handler or loader so the bookmark includes it. Local requests made with `void/client` share the session. If you need a newer bookmark or an independent primary-first read after using `db`, create a separate client with `createDb`.
|
|
157
119
|
|
|
158
|
-
|
|
120
|
+
The next request needs to reach D1 to see the new name. Disable ISR on these pages with `export const revalidate = 0` and bypass any existing response caches. The `private, no-store` header prevents browsers and shared caches from storing new responses.
|
|
159
121
|
|
|
160
|
-
|
|
122
|
+
Use a different cookie name for each database and environment. Pass the bookmark back as D1 supplied it. Clearing or expiring the cookie starts a new session without the earlier bookmark.
|
|
161
123
|
|
|
162
|
-
|
|
163
|
-
This recipe carries bookmarks only through the fetch wrapper below, not ordinary navigation, form submissions, or Pages requests. It does not share bookmarks with the cookie-based recipe.
|
|
164
|
-
:::
|
|
124
|
+
#### API requests with concurrent clients
|
|
165
125
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
126
|
+
If two requests save changes at the same time, their responses can arrive in the opposite order. With cookies, the last response can overwrite a newer bookmark. For a browser API client, send the bookmark in an `X-DB-Bookmark` header and keep the newest one. [Bookmarks from the same database sort in order.](https://developers.cloudflare.com/d1/reference/time-travel/#bookmarks)
|
|
127
|
+
|
|
128
|
+
Here’s the same profile example for `/api/profile` and its subpaths. Use the [combined middleware](#supporting-both-transports) if your app also needs bookmarks on ordinary navigation and form submissions.
|
|
169
129
|
|
|
170
130
|
```ts
|
|
171
131
|
// middleware/01.database.ts
|
|
@@ -190,7 +150,7 @@ export default defineMiddleware(async (c, next) => {
|
|
|
190
150
|
});
|
|
191
151
|
```
|
|
192
152
|
|
|
193
|
-
|
|
153
|
+
In the browser, keep the bookmark in `localStorage` so tabs can share it. Use a key unique to the database and the signed-in account. A [Web Lock](https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_API) lets one tab at a time compare its response with the stored bookmark. This example requires HTTPS or localhost and a browser with Web Locks and local storage.
|
|
194
154
|
|
|
195
155
|
```ts
|
|
196
156
|
// src/bookmark-fetch.ts
|
|
@@ -231,7 +191,7 @@ export function createBookmarkFetch(scope: string) {
|
|
|
231
191
|
}
|
|
232
192
|
```
|
|
233
193
|
|
|
234
|
-
|
|
194
|
+
Now save the new name and read the profile back through the same client.
|
|
235
195
|
|
|
236
196
|
```ts
|
|
237
197
|
import { createBookmarkFetch } from './bookmark-fetch';
|
|
@@ -252,19 +212,13 @@ export async function saveAndReadProfile(accountId: string, name: string) {
|
|
|
252
212
|
}
|
|
253
213
|
```
|
|
254
214
|
|
|
255
|
-
The
|
|
256
|
-
|
|
257
|
-
Use API endpoints that return data, not redirects.
|
|
215
|
+
The first `await` saves the bookmark before the second request starts. Use the wrapper with endpoints that return data directly. Browser redirects and form submissions use the cookie in the previous example.
|
|
258
216
|
|
|
259
217
|
#### Supporting both transports
|
|
260
218
|
|
|
261
|
-
|
|
219
|
+
If your profile has both a form and an API, read the cookie and header together and pass the newer bookmark to D1. Return the resulting bookmark in both places. This example covers `/profile` and `/api/profile`, including their subpaths. Disable ISR on the participating pages.
|
|
262
220
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
::: warning
|
|
266
|
-
The fetch wrapper retains the newest bookmark across concurrent responses, but cookies can still be overwritten out of order. For a guaranteed fresh read on a redirect's destination page, use a primary-first session.
|
|
267
|
-
:::
|
|
221
|
+
The fetch wrapper keeps the newest bookmark even when responses arrive out of order. Cookies can still arrive out of order. Use a primary-first session if a redirect must show the latest value.
|
|
268
222
|
|
|
269
223
|
```ts
|
|
270
224
|
// middleware/01.database.ts
|
|
@@ -50,6 +50,14 @@ void db migrate
|
|
|
50
50
|
void deploy
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
### Auth date columns
|
|
54
|
+
|
|
55
|
+
If an auth field stores a birthday, you may need to save dates before 1970. Set `database.authDateType` to `"datetime"` to generate `DATETIME(3)` columns. New MySQL starters already use this setting. If you omit it, Void generates `TIMESTAMP(3)`.
|
|
56
|
+
|
|
57
|
+
To switch an existing database, run `void db generate` and review the migration. Try it on a copy of the database in the same session time zone as your app. Check your stored dates, including session expirations, before committing the migration and applying it with `void db migrate`.
|
|
58
|
+
|
|
59
|
+
### Applying migrations on Cloudflare
|
|
60
|
+
|
|
53
61
|
For direct Cloudflare deploys, export the production `DATABASE_URL` in the shell running `void deploy --platform cloudflare`. Void uses it to provision Hyperdrive and apply pending checked-in migrations before uploading the Worker; it is not written to the Worker config.
|
|
54
62
|
|
|
55
63
|
Only one migration run changes a database at a time, whether it comes from `void db migrate`, `void db reset`, the reset that `void db seed` does before it loads data, `void deploy --platform cloudflare`, or a `void deploy` of any project that uses the database. Better Auth's table changes run inside the same run. Another run waits for it, up to about 20 seconds for a command that connects with `DATABASE_URL` and about 2 minutes for a `void deploy` to the Void platform, then stops with an error that asks you to try again.
|
|
@@ -66,7 +66,7 @@ export const users = pgTable('users', {
|
|
|
66
66
|
|
|
67
67
|
## Migrations
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
Generate and apply migrations locally:
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
# Generate migration files from schema changes
|
|
@@ -79,7 +79,7 @@ void db migrate
|
|
|
79
79
|
void db status
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
PostgreSQL rolls back the entire migration if a statement fails.
|
|
83
83
|
|
|
84
84
|
`void deploy` applies pending migrations before making the new version live. See [Deployment](../deployment.md).
|
|
85
85
|
|
package/docs/guide/database.md
CHANGED
|
@@ -264,7 +264,7 @@ Use `db/seed.ts` for a programmatic seed or `db/seed.sql` for SQL. JavaScript an
|
|
|
264
264
|
|
|
265
265
|
Use `db/seed.ts` when you want to generate seed data in code. Export a default function or a named `seed` function.
|
|
266
266
|
|
|
267
|
-
|
|
267
|
+
You can use your app’s TypeScript aliases in seed files and schema modules. For example, import a table from `@schema` just as you would in a route. Dynamic `import()` works too. If your `tsconfig.json` extends `.void/tsconfig.json`, run `void prepare` before seeding a fresh checkout.
|
|
268
268
|
|
|
269
269
|
```ts
|
|
270
270
|
// db/seed.ts
|
package/docs/guide/deployment.md
CHANGED
|
@@ -52,6 +52,24 @@ Declare values in `env.ts` and set production server secrets with `void secret p
|
|
|
52
52
|
|
|
53
53
|
Keep the CLI and framework adapters on matching versions, and commit `void.config.ts` and `void.lock.json` when generated.
|
|
54
54
|
|
|
55
|
+
### Worker minification
|
|
56
|
+
|
|
57
|
+
Void minifies production Worker bundles for non-static apps built directly by Void. The default keeps legal comments and preserves most function and class names. If your app depends on exact names, disable minification in `vite.config.ts`:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import { defineConfig } from 'vite';
|
|
61
|
+
import { voidPlugin } from 'void';
|
|
62
|
+
|
|
63
|
+
export default defineConfig({
|
|
64
|
+
plugins: [voidPlugin()],
|
|
65
|
+
environments: {
|
|
66
|
+
void_worker: { build: { minify: false } },
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
If a Vite plugin overrides minification late, set `build.rolldownOptions.output.minify` for `void_worker` or set `minify` in the plugin's `outputOptions` hook. Use `false` to disable minification or `true` for standard minification.
|
|
72
|
+
|
|
55
73
|
## Deploy from GitHub {#github}
|
|
56
74
|
|
|
57
75
|
Generate a workflow for your saved target and package manager:
|
|
@@ -5,22 +5,20 @@ outline: deep
|
|
|
5
5
|
|
|
6
6
|
# Edge Prerendering
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Render a page during deployment and its first visitor can read the cached HTML immediately. Void already does this for two kinds of pages:
|
|
9
9
|
|
|
10
10
|
- [Markdown pages](../pages-routing/markdown.md) are auto-prerendered.
|
|
11
11
|
- [Island pages](../pages-routing/islands) with no companion loader and no dynamic params are also auto-prerendered.
|
|
12
12
|
|
|
13
13
|
## Static pages (no params)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
To prerender your About page, export `prerender` from its companion `.server.ts` file.
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
18
|
// pages/about.server.ts
|
|
19
19
|
export const prerender = true;
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
Pages without dynamic params do not need `getPrerenderPaths()`.
|
|
23
|
-
|
|
24
22
|
## Dynamic pages (with params)
|
|
25
23
|
|
|
26
24
|
For a dynamic page, export `getPrerenderPaths()` to choose which paths to render. Annotate its return type with [`PageParams`](../../reference/api/types.md#route-types) so TypeScript checks the parameter names:
|
|
@@ -38,11 +36,9 @@ export async function getPrerenderPaths(): Promise<PageParams<'/blog/[slug]'>[]>
|
|
|
38
36
|
|
|
39
37
|
Return an object for each path, with every required parameter. Values can be strings or numbers; Void URL-encodes them. Use a catch-all page such as `pages/docs/[...slug]` for values containing `/`, for example `{ slug: 'guides/intro' }`.
|
|
40
38
|
|
|
41
|
-
The type annotation is required for TypeScript to check the keys. At deployment, Void reports invalid entries with their server filename and index.
|
|
42
|
-
|
|
43
39
|
## Custom SSR
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
For custom SSR, export `getPrerenderPaths()` from `src/main.ssr.ts` and return full paths:
|
|
46
42
|
|
|
47
43
|
```ts
|
|
48
44
|
// src/main.ssr.ts
|
|
@@ -24,7 +24,7 @@ Define URL redirects in [`void.config.ts`](../../reference/config) using the `ro
|
|
|
24
24
|
- **Destinations** can be strings (default `302`) or objects with `to` and optional `status`. Supported statuses: `301`, `302`, `303`, `307`, `308`.
|
|
25
25
|
- `:splat` in the destination is replaced with the portion of the path matched by `*` in the source pattern.
|
|
26
26
|
- Destination query strings are merged into the `Location` header (the destination's parameters take precedence on per-key conflict). To drop the incoming query, write an explicit reset like `?`.
|
|
27
|
-
- For redirects from a handler, loader, or middleware, use [`c.redirect()`](../../reference/api/rewrites.md#c-rewrite-destination).
|
|
27
|
+
- For redirects from a handler, loader, or middleware, use [`c.redirect()`](../../reference/api/rewrites.md#c-rewrite-destination).
|
|
28
28
|
- When multiple rules match, the **first match wins**. Put specific patterns before catch-all patterns.
|
|
29
29
|
- Redirects are evaluated **before** the request reaches the worker, so they short-circuit static asset serving, ISR, and SSR.
|
|
30
30
|
|
|
@@ -5,15 +5,13 @@ outline: deep
|
|
|
5
5
|
|
|
6
6
|
# Revalidation (ISR)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
A public product page can serve the same HTML to several visitors. With [Incremental Static Regeneration (ISR)](https://vercel.com/docs/incremental-static-regeneration), you choose how long that HTML stays fresh. Once it’s stale, visitors can keep reading the cached page while Void renders the next version.
|
|
9
9
|
|
|
10
|
-
Use revalidation with [Void SSR](../ssr.md), [Pages mode](../pages-routing/overview), or a [supported SSR framework](../../integrations/frameworks/overview.md).
|
|
11
|
-
|
|
12
|
-
To disable Void's ISR caching across the app while keeping your per-page settings, set `"routing": { "isr": false }` in `void.config.ts`. This overrides per-page revalidate and prerender policies. Set `isr` back to `true` to enable those policies again. Build-time HTML generation with `output: "static"` is unaffected.
|
|
10
|
+
Use revalidation with [Void SSR](../ssr.md), [Pages mode](../pages-routing/overview), or a [supported SSR framework](../../integrations/frameworks/overview.md). In a framework app, Void caches public HTML documents. The framework handles its own data requests.
|
|
13
11
|
|
|
14
12
|
## Enabling revalidation
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
To keep a rendered page fresh for one minute, set `routing.revalidate` to `60` in `void.config.ts`. The value is in seconds.
|
|
17
15
|
|
|
18
16
|
```json
|
|
19
17
|
{
|
|
@@ -23,7 +21,7 @@ Add a `routing.revalidate` field to `void.config.ts` with a TTL in seconds:
|
|
|
23
21
|
}
|
|
24
22
|
```
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
Set the TTL to `0` to render on each request. To turn off ISR and edge prerendering across the app, set `routing.isr: false`. You can still generate [static HTML at build time](../ssg.md).
|
|
27
25
|
|
|
28
26
|
## Per-path revalidation
|
|
29
27
|
|
|
@@ -44,10 +42,7 @@ You can set different TTLs for different URL patterns using an object:
|
|
|
44
42
|
|
|
45
43
|
Rules are matched in order, and the first match wins. The `*` glob matches any characters including `/`.
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
- `31536000` (1 year): effectively cached until the next deploy, since deploys clear the ISR cache
|
|
50
|
-
- `0`: never cached and always rendered by the worker, which is equivalent to plain SSR for that path
|
|
45
|
+
Deploys clear the cache, including pages with a long TTL such as `31536000` (one year).
|
|
51
46
|
|
|
52
47
|
## Per-page revalidation (Pages mode)
|
|
53
48
|
|
|
@@ -64,8 +59,6 @@ export const loader = defineHandler(async (c) => {
|
|
|
64
59
|
|
|
65
60
|
Use a whole number such as `3600` directly in the export. Expressions such as `60 * 60` and re-exports are ignored with a warning.
|
|
66
61
|
|
|
67
|
-
Per-page values take precedence over `void.config.ts` patterns.
|
|
68
|
-
|
|
69
62
|
A page's `revalidate` export also applies to `routes/` handlers whose URLs match the page pattern. For example, if `pages/[...slug].server.ts` exports `revalidate`, Void can also cache the `GET` response of `routes/now.ts`. Void never caches paths under `/api`. To keep a route handler's response out of the cache, set `x-revalidate: 0` on it. See [Per-response TTL override](#per-response-ttl-override).
|
|
70
63
|
|
|
71
64
|
## Precedence
|
|
@@ -81,8 +74,6 @@ When multiple sources set a revalidate TTL, the most specific wins:
|
|
|
81
74
|
|
|
82
75
|
The first request renders and caches the page. While the cached page is fresh, visitors receive it immediately. Once it becomes stale, Void serves it while rendering an updated version in the background.
|
|
83
76
|
|
|
84
|
-
A request without a cached entry waits for the page to render.
|
|
85
|
-
|
|
86
77
|
## Per-response TTL override
|
|
87
78
|
|
|
88
79
|
Route handlers can set the `x-revalidate` response header to override the TTL for a specific response:
|
|
@@ -107,9 +98,9 @@ Responses that vary by request headers, such as `Vary: Accept-Language` or `Vary
|
|
|
107
98
|
|
|
108
99
|
## Cache bypass
|
|
109
100
|
|
|
110
|
-
Requests with `Cookie`, `Authorization`, or Cloudflare Access's `Cf-Access-Jwt-Assertion` header bypass the ISR cache
|
|
101
|
+
Requests with `Cookie`, `Authorization`, or Cloudflare Access's `Cf-Access-Jwt-Assertion` header bypass the ISR cache.
|
|
111
102
|
|
|
112
|
-
|
|
103
|
+
Requests for other formats, such as `Accept: text/event-stream` or `Accept: text/markdown`, run your handler on each request.
|
|
113
104
|
|
|
114
105
|
## Cache keys and rewrites
|
|
115
106
|
|
|
@@ -117,7 +108,7 @@ For a dispatch rewrite, the cache key includes both the destination and original
|
|
|
117
108
|
|
|
118
109
|
Query parameters are excluded by default. Add `routing.revalidateQueryAllowlist` when specific parameters should produce separate cached responses. Requests with other query parameters get the cached page. If nothing is cached yet, they render live and are not stored, so add every parameter a page reads to `routing.revalidateQueryAllowlist`. Middleware `c.rewrite()` runs after the ISR lookup, so it doesn't create an additional cache variant.
|
|
119
110
|
|
|
120
|
-
Purge the destination pathname with `revalidate({ paths })`. Purging `/en/docs/foo` clears both direct and rewritten variants.
|
|
111
|
+
Purge the destination pathname with `revalidate({ paths })`. Purging `/en/docs/foo` clears both direct and rewritten variants.
|
|
121
112
|
|
|
122
113
|
## On-demand revalidation
|
|
123
114
|
|
|
@@ -92,7 +92,7 @@ export default defineConfig({
|
|
|
92
92
|
|
|
93
93
|
Use a fallback for a client-side router or a default-locale catch-all. An intentional `404` from a Void route remains a `404`. For third-party frameworks, fallbacks can also replace the framework's `404` response.
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
SPAs fall back to `/index.html` after any custom fallback rules.
|
|
96
96
|
|
|
97
97
|
## `_redirects` file
|
|
98
98
|
|
|
@@ -5,19 +5,17 @@ outline: deep
|
|
|
5
5
|
|
|
6
6
|
# Static Assets Caching
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
When someone returns to your app after a deploy, their browser can reuse the scripts and styles that haven’t changed. Vite gives a changed file a new name so the browser knows to fetch it.
|
|
9
9
|
|
|
10
10
|
## Hashed assets
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
For example, Vite might write `assets/app-Ab3xK9.js`. The hash in the filename identifies its contents. Files in `build.assetsDir` (default `assets/`) get this header so browsers and the edge can keep them for a year.
|
|
13
13
|
|
|
14
14
|
```
|
|
15
15
|
Cache-Control: public, max-age=31536000, immutable
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
If your Vite config customizes `build.assetsDir`, Void automatically detects this and applies the immutable optimization to the configured directory:
|
|
18
|
+
To change the directory for hashed assets, set `build.assetsDir`:
|
|
21
19
|
|
|
22
20
|
```ts
|
|
23
21
|
// vite.config.ts
|
|
@@ -28,7 +26,7 @@ export default defineConfig({
|
|
|
28
26
|
});
|
|
29
27
|
```
|
|
30
28
|
|
|
31
|
-
|
|
29
|
+
Setting `build.assetsDir` to `""` disables directory-based immutable caching.
|
|
32
30
|
|
|
33
31
|
Supported meta-frameworks use their own asset directories automatically.
|
|
34
32
|
|
|
@@ -40,7 +38,7 @@ Use [Custom Headers](./headers) to choose a cache policy for other files. Apply
|
|
|
40
38
|
|
|
41
39
|
## Non-hashed assets
|
|
42
40
|
|
|
43
|
-
Other static files, such as `index.html` and `favicon.ico`, are cached until the next deploy.
|
|
41
|
+
Other static files, such as `index.html` and `favicon.ico`, are cached at the edge until the next deploy.
|
|
44
42
|
|
|
45
43
|
```
|
|
46
44
|
Cache-Control: public, s-maxage=31536000, max-age=0, must-revalidate
|
|
@@ -48,18 +46,12 @@ Cache-Control: public, s-maxage=31536000, max-age=0, must-revalidate
|
|
|
48
46
|
|
|
49
47
|
Browsers revalidate these files on each request.
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- All `GET` requests for non-SSR projects such as SPAs and static sites
|
|
54
|
-
- GET requests with file extensions (`.ico`, `.png`, `.css`, etc.) in SSR projects
|
|
49
|
+
Static asset caching applies to complete `200` responses to `GET` requests:
|
|
55
50
|
|
|
56
|
-
|
|
51
|
+
- All paths in SPAs and static sites
|
|
52
|
+
- Paths with file extensions such as `.ico`, `.png`, or `.css` in SSR projects
|
|
57
53
|
|
|
58
|
-
|
|
59
|
-
- SSR-rendered pages (paths without file extensions in SSR projects)
|
|
60
|
-
- Non-GET requests
|
|
61
|
-
- Requests carrying `Cookie`, `Authorization`, or `Cf-Access-Jwt-Assertion` credentials
|
|
62
|
-
- Responses other than a complete `200`
|
|
54
|
+
Requests to `/api/*` and requests with `Cookie`, `Authorization`, or `Cf-Access-Jwt-Assertion` bypass the static asset cache. Use [Revalidation](./revalidation) to cache public SSR pages.
|
|
63
55
|
|
|
64
56
|
### Opting out
|
|
65
57
|
|
|
@@ -67,7 +59,7 @@ If your worker serves dynamic content at a URL that looks static (e.g., a dynami
|
|
|
67
59
|
|
|
68
60
|
## ETags and 304 Not Modified
|
|
69
61
|
|
|
70
|
-
|
|
62
|
+
Browsers can revalidate a file using its `ETag`. An unchanged file returns `304 Not Modified`.
|
|
71
63
|
|
|
72
64
|
## Custom headers
|
|
73
65
|
|
|
@@ -94,7 +86,3 @@ SvelteKit, Nuxt, Analog, and Astro handle their own error pages and ignore `rout
|
|
|
94
86
|
On direct Cloudflare deployments, SvelteKit, Nuxt, Analog, and Astro serve built files and prerendered pages without running the Worker. Other requests reach the framework.
|
|
95
87
|
|
|
96
88
|
To run server code before serving an asset, set [`run_worker_first`](https://developers.cloudflare.com/workers/static-assets/binding/#run_worker_first) under `cloudflare.assets` in `void.config.ts`. Setting it to `true` runs the Worker on every request and counts toward Worker request usage.
|
|
97
|
-
|
|
98
|
-
## API routes and SSR pages
|
|
99
|
-
|
|
100
|
-
API responses and SSR pages are not cached as static assets. Use [Revalidation](./revalidation) to cache public rendered pages.
|
|
@@ -15,7 +15,9 @@ The shared sender uses the platform's configured mail domain. To send — and re
|
|
|
15
15
|
void email domain add acme.com
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The CLI opens a token template with email and zone permissions selected. Add **Workers → Admin** so Void can create and remove the Worker that receives mail. Before creating the token, restrict it to the Cloudflare account and zone you want to use.
|
|
19
|
+
|
|
20
|
+
Copy the token or paste it into the masked prompt, then confirm the account and zone. The platform encrypts the token for that zone. Projects using the same zone share its mail Worker.
|
|
19
21
|
|
|
20
22
|
For inbound mail, use a Cloudflare zone apex with no existing mail service, such as `example.com`. Each apex belongs to one project, and a project can register several. Existing MX records or a catch-all pointing elsewhere block registration to protect your current mail service.
|
|
21
23
|
|
|
@@ -5,7 +5,7 @@ outline: deep
|
|
|
5
5
|
|
|
6
6
|
# Receiving Email {#inbound}
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
In a native Void app on Cloudflare, create inbound mail handlers in the top-level `email/` directory.
|
|
9
9
|
|
|
10
10
|
```ts
|
|
11
11
|
// email/_default.ts — fallback for any unmatched recipient
|
|
@@ -61,7 +61,7 @@ Files are matched against the local-part of the `To` address (the portion before
|
|
|
61
61
|
|
|
62
62
|
The first pattern that matches wins. Within a shape, a literal tag beats a captured tag — `support+vip@` reaches `support+vip.ts`, and every other `support+…@` reaches `support+[ticket].ts`. Handlers of the same shape are tried alphabetically.
|
|
63
63
|
|
|
64
|
-
If nothing matches and there's no `_default.ts`, control returns to Cloudflare and the sender receives a non-delivery report.
|
|
64
|
+
If nothing matches and there's no `_default.ts`, control returns to Cloudflare and the sender receives a non-delivery report. Place handlers directly under `email/`.
|
|
65
65
|
|
|
66
66
|
## Threaded replies {#threaded-replies}
|
|
67
67
|
|
|
@@ -160,7 +160,7 @@ Void infers `contentType` from the filename if you omit it. An explicit value mu
|
|
|
160
160
|
|
|
161
161
|
## Calendar invitations
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
To invite someone to a meeting, include the iCalendar text in `calendar.content`. Here’s a kickoff email with a plain-text message for mail clients that can’t display the invitation.
|
|
164
164
|
|
|
165
165
|
```ts
|
|
166
166
|
import { sendEmail } from 'void/email';
|
|
@@ -175,6 +175,8 @@ function sendInvite(to: string, icsText: string) {
|
|
|
175
175
|
}
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
+
Use `REQUEST` for an invitation or an update and `CANCEL` to cancel the event. Set `METHOD` in the iCalendar text to the same value. Include either `text` or `html` for the email itself.
|
|
179
|
+
|
|
178
180
|
## Result and errors {#result-and-errors}
|
|
179
181
|
|
|
180
182
|
`sendEmail` returns a result instead of throwing. A successful result means the provider accepted the send; it does not confirm delivery to the recipient's mailbox.
|
package/docs/guide/env-vars.md
CHANGED
|
@@ -10,6 +10,8 @@ Declare your environment variables in `env.ts`, then read them through `env` fro
|
|
|
10
10
|
|
|
11
11
|
Create `env.ts` at the project root:
|
|
12
12
|
|
|
13
|
+
For a package with `"type": "commonjs"` in `package.json`, use `env.mts`.
|
|
14
|
+
|
|
13
15
|
```ts
|
|
14
16
|
import { defineEnv, number, string, url } from 'void/env';
|
|
15
17
|
|