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
|
@@ -5,8 +5,18 @@ export type PrerenderResult = {
|
|
|
5
5
|
error: string;
|
|
6
6
|
}>;
|
|
7
7
|
};
|
|
8
|
+
/** Error artifacts are documents, not successful prerender routes or page-data entries. */
|
|
9
|
+
export declare function renderBoundary404(clientDir: string, fetchBoundary: () => Promise<Response>): Promise<void>;
|
|
8
10
|
export declare function assertNoPrerenderFailures(failed: PrerenderResult["failed"]): void;
|
|
9
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Static file server that will serve the prerendered files. Hosts decode the
|
|
13
|
+
* request path before the file lookup, so files are written decoded:
|
|
14
|
+
* Cloudflare assets decode each segment with decodeURIComponent, and Hono's
|
|
15
|
+
* serveStatic (Node, Bun, Deno) uses decodeURI, which keeps reserved
|
|
16
|
+
* characters such as %23 and %3F encoded.
|
|
17
|
+
*/
|
|
18
|
+
export type PrerenderHost = "cloudflare" | "node";
|
|
19
|
+
export declare function outputFileForPath(path: string, host?: PrerenderHost): string;
|
|
10
20
|
export declare function readPrerenderPathsResponse(response: Response): Promise<Array<string>>;
|
|
11
21
|
/** Shared renderer for local Workers and the isolated Node prerender child. */
|
|
12
|
-
export declare function renderPrerenderPaths(paths: Array<string>, clientDir: string, fetchPath: (path: string) => Promise<Response>, fetchPageData?: (path: string) => Promise<Response>, onResult?: (path: string, outputFile: string, error?: string) => void): Promise<PrerenderResult>;
|
|
22
|
+
export declare function renderPrerenderPaths(paths: Array<string>, clientDir: string, fetchPath: (path: string) => Promise<Response>, fetchPageData?: (path: string) => Promise<Response>, onResult?: (path: string, outputFile: string, error?: string) => void, host?: PrerenderHost): Promise<PrerenderResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as assertNoPrerenderFailures, n as outputFileForPath, r as readPrerenderPathsResponse, i as renderPrerenderPaths } from "./prerender-render-
|
|
1
|
+
export { t as assertNoPrerenderFailures, n as outputFileForPath, r as readPrerenderPathsResponse, i as renderBoundary404, a as renderPrerenderPaths } from "./prerender-render-BAdYhivW.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as readDeploymentPlatform } from "./project-CLwxcEdq.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { r as PlatformClient } from "./client-
|
|
5
|
-
import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-
|
|
2
|
+
import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
|
|
3
|
+
import { c as getToken, s as getSiteDomain } from "./auth-CCk9Seol.mjs";
|
|
4
|
+
import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
|
|
5
|
+
import { _ as tablePrefix, f as import_picocolors, i as dim, l as formatUrl, o as formatCount } from "./output-DNVILSz2.mjs";
|
|
6
6
|
// src/cli/projects.ts
|
|
7
7
|
async function runProjectsCommand(root) {
|
|
8
8
|
console.log();
|
|
@@ -37,77 +37,77 @@ async function runProjectsCommand(root) {
|
|
|
37
37
|
async function runProjectCommand(root, args) {
|
|
38
38
|
const cloudflare = readDeploymentPlatform(root) === "cloudflare";
|
|
39
39
|
if (args.subcommand === "status") {
|
|
40
|
-
const { runListCommand } = await import("./list-
|
|
40
|
+
const { runListCommand } = await import("./list-CxRthQks.mjs");
|
|
41
41
|
return runListCommand(root, args.name || void 0);
|
|
42
42
|
}
|
|
43
43
|
if (args.subcommand === "link") {
|
|
44
44
|
if (cloudflare) throw new Error("project: Direct Cloudflare apps are identified by cloudflare.name in void.config.ts and do not need linking.");
|
|
45
|
-
const { runLink } = await import("./link-
|
|
45
|
+
const { runLink } = await import("./link-CE55DDzS.mjs");
|
|
46
46
|
return runLink(root, args.name || void 0);
|
|
47
47
|
}
|
|
48
48
|
if (args.subcommand === "list") {
|
|
49
49
|
if (cloudflare) {
|
|
50
|
-
const { runListCommand } = await import("./list-
|
|
50
|
+
const { runListCommand } = await import("./list-CxRthQks.mjs");
|
|
51
51
|
return runListCommand(root);
|
|
52
52
|
}
|
|
53
53
|
return runProjectsCommand(root);
|
|
54
54
|
}
|
|
55
55
|
if (args.subcommand === "token") {
|
|
56
56
|
if (cloudflare) throw new Error("project: CI deploy credentials are available only for Void platform projects.");
|
|
57
|
-
const { runProjectTokenCommand } = await import("./project-token-
|
|
57
|
+
const { runProjectTokenCommand } = await import("./project-token-B4D5yhHQ.mjs");
|
|
58
58
|
return runProjectTokenCommand(root, args);
|
|
59
59
|
}
|
|
60
60
|
if (args.subcommand === "team") {
|
|
61
61
|
if (args.action === "") {
|
|
62
|
-
const { printHelpPage } = await import("./help-
|
|
62
|
+
const { printHelpPage } = await import("./help-CItQVDL4.mjs");
|
|
63
63
|
printHelpPage(["project", "team"]);
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
const accountInvitationAction = args.action === "pending" || args.action === "accept" || args.action === "decline";
|
|
67
67
|
if (cloudflare && !accountInvitationAction) throw new Error("project: Teams are available only for projects hosted on a Void platform, not direct Cloudflare deployments.");
|
|
68
|
-
const { runProjectTeamCommand } = await import("./project-team-
|
|
68
|
+
const { runProjectTeamCommand } = await import("./project-team-C5XtHbZk.mjs");
|
|
69
69
|
return runProjectTeamCommand(root, args);
|
|
70
70
|
}
|
|
71
71
|
if (args.subcommand === "zero-trust") {
|
|
72
72
|
if (cloudflare) throw new Error("project: Zero Trust overrides are available only for projects hosted on a Void platform.");
|
|
73
73
|
if (args.action === "") {
|
|
74
|
-
const { printHelpPage } = await import("./help-
|
|
74
|
+
const { printHelpPage } = await import("./help-CItQVDL4.mjs");
|
|
75
75
|
printHelpPage(["project", "zero-trust"]);
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
78
|
const action = args.action;
|
|
79
|
-
const { runProjectZeroTrustCommand } = await import("./project-zero-trust
|
|
79
|
+
const { runProjectZeroTrustCommand } = await import("./project-zero-trust--0LvktDg.mjs");
|
|
80
80
|
return runProjectZeroTrustCommand(root, {
|
|
81
81
|
...args,
|
|
82
82
|
action
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
if (args.subcommand === "logs") {
|
|
86
|
-
const { runLogsCommand } = await import("./logs-
|
|
86
|
+
const { runLogsCommand } = await import("./logs-BgRJuvb1.mjs");
|
|
87
87
|
return runLogsCommand(root, args.filter, args.range, args.deployment || void 0, args.level || void 0);
|
|
88
88
|
}
|
|
89
89
|
if (args.subcommand === "requests") {
|
|
90
90
|
if (cloudflare) throw new Error("project: Historical request analytics require the Void platform. Use `void project logs` for a live Cloudflare tail.");
|
|
91
|
-
const { runRequestsCommand } = await import("./requests-
|
|
91
|
+
const { runRequestsCommand } = await import("./requests-CrRiTgQA.mjs");
|
|
92
92
|
return runRequestsCommand(root, args.range, args.status || void 0);
|
|
93
93
|
}
|
|
94
94
|
if (args.subcommand === "rollback") {
|
|
95
|
-
const { runRollbackCommand } = await import("./rollback-
|
|
95
|
+
const { runRollbackCommand } = await import("./rollback-BsmQyj-Q.mjs");
|
|
96
96
|
return runRollbackCommand(root, args.deployId || void 0, args.platform);
|
|
97
97
|
}
|
|
98
98
|
if (args.subcommand === "cancel") {
|
|
99
99
|
if (cloudflare) throw new Error("project: Direct Cloudflare deploys activate only after readiness succeeds, so there is no remote build to cancel.");
|
|
100
|
-
const { runCancelDeployCommand } = await import("./cancel-deploy-
|
|
100
|
+
const { runCancelDeployCommand } = await import("./cancel-deploy-Ce6Os4fa.mjs");
|
|
101
101
|
return runCancelDeployCommand(root, args.deployId || void 0);
|
|
102
102
|
}
|
|
103
103
|
if (args.subcommand === "delete") {
|
|
104
104
|
if (cloudflare) throw new Error("project: Refusing to delete Cloudflare resources through this command. Direct deployments are additive and existing resources may be shared.");
|
|
105
|
-
const { runDeleteCommand } = await import("./delete-
|
|
105
|
+
const { runDeleteCommand } = await import("./delete-CModjyOC.mjs");
|
|
106
106
|
return runDeleteCommand(root, args.name || void 0, { force: args.force });
|
|
107
107
|
}
|
|
108
108
|
if (args.subcommand === "purge-cache") {
|
|
109
109
|
if (cloudflare) throw new Error("project: `void project purge-cache` is available only for projects hosted on a Void platform. For a direct Cloudflare deploy, redeploy or purge the configured ISR KV namespace.");
|
|
110
|
-
const { runPurgeCacheCommand } = await import("./cache-
|
|
110
|
+
const { runPurgeCacheCommand } = await import("./cache-D0m3Z_Xf.mjs");
|
|
111
111
|
return runPurgeCacheCommand(root, args.projectSlug || void 0);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
|
|
2
|
+
import { c as getToken, i as getAccountCredential } from "./auth-CCk9Seol.mjs";
|
|
3
|
+
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-SZPyj4X_.mjs";
|
|
4
|
+
import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-DNVILSz2.mjs";
|
|
1
5
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { H as outro, L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-CoxPEhJq.mjs";
|
|
5
|
-
import { h as sanitizeTerminalText, l as formatUrl, m as printSuccess, o as formatCount, p as note } from "./output-BCdLioKP.mjs";
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Da3OgCU1.mjs";
|
|
7
7
|
// src/cli/project-team.ts
|
|
8
8
|
function clean(value) {
|
|
9
9
|
return (value ?? "—").replace(/[\u0000-\u001f\u007f]/g, " ");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
|
|
4
|
+
import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-DNVILSz2.mjs";
|
|
1
5
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { H as outro, L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
|
-
import { _ as tablePrefix, i as dim, m as printSuccess } from "./output-BCdLioKP.mjs";
|
|
6
|
-
import { r as requireProjectBySlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
6
|
+
import { r as requireProjectBySlug } from "./resolve-project-Da3OgCU1.mjs";
|
|
7
7
|
// src/cli/project-token.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const humanToken = getToken(root);
|
|
@@ -34,13 +34,15 @@ function createProjectTsconfig(root, hasRouteTypes, hasDb, hasSchema, options =
|
|
|
34
34
|
const includeMd = existsSync(join(outDir, "md.d.ts"));
|
|
35
35
|
const includeEnv = existsSync(join(outDir, "env.d.ts"));
|
|
36
36
|
const includeAuth = existsSync(join(outDir, "auth.d.ts"));
|
|
37
|
+
const includeBindings = existsSync(join(outDir, "bindings.d.ts"));
|
|
37
38
|
const tsconfig = { files: [
|
|
38
39
|
...includeRoutes ? ["routes.d.ts"] : [],
|
|
39
40
|
...hasDb ? ["db.d.ts"] : [],
|
|
40
41
|
...includeQueues ? ["queues.d.ts"] : [],
|
|
41
42
|
...includeMd ? ["md.d.ts"] : [],
|
|
42
43
|
...includeEnv ? ["env.d.ts"] : [],
|
|
43
|
-
...includeAuth ? ["auth.d.ts"] : []
|
|
44
|
+
...includeAuth ? ["auth.d.ts"] : [],
|
|
45
|
+
...includeBindings ? ["bindings.d.ts"] : []
|
|
44
46
|
] };
|
|
45
47
|
if (hasDb) {
|
|
46
48
|
const paths = {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CCk9Seol.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
|
|
4
|
+
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-DNVILSz2.mjs";
|
|
1
5
|
import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { H as outro, L as log } from "./dist-D23AAMxT.mjs";
|
|
4
|
-
import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
|
|
5
|
-
import { h as sanitizeTerminalText, m as printSuccess, p as note } from "./output-BCdLioKP.mjs";
|
|
6
|
-
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-D0YNnJfm.mjs";
|
|
6
|
+
import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Da3OgCU1.mjs";
|
|
7
7
|
// src/cli/project-zero-trust.ts
|
|
8
8
|
async function resolveTarget(root, args) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import { a as executeComposedHandler, i as separateDeferred, n as DEFERRED, o as getHandlerComposition, t as ValidationError } from "./validation-error-uAAjlsiW.mjs";
|
|
2
2
|
import { n as isConvertedResponse } from "./response-HmNjB30w.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { o as searchWithoutActionKey, r as hasActionKey } from "./action-key-ByZ6DDld.mjs";
|
|
4
4
|
import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "./head-5XPcnG-j.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { a as serializePageData, o as escapeScriptJson } from "./serialize-Pf-CIQK_.mjs";
|
|
6
|
+
import { PAGES_PROTOCOL_VERSION } from "@void/edge";
|
|
7
|
+
// src/pages/not-found-context.ts
|
|
8
|
+
const loaderBoundaries = /* @__PURE__ */ new WeakSet();
|
|
9
|
+
function handlesPageLoaderNotFound(c) {
|
|
10
|
+
return loaderBoundaries.has(c);
|
|
11
|
+
}
|
|
12
|
+
/** Defer only Void's app fallback while a loader can select its own boundary. */
|
|
13
|
+
async function withLoaderNotFoundBoundary(c, load) {
|
|
14
|
+
const alreadyHandled = loaderBoundaries.has(c);
|
|
15
|
+
loaderBoundaries.add(c);
|
|
16
|
+
try {
|
|
17
|
+
return await load();
|
|
18
|
+
} finally {
|
|
19
|
+
if (!alreadyHandled) loaderBoundaries.delete(c);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
6
22
|
// src/pages/protocol.ts
|
|
7
23
|
const POWERED_BY = { "X-Powered-By": "Void" };
|
|
8
24
|
const RENDER_ERROR_ASSET_TAGS_KEY = "__voidPageAssetTags";
|
|
@@ -13,9 +29,25 @@ function safeJsonStringify(value) {
|
|
|
13
29
|
function isPagesRequest(c) {
|
|
14
30
|
return c.req.header("x-voidpages") === "true";
|
|
15
31
|
}
|
|
32
|
+
function needsPageReload(c) {
|
|
33
|
+
return isPagesRequest(c) && c.req.header("X-VoidPages-Version") !== PAGES_PROTOCOL_VERSION;
|
|
34
|
+
}
|
|
35
|
+
/** Old clients reload a successful non-Pages response; form errors stay readable. */
|
|
36
|
+
function legacyPageResponse(c, errors = null) {
|
|
37
|
+
const headers = pageResponseHeaders(c, {
|
|
38
|
+
"Content-Type": errors ? "application/json" : "text/plain; charset=utf-8",
|
|
39
|
+
"Cache-Control": "no-store",
|
|
40
|
+
Vary: "X-VoidPages, X-VoidPages-Version"
|
|
41
|
+
});
|
|
42
|
+
headers.delete("X-VoidPages");
|
|
43
|
+
return new Response(errors ? JSON.stringify({ errors }) : null, {
|
|
44
|
+
status: errors ? 422 : 200,
|
|
45
|
+
headers
|
|
46
|
+
});
|
|
47
|
+
}
|
|
16
48
|
function pageResponseHeaders(c, headers) {
|
|
17
49
|
const out = new Headers(c.res.headers);
|
|
18
|
-
for (const [key, value] of Object.entries(headers)) if (key.toLowerCase() === "vary") appendVary(out,
|
|
50
|
+
for (const [key, value] of Object.entries(headers)) if (key.toLowerCase() === "vary") for (const name of value.split(",")) appendVary(out, name.trim());
|
|
19
51
|
else out.set(key, value);
|
|
20
52
|
return out;
|
|
21
53
|
}
|
|
@@ -23,6 +55,12 @@ function appendVary(headers, name) {
|
|
|
23
55
|
const existing = headers.get("Vary")?.split(",").map((value) => value.trim().toLowerCase()) ?? [];
|
|
24
56
|
if (!existing.includes("*") && !existing.includes(name.toLowerCase())) headers.append("Vary", name);
|
|
25
57
|
}
|
|
58
|
+
function varyPagesResponse(c) {
|
|
59
|
+
const headers = new Headers(c.res.headers);
|
|
60
|
+
appendVary(headers, "X-VoidPages");
|
|
61
|
+
appendVary(headers, "X-VoidPages-Version");
|
|
62
|
+
c.header("Vary", headers.get("Vary"));
|
|
63
|
+
}
|
|
26
64
|
function escapeHtmlAttr(value) {
|
|
27
65
|
return value.replaceAll("&", "&").replaceAll("\"", """).replaceAll("<", "<");
|
|
28
66
|
}
|
|
@@ -112,9 +150,11 @@ async function renderPageHtml(c, pageObj, componentId, renderMode, renderFn, get
|
|
|
112
150
|
};
|
|
113
151
|
}
|
|
114
152
|
function pageJsonResponse(c, pageObj) {
|
|
115
|
-
return Response
|
|
153
|
+
return new Response(serializePageData(pageObj), { headers: pageResponseHeaders(c, {
|
|
116
154
|
"X-VoidPages": "true",
|
|
117
|
-
|
|
155
|
+
"X-VoidPages-Version": PAGES_PROTOCOL_VERSION,
|
|
156
|
+
"Content-Type": "application/json",
|
|
157
|
+
Vary: "X-VoidPages, X-VoidPages-Version",
|
|
118
158
|
...POWERED_BY
|
|
119
159
|
}) });
|
|
120
160
|
}
|
|
@@ -142,17 +182,116 @@ async function extractProps(result) {
|
|
|
142
182
|
* 200s (file downloads, streams). JSON 200s are still extracted as props for
|
|
143
183
|
* backward compat with loaders using c.json().
|
|
144
184
|
*/
|
|
145
|
-
async function runLoader(handler, c, render) {
|
|
185
|
+
async function runLoader(handler, c, render, recover, recoverNotFound = false) {
|
|
146
186
|
if (!handler) return render({});
|
|
147
187
|
return runPageHandler(handler, c, async (leaf) => {
|
|
148
|
-
|
|
188
|
+
let result;
|
|
189
|
+
try {
|
|
190
|
+
result = recoverNotFound ? await withLoaderNotFoundBoundary(c, () => leaf(c)) : await leaf(c);
|
|
191
|
+
} catch (error) {
|
|
192
|
+
const recovered = await recover?.(error);
|
|
193
|
+
if (recovered) return recovered;
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
149
196
|
if (result instanceof Response && !isConvertedResponse(result)) {
|
|
197
|
+
if (result.status === 404 && !result.headers.get("Content-Disposition")?.includes("attachment")) {
|
|
198
|
+
const recovered = await recover?.(void 0, result);
|
|
199
|
+
if (recovered) return recovered;
|
|
200
|
+
}
|
|
150
201
|
const contentType = result.headers.get("content-type") || "";
|
|
151
202
|
if (result.status >= 300 || !contentType.includes("application/json")) return result;
|
|
152
203
|
}
|
|
153
|
-
|
|
204
|
+
let props;
|
|
205
|
+
try {
|
|
206
|
+
props = await extractProps(result);
|
|
207
|
+
} catch (error) {
|
|
208
|
+
const recovered = await recover?.(error);
|
|
209
|
+
if (recovered) return recovered;
|
|
210
|
+
throw error;
|
|
211
|
+
}
|
|
212
|
+
return render(props);
|
|
154
213
|
});
|
|
155
214
|
}
|
|
215
|
+
/** Recover one completed GET operation without replaying its middleware or loader. */
|
|
216
|
+
async function renderPageFailure(c, error, original, renderFn, getAssetTags, configHead, options) {
|
|
217
|
+
const httpError = error && typeof error === "object" && "getResponse" in error && typeof error.getResponse === "function";
|
|
218
|
+
const explicit = httpError ? error.getResponse() : original;
|
|
219
|
+
if (explicit && (explicit.status !== 404 || explicit.headers.has("Content-Disposition"))) return;
|
|
220
|
+
const notFound = explicit?.status === 404;
|
|
221
|
+
const candidates = notFound ? [options?.boundaries?.notFound, ...options?.boundaries?.notFoundErrors ?? options?.boundaries?.errors ?? []] : options?.boundaries?.errors;
|
|
222
|
+
if (!candidates?.[0]) return;
|
|
223
|
+
if (options?.renderMode !== "island") varyPagesResponse(c);
|
|
224
|
+
let status = notFound ? 404 : 500;
|
|
225
|
+
let message = notFound ? httpError && error instanceof Error ? error.message || "Not Found" : "Not Found" : "Internal Server Error";
|
|
226
|
+
if (!notFound && options?.dev && error instanceof Error) message = error.message;
|
|
227
|
+
if (error && !notFound) console.error(error);
|
|
228
|
+
const shared = c.get("shared") ?? {};
|
|
229
|
+
let head;
|
|
230
|
+
try {
|
|
231
|
+
head = resolveHead(configHead, c.get("headDefaults"), void 0);
|
|
232
|
+
serializePageData({
|
|
233
|
+
shared,
|
|
234
|
+
head
|
|
235
|
+
});
|
|
236
|
+
} catch (cause) {
|
|
237
|
+
throw new Error("Unable to render Pages error boundary", { cause });
|
|
238
|
+
}
|
|
239
|
+
const attempted = /* @__PURE__ */ new Set();
|
|
240
|
+
for (const component of candidates) {
|
|
241
|
+
if (!component || attempted.has(component)) continue;
|
|
242
|
+
attempted.add(component);
|
|
243
|
+
const page = {
|
|
244
|
+
component,
|
|
245
|
+
props: { error: {
|
|
246
|
+
status,
|
|
247
|
+
message
|
|
248
|
+
} },
|
|
249
|
+
shared,
|
|
250
|
+
params: requestParams(c),
|
|
251
|
+
url: requestPathWithSearch(c),
|
|
252
|
+
errors: null,
|
|
253
|
+
head: {
|
|
254
|
+
...head,
|
|
255
|
+
title: head?.title ?? (status === 404 ? "Not Found" : "Internal Server Error")
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
try {
|
|
259
|
+
let response;
|
|
260
|
+
if (isPagesRequest(c) && options?.renderMode !== "island") response = pageJsonResponse(c, page);
|
|
261
|
+
else {
|
|
262
|
+
const { html, assetTags } = await renderPageHtml(c, page, component, options?.renderMode ?? "server", renderFn, getAssetTags);
|
|
263
|
+
response = renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
264
|
+
}
|
|
265
|
+
const headers = new Headers(explicit?.headers);
|
|
266
|
+
for (const [key, value] of response.headers) if (key !== "set-cookie") headers.set(key, value);
|
|
267
|
+
for (const cookie of response.headers.getSetCookie()) if (!headers.getSetCookie().includes(cookie)) headers.append("Set-Cookie", cookie);
|
|
268
|
+
for (const key of [
|
|
269
|
+
"Content-Length",
|
|
270
|
+
"Content-Encoding",
|
|
271
|
+
"Content-Range",
|
|
272
|
+
"ETag",
|
|
273
|
+
"Last-Modified"
|
|
274
|
+
]) {
|
|
275
|
+
headers.delete(key);
|
|
276
|
+
c.header(key, void 0);
|
|
277
|
+
}
|
|
278
|
+
headers.set("Cache-Control", "no-store");
|
|
279
|
+
c.header("Cache-Control", "no-store");
|
|
280
|
+
c.header("Set-Cookie", void 0);
|
|
281
|
+
for (const cookie of headers.getSetCookie()) c.header("Set-Cookie", cookie, { append: true });
|
|
282
|
+
if (original) await original.body?.cancel();
|
|
283
|
+
return new Response(c.req.method === "HEAD" ? null : response.body, {
|
|
284
|
+
status,
|
|
285
|
+
headers
|
|
286
|
+
});
|
|
287
|
+
} catch (failure) {
|
|
288
|
+
console.error(failure);
|
|
289
|
+
status = 500;
|
|
290
|
+
message = options?.dev && failure instanceof Error ? failure.message : "Internal Server Error";
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
throw new Error("Unable to render Pages error boundary");
|
|
294
|
+
}
|
|
156
295
|
/**
|
|
157
296
|
* Per-route middleware from `defineHandler(middleware..., handler)` wraps the
|
|
158
297
|
* response `endpoint` builds from the leaf handler, as it wraps a route's
|
|
@@ -224,78 +363,92 @@ function streamDeferredResponse(initialChunk, deferredMap, c, contentType, dev,
|
|
|
224
363
|
});
|
|
225
364
|
return renderedResponse(c, readable, contentType, assetTags);
|
|
226
365
|
}
|
|
366
|
+
function asCloudContext(c) {
|
|
367
|
+
return c;
|
|
368
|
+
}
|
|
227
369
|
/** Handle GET page request — run handler, return page object or SSR HTML */
|
|
228
370
|
async function handlePageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
371
|
+
return runPageGet(handler, headFn, asCloudContext(c), componentId, renderFn, getAssetTags, configHead, options);
|
|
372
|
+
}
|
|
373
|
+
async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
229
374
|
const renderMode = options?.renderMode ?? "server";
|
|
375
|
+
if (renderMode !== "island" && needsPageReload(c)) return legacyPageResponse(c);
|
|
376
|
+
const recover = (error, response) => renderPageFailure(c, error, response, renderFn, getAssetTags, configHead, options);
|
|
230
377
|
return runLoader(handler, c, async (props) => {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
const
|
|
262
|
-
|
|
378
|
+
try {
|
|
379
|
+
const shared = c.get("shared") ?? {};
|
|
380
|
+
const pageHead = headFn ? headFn(c, props) : void 0;
|
|
381
|
+
const middlewareHead = c.get("headDefaults");
|
|
382
|
+
const head = resolveHead(configHead, middlewareHead, pageHead);
|
|
383
|
+
if (renderMode !== "island") varyPagesResponse(c);
|
|
384
|
+
const { immediateProps, deferredMap } = separateDeferred(props);
|
|
385
|
+
const hasDeferred = Object.keys(deferredMap).length > 0;
|
|
386
|
+
if (hasDeferred && (options?.boundaries?.notFound || options?.boundaries?.errors.length)) c.header("Cache-Control", "no-store");
|
|
387
|
+
const deferredKeys = {};
|
|
388
|
+
for (const [group, { keys }] of Object.entries(deferredMap)) for (const key of keys) deferredKeys[key] = group;
|
|
389
|
+
const pageObj = {
|
|
390
|
+
component: componentId,
|
|
391
|
+
props: immediateProps,
|
|
392
|
+
params: requestParams(c),
|
|
393
|
+
shared,
|
|
394
|
+
url: requestPathWithSearch(c),
|
|
395
|
+
errors: null,
|
|
396
|
+
...head && { head },
|
|
397
|
+
...hasDeferred && {
|
|
398
|
+
deferred: Object.keys(deferredMap),
|
|
399
|
+
deferredKeys
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
if (renderMode !== "island" && isPagesRequest(c)) {
|
|
403
|
+
if (c.req.header("purpose") === "prefetch" && hasDeferred) {
|
|
404
|
+
const resolvedProps = { ...immediateProps };
|
|
405
|
+
let deferredErrors;
|
|
406
|
+
await Promise.all(Object.entries(deferredMap).map(async ([group, { resolver, keys }]) => {
|
|
407
|
+
try {
|
|
408
|
+
const data = await resolver(c);
|
|
409
|
+
if (keys.length === 1) resolvedProps[keys[0]] = data ?? null;
|
|
410
|
+
else {
|
|
411
|
+
const obj = typeof data === "object" && data !== null ? data : {};
|
|
412
|
+
for (const key of keys) resolvedProps[key] = obj[key];
|
|
413
|
+
}
|
|
414
|
+
} catch (err) {
|
|
415
|
+
(deferredErrors ??= {})[group] = deferredErrorMessage(err, options?.dev === true);
|
|
416
|
+
for (const key of keys) delete resolvedProps[key];
|
|
263
417
|
}
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
418
|
+
}));
|
|
419
|
+
return pageJsonResponse(c, {
|
|
420
|
+
...pageObj,
|
|
421
|
+
props: resolvedProps,
|
|
422
|
+
deferred: void 0,
|
|
423
|
+
...deferredErrors && { deferredErrors }
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
if (!hasDeferred) return pageJsonResponse(c, pageObj);
|
|
427
|
+
c.header("X-VoidPages", "true");
|
|
428
|
+
c.header("X-VoidPages-Version", PAGES_PROTOCOL_VERSION);
|
|
429
|
+
return streamDeferredResponse(serializePageData(pageObj) + "\n", deferredMap, c, "application/x-ndjson", options?.dev === true, (group, data) => serializePageData({
|
|
430
|
+
__deferred: group,
|
|
431
|
+
data
|
|
432
|
+
}) + "\n", (group, error) => serializePageData({
|
|
433
|
+
__deferred: group,
|
|
434
|
+
error
|
|
435
|
+
}) + "\n");
|
|
275
436
|
}
|
|
276
|
-
|
|
277
|
-
c
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
437
|
+
const { html, assetTags } = await renderPageHtml(c, pageObj, componentId, renderMode, renderFn, getAssetTags);
|
|
438
|
+
if (!hasDeferred) return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
439
|
+
return streamDeferredResponse(html, deferredMap, c, "text/html; charset=utf-8", options?.dev === true, (group, data) => {
|
|
440
|
+
const g = safeJsonStringify(group);
|
|
441
|
+
return `\n<script>(function(d){window.__resolveDeferred?window.__resolveDeferred(${g},d,true):(window.__deferredQueue??=[]).push([${g},d,0,true])})(${serializePageData(data)})<\/script>`;
|
|
442
|
+
}, (group, error) => {
|
|
443
|
+
const g = safeJsonStringify(group);
|
|
444
|
+
return `\n<script>(function(e){window.__rejectDeferred?window.__rejectDeferred(${g},e):(window.__deferredQueue??=[]).push([${g},0,e])})(${safeJsonStringify(error)})<\/script>`;
|
|
445
|
+
}, assetTags);
|
|
446
|
+
} catch (error) {
|
|
447
|
+
const recovered = await recover(error);
|
|
448
|
+
if (recovered) return recovered;
|
|
449
|
+
throw error;
|
|
288
450
|
}
|
|
289
|
-
|
|
290
|
-
if (!hasDeferred) return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
291
|
-
return streamDeferredResponse(html, deferredMap, c, "text/html; charset=utf-8", options?.dev === true, (group, data) => {
|
|
292
|
-
const g = safeJsonStringify(group);
|
|
293
|
-
return `\n<script>(function(d){window.__resolveDeferred?window.__resolveDeferred(${g},d):(window.__deferredQueue??=[]).push([${g},d])})(${safeJsonStringify(data)})<\/script>`;
|
|
294
|
-
}, (group, error) => {
|
|
295
|
-
const g = safeJsonStringify(group);
|
|
296
|
-
return `\n<script>(function(e){window.__rejectDeferred?window.__rejectDeferred(${g},e):(window.__deferredQueue??=[]).push([${g},0,e])})(${safeJsonStringify(error)})<\/script>`;
|
|
297
|
-
}, assetTags);
|
|
298
|
-
});
|
|
451
|
+
}, recover, options?.boundaries?.notFound !== void 0);
|
|
299
452
|
}
|
|
300
453
|
function isSameOriginAction(request) {
|
|
301
454
|
const origin = new URL(request.url).origin;
|
|
@@ -313,6 +466,9 @@ function isSameOriginAction(request) {
|
|
|
313
466
|
}
|
|
314
467
|
/** Handle POST/PUT/PATCH/DELETE page request — run mutation, then re-run GET or redirect */
|
|
315
468
|
async function handlePageMutation(mutationHandler, getHandler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
469
|
+
return runPageMutation(mutationHandler, getHandler, headFn, asCloudContext(c), componentId, renderFn, getAssetTags, configHead, options);
|
|
470
|
+
}
|
|
471
|
+
async function runPageMutation(mutationHandler, getHandler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
|
|
316
472
|
if (!isSameOriginAction(c.req.raw)) return new Response("Cross-origin page actions are not allowed.", { status: 403 });
|
|
317
473
|
const renderMode = options?.renderMode ?? "server";
|
|
318
474
|
function buildMutationPageObj(props, errors) {
|
|
@@ -333,9 +489,11 @@ async function handlePageMutation(mutationHandler, getHandler, headFn, c, compon
|
|
|
333
489
|
const rerenderErrors = /* @__PURE__ */ new WeakSet();
|
|
334
490
|
/** Re-run the GET loader and respond with the page, optionally carrying validation errors. */
|
|
335
491
|
async function respondWithPage(errors) {
|
|
492
|
+
if (needsPageReload(c)) return legacyPageResponse(c, errors);
|
|
336
493
|
try {
|
|
337
494
|
return await runLoader(getHandler, c, async (props) => {
|
|
338
495
|
const pageObj = buildMutationPageObj(stripDeferred(props), errors);
|
|
496
|
+
varyPagesResponse(c);
|
|
339
497
|
if (isPagesRequest(c)) return pageJsonResponse(c, pageObj);
|
|
340
498
|
const { html, assetTags } = await renderPageHtml(c, pageObj, componentId, renderMode, renderFn, getAssetTags);
|
|
341
499
|
return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
|
|
@@ -378,4 +536,4 @@ async function handlePageMutation(mutationHandler, getHandler, headFn, c, compon
|
|
|
378
536
|
throw e;
|
|
379
537
|
}
|
|
380
538
|
}
|
|
381
|
-
export { safeJsonStringify as i, handlePageGet as n, handlePageMutation as r, flattenValidationErrors as t };
|
|
539
|
+
export { handlesPageLoaderNotFound as a, safeJsonStringify as i, handlePageGet as n, handlePageMutation as r, flattenValidationErrors as t };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { n as CloudBindings, r as CloudContext } from "./handler-BO7Od-z9.mjs";
|
|
1
2
|
import { n as HeadDescriptor, t as HeadConfig } from "./head-MeF_5M_3.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { s as PageRenderMode, t as DevCssAsset } from "./types-IPut3_Yx.mjs";
|
|
4
|
+
import { Context } from "hono";
|
|
4
5
|
/** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
|
|
5
6
|
declare function safeJsonStringify(value: unknown): string;
|
|
6
7
|
type PageObject = {
|
|
8
|
+
/** Build-only server document; never bootstraps an interactive Pages root. */
|
|
9
|
+
documentOnly?: boolean;
|
|
7
10
|
component: string;
|
|
8
11
|
props: Record<string, unknown>;
|
|
9
12
|
params: Record<string, string>;
|
|
@@ -19,10 +22,16 @@ type PageObject = {
|
|
|
19
22
|
type PageRenderResult = string | ReadableStream<Uint8Array>;
|
|
20
23
|
type PageHandler = ((c: CloudContext) => unknown | Promise<unknown>) | undefined;
|
|
21
24
|
type PageHeadHandler = ((c: CloudContext, props: Record<string, unknown>) => HeadDescriptor | undefined) | undefined;
|
|
25
|
+
type PageRequestContext = Context | CloudContext;
|
|
22
26
|
type PageRenderOptions = {
|
|
23
27
|
renderMode?: PageRenderMode;
|
|
24
28
|
/** Dev server build: rejected deferred props keep their raw error message. */
|
|
25
29
|
dev?: boolean;
|
|
30
|
+
boundaries?: {
|
|
31
|
+
notFound?: string;
|
|
32
|
+
notFoundErrors?: Array<string>;
|
|
33
|
+
errors: Array<string>;
|
|
34
|
+
};
|
|
26
35
|
};
|
|
27
36
|
type AssetTags = {
|
|
28
37
|
css: string;
|
|
@@ -36,7 +45,7 @@ type GetAssetTags = (req: Request, env: CloudBindings, componentId: string) => P
|
|
|
36
45
|
/** Flatten withValidator's { issues: [{ slot, issues: [{ message, path }] }] } into { field: message } */
|
|
37
46
|
declare function flattenValidationErrors(body: unknown): Record<string, string>;
|
|
38
47
|
/** Handle GET page request — run handler, return page object or SSR HTML */
|
|
39
|
-
declare function handlePageGet(handler: PageHandler, headFn: PageHeadHandler, c:
|
|
48
|
+
declare function handlePageGet(handler: PageHandler, headFn: PageHeadHandler, c: PageRequestContext, componentId: string, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, options?: PageRenderOptions): Promise<Response>;
|
|
40
49
|
/** Handle POST/PUT/PATCH/DELETE page request — run mutation, then re-run GET or redirect */
|
|
41
|
-
declare function handlePageMutation(mutationHandler: PageHandler, getHandler: PageHandler, headFn: PageHeadHandler, c:
|
|
50
|
+
declare function handlePageMutation(mutationHandler: PageHandler, getHandler: PageHandler, headFn: PageHeadHandler, c: PageRequestContext, componentId: string, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, options?: PageRenderOptions): Promise<Response>;
|
|
42
51
|
export { handlePageMutation as a, handlePageGet as i, PageRenderResult as n, safeJsonStringify as o, flattenValidationErrors as r, PageObject as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join, c as resolve$2, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { i as voidWarn, r as voidLog } from "./log-D9hwSySP.mjs";
|
|
3
|
-
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-Gn4EoY4-.mjs";
|
|
4
3
|
import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
|
|
5
|
-
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-
|
|
4
|
+
import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-DmTxZR-N.mjs";
|
|
5
|
+
import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-k40T7XTQ.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
7
7
|
import { closeSync, existsSync, fsyncSync, lstatSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, unlinkSync, writeSync } from "node:fs";
|
|
8
8
|
import { isRecord } from "@void/deploy-core";
|