void 1.6.2 → 1.8.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/dist/{account-cmd-D903EEWQ.mjs → account-cmd-CZKntRH2.mjs} +6 -6
- package/dist/action-key-ByZ6DDld.mjs +64 -0
- package/dist/{application-analysis-DlUG-XNT.mjs → application-analysis-CyTagJQM.mjs} +31 -10
- package/dist/{application-routing-GCBSwXA9.mjs → application-routing-BLrMVpqi.mjs} +2 -1
- package/dist/{auth-CL-p_rqV.mjs → auth-BN0NU9dz.mjs} +1 -1
- package/dist/{auth-CH4PLAX1.d.mts → auth-Bk9VGtQW.d.mts} +9 -2
- package/dist/{auth-Dy8svcqQ.mjs → auth-CCk9Seol.mjs} +2 -2
- package/dist/{auth-YVjBX5NY.mjs → auth-DyWp-fSo.mjs} +7 -1
- package/dist/{auth-link-g9J7MSmP.mjs → auth-link-BOaQWMKw.mjs} +6 -6
- package/dist/{auth-router-DMZbG9Qn.mjs → auth-router-D0-VcmDs.mjs} +3 -3
- package/dist/{better-auth-shared-BJyG2mH0.d.mts → better-auth-shared-CQFdtguU.d.mts} +2 -2
- package/dist/{better-auth-shared-C958aM7W.mjs → better-auth-shared-CdVyCUou.mjs} +1 -1
- package/dist/boundary-plans-CRmWH68v.d.mts +25 -0
- package/dist/{build-cmd-DmjbuT6d.mjs → build-cmd-JTsXXf2F.mjs} +5 -5
- package/dist/{cache-2khBO1MR.mjs → cache-D0m3Z_Xf.mjs} +5 -5
- package/dist/{cancel-deploy-_itbbvY3.mjs → cancel-deploy-Ce6Os4fa.mjs} +4 -4
- package/dist/{cf-build-output-B1C8U83u.mjs → cf-build-output-CWNOH-KA.mjs} +2 -1
- package/dist/cf-build-output-DUZnAeZ1.mjs +1 -0
- package/dist/{cf-config-migrate-Dy8MrKgF.mjs → cf-config-migrate-Bb-EdAQq.mjs} +5 -1
- package/dist/cli/cli.mjs +68 -1868
- package/dist/cli/cloudflare-operation-process.mjs +101 -26
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/cli-main-rkrJy2Ge.mjs +1889 -0
- package/dist/client-D1Vz1Zep.mjs +1 -0
- package/dist/{client-CoxPEhJq.mjs → client-SZPyj4X_.mjs} +10 -4
- package/dist/{cloudflare-auth-CuS42-9A.mjs → cloudflare-auth-7jTqy9Bx.mjs} +1 -1
- package/dist/{cloudflare-cmd-DTF19-j-.mjs → cloudflare-cmd-ChPLQcTP.mjs} +5 -5
- package/dist/{cloudflare-config-Ce8j5S7V.mjs → cloudflare-config-DtOGAbeB.mjs} +2 -2
- package/dist/{cloudflare-connect-BN4dHp8i.mjs → cloudflare-connect-Co93VYTo.mjs} +3 -3
- package/dist/{cloudflare-operations-DrZGzQap.mjs → cloudflare-operations-CXaDKYj2.mjs} +6 -6
- package/dist/{cloudflare-operations-laxRA8HN.mjs → cloudflare-operations-DATekLwI.mjs} +1 -1
- package/dist/{cloudflare-process-D9aC-jXr.mjs → cloudflare-process-DmTxZR-N.mjs} +2 -2
- package/dist/{config-hL-S-Y9D.mjs → config-5oSQhZNj.mjs} +3 -1
- package/dist/{config-CPxJmt4M.d.mts → config-CTlUaXWZ.d.mts} +3 -1
- package/dist/{config-CNDjO-15.mjs → config-DcqUBGCb.mjs} +1 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-DMR0i3Z2.mjs → config-wo2EaH0X.mjs} +1 -1
- package/dist/{connect-DHepM7Xs.mjs → connect-DlvXt1JR.mjs} +7 -7
- package/dist/{create-project-Bq0M8MtO.mjs → create-project-CC_7hmYJ.mjs} +5 -5
- package/dist/{create-project-BiMmR5wA.mjs → create-project-DzY05xqC.mjs} +1 -1
- package/dist/{db-CqfT6lhV.mjs → db-FhyYGcJJ.mjs} +39 -39
- package/dist/{db-types-DRmxBJ2K.mjs → db-types-sVwEpyPR.mjs} +4 -2
- package/dist/{delete-CY4L8fi2.mjs → delete-CModjyOC.mjs} +5 -5
- package/dist/{deploy-La_Ly8g_.mjs → deploy-Cz9TEzZy.mjs} +502 -110
- package/dist/deploy-DMieisRu.mjs +2 -0
- package/dist/{deploy-managed-static-CESLfKHN.mjs → deploy-managed-static-DlxxXkAM.mjs} +16 -16
- package/dist/{deploy-transport-DcI6LXhY.mjs → deploy-transport-DUvm6-CR.mjs} +3 -3
- package/dist/deploy.mjs +8 -8
- package/dist/{dispatch-DM4Xdd2l.mjs → dispatch-CCiaAnSK.mjs} +7 -7
- package/dist/{dist-eV_Ep60B.mjs → dist-Cp4b1_T9.mjs} +1 -1
- package/dist/{dist-D23AAMxT.mjs → dist-STQXl8ck.mjs} +86 -138
- package/dist/{domain-BD1KOQL3.mjs → domain-DvdZPA50.mjs} +6 -6
- package/dist/{drizzle-C8MPqt5m.mjs → drizzle-D4V_06-B.mjs} +1 -1
- package/dist/{drizzle-lFdzSEa9.mjs → drizzle-DBSpPpU1.mjs} +34 -8
- package/dist/{email-XAspopcj.mjs → email-ASpNrfLd.mjs} +10 -10
- package/dist/{email-cloudflare-RxIQoPc9.mjs → email-cloudflare-kqoN9jst.mjs} +25 -16
- package/dist/{entry-DFBca6aS.mjs → entry-BweGTCgj.mjs} +1 -1
- package/dist/{env-DrYUh55t.mjs → env-Bpkg3G5i.mjs} +7 -7
- package/dist/{env-CuzZZyjB.mjs → env-UqS-21xi.mjs} +8 -1
- package/dist/env-mask-D31Qztl9.mjs +46 -0
- package/dist/{env-public-CeNeO_AT.d.mts → env-public-DtJL_hZq.d.mts} +8 -7
- package/dist/{env-validation-Del3C8AY.mjs → env-validation-BpCCQE_6.mjs} +6 -6
- package/dist/{env-validation-Bosj7EVg.mjs → env-validation-CN386Utu.mjs} +1 -1
- package/dist/{fetch-C8yhLoF3.mjs → fetch-CAIVkLvW.mjs} +1 -1
- package/dist/{fetch-B-gLGYVl.d.mts → fetch-CbI6lNnk.d.mts} +6 -4
- package/dist/{fetch-stream-DafNtVJC.mjs → fetch-stream-6Op0qlLd.mjs} +1 -1
- package/dist/{fetch-stream-DuwxWmBM.d.mts → fetch-stream-DoED9atq.d.mts} +1 -1
- package/dist/gen-M5fNQKfH.mjs +1 -0
- package/dist/{gen-DSkScMIz.mjs → gen-upKJChvd.mjs} +7 -7
- package/dist/{github-cmd-CA-lBdkn.mjs → github-cmd-BvMOlb8Z.mjs} +6 -6
- package/dist/{handler-BR6Tvjkp.d.mts → handler-BO7Od-z9.d.mts} +22 -8
- package/dist/{handler-DnI_au0K.mjs → handler-C9SnmeW1.mjs} +5 -4
- package/dist/{headers--cbz6iZ8.mjs → headers-COGEDoMN.mjs} +11 -2
- package/dist/help-CItQVDL4.mjs +1 -0
- package/dist/{help-1OCFDsRr.mjs → help-TPCjTu6e.mjs} +7 -3
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +379 -265
- package/dist/{info-BpxpsX0B.mjs → info-EsDyihwf.mjs} +4 -4
- package/dist/{init-DpVXO5S-.mjs → init-a4lVagrb.mjs} +33 -32
- package/dist/{link-DAXOT-G_.mjs → link-CE55DDzS.mjs} +6 -6
- package/dist/{list-BFQ0gcML.mjs → list-CxRthQks.mjs} +7 -7
- package/dist/{live-DF4HUl2m.mjs → live-CYJ4KGoR.mjs} +2 -2
- package/dist/{live-0xrcVpyq.d.mts → live-Kc55iuOQ.d.mts} +2 -2
- package/dist/{local-d1-CLVPP6v7.mjs → local-d1-CFcH9Bx3.mjs} +2 -2
- package/dist/{login-RIw7ffPe.mjs → login-AfcSGSmE.mjs} +5 -5
- package/dist/login-ZHsAm-I6.mjs +1 -0
- package/dist/{logs-B2OeLS4X.mjs → logs-BgRJuvb1.mjs} +6 -6
- package/dist/{migrate-DiI50Chz.mjs → migrate-BNAh6m_C.mjs} +5 -5
- package/dist/migrate-BflbbZQK.mjs +1 -0
- package/dist/nitro.d.mts +5 -0
- package/dist/nitro.mjs +27 -8
- package/dist/{node-Bc-dBAGL.mjs → node-CXFUw0Uz.mjs} +5 -5
- package/dist/{operator-args-D79WQP70.mjs → operator-args-DGTuCdSE.mjs} +9 -1
- package/dist/{operator-auth-CfDcmzpo.mjs → operator-auth-CD3pap65.mjs} +1 -1
- package/dist/{operator-client-BIY4-N_6.mjs → operator-client-XvXTkea6.mjs} +2 -2
- package/dist/{operator-cmd-CEI5Aaza.mjs → operator-cmd-C-viB7Si.mjs} +7 -7
- package/dist/operator-cmd-D6qNuJ_z.mjs +1 -0
- package/dist/output-BsdnNpxa.mjs +1 -0
- package/dist/{output-BCdLioKP.mjs → output-DNVILSz2.mjs} +1 -1
- package/dist/pages/client.d.mts +43 -15
- package/dist/pages/client.mjs +165 -80
- package/dist/pages/index.d.mts +6 -4
- package/dist/pages/index.mjs +6 -6
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +13 -2
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.d.mts +2 -2
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{platform-args-Cx1M-7bq.mjs → platform-args-CiYeZmc5.mjs} +1 -1
- package/dist/platform-args-DJvF1-kl.mjs +1 -0
- package/dist/{platform-auth-config-ZrYm8KVs.mjs → platform-auth-config-Dt2qEc2w.mjs} +10 -10
- package/dist/{platform-auth-protection-t6mdY4nn.mjs → platform-auth-protection-B7TaF-PZ.mjs} +8 -8
- package/dist/{platform-auth-recovery-XeBmPTXx.mjs → platform-auth-recovery-suXSteJ6.mjs} +7 -7
- package/dist/{platform-cmd-EXehmSYA.mjs → platform-cmd-9rvYBBtr.mjs} +9 -9
- package/dist/{platform-cmd-C7BevP9b.mjs → platform-cmd-DuAsIxbU.mjs} +1 -1
- package/dist/{platform-domain-DR263ObA.mjs → platform-domain-DhH_vDr6.mjs} +5 -5
- package/dist/{platform-lifecycle-CN4aXldN.mjs → platform-lifecycle-3uI-E2bF.mjs} +1 -1
- package/dist/{platform-lifecycle-BvU_TNji.mjs → platform-lifecycle-CXmXe2xt.mjs} +17 -17
- package/dist/{platform-management-_UE1_GM8.mjs → platform-management-BBCHfwji.mjs} +4 -4
- package/dist/{platform-management-yS2sve3V.mjs → platform-management-PdrgDQTe.mjs} +1 -1
- package/dist/{platform-plans-config-Dx1agneU.mjs → platform-plans-config-BGwkXYDM.mjs} +5 -5
- package/dist/{platform-recovery-CPVk9-Q4.mjs → platform-recovery-C8NxXGRR.mjs} +3 -3
- package/dist/{platform-setup-Vw1AaUN8.mjs → platform-setup-Casiffqj.mjs} +3 -3
- package/dist/{plugin-inference-bQ1Be840.mjs → plugin-inference-CErfTgEx.mjs} +4 -4
- package/dist/{prepare-D8L9AQbw.mjs → prepare-BDKWZgfL.mjs} +12 -9
- package/dist/{prepare-BkRhDnxw.mjs → prepare-BLrzXjIl.mjs} +3 -3
- package/dist/prepare-a1_5usAn.mjs +1 -0
- package/dist/{prerender-render-RlAj6hh8.mjs → prerender-render-BAdYhivW.mjs} +44 -15
- package/dist/prerender-render.d.mts +12 -2
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-cmd-DH3CuFC6.mjs → project-cmd-DzGvxXKH.mjs} +18 -18
- package/dist/{project-team-MjT5K4rQ.mjs → project-team-C5XtHbZk.mjs} +5 -5
- package/dist/{project-token-BKHGwY3k.mjs → project-token-B4D5yhHQ.mjs} +5 -5
- package/dist/{project-tsconfig-BMveFb4b.mjs → project-tsconfig-nhnTWO_Y.mjs} +3 -1
- package/dist/{project-zero-trust-Bzdd05-h.mjs → project-zero-trust--0LvktDg.mjs} +5 -5
- package/dist/{protocol-COyySMki.mjs → protocol-B1Tvc9-x.mjs} +232 -74
- package/dist/{protocol-CkwjASep.d.mts → protocol-Cg2I81NA.d.mts} +13 -4
- package/dist/{provision-B0HqoRuI.mjs → provision-C3yiHdld.mjs} +2 -2
- package/dist/{provision-CYhZR_Mn.mjs → provision-CAcrauvr.mjs} +1 -1
- package/dist/{requests-daJmVpjk.mjs → requests-CrRiTgQA.mjs} +4 -4
- package/dist/resolve-project-C5wC-Hoi.mjs +1 -0
- package/dist/{resolve-project-D0YNnJfm.mjs → resolve-project-Da3OgCU1.mjs} +1 -1
- package/dist/{rollback-AVwiMAkk.mjs → rollback-BsmQyj-Q.mjs} +7 -7
- package/dist/{route-types-e69EqY88.mjs → route-types-CgtlFCDz.mjs} +268 -14
- package/dist/{route-url-C_YIH_zO.d.mts → route-url-C3JwYrER.d.mts} +8 -3
- package/dist/{route-url-CRDF-I0I.mjs → route-url-CfCR4oMj.mjs} +4 -3
- package/dist/routes-stub.d.mts +14 -4
- package/dist/routes-stub.mjs +1 -1
- package/dist/{runner-QMeOpScZ.mjs → runner-CTk21HrO.mjs} +1 -1
- package/dist/{runner-mysql-0zVmB1JW.mjs → runner-mysql-CHvEg_sy.mjs} +1 -1
- package/dist/runtime/ai.mjs +1 -1
- package/dist/runtime/auth.d.mts +2 -2
- package/dist/runtime/auth.mjs +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/better-auth-mysql.mjs +1 -1
- package/dist/runtime/better-auth-pg.d.mts +1 -1
- package/dist/runtime/better-auth-pg.mjs +1 -1
- package/dist/runtime/better-auth.d.mts +1 -1
- package/dist/runtime/better-auth.mjs +1 -1
- package/dist/runtime/client-react.d.mts +3 -3
- package/dist/runtime/client-react.mjs +2 -2
- package/dist/runtime/client-solid.d.mts +3 -3
- package/dist/runtime/client-solid.mjs +2 -2
- package/dist/runtime/client-svelte.d.mts +3 -3
- package/dist/runtime/client-svelte.mjs +2 -2
- package/dist/runtime/client-vue.d.mts +3 -3
- package/dist/runtime/client-vue.mjs +2 -2
- package/dist/runtime/client.d.mts +3 -3
- package/dist/runtime/client.mjs +2 -2
- package/dist/runtime/db.d.mts +6 -3
- package/dist/runtime/db.mjs +2 -2
- package/dist/runtime/email/testing.mjs +2 -2
- package/dist/runtime/email.mjs +3 -3
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +55 -85
- package/dist/runtime/fetch-server.d.mts +1 -1
- package/dist/runtime/fetch-server.mjs +1 -1
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +1 -1
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.d.mts +3 -1
- package/dist/runtime/live-client.d.mts +11 -2
- package/dist/runtime/live-client.mjs +8 -0
- package/dist/runtime/live-server.mjs +1 -1
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/log.mjs +1 -1
- package/dist/runtime/remote/index.mjs +1 -1
- package/dist/runtime/route-url.d.mts +2 -2
- package/dist/runtime/route-url.mjs +1 -1
- package/dist/runtime/routing.d.mts +21 -5
- package/dist/runtime/routing.mjs +251 -29
- package/dist/runtime/sandbox.mjs +1 -1
- package/dist/runtime/sse-client.d.mts +9 -1
- package/dist/runtime/sse-client.mjs +7 -0
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -1
- package/dist/runtime/ws-server.d.mts +3 -3
- package/dist/runtime/ws-server.mjs +1 -1
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +1 -1
- package/dist/{scan-F0psanp7.mjs → scan-BJ3bj6aP.mjs} +236 -32
- package/dist/{secret-szNdoeKa.mjs → secret-D0g5oBsP.mjs} +7 -7
- package/dist/serialize-DN-envGQ.d.mts +18 -0
- package/dist/serialize-Pf-CIQK_.mjs +39 -0
- package/dist/{skills-D393E4lB.mjs → skills-CoBB9_Ao.mjs} +1 -1
- package/dist/{ast-bindings-BkivMJIo.mjs → static-exports-DFkzL-NX.mjs} +96 -33
- package/dist/{subcommand-prompt-CxJXporl.mjs → subcommand-prompt-0yIARXf2.mjs} +2 -2
- package/dist/{types-agfx0alu.d.mts → types-IPut3_Yx.d.mts} +15 -1
- package/dist/url-CuoEn0o3.mjs +43 -0
- package/dist/validator-8-NZs2Xr.mjs +168 -0
- package/dist/{version-metadata-BC3LK7Y-.mjs → version-metadata-eUd6Ar_U.mjs} +1 -1
- package/dist/wrangler-R3kMdJfw.mjs +1 -0
- package/dist/{wrangler-Gn4EoY4-.mjs → wrangler-k40T7XTQ.mjs} +2 -2
- package/dist/{wrapper-B9W9RE8z.mjs → wrapper-CVMZarxf.mjs} +11 -8
- package/dist/{ws-Dmjg5NH2.d.mts → ws--U7QicYy.d.mts} +2 -2
- package/docs/guide/ai.md +3 -0
- package/docs/guide/app-types.md +1 -0
- package/docs/guide/auth.md +63 -0
- package/docs/guide/database/d1.md +16 -1
- package/docs/guide/database/mysql.md +1 -0
- package/docs/guide/database/postgresql.md +1 -0
- package/docs/guide/database.md +34 -0
- package/docs/guide/deployment.md +9 -0
- package/docs/guide/durable-state.md +1 -0
- package/docs/guide/edge/headers.md +1 -0
- package/docs/guide/edge/prerendering.md +10 -4
- package/docs/guide/edge/redirects.md +1 -0
- package/docs/guide/edge/revalidation.md +6 -0
- package/docs/guide/edge/rewrites.md +1 -0
- package/docs/guide/edge/static-assets.md +1 -0
- package/docs/guide/email/domains.md +1 -0
- package/docs/guide/email/receiving.md +3 -2
- package/docs/guide/email/sending.md +3 -2
- package/docs/guide/email.md +1 -0
- package/docs/guide/env-vars.md +4 -0
- package/docs/guide/index.md +1 -0
- package/docs/guide/jobs.md +1 -0
- package/docs/guide/kv.md +1 -0
- package/docs/guide/live.md +3 -0
- package/docs/guide/pages-routing/actions-and-forms.md +51 -28
- package/docs/guide/pages-routing/errors.md +101 -0
- package/docs/guide/pages-routing/head.md +4 -1
- package/docs/guide/pages-routing/islands.md +2 -1
- package/docs/guide/pages-routing/layouts.md +3 -0
- package/docs/guide/pages-routing/loaders.md +3 -0
- package/docs/guide/pages-routing/markdown.md +3 -3
- package/docs/guide/pages-routing/overview.md +142 -10
- package/docs/guide/pages-routing/view-transitions.md +1 -0
- package/docs/guide/platform/administration/access.md +1 -0
- package/docs/guide/platform/administration/connected-apps.md +4 -0
- package/docs/guide/platform/administration/email.md +1 -0
- package/docs/guide/platform/administration/operations.md +1 -0
- package/docs/guide/platform/administration/plans.md +1 -0
- package/docs/guide/platform/administration/projects.md +11 -0
- package/docs/guide/platform/administration/zero-trust.md +1 -0
- package/docs/guide/platform/development/local.md +1 -0
- package/docs/guide/platform/development/runtime.md +1 -0
- package/docs/guide/platform/development/schema-ci.md +1 -0
- package/docs/guide/platform/installation/ci.md +1 -0
- package/docs/guide/platform/installation/credentials.md +1 -0
- package/docs/guide/platform/installation/domains.md +1 -0
- package/docs/guide/platform/installation/first-deployment.md +1 -0
- package/docs/guide/platform/installation/maintenance.md +1 -0
- package/docs/guide/platform/installation/prerequisites.md +1 -0
- package/docs/guide/platform/installation/setup.md +1 -0
- package/docs/guide/platform/installation/uninstall.md +1 -0
- package/docs/guide/platform-administration.md +1 -0
- package/docs/guide/platform-development.md +1 -0
- package/docs/guide/project-collaboration.md +1 -0
- package/docs/guide/queues.md +3 -0
- package/docs/guide/quickstart.md +4 -2
- package/docs/guide/remote-dev.md +1 -0
- package/docs/guide/sandboxes.md +1 -0
- package/docs/guide/self-hosted-platform.md +1 -0
- package/docs/guide/server-routing.md +1 -0
- package/docs/guide/sse.md +3 -0
- package/docs/guide/ssg.md +24 -2
- package/docs/guide/ssr.md +1 -0
- package/docs/guide/storage.md +7 -2
- package/docs/guide/testing.md +62 -0
- package/docs/guide/type-safety.md +308 -26
- package/docs/guide/typed-fetch.md +8 -3
- package/docs/guide/websockets.md +6 -5
- package/docs/index.md +1 -0
- package/docs/integrations/agents.md +1 -0
- package/docs/integrations/cloudflare.md +11 -10
- package/docs/integrations/frameworks/analog.md +1 -0
- package/docs/integrations/frameworks/astro.md +1 -0
- package/docs/integrations/frameworks/nuxt.md +3 -0
- package/docs/integrations/frameworks/overview.md +3 -0
- package/docs/integrations/frameworks/react-router.md +1 -0
- package/docs/integrations/frameworks/sveltekit.md +1 -0
- package/docs/integrations/frameworks/tanstack-start.md +1 -0
- package/docs/integrations/hono.md +1 -0
- package/docs/integrations/nodejs-bun-deno.md +66 -0
- package/docs/reference/api/auth.md +20 -0
- package/docs/reference/api/client.md +7 -4
- package/docs/reference/api/database.md +24 -1
- package/docs/reference/api/deploy.md +4 -0
- package/docs/reference/api/durable.md +1 -0
- package/docs/reference/api/env.md +1 -0
- package/docs/reference/api/handlers.md +4 -1
- package/docs/reference/api/pages.md +30 -12
- package/docs/reference/api/plugin.md +1 -0
- package/docs/reference/api/resources.md +4 -1
- package/docs/reference/api/rewrites.md +18 -5
- package/docs/reference/api/types.md +10 -2
- package/docs/reference/api.md +1 -0
- package/docs/reference/cli/auth.md +1 -0
- package/docs/reference/cli/database.md +3 -0
- package/docs/reference/cli/deploy.md +18 -11
- package/docs/reference/cli/domains.md +1 -0
- package/docs/reference/cli/email.md +1 -0
- package/docs/reference/cli/generate.md +1 -0
- package/docs/reference/cli/github.md +1 -0
- package/docs/reference/cli/platform-config.md +1 -0
- package/docs/reference/cli/platform-email.md +1 -0
- package/docs/reference/cli/platform-installation.md +1 -0
- package/docs/reference/cli/platform-operations.md +1 -0
- package/docs/reference/cli/platform-users.md +23 -0
- package/docs/reference/cli/platform-zero-trust.md +1 -0
- package/docs/reference/cli/platform.md +1 -0
- package/docs/reference/cli/project.md +1 -0
- package/docs/reference/cli/secrets.md +1 -0
- package/docs/reference/cli/setup.md +1 -0
- package/docs/reference/cli.md +6 -0
- package/docs/reference/config.md +25 -2
- package/docs/reference/resource-inference.md +1 -0
- package/docs/reference/structure.md +1 -0
- package/package.json +27 -25
- package/schema.json +4 -0
- package/skills/void/SKILL.md +7 -0
- package/dist/action-key-XtKKbbsi.mjs +0 -25
- package/dist/cf-build-output-CmDOcA7K.mjs +0 -1
- package/dist/client-CEtr5UOR.mjs +0 -1
- package/dist/deploy-DMhOyebt.mjs +0 -2
- package/dist/gen-BbT1Ku1P.mjs +0 -1
- package/dist/help-Ba8Dq5-r.mjs +0 -1
- package/dist/login-BX2gzHUt.mjs +0 -1
- package/dist/migrate-CUGMGaIM.mjs +0 -1
- package/dist/operator-cmd-oTT2MA9G.mjs +0 -1
- package/dist/output-E6gecbbV.mjs +0 -1
- package/dist/platform-args-C7XUw9mw.mjs +0 -1
- package/dist/prepare-CZRVGNld.mjs +0 -1
- package/dist/resolve-project-CgfjtOwz.mjs +0 -1
- package/dist/serialize-DUuYuaY3.mjs +0 -29
- package/dist/serialize-I4EmS-Wf.d.mts +0 -16
- package/dist/validator-CTfmzZYb.mjs +0 -69
- package/dist/wrangler-CQ5c-MtJ.mjs +0 -1
- package/dist/{cf-access-BmBT2h8_.mjs → cf-access-Dnyw8KFY.mjs} +1 -1
- package/dist/{config-s6TkpSat.mjs → config-eeDzKBS9.mjs} +1 -1
- package/dist/{env-types-Bd8DkQhl.mjs → env-types-Dz9qkiOn.mjs} +1 -1
- package/dist/{inbound-CdO-qY0w.mjs → inbound-C2H6Dzz1.mjs} +2 -2
- package/dist/{runner-5MCSimKx.mjs → runner-CMZb7jNU.mjs} +1 -1
- package/dist/{runner-mysql-Bdmsp_x4.mjs → runner-mysql-BXfcQQj3.mjs} +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Turn files in pages/ into routes. A server loader returns data, and the page component receives it as props.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -153,6 +154,8 @@ Render and prerender flags combine like this:
|
|
|
153
154
|
| Island page + `ssr = false` | Invalid. Island pages already use the island renderer. |
|
|
154
155
|
| `output: "static"` + `prerender` unset | Auto-prerender pages that have known paths, including client-only shells. |
|
|
155
156
|
|
|
157
|
+
Write `ssr` and `prerender` as `true` or `false` with `export const` in the `.server.ts` file itself. Void reads them without running the file, so it ignores a computed or re-exported value and prints a warning.
|
|
158
|
+
|
|
156
159
|
### Typed navigation
|
|
157
160
|
|
|
158
161
|
Use the `Link` component for SPA navigation between pages. Build dynamic URLs with [`routeUrl()`](../type-safety.md#typed-urls-and-navigation) to check the route pattern and its parameters:
|
|
@@ -164,7 +167,7 @@ import { Link } from "@void/react";
|
|
|
164
167
|
import { routeUrl } from 'void/routes';
|
|
165
168
|
|
|
166
169
|
<Link href="/users">Users</Link>
|
|
167
|
-
<Link href={routeUrl('/users
|
|
170
|
+
<Link href={routeUrl('/users/[id]', { params: { id } })}>View</Link>
|
|
168
171
|
```
|
|
169
172
|
|
|
170
173
|
```vue [Vue]
|
|
@@ -175,7 +178,7 @@ import { routeUrl } from 'void/routes';
|
|
|
175
178
|
|
|
176
179
|
<template>
|
|
177
180
|
<Link href="/users">Users</Link>
|
|
178
|
-
<Link :href="routeUrl('/users
|
|
181
|
+
<Link :href="routeUrl('/users/[id]', { params: { id } })">View</Link>
|
|
179
182
|
</template>
|
|
180
183
|
```
|
|
181
184
|
|
|
@@ -186,7 +189,7 @@ import { routeUrl } from 'void/routes';
|
|
|
186
189
|
</script>
|
|
187
190
|
|
|
188
191
|
<Link href="/users">Users</Link>
|
|
189
|
-
<Link href={routeUrl('/users
|
|
192
|
+
<Link href={routeUrl('/users/[id]', { params: { id } })}>View</Link>
|
|
190
193
|
```
|
|
191
194
|
|
|
192
195
|
```tsx [Solid]
|
|
@@ -194,7 +197,7 @@ import { Link } from "@void/solid";
|
|
|
194
197
|
import { routeUrl } from 'void/routes';
|
|
195
198
|
|
|
196
199
|
<Link href="/users">Users</Link>
|
|
197
|
-
<Link href={routeUrl('/users
|
|
200
|
+
<Link href={routeUrl('/users/[id]', { params: { id } })}>View</Link>
|
|
198
201
|
```
|
|
199
202
|
|
|
200
203
|
:::
|
|
@@ -203,7 +206,11 @@ With [`routing.typedRoutes`](../type-safety.md#checked-url-strings), which apps
|
|
|
203
206
|
|
|
204
207
|
`Link` also supports query data, history replacement, full-page navigation, and cancellation:
|
|
205
208
|
|
|
206
|
-
|
|
209
|
+
::: code-group
|
|
210
|
+
|
|
211
|
+
```tsx [React]
|
|
212
|
+
import { Link } from '@void/react';
|
|
213
|
+
|
|
207
214
|
<Link href="/users" data={{ page: 2, tag: ['active', 'new'] }}>
|
|
208
215
|
Filtered users
|
|
209
216
|
</Link>
|
|
@@ -228,8 +235,81 @@ With [`routing.typedRoutes`](../type-safety.md#checked-url-strings), which apps
|
|
|
228
235
|
</Link>
|
|
229
236
|
```
|
|
230
237
|
|
|
238
|
+
```vue [Vue]
|
|
239
|
+
<script setup lang="ts">
|
|
240
|
+
import { Link } from '@void/vue';
|
|
241
|
+
|
|
242
|
+
function onNavigate(event: { preventDefault(): void }) {
|
|
243
|
+
if (!confirm('Leave this page?')) {
|
|
244
|
+
event.preventDefault();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
</script>
|
|
248
|
+
|
|
249
|
+
<template>
|
|
250
|
+
<Link href="/users" :data="{ page: 2, tag: ['active', 'new'] }">Filtered users</Link>
|
|
251
|
+
<Link href="/users" replace>Users</Link>
|
|
252
|
+
<Link href="/logout" reload-document>Sign out</Link>
|
|
253
|
+
<Link href="/settings" :on-navigate="onNavigate">Settings</Link>
|
|
254
|
+
</template>
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
```svelte [Svelte]
|
|
258
|
+
<script lang="ts">
|
|
259
|
+
import { Link } from '@void/svelte';
|
|
260
|
+
</script>
|
|
261
|
+
|
|
262
|
+
<Link href="/users" data={{ page: 2, tag: ['active', 'new'] }}>Filtered users</Link>
|
|
263
|
+
|
|
264
|
+
<Link href="/users" replace>Users</Link>
|
|
265
|
+
|
|
266
|
+
<Link href="/logout" reloadDocument>Sign out</Link>
|
|
267
|
+
|
|
268
|
+
<Link
|
|
269
|
+
href="/settings"
|
|
270
|
+
onNavigate={(event) => {
|
|
271
|
+
if (!confirm('Leave this page?')) {
|
|
272
|
+
event.preventDefault();
|
|
273
|
+
}
|
|
274
|
+
}}
|
|
275
|
+
>
|
|
276
|
+
Settings
|
|
277
|
+
</Link>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
```tsx [Solid]
|
|
281
|
+
import { Link } from '@void/solid';
|
|
282
|
+
|
|
283
|
+
<Link href="/users" data={{ page: 2, tag: ['active', 'new'] }}>
|
|
284
|
+
Filtered users
|
|
285
|
+
</Link>
|
|
286
|
+
|
|
287
|
+
<Link href="/users" replace>
|
|
288
|
+
Users
|
|
289
|
+
</Link>
|
|
290
|
+
|
|
291
|
+
<Link href="/logout" reloadDocument>
|
|
292
|
+
Sign out
|
|
293
|
+
</Link>
|
|
294
|
+
|
|
295
|
+
<Link
|
|
296
|
+
href="/settings"
|
|
297
|
+
onNavigate={(event) => {
|
|
298
|
+
if (!confirm('Leave this page?')) {
|
|
299
|
+
event.preventDefault();
|
|
300
|
+
}
|
|
301
|
+
}}
|
|
302
|
+
>
|
|
303
|
+
Settings
|
|
304
|
+
</Link>
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
:::
|
|
308
|
+
|
|
231
309
|
`prefetch` and `reloadDocument` work only with GET links. GET `data` becomes query parameters; use scalar values or arrays.
|
|
232
310
|
|
|
311
|
+
If a deployment changes Void's page-data format, already-open tabs reload on their next page navigation to load the matching client.
|
|
312
|
+
|
|
233
313
|
For programmatic navigation, use `useRouter()`. Pass a typed destination object to `visit()`, `prefetch()`, or `flush()`:
|
|
234
314
|
|
|
235
315
|
```ts
|
|
@@ -238,7 +318,7 @@ import type { RouteDestination } from 'void/routes';
|
|
|
238
318
|
|
|
239
319
|
const router = useRouter();
|
|
240
320
|
const profile = {
|
|
241
|
-
pathname: '/users
|
|
321
|
+
pathname: '/users/[id]',
|
|
242
322
|
params: { id: 42 },
|
|
243
323
|
query: { tab: 'activity' },
|
|
244
324
|
} satisfies RouteDestination;
|
|
@@ -254,17 +334,58 @@ You can also pass URL strings or `URL` instances to these router methods. See [T
|
|
|
254
334
|
|
|
255
335
|
`router.visit()` updates the page in place for same-origin URLs. `http(s)` URLs on another origin get a full page load, and other schemes such as `javascript:` are rejected.
|
|
256
336
|
|
|
257
|
-
For dynamic route params, use `useParams()` from the same adapter package:
|
|
337
|
+
For dynamic route params, use `useParams()` from the same adapter package. Pass the page's URL pattern as the type argument to type the result:
|
|
258
338
|
|
|
259
|
-
|
|
339
|
+
::: code-group
|
|
340
|
+
|
|
341
|
+
```tsx [React]
|
|
342
|
+
// pages/posts/[id].tsx
|
|
260
343
|
import { useParams } from '@void/react';
|
|
261
344
|
|
|
262
345
|
export default function PostPage() {
|
|
263
|
-
const { id } = useParams<{ id: string }
|
|
346
|
+
const { id } = useParams<'/posts/[id]'>(); // { id: string }
|
|
264
347
|
return <h1>Post {id}</h1>;
|
|
265
348
|
}
|
|
266
349
|
```
|
|
267
350
|
|
|
351
|
+
```vue [Vue]
|
|
352
|
+
<!-- pages/posts/[id].vue -->
|
|
353
|
+
<script setup lang="ts">
|
|
354
|
+
import { useParams } from '@void/vue';
|
|
355
|
+
|
|
356
|
+
const params = useParams<'/posts/[id]'>(); // { id: string }
|
|
357
|
+
</script>
|
|
358
|
+
|
|
359
|
+
<template>
|
|
360
|
+
<h1>Post {{ params.id }}</h1>
|
|
361
|
+
</template>
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
```svelte [Svelte]
|
|
365
|
+
<!-- pages/posts/[id].svelte -->
|
|
366
|
+
<script lang="ts">
|
|
367
|
+
import { useParams } from '@void/svelte';
|
|
368
|
+
|
|
369
|
+
const params = useParams<'/posts/[id]'>(); // { id: string }
|
|
370
|
+
</script>
|
|
371
|
+
|
|
372
|
+
<h1>Post {params.id}</h1>
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
```tsx [Solid]
|
|
376
|
+
// pages/posts/[id].tsx
|
|
377
|
+
import { useParams } from '@void/solid';
|
|
378
|
+
|
|
379
|
+
export default function PostPage() {
|
|
380
|
+
const params = useParams<'/posts/[id]'>(); // { id: string }
|
|
381
|
+
return <h1>Post {params.id}</h1>;
|
|
382
|
+
}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
:::
|
|
386
|
+
|
|
387
|
+
See [Page params](../type-safety.md#page-params) for how patterns are checked.
|
|
388
|
+
|
|
268
389
|
### Active links
|
|
269
390
|
|
|
270
391
|
`Link` marks the link to the current page with `aria-current="page"` and `data-void-active`. Use them to style navigation:
|
|
@@ -322,7 +443,18 @@ A link is active only on its own path by default. Set `activeMatch="prefix"` to
|
|
|
322
443
|
|
|
323
444
|
`aria-current="page"` marks only the exact page, so select `[aria-current="page"]` to style it differently from its section. A link to `/` is active only on the home page.
|
|
324
445
|
|
|
325
|
-
|
|
446
|
+
A link without a query ignores the current query, as `/users?page=2` shows above. A link with a query is active only when the current URL has each of its params with the same value. The current URL can have other params, in any order, and a GET link's `data` counts as part of its query. Pagination links to other pages are not marked, while a filter tab stays active as you page through it:
|
|
447
|
+
|
|
448
|
+
| Current URL | Link | Active |
|
|
449
|
+
| ---------------------------- | ------------------------------ | --------------- |
|
|
450
|
+
| `/posts?page=2` | `href="/posts?page=1"` | none |
|
|
451
|
+
| `/posts?page=2` | `href="/posts?page=2"` | both attributes |
|
|
452
|
+
| `/issues?status=open&page=2` | `href="/issues?status=open"` | both attributes |
|
|
453
|
+
| `/issues?status=open` | `href="/issues?status=closed"` | none |
|
|
454
|
+
|
|
455
|
+
On nested pages, `activeMatch="prefix"` compares only the path, so `href="/reports?range=30d"` has `data-void-active` on `/reports/42`.
|
|
456
|
+
|
|
457
|
+
Paths match the way pages are routed: letter case and trailing slashes count. The hash is ignored. Links to other origins and non-GET links are never active. An `aria-current` or `data-void-active` you pass to `Link` replaces the computed value. Pass them yourself on a link that stands for a default value, such as an "All" tab at `/issues`, or a `?page=1` link when page 1 is `/posts`.
|
|
326
458
|
|
|
327
459
|
### Pending links
|
|
328
460
|
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Register a separate application as an OAuth client so its users can sign in on Void and choose whether to connect it.'
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
# Connected apps
|
|
2
6
|
|
|
3
7
|
A connected app is a separate application registered as an OAuth client on your Void installation. Users sign in on Void and decide whether to connect it. The application operator may be different from the platform administrator.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Find users, inspect their projects and usage, and change the plan assigned to an account.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -25,6 +26,16 @@ Project details include resources, domains, and recent builds and deployments. T
|
|
|
25
26
|
|
|
26
27
|
In the admin dashboard, open a project to view its team. Search for a platform user and choose a role to add them immediately; an email address is not required. You can also change or remove existing members. Pending invitations created through other project workflows remain visible until accepted or revoked. If email is unavailable for a pending invitation, share its ID so the user can accept it with `void project team accept <invitation-id>`. The owner cannot be removed from the team; transfer ownership first. Removing a collaborator or admin, changing one to reader, or suspending or deleting their account [replaces the project's platform credentials](../../project-collaboration.md#change-or-remove-access), the same as the CLI.
|
|
27
28
|
|
|
29
|
+
### AI Logging
|
|
30
|
+
|
|
31
|
+
Keep prompt and response bodies out of a project's AI Gateway logs while retaining request metadata:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
void platform project ai-logging <project-id> metadata
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Only platform administrators can change this setting. It applies to AI requests through the platform, including calls with an app's own provider key. Other projects keep their own settings. Use `inherit` to restore the gateway default, `off` to disable log collection, or `full` to include bodies. Inspect the saved mode with `void platform project show <project-id> --json`. See [AI Gateway logging](../../../reference/cli/platform-users.md#ai-gateway-logging) for the modes and Cloudflare's billing and Logpush behavior.
|
|
38
|
+
|
|
28
39
|
### Transferring Project Ownership
|
|
29
40
|
|
|
30
41
|
Only an installation administrator can change a project's owner. The new owner must already have an account on this platform. In the dashboard, search for the new owner on the project page and preview the transfer before applying it. The CLI accepts a user ID:
|
package/docs/guide/queues.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Process work asynchronously with a consumer in queues/, then send it typed messages from your app.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -110,6 +111,8 @@ export default defineQueue<Message>(async (batch, env) => {
|
|
|
110
111
|
- `maxRetries`: maximum number of retries before delivery is exhausted (default `3`)
|
|
111
112
|
- `retryDelay`: seconds to wait between retries (default `0`)
|
|
112
113
|
|
|
114
|
+
Declare each option in the queue file with `export const` and a whole-number literal. Void reads these values without running the file, so computed values and options re-exported from another module are not supported. To use the same value in several queues, repeat it in each queue file.
|
|
115
|
+
|
|
113
116
|
Void-managed queues do not configure a dead-letter queue. Cloudflare permanently
|
|
114
117
|
deletes messages that exhaust their retries without one; see
|
|
115
118
|
[Cloudflare's dead-letter queue guide](https://developers.cloudflare.com/queues/configuration/dead-letter-queues/).
|
package/docs/guide/quickstart.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Create a Void app, run it locally, and deploy it. You can also add Void to an existing Vite app.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -28,11 +29,12 @@ yarn void init
|
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
```sh [bun]
|
|
32
|
+
# bunx runs Void with the `node` on your PATH: use Node.js 24.22+ or 26.12+
|
|
31
33
|
bun add -D void
|
|
32
34
|
bunx void init
|
|
33
35
|
```
|
|
34
36
|
|
|
35
|
-
```sh [
|
|
37
|
+
```sh [vp]
|
|
36
38
|
vp add -D void
|
|
37
39
|
vpx void init
|
|
38
40
|
```
|
|
@@ -65,7 +67,7 @@ yarn run dev
|
|
|
65
67
|
bun run dev
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
```sh [
|
|
70
|
+
```sh [vp]
|
|
69
71
|
vpr dev
|
|
70
72
|
```
|
|
71
73
|
|
package/docs/guide/remote-dev.md
CHANGED
package/docs/guide/sandboxes.md
CHANGED
package/docs/guide/sse.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Stream events from a route handler to the browser. Void formats the messages, sends keepalives, and closes the stream.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -141,6 +142,8 @@ stream.close();
|
|
|
141
142
|
|
|
142
143
|
The client wraps native `EventSource`. It supports cookie credentials and typed event handlers, but it does not support request bodies or arbitrary headers. Use cookie auth, signed URLs, or a fetch-based streaming route when you need custom headers.
|
|
143
144
|
|
|
145
|
+
With [`routing.typedRoutes`](../reference/config.md#routing-typedroutes), the URL must match one of your routes, such as `` `/api/jobs/${id}` ``, or be an `http://` or `https://` URL. Cast a `string` that TypeScript can't check with `as RouteUrl` from `void/routes`. The cast turns off the check for that URL.
|
|
146
|
+
|
|
144
147
|
JSON parsing is the default. Set `parse: 'text'` or pass a custom parser for non-JSON payloads:
|
|
145
148
|
|
|
146
149
|
```ts
|
package/docs/guide/ssg.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Prerender every page at build time by setting the static output mode in void.config.ts.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -19,6 +20,23 @@ When `output` is `"static"`:
|
|
|
19
20
|
- Dynamic pages without `getPrerenderPaths()` are implicitly not prerendered (the paths aren't known at build time).
|
|
20
21
|
- The build output is self-contained and works for direct Cloudflare deployment, self-hosting, or `void deploy`.
|
|
21
22
|
|
|
23
|
+
## Trailing slashes and directory indexes
|
|
24
|
+
|
|
25
|
+
For hosts such as GitHub Pages, enable trailing-slash Pages URLs and directory-style HTML output:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { defineConfig } from 'void/config';
|
|
29
|
+
|
|
30
|
+
export default defineConfig({
|
|
31
|
+
output: 'static',
|
|
32
|
+
routing: { trailingSlash: true },
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`/posts/` is written to `posts/index.html`, and `/posts/hello/` to `posts/hello/index.html`. Pages URLs without the slash redirect to their trailing-slash URL in development and when served by Void. Use trailing slashes in your page links; generated route types follow this setting. API routes keep their existing URLs.
|
|
37
|
+
|
|
38
|
+
Omitting the option or setting it to `false` preserves the default `posts.html` output. Static builds keep `404.html` at the output root. On Cloudflare, use the default HTML handling or `force-trailing-slash`; `drop-trailing-slash` conflicts with this option. Third-party frameworks retain their own URL configuration.
|
|
39
|
+
|
|
22
40
|
## Per-page overrides
|
|
23
41
|
|
|
24
42
|
Individual pages can opt out of prerendering:
|
|
@@ -28,15 +46,19 @@ Individual pages can opt out of prerendering:
|
|
|
28
46
|
export const prerender = false;
|
|
29
47
|
```
|
|
30
48
|
|
|
31
|
-
Dynamic pages with `getPrerenderPaths()` are prerendered for the returned param combinations:
|
|
49
|
+
Dynamic pages with `getPrerenderPaths()` are prerendered for the returned param combinations. Annotate the return type with [`PageParams`](../reference/api/types.md#route-types) so TypeScript checks the param names. Void does not infer them from the filename:
|
|
32
50
|
|
|
33
51
|
```ts
|
|
34
52
|
// pages/blog/[slug].server.ts
|
|
35
|
-
|
|
53
|
+
import type { PageParams } from 'void/routes';
|
|
54
|
+
|
|
55
|
+
export async function getPrerenderPaths(): Promise<PageParams<'/blog/[slug]'>[]> {
|
|
36
56
|
return [{ slug: 'hello-world' }, { slug: 'getting-started' }];
|
|
37
57
|
}
|
|
38
58
|
```
|
|
39
59
|
|
|
60
|
+
Each object must include every param in the page path. Values can be strings or numbers, and Void URL-encodes them. A single-segment param such as `[slug]` cannot contain `/`. For nested paths, use a catch-all page such as `pages/docs/[...slug]` and return `{ slug: 'guides/intro' }`. If an entry is invalid, the build fails. The error names the server file and the entry index.
|
|
61
|
+
|
|
40
62
|
## 404 pages
|
|
41
63
|
|
|
42
64
|
Static builds that prerender at least one page include a default `404.html` in `dist/client/`. To provide your own, add `public/404.html` or prerender a page at `/404`.
|
package/docs/guide/ssr.md
CHANGED
package/docs/guide/storage.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: 'Store files in Cloudflare R2, and upload, download, and read metadata through void/storage.'
|
|
2
3
|
outline: deep
|
|
3
4
|
---
|
|
4
5
|
|
|
@@ -68,10 +69,14 @@ Files your users upload can contain HTML or scripts. Store them under keys your
|
|
|
68
69
|
|
|
69
70
|
## Custom bindings
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
Declare your R2 binding under `cloudflare.r2_buckets` in `void.config.ts`, for example `{ binding: 'MY_BUCKET', bucket_name: 'uploads' }`. Run `void prepare` to generate its type, then pass it to `createStorage(bucket)`:
|
|
72
73
|
|
|
73
74
|
```ts
|
|
75
|
+
import { defineHandler } from 'void';
|
|
74
76
|
import { createStorage } from 'void/storage';
|
|
75
77
|
|
|
76
|
-
const
|
|
78
|
+
export const GET = defineHandler((c) => {
|
|
79
|
+
const storage = createStorage(c.env.MY_BUCKET);
|
|
80
|
+
return storage.list();
|
|
81
|
+
});
|
|
77
82
|
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 'Test a Void app with Vitest. With Vite+, run the tests through vp test.'
|
|
3
|
+
outline: deep
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Testing
|
|
7
|
+
|
|
8
|
+
Test your app with [Vitest](https://vitest.dev/). With Vite+, the default toolchain, run it with `vp test`:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
vp test
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Import test APIs from `vite-plus/test`. With the Vite toolchain, add `vitest` to your dev dependencies, run `vitest`, and import from `vitest` instead.
|
|
15
|
+
|
|
16
|
+
Vitest reads your `vite.config.ts`, so `void/*` imports, `@schema`, and the other modules Void provides resolve in tests as they do in your app. Tests need no separate configuration.
|
|
17
|
+
|
|
18
|
+
Keep test files out of the [convention directories](../reference/structure.md) such as `routes/` and `pages/`. Void reads the files there as part of your app, so a test file in `routes/` becomes a route. Put tests in `tests/`, or next to the code they test in `src/`.
|
|
19
|
+
|
|
20
|
+
## Bindings {#bindings}
|
|
21
|
+
|
|
22
|
+
Tests run in Node.js, not in the Workers runtime. Void doesn't start your Worker for a test run, so D1, KV, R2, and other bindings are unavailable, and it doesn't apply migrations to your local database. You can import modules that use bindings, but a call that reaches one throws `env: Cloudflare env is unavailable`.
|
|
23
|
+
|
|
24
|
+
To test code that uses a binding, replace its module with [`vi.mock()`](https://vitest.dev/api/vi#vi-mock):
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
// src/visits.ts
|
|
28
|
+
import { kv } from 'void/kv';
|
|
29
|
+
|
|
30
|
+
export async function countVisit(): Promise<number> {
|
|
31
|
+
const visits = ((await kv.get<number>('visits')) ?? 0) + 1;
|
|
32
|
+
await kv.put('visits', visits);
|
|
33
|
+
return visits;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
// src/visits.test.ts
|
|
39
|
+
import { expect, it, vi } from 'vite-plus/test';
|
|
40
|
+
import { countVisit } from './visits';
|
|
41
|
+
|
|
42
|
+
vi.mock('void/kv', () => {
|
|
43
|
+
const values = new Map<string, unknown>();
|
|
44
|
+
return {
|
|
45
|
+
kv: {
|
|
46
|
+
get: async (key: string) => values.get(key) ?? null,
|
|
47
|
+
put: async (key: string, value: unknown) => {
|
|
48
|
+
values.set(key, value);
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it('counts visits', async () => {
|
|
55
|
+
await countVisit();
|
|
56
|
+
expect(await countVisit()).toBe(2);
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Email {#email}
|
|
61
|
+
|
|
62
|
+
`void/email/testing` captures sent and received email in tests. See [Testing](./email/sending.md#testing) in Sending Email and [Testing inbound handlers](./email/receiving.md#testing-inbound-handlers) in Receiving Email.
|