void 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{account-cmd-HP8bixYo.mjs → account-cmd-DRhmCWcm.mjs} +7 -8
- package/dist/{action-key-XZ9HkWAO.mjs → action-key-XtKKbbsi.mjs} +1 -2
- package/dist/{agents-CuNtT0D_.mjs → agents-DRo8gzni.mjs} +2 -3
- package/dist/{application-analysis-DDOQwiXk.mjs → application-analysis-HRFsZOv3.mjs} +18 -24
- package/dist/{application-routing-4719u_kf.mjs → application-routing-P4TggvWp.mjs} +2 -3
- package/dist/{ast-CsZ_q_gc.mjs → ast-Cv0JwXqb.mjs} +1 -2
- package/dist/{ast-bindings-C3yaPs1y.mjs → ast-bindings-BkivMJIo.mjs} +6 -11
- package/dist/{atomic-write-Dq6R0BPN.mjs → atomic-write-DA6eD1Kp.mjs} +1 -2
- package/dist/{auth-g2TQbDLD.d.mts → auth-CH4PLAX1.d.mts} +0 -2
- package/dist/{auth-Cbqi1iVX.mjs → auth-CL-p_rqV.mjs} +1 -1
- package/dist/{auth-B6iOCjKI.mjs → auth-Dy8svcqQ.mjs} +6 -7
- package/dist/{auth-3sGB0zJ1.mjs → auth-YVjBX5NY.mjs} +1 -2
- package/dist/{auth-client-Bawdj38n.d.mts → auth-client-6-Ft9i9T.d.mts} +0 -2
- package/dist/{auth-client-BWBT8HLp.mjs → auth-client-DwCdwKbw.mjs} +1 -2
- package/dist/{auth-client-react-CMLwT2xI.mjs → auth-client-react-CJdeErvM.mjs} +1 -2
- package/dist/{auth-client-react-7GFffu8R.d.mts → auth-client-react-DvQLe5Zb.d.mts} +0 -2
- package/dist/{auth-client-solid-UoreJWZG.mjs → auth-client-solid-BRvgvp6h.mjs} +1 -2
- package/dist/{auth-client-solid-DyTFL4cq.d.mts → auth-client-solid-P9pEtKGp.d.mts} +0 -2
- package/dist/{auth-client-svelte-zetW0KIH.d.mts → auth-client-svelte-B5j8irT6.d.mts} +0 -2
- package/dist/{auth-client-svelte-Cv_WvrRk.mjs → auth-client-svelte-BSqUCEed.mjs} +1 -2
- package/dist/{auth-client-vue-bChShbQP.d.mts → auth-client-vue-BEiAfavk.d.mts} +0 -2
- package/dist/{auth-client-vue-CFk7Xbv3.mjs → auth-client-vue-CPkbRtOO.mjs} +1 -2
- package/dist/{auth-link-CedYpDCy.mjs → auth-link-CVXP1G6G.mjs} +7 -8
- package/dist/{auth-migrations-BO27GDNr.mjs → auth-migrations-DDeifS3v.mjs} +1 -2
- package/dist/{auth-router-vafo7x8w.mjs → auth-router-D1pGdbvB.mjs} +6 -7
- package/dist/{base64-DVrOndmI.mjs → base64-ikl9yBy3.mjs} +1 -2
- package/dist/{better-auth-shared-BHB8kiTE.d.mts → better-auth-shared-BJyG2mH0.d.mts} +2 -6
- package/dist/{better-auth-shared-7FM3Uk2N.mjs → better-auth-shared-C958aM7W.mjs} +31 -7
- package/dist/{build-cmd-9vUAQ1_V.mjs → build-cmd-DmjbuT6d.mjs} +7 -8
- package/dist/{cache-jvwLNb0h.mjs → cache-2khBO1MR.mjs} +7 -8
- package/dist/{cancel-deploy-Dw0UmWKO.mjs → cancel-deploy-_itbbvY3.mjs} +6 -7
- package/dist/{cf-access-CWP4avfP.mjs → cf-access-BmBT2h8_.mjs} +3 -4
- package/dist/{cf-access-BM9G0lhO.mjs → cf-access-pejlJmuy.mjs} +1 -2
- package/dist/{cf-build-output-XpNR9zoh.mjs → cf-build-output-B1C8U83u.mjs} +41 -314
- package/dist/cf-build-output-CmDOcA7K.mjs +1 -0
- package/dist/{cf-command-values-ByHk0xg4.mjs → cf-command-values-Ccl-zRhl.mjs} +10 -7
- package/dist/cf-config-migrate-Dy8MrKgF.mjs +326 -0
- package/dist/{cf-worker-settings-Dg27RzyT.mjs → cf-worker-settings-CARs4Wy9.mjs} +3 -5
- package/dist/cli/cli.mjs +66 -76
- package/dist/cli/cloudflare-operation-process.mjs +14 -18
- package/dist/cli/env-schema-probe.d.mts +1 -5
- package/dist/cli/env-schema-probe.mjs +4 -5
- package/dist/client-CEtr5UOR.mjs +1 -0
- package/dist/{client-B3LnB_bE.mjs → client-CoxPEhJq.mjs} +15 -13
- package/dist/{cloudflare-auth-DyD_kVFr.mjs → cloudflare-auth-CEu-1Ps_.mjs} +2 -3
- package/dist/{cloudflare-cmd-D-b_u3T4.mjs → cloudflare-cmd-fZ6AMSWk.mjs} +7 -8
- package/dist/{cloudflare-config-CH1AylZT.mjs → cloudflare-config-eQunqX6A.mjs} +22 -17
- package/dist/{cloudflare-connect-zTJh8UnN.mjs → cloudflare-connect-9OZe4XVQ.mjs} +5 -6
- package/dist/{cloudflare-operations-Bc-7fN44.mjs → cloudflare-operations-CrskD4_O.mjs} +8 -9
- package/dist/{cloudflare-operations-BtulCNOg.mjs → cloudflare-operations-oLvAd9Nd.mjs} +1 -1
- package/dist/{cloudflare-process-8jEYIeim.mjs → cloudflare-process-DjJ638A-.mjs} +7 -9
- package/dist/{cloudflare-user-output-Q-k0QoNQ.mjs → cloudflare-user-output-zEwuGrEJ.mjs} +1 -2
- package/dist/collect-8i0wU63d.mjs +1 -0
- package/dist/{collect-Dew86qce.mjs → collect-C6Blu9yw.mjs} +2 -3
- package/dist/{config-tqMM6DwY.mjs → config-BBlVXZCU.mjs} +5 -6
- package/dist/{config-OFOAimzt.mjs → config-BITKQ3O6.mjs} +5 -5
- package/dist/{config-BV2ASlpn.mjs → config-BgysUhnm.mjs} +1 -1
- package/dist/{config-CAdZVTLN.d.mts → config-CPxJmt4M.d.mts} +4 -6
- package/dist/{config-D-6q7EBH.mjs → config-WlvEcL82.mjs} +3 -4
- package/dist/config-entry.d.mts +1 -3
- package/dist/config-entry.mjs +1 -2
- package/dist/{connect-BOM6zvFX.mjs → connect-CKvmkl2R.mjs} +10 -11
- package/dist/{create-project-C2K0DN2O.mjs → create-project-BiMmR5wA.mjs} +1 -1
- package/dist/{create-project-Bxd02EHN.mjs → create-project-Bq0M8MtO.mjs} +9 -11
- package/dist/{database-provider-Cx525bwX.mjs → database-provider-DkZo4VwN.mjs} +1 -2
- package/dist/database-provider.d.mts +1 -3
- package/dist/database-provider.mjs +1 -1
- package/dist/{db-Cdvr3zwG.mjs → db-cq5RW4Vy.mjs} +52 -54
- package/dist/{db-types-0eCiqYb1.mjs → db-types-C_8amnB0.mjs} +3 -4
- package/dist/{delete-lETE6Tpt.mjs → delete-CY4L8fi2.mjs} +7 -8
- package/dist/deploy-B029oHlE.mjs +2 -0
- package/dist/{deploy-CdM-LAxX.mjs → deploy-D_gEojD2.mjs} +144 -136
- package/dist/{deploy-managed-static-DjeBFG2c.mjs → deploy-managed-static-BHVbB_-A.mjs} +33 -40
- package/dist/{deploy-transport-DIq_gFTP.mjs → deploy-transport-DEyOUfac.mjs} +6 -7
- package/dist/deploy.d.mts +1 -3
- package/dist/deploy.mjs +11 -11
- package/dist/{dev-inbox-D0jxye_D.mjs → dev-inbox-CUUS6iUg.mjs} +3 -4
- package/dist/discover-D4mQthao.mjs +1 -0
- package/dist/{discover-LaV0tbIu.mjs → discover-Dhkzxgdt.mjs} +3 -4
- package/dist/{dispatch-CLa2LThw.mjs → dispatch-BNLB5_Gm.mjs} +12 -15
- package/dist/{dist-Cegxq8gs.mjs → dist-B6eN80gc.mjs} +199 -118
- package/dist/{dist-D15hFhP0.mjs → dist-BWNkVq50.mjs} +8 -15
- package/dist/{dist-Cor9XGoz.mjs → dist-D23AAMxT.mjs} +9 -16
- package/dist/{dist-ipQi0Q8y.mjs → dist-DMYe8CZJ.mjs} +1 -2
- package/dist/{dist-B1PLt4_8.mjs → dist-eV_Ep60B.mjs} +1 -1
- package/dist/{domain-DyhNtdYf.mjs → domain-BlH90Ods.mjs} +8 -9
- package/dist/{dotenv-CNazY3-w.mjs → dotenv-CEI8hapP.mjs} +1 -2
- package/dist/{drizzle-9TubSZvI.mjs → drizzle-C8MPqt5m.mjs} +1 -1
- package/dist/{drizzle-BQfyvQKX.mjs → drizzle-lFdzSEa9.mjs} +2 -3
- package/dist/{email-B9ayYQEG.mjs → email-BHY72ixO.mjs} +3 -4
- package/dist/{email-DM2wDcBN.mjs → email-Bkq8ZL1p.mjs} +14 -15
- package/dist/{email-cloudflare-PMbAev9Q.mjs → email-cloudflare-MvJIxrwx.mjs} +18 -123
- package/dist/{email-protocol-D9nTvhCp.mjs → email-protocol-DTs_TjCS.mjs} +1 -2
- package/dist/{entry-BEM8ZuGP.mjs → entry-CBZsCy3O.mjs} +5 -6
- package/dist/{env-78hbN-oI.mjs → env-AvuCSeCH.mjs} +10 -11
- package/dist/{env-BaMz0j7H.mjs → env-CuzZZyjB.mjs} +3 -4
- package/dist/{env-0jrMQJI_.mjs → env-DtKg5G26.mjs} +2 -3
- package/dist/{env-helpers--wFmQ_5Q.mjs → env-helpers-Dj_SIwPu.mjs} +1 -2
- package/dist/{env-helpers-CyKtOBpj.d.mts → env-helpers-U56xuFgL.d.mts} +1 -3
- package/dist/{env-public-6lqiSD2b.d.mts → env-public-CeNeO_AT.d.mts} +2 -4
- package/dist/{env-raw-D74P4ebM.mjs → env-raw-e8qgqAzQ.mjs} +1 -2
- package/dist/{env-types-BicfKBhV.mjs → env-types-DqzVBKnS.mjs} +4 -5
- package/dist/{env-validation-BUfFZ6bt.mjs → env-validation-C8Cmvas0.mjs} +1 -1
- package/dist/{env-validation-B3VobvXm.mjs → env-validation-GV1oD4EV.mjs} +9 -10
- package/dist/{error-pages-CLIJ7aYq.mjs → error-pages-COVBnzK7.mjs} +6 -12
- package/dist/{fetch-CUX0tB78.d.mts → fetch-B-gLGYVl.d.mts} +0 -4
- package/dist/{fetch-CtESUYWd.mjs → fetch-C8yhLoF3.mjs} +3 -4
- package/dist/{fetch-error-Bw0n-IY-.mjs → fetch-error-DmlRM6e4.mjs} +2 -4
- package/dist/{fetch-stream-BspOeTAI.mjs → fetch-stream-DafNtVJC.mjs} +4 -5
- package/dist/{fetch-stream-DfkAzZf-.d.mts → fetch-stream-DuwxWmBM.d.mts} +1 -3
- package/dist/{gen-CFmsUsW1.mjs → gen-BD-dfjxY.mjs} +12 -13
- package/dist/gen-CIHXh9I8.mjs +1 -0
- package/dist/{generate-DkEb9rL-.mjs → generate-BOp1g1H_.mjs} +1 -1
- package/dist/{generate-B1m4Cm4n.mjs → generate-CWb8aOsm.mjs} +4 -5
- package/dist/{generated-wrangler-config-DeWj5F9Y.mjs → generated-wrangler-config-CoDaaFsA.mjs} +1 -2
- package/dist/{git-metadata-D-gurjzG.mjs → git-metadata-Cukp5kV5.mjs} +1 -2
- package/dist/{github-cmd-De-_IWbM.mjs → github-cmd-CA-lBdkn.mjs} +8 -9
- package/dist/{handler-BHktmuTL.d.mts → handler-BR6Tvjkp.d.mts} +18 -26
- package/dist/{handler-BZ1t7-Rv.mjs → handler-CKeTtYID.mjs} +6 -17
- package/dist/{head-D2VF4ApL.mjs → head-5XPcnG-j.mjs} +1 -2
- package/dist/{head-C8K_iGe6.d.mts → head-MeF_5M_3.d.mts} +0 -2
- package/dist/headers-CuTEdP9C.mjs +445 -0
- package/dist/{help-CKbrhZha.mjs → help-1OCFDsRr.mjs} +28 -12
- package/dist/help-Ba8Dq5-r.mjs +1 -0
- package/dist/{inbound-Da7XsjH3.d.mts → inbound-BHt4dIlL.d.mts} +16 -9
- package/dist/{inbound-VrOLqwZY.mjs → inbound-CdO-qY0w.mjs} +6 -81
- package/dist/index.d.mts +23 -13
- package/dist/index.mjs +495 -223
- package/dist/{info-Yg0-V5Rs.mjs → info-CJxua_db.mjs} +6 -7
- package/dist/{init-CDiJQycf.mjs → init-B-4CluYx.mjs} +43 -59
- package/dist/{isr-config-fZaJJ8t7.mjs → isr-config-Czzb4mIq.mjs} +5 -55
- package/dist/{limits-D0vD1M9A.mjs → limits-CrHLm5Tk.mjs} +1 -2
- package/dist/{limits-CFsDKQvU.d.mts → limits-_xIf5z_P.d.mts} +0 -2
- package/dist/{link-Dllip08S.mjs → link-DAXOT-G_.mjs} +8 -9
- package/dist/{list-BYRP6am0.mjs → list-BYSOo9fm.mjs} +8 -9
- package/dist/{live-BllfDuzA.d.mts → live-0xrcVpyq.d.mts} +2 -4
- package/dist/{live-BcHoTDFe.mjs → live-DF4HUl2m.mjs} +5 -7
- package/dist/{load-user-env-DD5qveNU.mjs → load-user-env-CSwdofj0.mjs} +1 -2
- package/dist/{local-d1-CAwAs9GH.mjs → local-d1-BLgsNUj9.mjs} +4 -5
- package/dist/{log-BMwmN5Ae.mjs → log-D9hwSySP.mjs} +3 -4
- package/dist/login-BpbYeu-n.mjs +1 -0
- package/dist/{login-PcFy5mlC.mjs → login-CJopTWX4.mjs} +6 -7
- package/dist/{logs-DmJTBhed.mjs → logs-DE0weBsR.mjs} +19 -18
- package/dist/{migrate-B8S2xTcb.mjs → migrate-ChHHZBTi.mjs} +20 -16
- package/dist/migrate-HdA6Kh2p.mjs +1 -0
- package/dist/{migration-handler-CwlEQUoo.d.mts → migration-handler-D8mDx3Ew.d.mts} +0 -4
- package/dist/{migration-handler-Cg0Y4EPu.mjs → migration-handler-DCehTlWs.mjs} +1 -2
- package/dist/{mime-BAyHPskU.mjs → mime-CtP6-qAF.mjs} +145 -18
- package/dist/{mysql-migration-sql-BIS5vbNk.mjs → mysql-migration-sql-CI9VTwjt.mjs} +3 -5
- package/dist/{neon-DTZr7Bu7.mjs → neon-CJzQSycr.mjs} +2 -3
- package/dist/nitro.d.mts +0 -2
- package/dist/nitro.mjs +5 -6
- package/dist/{node-CDOPrGSl.mjs → node-CZ6lGNLn.mjs} +8 -9
- package/dist/{operator-args-BsJIYXaT.mjs → operator-args-D79WQP70.mjs} +2 -3
- package/dist/{operator-auth-Cr2zCc-J.mjs → operator-auth-CfDcmzpo.mjs} +2 -3
- package/dist/{operator-client-C-ROjk1I.mjs → operator-client-BIY4-N_6.mjs} +3 -4
- package/dist/{operator-cmd-DmkmS2wL.mjs → operator-cmd-BUqsdk2K.mjs} +32 -15
- package/dist/operator-cmd-wBYyp8iQ.mjs +1 -0
- package/dist/{output-BpgYODYx.mjs → output-BCdLioKP.mjs} +4 -5
- package/dist/output-E6gecbbV.mjs +1 -0
- package/dist/{package-json-BjYqR-So.mjs → package-json-DvS6IFRv.mjs} +2 -3
- package/dist/pages/client.d.mts +147 -31
- package/dist/pages/client.mjs +199 -43
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +25 -18
- package/dist/pages/index.mjs +24 -12
- package/dist/pages/islands-plugin.d.mts +75 -13
- package/dist/pages/islands-plugin.mjs +92 -7
- package/dist/pages/prefetch.d.mts +2 -2
- package/dist/pages/prefetch.mjs +1 -1
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +2 -2
- package/dist/pages/serialize.d.mts +1 -1
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{pg-J2HbZIkX.mjs → pg-DoyPxa_X.mjs} +1 -2
- package/dist/{picocolors-BsDfhxIw.mjs → picocolors-D1NxSLw-.mjs} +2 -3
- package/dist/{plan-BhLO2p4w.mjs → plan-BOD70XGS.mjs} +1 -2
- package/dist/plan-CQ-N4gws.mjs +1 -0
- package/dist/platform-args-C7XUw9mw.mjs +1 -0
- package/dist/{platform-args-BMD2gjc_.mjs → platform-args-Cx1M-7bq.mjs} +22 -11
- package/dist/{platform-auth-config-CImnfohz.mjs → platform-auth-config-K4m_LE8b.mjs} +10 -11
- package/dist/{platform-auth-protection-BogLhtHi.mjs → platform-auth-protection-KF5Vo-1I.mjs} +10 -11
- package/dist/{platform-auth-recovery-B-mEaWEi.mjs → platform-auth-recovery-BOdFrl7R.mjs} +9 -11
- package/dist/{platform-cmd-CV8NxIIn.mjs → platform-cmd-DpCHawGF.mjs} +1 -1
- package/dist/{platform-cmd-DZK2ixMl.mjs → platform-cmd-Ds3EAV5t.mjs} +13 -13
- package/dist/{platform-discovery-CHhNs8Nn.mjs → platform-discovery-B0eZjZ3B.mjs} +2 -3
- package/dist/{platform-domain-CRvelPGE.mjs → platform-domain-rWJshybd.mjs} +7 -8
- package/dist/{platform-lifecycle-DwXq7kZt.mjs → platform-lifecycle-BH34I0rh.mjs} +1 -1
- package/dist/{platform-lifecycle-CPYY7E9B.mjs → platform-lifecycle-D9RdGub1.mjs} +110 -110
- package/dist/{platform-management-BOnGbMSM.mjs → platform-management-BRefdHGD.mjs} +27 -11
- package/dist/{platform-management-lXdgGgAM.mjs → platform-management-BfLW0Zlo.mjs} +1 -1
- package/dist/{platform-plans-config-CeydDSj0.mjs → platform-plans-config-Dx1agneU.mjs} +5 -6
- package/dist/{platform-recovery-noaALXnE.mjs → platform-recovery-DZuZGJtt.mjs} +5 -6
- package/dist/{platform-registry-B9mWX9LO.mjs → platform-registry-DZ_2Xuqd.mjs} +4 -6
- package/dist/platform-runtime-logs-CdJGnk3f.mjs +68 -0
- package/dist/{platform-setup-Ca53gtt0.mjs → platform-setup-Vw1AaUN8.mjs} +19 -7
- package/dist/{plugin-inference-CeiB6BG5.mjs → plugin-inference-CdLbxZL_.mjs} +16 -24
- package/dist/{prefetch-Bsc_Pb6c.mjs → prefetch-Dx2jIbtg.mjs} +20 -3
- package/dist/{prefetch-Ce6la4EI.d.mts → prefetch-NdNeubbH.d.mts} +7 -3
- package/dist/{prepare-D604Yiyr.mjs → prepare-BJW-f1f1.mjs} +13 -14
- package/dist/{prepare-BuOS18AM.mjs → prepare-BMGeKL16.mjs} +4 -5
- package/dist/prepare-BdxJJCMv.mjs +1 -0
- package/dist/{prerender-render-CaShbHJ3.mjs → prerender-render-RlAj6hh8.mjs} +2 -3
- package/dist/prerender-render.d.mts +1 -3
- package/dist/prerender-render.mjs +1 -1
- package/dist/{project-rqDnVsJN.mjs → project-CLwxcEdq.mjs} +3 -4
- package/dist/{project-zdB3fs9G.mjs → project-DVsTAWFh.mjs} +1 -1
- package/dist/{project-cmd-DBYqAIbe.mjs → project-cmd-B_bUyZ3J.mjs} +21 -23
- package/dist/{project-paths-DGu_QZ_Q.mjs → project-paths-CdGv9Tmi.mjs} +3 -5
- package/dist/project-slug-BUy0lmyR.mjs +1 -0
- package/dist/{project-slug-23TpquG4.mjs → project-slug-CO6ci9XG.mjs} +0 -1
- package/dist/{project-team-BjCLgTRC.mjs → project-team-MjT5K4rQ.mjs} +7 -8
- package/dist/{project-token-BB6PwaA9.mjs → project-token-BKHGwY3k.mjs} +7 -8
- package/dist/{project-tsconfig-CVvk6Z_e.mjs → project-tsconfig-Cf2NFjlM.mjs} +4 -6
- package/dist/{project-zero-trust-CWDh1P_t.mjs → project-zero-trust-Bzdd05-h.mjs} +7 -8
- package/dist/{protocol-DimNxVRr.mjs → protocol-COyySMki.mjs} +135 -113
- package/dist/{protocol-D5XDySYu.d.mts → protocol-CkwjASep.d.mts} +4 -6
- package/dist/{providers-BNKRacMr.d.mts → providers-D5P8j_8D.d.mts} +0 -2
- package/dist/{providers-BUHwJlmM.mjs → providers-ZARwX2cL.mjs} +1 -2
- package/dist/{provision-DztLJ97X.mjs → provision-BbCzpbXs.mjs} +6 -7
- package/dist/{provision-DfxLCg-d.mjs → provision-DQF6Kw-6.mjs} +1 -1
- package/dist/{queues-BWKt1Xo4.d.mts → queues-DdM42xXW.d.mts} +0 -2
- package/dist/{r2-conditions-B8xUgJRc.mjs → r2-conditions-BqkQNt2n.mjs} +1 -2
- package/dist/{requests-D_pbzDyz.mjs → requests-daJmVpjk.mjs} +6 -7
- package/dist/resolve-project-CgfjtOwz.mjs +1 -0
- package/dist/{resolve-project-Xoi6eTWY.mjs → resolve-project-D0YNnJfm.mjs} +4 -5
- package/dist/{resource-name-C7LVpcRm.mjs → resource-name-DlJ9QXzg.mjs} +1 -2
- package/dist/{response-Tn7rU0MV.mjs → response-HmNjB30w.mjs} +1 -2
- package/dist/{rollback-CjfIYsJx.mjs → rollback-BgL0wY1J.mjs} +7 -8
- package/dist/{rolldown-runtime-3h0WiCiA.mjs → rolldown-runtime-uD8oG6U2.mjs} +1 -2
- package/dist/{route-types-DvEGmPif.mjs → route-types-CZc1YXjF.mjs} +80 -9
- package/dist/route-url-CRDF-I0I.mjs +57 -0
- package/dist/route-url-C_YIH_zO.d.mts +37 -0
- package/dist/routes-stub.d.mts +8 -3
- package/dist/routes-stub.mjs +1 -1
- package/dist/{routing-assets-DdSFxoLp.mjs → routing-assets-DJIVOrCh.mjs} +1 -2
- package/dist/{runner-3uGC-oLF.mjs → runner-5MCSimKx.mjs} +5 -6
- package/dist/{runner-WCdfeI0q.mjs → runner-QMeOpScZ.mjs} +1 -1
- package/dist/{runner-mysql-BcHnLUuM.mjs → runner-mysql-0zVmB1JW.mjs} +1 -1
- package/dist/{runner-mysql-BWmbk5IE.mjs → runner-mysql-Bdmsp_x4.mjs} +3 -4
- package/dist/{runner-pg-Cgp-cr_p.mjs → runner-pg-2pjltt0t.mjs} +1 -1
- package/dist/{runner-pg-Cr3qrqi4.mjs → runner-pg-mYc75KfH.mjs} +2 -3
- package/dist/runtime/ai.d.mts +0 -4
- package/dist/runtime/ai.mjs +6 -8
- package/dist/runtime/auth-client-react.d.mts +1 -1
- package/dist/runtime/auth-client-react.mjs +1 -1
- package/dist/runtime/auth-client-solid.d.mts +1 -1
- package/dist/runtime/auth-client-solid.mjs +1 -1
- package/dist/runtime/auth-client-svelte.d.mts +1 -1
- package/dist/runtime/auth-client-svelte.mjs +1 -1
- package/dist/runtime/auth-client-vue.d.mts +1 -1
- package/dist/runtime/auth-client-vue.mjs +1 -1
- package/dist/runtime/auth-client.d.mts +1 -1
- package/dist/runtime/auth-client.mjs +1 -1
- package/dist/runtime/auth.d.mts +1 -1
- package/dist/runtime/auth.mjs +1 -1
- package/dist/runtime/better-auth-mysql.d.mts +2 -4
- package/dist/runtime/better-auth-mysql.mjs +3 -4
- package/dist/runtime/better-auth-pg.d.mts +2 -4
- package/dist/runtime/better-auth-pg.mjs +4 -5
- package/dist/runtime/better-auth.d.mts +2 -4
- package/dist/runtime/better-auth.mjs +3 -4
- package/dist/runtime/client-react.d.mts +4 -4
- package/dist/runtime/client-react.mjs +4 -4
- package/dist/runtime/client-solid.d.mts +4 -4
- package/dist/runtime/client-solid.mjs +4 -4
- package/dist/runtime/client-svelte.d.mts +4 -4
- package/dist/runtime/client-svelte.mjs +4 -4
- package/dist/runtime/client-vue.d.mts +4 -4
- package/dist/runtime/client-vue.mjs +4 -4
- package/dist/runtime/client.d.mts +4 -4
- package/dist/runtime/client.mjs +4 -4
- package/dist/runtime/db.d.mts +0 -2
- package/dist/runtime/db.mjs +2 -3
- package/dist/runtime/durable.d.mts +0 -2
- package/dist/runtime/durable.mjs +3 -4
- package/dist/runtime/email/testing.d.mts +1 -5
- package/dist/runtime/email/testing.mjs +5 -6
- package/dist/runtime/email-protocol.d.mts +0 -2
- package/dist/runtime/email-protocol.mjs +1 -1
- package/dist/runtime/email.d.mts +1 -5
- package/dist/runtime/email.mjs +6 -7
- package/dist/runtime/env-public-client.d.mts +1 -3
- package/dist/runtime/env-public-client.mjs +2 -3
- package/dist/runtime/env-public.d.mts +2 -2
- package/dist/runtime/env-public.mjs +5 -7
- package/dist/runtime/env.d.mts +0 -4
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/fetch-server.d.mts +1 -3
- package/dist/runtime/fetch-server.mjs +3 -4
- package/dist/runtime/fetch-stream.d.mts +2 -2
- package/dist/runtime/fetch-stream.mjs +2 -2
- package/dist/runtime/fetch.d.mts +1 -1
- package/dist/runtime/fetch.mjs +2 -2
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +2 -2
- package/dist/runtime/isr.d.mts +1 -3
- package/dist/runtime/isr.mjs +2 -3
- package/dist/runtime/kv.d.mts +1 -3
- package/dist/runtime/kv.mjs +2 -3
- package/dist/runtime/limits.d.mts +1 -1
- package/dist/runtime/limits.mjs +1 -1
- package/dist/runtime/live-client.d.mts +1 -3
- package/dist/runtime/live-client.mjs +1 -2
- package/dist/runtime/live-server.d.mts +0 -2
- package/dist/runtime/live-server.mjs +3 -4
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/log.d.mts +3 -3
- package/dist/runtime/log.mjs +26 -18
- package/dist/runtime/migration-handler-mysql.d.mts +2 -4
- package/dist/runtime/migration-handler-mysql.mjs +2 -3
- package/dist/runtime/migration-handler-pg.d.mts +2 -4
- package/dist/runtime/migration-handler-pg.mjs +2 -3
- package/dist/runtime/migration-handler.d.mts +1 -1
- package/dist/runtime/migration-handler.mjs +1 -1
- package/dist/runtime/queues.d.mts +1 -1
- package/dist/runtime/queues.mjs +2 -3
- package/dist/runtime/remote/binding-handler.d.mts +1 -3
- package/dist/runtime/remote/binding-handler.mjs +3 -4
- package/dist/runtime/remote/index.d.mts +1 -3
- package/dist/runtime/remote/index.mjs +8 -13
- package/dist/runtime/response.d.mts +1 -3
- package/dist/runtime/response.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 +8 -11
- package/dist/runtime/routing.mjs +52 -32
- package/dist/runtime/sandbox-container.d.mts +1 -1
- package/dist/runtime/sandbox-container.mjs +1 -1
- package/dist/runtime/sandbox.d.mts +2 -2
- package/dist/runtime/sandbox.mjs +5 -6
- package/dist/runtime/seed.d.mts +0 -2
- package/dist/runtime/seed.mjs +1 -2
- package/dist/runtime/sse-client.d.mts +1 -3
- package/dist/runtime/sse-client.mjs +1 -2
- package/dist/runtime/sse.d.mts +1 -3
- package/dist/runtime/sse.mjs +1 -1
- package/dist/runtime/storage.d.mts +1 -3
- package/dist/runtime/storage.mjs +2 -3
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/validator.mjs +1 -1
- package/dist/runtime/ws-server.d.mts +3 -5
- package/dist/runtime/ws-server.mjs +3 -4
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/runtime/ws.mjs +3 -4
- package/dist/{sandbox-q3waMc2T.d.mts → sandbox-DE1WsxuB.d.mts} +2 -4
- package/dist/{sandbox-container-a9LRUtii.mjs → sandbox-container-BuxhwCgt.mjs} +1 -2
- package/dist/{sandbox-container-ChQRum-j.d.mts → sandbox-container-CZFZdMso.d.mts} +0 -2
- package/dist/{scan-N9WzdcAl.mjs → scan-X2rDDRNa.mjs} +49 -35
- package/dist/{secret-3X0PxmuX.mjs → secret-CPq-B_vp.mjs} +17 -15
- package/dist/{serialize-YHvlcG3Q.mjs → serialize-DUuYuaY3.mjs} +2 -4
- package/dist/{serialize-DtR8Vwa_.d.mts → serialize-I4EmS-Wf.d.mts} +0 -2
- package/dist/{skills-CrUO3PJ0.mjs → skills-D393E4lB.mjs} +4 -5
- package/dist/{sqlite-validation-BzKMWnO4.mjs → sqlite-validation-CLJXXN93.mjs} +1 -2
- package/dist/{sse-CMvCgjNk.mjs → sse-CxR30yMF.mjs} +1 -2
- package/dist/{standard-schema-Fo_vCAZh.d.mts → standard-schema-CuDawHOC.d.mts} +0 -2
- package/dist/{static-asset-marker-Btf-6oCD.mjs → static-asset-marker-DsQKz6lt.mjs} +9 -3
- package/dist/{subcommand-prompt-D9OhhbGG.mjs → subcommand-prompt-CxJXporl.mjs} +3 -4
- package/dist/sveltekit.d.mts +0 -2
- package/dist/sveltekit.mjs +2 -3
- package/dist/{terminal-log-text-D9ACPOuG.mjs → terminal-log-text-DNsWJREL.mjs} +1 -2
- package/dist/{types-w72dljaA.d.mts → types-agfx0alu.d.mts} +0 -4
- package/dist/validate-DY1U9rET.mjs +1 -0
- package/dist/{validate-CnZPMq4q.mjs → validate-Ddzl-IwT.mjs} +4 -5
- package/dist/validation-error-uAAjlsiW.mjs +82 -0
- package/dist/{validator-BTOu0fB0.mjs → validator-CTfmzZYb.mjs} +2 -5
- package/dist/{version-metadata-D2vfMQzv.mjs → version-metadata-C8hLzQkv.mjs} +4 -6
- package/dist/{worker-conditions-AWFRcFxR.mjs → worker-conditions-CBZ0RYsZ.mjs} +1 -2
- package/dist/{wrangler-I-scB_1t.mjs → wrangler-DESSbN8L.mjs} +6 -8
- package/dist/wrangler-DUB3MGHV.mjs +1 -0
- package/dist/{wrapper-BBl1rC32.mjs → wrapper-C9SUxoj7.mjs} +17 -14
- package/dist/{ws-B3ClMVDh.d.mts → ws-Dmjg5NH2.d.mts} +3 -5
- package/dist/{yarn-pnp-DLbEFMT0.mjs → yarn-pnp-DgWbE7z5.mjs} +2 -3
- package/docs/guide/database.md +4 -4
- package/docs/guide/deployment.md +1 -1
- package/docs/guide/edge/headers.md +4 -6
- package/docs/guide/edge/redirects.md +4 -4
- package/docs/guide/edge/rewrites.md +1 -1
- package/docs/guide/edge/static-assets.md +0 -10
- package/docs/guide/email/domains.md +3 -1
- package/docs/guide/email/receiving.md +4 -4
- package/docs/guide/email/sending.md +43 -13
- package/docs/guide/pages-routing/actions-and-forms.md +26 -9
- package/docs/guide/pages-routing/islands.md +5 -5
- package/docs/guide/pages-routing/layouts.md +16 -2
- package/docs/guide/pages-routing/loaders.md +5 -5
- package/docs/guide/pages-routing/markdown.md +7 -7
- package/docs/guide/pages-routing/overview.md +137 -27
- package/docs/guide/platform/administration/connected-apps.md +4 -2
- package/docs/guide/platform/administration/email.md +6 -8
- package/docs/guide/platform/installation/credentials.md +12 -10
- package/docs/guide/platform/installation/maintenance.md +18 -21
- package/docs/guide/platform/installation/prerequisites.md +1 -1
- package/docs/guide/platform/installation/setup.md +23 -2
- package/docs/guide/platform/installation/uninstall.md +1 -1
- package/docs/guide/queues.md +4 -8
- package/docs/guide/self-hosted-platform.md +3 -3
- package/docs/guide/server-routing.md +7 -7
- package/docs/guide/ssg.md +3 -3
- package/docs/guide/type-safety.md +84 -1
- package/docs/guide/typed-fetch.md +1 -1
- package/docs/guide/websockets.md +1 -1
- package/docs/integrations/cloudflare.md +2 -2
- package/docs/integrations/frameworks/analog.md +1 -1
- package/docs/integrations/frameworks/astro.md +17 -12
- package/docs/integrations/frameworks/nuxt.md +1 -1
- package/docs/integrations/frameworks/overview.md +2 -2
- package/docs/integrations/frameworks/sveltekit.md +1 -1
- package/docs/integrations/frameworks/tanstack-start.md +1 -1
- package/docs/integrations/hono.md +5 -5
- package/docs/reference/api/auth.md +1 -1
- package/docs/reference/api/deploy.md +6 -6
- package/docs/reference/api/pages.md +109 -50
- package/docs/reference/api/plugin.md +4 -4
- package/docs/reference/api/resources.md +4 -1
- package/docs/reference/api/rewrites.md +24 -3
- package/docs/reference/api/types.md +45 -0
- package/docs/reference/api.md +2 -2
- package/docs/reference/cli/database.md +15 -9
- package/docs/reference/cli/email.md +4 -2
- package/docs/reference/cli/platform-installation.md +6 -3
- package/docs/reference/cli/project.md +2 -2
- package/docs/reference/cli/secrets.md +3 -1
- package/docs/reference/cli/setup.md +4 -4
- package/docs/reference/cli.md +1 -1
- package/docs/reference/config.md +12 -2
- package/package.json +36 -32
- package/sandbox.Dockerfile +1 -1
- package/schema.json +4 -0
- package/skills/void/SKILL.md +5 -0
- package/dist/cf-build-output-bd8Uwv1P.mjs +0 -1
- package/dist/client-BZb9j66F.mjs +0 -1
- package/dist/collect-BWhkgtAn.mjs +0 -1
- package/dist/deploy-CX94CmKa.mjs +0 -2
- package/dist/discover-D4TPKo57.mjs +0 -1
- package/dist/gen-BhWBT4iu.mjs +0 -1
- package/dist/headers--vaK_chu.mjs +0 -226
- package/dist/help-qOZr3wng.mjs +0 -1
- package/dist/login-BAPmYnb7.mjs +0 -1
- package/dist/migrate-BIYTPQE6.mjs +0 -1
- package/dist/operator-cmd-CjazwOyb.mjs +0 -1
- package/dist/output-BW9uK099.mjs +0 -1
- package/dist/plan-CKX_jWnD.mjs +0 -1
- package/dist/platform-args-BC8_hsDj.mjs +0 -1
- package/dist/prepare-DU-tOpS5.mjs +0 -1
- package/dist/project-slug-6cyz8E7k.mjs +0 -1
- package/dist/resolve-project-DD1vu8s9.mjs +0 -1
- package/dist/route-url-BgPja1GS.d.mts +0 -5
- package/dist/route-url-BjGv_KKY.mjs +0 -28
- package/dist/validate-D7Wn8PUX.mjs +0 -1
- package/dist/validation-error-Dg9Recn1.mjs +0 -49
- package/dist/wrangler-UnwdISay.mjs +0 -1
|
@@ -21,7 +21,7 @@ TanStack Start and React Router use the Cloudflare Vite plugin provided by Void.
|
|
|
21
21
|
| [SvelteKit](./sveltekit.md) | `@sveltejs/kit` | Vite-based, uses its own Cloudflare adapter |
|
|
22
22
|
| [Nuxt](./nuxt.md) | `nuxt` | Own CLI and build toolchain |
|
|
23
23
|
| [Analog](./analog.md) | `@analogjs/platform` | Vite-based, uses Nitro with Cloudflare preset |
|
|
24
|
-
| [Astro **
|
|
24
|
+
| [Astro **v7+**](./astro.md) | `astro` | Own CLI and Cloudflare adapter (v7 required) |
|
|
25
25
|
|
|
26
26
|
Detection is automatic. The CLI reads your `package.json` dependencies.
|
|
27
27
|
|
|
@@ -40,7 +40,7 @@ With `voidPlugin()` added to the framework's Vite config, frameworks get most of
|
|
|
40
40
|
|
|
41
41
|
For framework apps, Void revalidation caches public HTML document responses with both `void deploy` and `void deploy --platform cloudflare`. Client data requests continue to use the framework's own behavior. A response with `Set-Cookie` or `Cache-Control: private`, `no-store`, or `no-cache` is never shared.
|
|
42
42
|
|
|
43
|
-
Frameworks can also access bindings directly via the framework's own mechanisms (e.g. `env` from `cloudflare:workers` in SvelteKit 3 and
|
|
43
|
+
Frameworks can also access bindings directly via the framework's own mechanisms (e.g. `env` from `cloudflare:workers` in SvelteKit 3, Analog, and Astro, `platform.env` in SvelteKit 2, `event.context.cloudflare.env` in Nuxt).
|
|
44
44
|
|
|
45
45
|
## Configuration
|
|
46
46
|
|
|
@@ -91,8 +91,8 @@ Void-managed auth is not supported in framework mode yet. Use Better Auth's offi
|
|
|
91
91
|
### Database
|
|
92
92
|
|
|
93
93
|
```ts
|
|
94
|
-
import { users } from '@schema';
|
|
95
94
|
// src/routes/users/+page.server.ts
|
|
95
|
+
import { users } from '@schema';
|
|
96
96
|
import { db } from 'void/db';
|
|
97
97
|
|
|
98
98
|
export async function load() {
|
|
@@ -92,7 +92,7 @@ export { Counter } from './counter';
|
|
|
92
92
|
export default handler;
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
-
Void
|
|
95
|
+
Void uses TanStack's default server entry unless you set `cloudflare.main`. You can also use a package entry such as `@tanstack/react-start/server-entry`.
|
|
96
96
|
|
|
97
97
|
Bind an exported Durable Object or Workflow class under `cloudflare` as well, for example in `cloudflare.durable_objects`. These settings apply when you deploy with `void deploy --platform cloudflare`. On a Void platform, use [Durable State](../../guide/durable-state.md) instead.
|
|
98
98
|
|
|
@@ -17,16 +17,16 @@ Once `hono` is installed in your app, you can use built-in middleware, helpers,
|
|
|
17
17
|
Use Hono's built-in middleware in your global middleware files or per-route:
|
|
18
18
|
|
|
19
19
|
```ts
|
|
20
|
-
import { cors } from 'hono/cors';
|
|
21
20
|
// middleware/01.cors.ts
|
|
21
|
+
import { cors } from 'hono/cors';
|
|
22
22
|
import { defineMiddleware } from 'void';
|
|
23
23
|
|
|
24
24
|
export default defineMiddleware(cors({ origin: 'https://example.com' }));
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
|
-
import { cache } from 'hono/cache';
|
|
29
28
|
// routes/api/products.ts (per-route cache)
|
|
29
|
+
import { cache } from 'hono/cache';
|
|
30
30
|
import { defineHandler } from 'void';
|
|
31
31
|
import { listProducts } from '../../lib/products';
|
|
32
32
|
|
|
@@ -41,8 +41,8 @@ export const GET = defineHandler(
|
|
|
41
41
|
:::
|
|
42
42
|
|
|
43
43
|
```ts
|
|
44
|
-
import { bearerAuth } from 'hono/bearer-auth';
|
|
45
44
|
// routes/api/webhooks/stripe.ts (per-route usage)
|
|
45
|
+
import { bearerAuth } from 'hono/bearer-auth';
|
|
46
46
|
import { defineHandler } from 'void';
|
|
47
47
|
|
|
48
48
|
export const POST = defineHandler(bearerAuth({ token: 'webhook-secret' }), async (c) => {
|
|
@@ -56,8 +56,8 @@ export const POST = defineHandler(bearerAuth({ token: 'webhook-secret' }), async
|
|
|
56
56
|
Hono's context helpers are available on `c` in every handler:
|
|
57
57
|
|
|
58
58
|
```ts
|
|
59
|
-
import { stream } from 'hono/streaming';
|
|
60
59
|
// routes/api/download.ts
|
|
60
|
+
import { stream } from 'hono/streaming';
|
|
61
61
|
import { defineHandler } from 'void';
|
|
62
62
|
|
|
63
63
|
export const GET = defineHandler((c) => {
|
|
@@ -84,8 +84,8 @@ export const GET = defineHandler((c) => {
|
|
|
84
84
|
Any `hono/*` or `@hono/*` package works. Install the package in your app, then use it directly:
|
|
85
85
|
|
|
86
86
|
```ts
|
|
87
|
-
import { rateLimiter } from 'hono-rate-limiter';
|
|
88
87
|
// middleware/01.rate-limit.ts
|
|
88
|
+
import { rateLimiter } from 'hono-rate-limiter';
|
|
89
89
|
import { defineMiddleware } from 'void';
|
|
90
90
|
|
|
91
91
|
export default defineMiddleware(rateLimiter({ windowMs: 60_000, limit: 100 }));
|
|
@@ -111,7 +111,7 @@ interface AuthSession {
|
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
::: tip Types inside `auth.ts`
|
|
114
|
-
|
|
114
|
+
In `auth.ts` and its imports, let Better Auth infer hook types or use its `User` and `Session` types. Using Void's inferred auth types or auth helper results there creates a circular reference. Callbacks such as `sendResetPassword` receive Better Auth's base `User` type.
|
|
115
115
|
:::
|
|
116
116
|
|
|
117
117
|
## `AuthState` {#authstate}
|
|
@@ -8,7 +8,7 @@ Build the app in managed mode inside its isolated environment:
|
|
|
8
8
|
VOID_DEPLOY_BUILD=1 VOID_DEPLOY_PROJECT_ID=artifact npm run build
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
These values select a platform-compatible build.
|
|
11
|
+
These values select a platform-compatible build. The target project is selected during publish approval.
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
14
|
import { prepareDeployArtifact } from 'void/deploy';
|
|
@@ -16,9 +16,9 @@ import { prepareDeployArtifact } from 'void/deploy';
|
|
|
16
16
|
const { artifact, assets } = await prepareDeployArtifact('/path/to/app');
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
`artifact` contains the deployment manifest,
|
|
19
|
+
`artifact` contains the deployment manifest, asset metadata, and any Worker modules. `assets` maps asset URL paths to base64 bytes. SPAs and static sites use the same output directory and routing configuration as `void deploy`. Keep the prepared result unchanged while requesting [publish approval](/guide/platform/administration/connected-apps).
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Use this API for built Cloudflare Worker apps, SPAs, and static sites. For Node targets, Pages `output: 'static'`, remote data, deploy-time prerendering, Sandbox, or Live resources, use `void deploy`.
|
|
22
22
|
|
|
23
23
|
Run preparation inside the same isolated environment as the app build. App configuration and build plugins execute project code; keep platform credentials on the publishing server.
|
|
24
24
|
|
|
@@ -28,7 +28,7 @@ Run preparation inside the same isolated environment as the app build. App confi
|
|
|
28
28
|
`prepareCfBuildOutput` follows Cloudflare's draft Build Output format. Its options and the prepared directory can change between Void releases.
|
|
29
29
|
:::
|
|
30
30
|
|
|
31
|
-
Use `prepareCfBuildOutput` to
|
|
31
|
+
Use `prepareCfBuildOutput` to prepare an existing Worker build for Cloudflare publication:
|
|
32
32
|
|
|
33
33
|
```ts
|
|
34
34
|
import { prepareCfBuildOutput } from 'void/deploy';
|
|
@@ -48,7 +48,7 @@ try {
|
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
Pass
|
|
51
|
+
Pass a Worker output directory containing a generated `wrangler.json`, such as `dist/ssr` or `dist/server`. For native Cloudflare Build Output, pass the project root containing `.cloudflare/output/v0`. The result is a temporary copy for your publication workflow. For Containers built from a local Dockerfile, publish from the same Docker environment used to build the image.
|
|
52
52
|
|
|
53
53
|
| Option | Description |
|
|
54
54
|
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -56,4 +56,4 @@ Pass the Worker output directory that contains a generated `wrangler.json`, such
|
|
|
56
56
|
| `mode` | Vite build mode. Native output keeps the mode it was built with, and a different value returns `null`. For other output it defaults to `production`. |
|
|
57
57
|
| `projectRoot` | App directory containing `package.json` and its installed dependencies. Defaults to the input directory. |
|
|
58
58
|
|
|
59
|
-
The result
|
|
59
|
+
The result provides `directory`, an optional `assetsDirectory` pointing to the input assets, and an async `dispose()` method. Dispose the result after publication. Unsupported configurations return `null`; missing or invalid build files throw an error.
|
|
@@ -6,6 +6,44 @@ outline: deep
|
|
|
6
6
|
|
|
7
7
|
Framework adaptors for [Pages Routing](../../guide/pages-routing/overview). Each adaptor provides a Vite plugin and client-side runtime.
|
|
8
8
|
|
|
9
|
+
## Navigation destinations {#navigation-destinations}
|
|
10
|
+
|
|
11
|
+
All four adapters support typed URLs through [`routeUrl()`](./types.md#routeurl-path-options). Pass the returned string to `Link`'s `href`, which has the type [`Href`](./types.md#route-types).
|
|
12
|
+
|
|
13
|
+
The router's `visit(destination, options?)`, `prefetch(destination, options?)`, and `flush(destination, method?)` accept [`RouteUrlInput`](./types.md#route-types): a string, `URL`, or typed destination object.
|
|
14
|
+
|
|
15
|
+
With [`routing.typedRoutes`](../config.md#routing-typedroutes), `href` and router strings must match one of your routes, or be a same-page or external URL. Without it, both accept any string.
|
|
16
|
+
|
|
17
|
+
See [Typed navigation](../../guide/pages-routing/overview.md#typed-navigation) for framework examples.
|
|
18
|
+
|
|
19
|
+
## Prefetching {#prefetching}
|
|
20
|
+
|
|
21
|
+
`Link`'s `prefetch` prop takes `true`, `false`, a strategy, or an array of strategies:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
type LinkPrefetchStrategy = 'hover' | 'click' | 'mount' | 'visible';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Value | Loads the page |
|
|
28
|
+
| ------------------- | --------------------------------------------------------------------------------------------- |
|
|
29
|
+
| `'hover'` or `true` | When the pointer rests on the link for `hoverDelay`, when it gets keyboard focus, or on touch |
|
|
30
|
+
| `'click'` | When the mouse button or finger goes down, just before the click |
|
|
31
|
+
| `'mount'` | As soon as the link renders |
|
|
32
|
+
| `'visible'` | Once the link has stayed in view for 300 ms. Links scrolled quickly past are skipped |
|
|
33
|
+
| `false` | Never |
|
|
34
|
+
|
|
35
|
+
With an array such as `['visible', 'hover']`, the first strategy to happen loads the page, and later ones reuse it. `prefetch` works only on GET links, and links to other sites are never prefetched. No strategy prefetches while the browser reports data saver or a 2G connection, which only Chromium-based browsers report; calling `router.prefetch()` yourself still loads the page.
|
|
36
|
+
|
|
37
|
+
`cacheFor` sets how long a prefetched page is reused, in milliseconds or as a duration such as `'5m'`. A pair such as `['30s', '5m']` treats the page as fresh for 30 seconds, then still shows it for up to 5 minutes while loading a fresh copy in the background.
|
|
38
|
+
|
|
39
|
+
Each adapter plugin's `prefetch` option sets app-wide values:
|
|
40
|
+
|
|
41
|
+
| Option | Default | Description |
|
|
42
|
+
| ----------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
43
|
+
| `defaultStrategy` | `false` | The `prefetch` value for every `Link` that doesn't set its own. A `Link`'s own `prefetch` replaces it, and `prefetch={false}` turns it off. Links with a non-GET `method` or `reloadDocument` don't use it. |
|
|
44
|
+
| `hoverDelay` | `75` | Milliseconds the pointer rests on a link before `'hover'` prefetches. |
|
|
45
|
+
| `cacheFor` | `'30s'` | The `cacheFor` value for every `Link` that doesn't set its own. |
|
|
46
|
+
|
|
9
47
|
## `@void/vue` {#void-vue}
|
|
10
48
|
|
|
11
49
|
### `voidVue(options?)` {#voidvue-options}
|
|
@@ -33,8 +71,9 @@ interface VoidVueOptions {
|
|
|
33
71
|
vue?: VuePluginOptions; // passed through to @vitejs/plugin-vue
|
|
34
72
|
viewTransitions?: boolean; // enable View Transitions API for navigations
|
|
35
73
|
prefetch?: {
|
|
36
|
-
|
|
37
|
-
|
|
74
|
+
defaultStrategy?: boolean | LinkPrefetchStrategy | LinkPrefetchStrategy[]; // default: false
|
|
75
|
+
hoverDelay?: number; // default: 75 (ms)
|
|
76
|
+
cacheFor?: number | string | [string, string]; // default: '30s'
|
|
38
77
|
};
|
|
39
78
|
}
|
|
40
79
|
```
|
|
@@ -43,16 +82,16 @@ interface VoidVueOptions {
|
|
|
43
82
|
|
|
44
83
|
Imported from `"@void/vue"`.
|
|
45
84
|
|
|
46
|
-
| Export | Description
|
|
47
|
-
| ---------------------------------- |
|
|
48
|
-
| `Link` | Vue component for SPA navigation. Renders `<a>` for GET, `<button>` for non-GET methods. Props: `href`, `method`, `data`, `prefetch`, `cacheFor`, `preserveScroll`, `preserveState`, `replace`, `reloadDocument`, `viewTransition`, `onNavigate`. |
|
|
49
|
-
| `useRouter()` | Returns the Void Router with current route state (`url`, `path`, `query`, `params`) and navigation methods: `visit`, `refresh`, awaitable `prefetch`, `flush`, `flushAll`.
|
|
50
|
-
| `useParams()` | Returns dynamic route params for the page currently being rendered.
|
|
51
|
-
| `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination.
|
|
52
|
-
| `useForm(url, defaults, options?)` | Typed reactive form helper bound to a page action URL. Returns `{ data, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`.
|
|
53
|
-
| `useIslandForm(defaults)` | Form helper for island components. Same form state as `useForm()`, plus `submit(url, method)`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`.
|
|
54
|
-
| `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`.
|
|
55
|
-
| `useShared()` | Returns shared data
|
|
85
|
+
| Export | Description |
|
|
86
|
+
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
87
|
+
| `Link` | Vue component for SPA navigation. Renders `<a>` for GET, `<button>` for non-GET methods. Props: `href`, `method`, `data`, `prefetch`, `cacheFor`, `preserveScroll`, `preserveState`, `replace`, `reloadDocument`, `viewTransition`, `activeMatch`, `onNavigate`. Adds `aria-current="page"` and `data-void-active` to the link to the current page ([active links](../../guide/pages-routing/overview.md#active-links)), and `data-void-pending` to links to a page while it loads ([pending links](../../guide/pages-routing/overview.md#pending-links)). |
|
|
88
|
+
| `useRouter()` | Returns the Void Router with current route state (`url`, `path`, `query`, `params`) and navigation methods: `visit`, `refresh`, awaitable `prefetch`, `flush`, `flushAll`. |
|
|
89
|
+
| `useParams()` | Returns dynamic route params for the page currently being rendered. |
|
|
90
|
+
| `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination. |
|
|
91
|
+
| `useForm(url, defaults, options?)` | Typed reactive form helper bound to a page action URL. Returns `{ data, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`. |
|
|
92
|
+
| `useIslandForm(defaults)` | Form helper for island components. Same form state as `useForm()`, plus `submit(url, method)`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`. |
|
|
93
|
+
| `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`. |
|
|
94
|
+
| `useShared()` | Returns shared data. Middleware sets it with `c.set("shared", {...})`; a loader or action can update it. See [Shared data](../../guide/pages-routing/layouts.md#shared-data). |
|
|
56
95
|
|
|
57
96
|
Vue `Link` GET `data` is merged into the rendered `href` query string. Primitive values are serialized with `String(value)`, arrays become repeated keys, `null` and `undefined` are omitted, and nested objects throw. `prefetch` and `reloadDocument` are GET-only and throw for mutation links.
|
|
58
97
|
|
|
@@ -85,8 +124,9 @@ interface VoidReactOptions {
|
|
|
85
124
|
react?: ReactPluginOptions; // passed through to @vitejs/plugin-react
|
|
86
125
|
viewTransitions?: boolean; // enable View Transitions API for navigations
|
|
87
126
|
prefetch?: {
|
|
88
|
-
|
|
89
|
-
|
|
127
|
+
defaultStrategy?: boolean | LinkPrefetchStrategy | LinkPrefetchStrategy[]; // default: false
|
|
128
|
+
hoverDelay?: number; // default: 75 (ms)
|
|
129
|
+
cacheFor?: number | string | [string, string]; // default: '30s'
|
|
90
130
|
};
|
|
91
131
|
}
|
|
92
132
|
```
|
|
@@ -95,21 +135,21 @@ interface VoidReactOptions {
|
|
|
95
135
|
|
|
96
136
|
Imported from `"@void/react"`.
|
|
97
137
|
|
|
98
|
-
| Export | Description
|
|
99
|
-
| ---------------------------------- |
|
|
100
|
-
| `Link` | React component for SPA navigation. Renders `<a>` for GET, `<button>` for non-GET methods. Props: `href`, `method`, `data`, `prefetch`, `cacheFor`, `preserveScroll`, `preserveState`, `replace`, `reloadDocument`, `viewTransition`, `onNavigate`. |
|
|
101
|
-
| `useRouter()` | Returns the Void Router with current route state (`url`, `path`, `query`, `params`) and navigation methods: `visit`, `refresh`, awaitable `prefetch`, `flush`, `flushAll`. React navigations are scheduled as transitions.
|
|
102
|
-
| `useParams()` | Returns dynamic route params for the page currently being rendered.
|
|
103
|
-
| `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination.
|
|
104
|
-
| `useForm(url, defaults, options?)` | Form helper hook. Returns `{ data, setData, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`.
|
|
105
|
-
| `useIslandForm(defaults)` | Form helper hook for island components. Same form state as `useForm()`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`.
|
|
106
|
-
| `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`.
|
|
107
|
-
| `useShared()` | Returns shared data
|
|
108
|
-
| `Deferred<T>` | React-only prop type for `defer()` results. It is `Promise<T>` and is consumed with React `use()`.
|
|
138
|
+
| Export | Description |
|
|
139
|
+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
140
|
+
| `Link` | React component for SPA navigation. Renders `<a>` for GET, `<button>` for non-GET methods. Props: `href`, `method`, `data`, `prefetch`, `cacheFor`, `preserveScroll`, `preserveState`, `replace`, `reloadDocument`, `viewTransition`, `activeMatch`, `onNavigate`. Adds `aria-current="page"` and `data-void-active` to the link to the current page ([active links](../../guide/pages-routing/overview.md#active-links)), and `data-void-pending` to links to a page while it loads ([pending links](../../guide/pages-routing/overview.md#pending-links)). |
|
|
141
|
+
| `useRouter()` | Returns the Void Router with current route state (`url`, `path`, `query`, `params`) and navigation methods: `visit`, `refresh`, awaitable `prefetch`, `flush`, `flushAll`. React navigations are scheduled as transitions. |
|
|
142
|
+
| `useParams()` | Returns dynamic route params for the page currently being rendered. |
|
|
143
|
+
| `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination. |
|
|
144
|
+
| `useForm(url, defaults, options?)` | Form helper hook. Returns `{ data, setData, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`. |
|
|
145
|
+
| `useIslandForm(defaults)` | Form helper hook for island components. Same form state as `useForm()`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`. |
|
|
146
|
+
| `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`. |
|
|
147
|
+
| `useShared()` | Returns shared data. Middleware sets it with `c.set("shared", {...})`; a loader or action can update it. See [Shared data](../../guide/pages-routing/layouts.md#shared-data). |
|
|
148
|
+
| `Deferred<T>` | React-only prop type for `defer()` results. It is `Promise<T>` and is consumed with React `use()`. |
|
|
109
149
|
|
|
110
150
|
React `Link` GET `data` is merged into the rendered `href` query string. Primitive values are serialized with `String(value)`, arrays become repeated keys, `null` and `undefined` are omitted, and nested objects throw. `prefetch` and `reloadDocument` are GET-only and throw for mutation links.
|
|
111
151
|
|
|
112
|
-
React `useForm()`
|
|
152
|
+
React `useForm()` accepts `onSuccess?: () => void | Promise<void>` and `onError?: (error: Record<string, string> | VoidActionError) => void | Promise<void>`. `pending` stays true until callbacks finish. See [submission callbacks](../../guide/pages-routing/actions-and-forms.md#react-submission-callbacks).
|
|
113
153
|
|
|
114
154
|
React deferred props returned from `defer()` are Suspense resources. Read them
|
|
115
155
|
with React's `use()` inside a `<Suspense>` boundary. React Pages requires React
|
|
@@ -120,6 +160,23 @@ When explicitly annotating props, import `Deferred` from the framework adapter
|
|
|
120
160
|
package (`@void/react`, `@void/vue`, `@void/svelte`, or `@void/solid`) so the
|
|
121
161
|
type matches that adapter's client runtime shape.
|
|
122
162
|
|
|
163
|
+
### React navigation completion {#react-navigation-completion}
|
|
164
|
+
|
|
165
|
+
By default, `await router.visit()` and `await router.refresh()` wait for React to commit the updated page and URL. You can also request this explicitly with `{ resolveOn: 'commit' }`.
|
|
166
|
+
|
|
167
|
+
When awaiting navigation inside `startTransition`, a `<form action>`, `useActionState`, or an async `useForm()` callback, pass `{ resolveOn: 'data' }`:
|
|
168
|
+
|
|
169
|
+
```tsx
|
|
170
|
+
startTransition(async () => {
|
|
171
|
+
await saveUser();
|
|
172
|
+
await router.refresh({ resolveOn: 'data' });
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
await router.visit('/account', { resolveOn: 'data' });
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
With `'data'`, the promise resolves when the destination's page data is ready, allowing the Action to finish while React renders the update. The transition can remain pending through Suspense. The DOM and URL may still show the previous page after `await`; use an effect or ref callback for work that requires the updated DOM.
|
|
179
|
+
|
|
123
180
|
## `@void/svelte` {#void-svelte}
|
|
124
181
|
|
|
125
182
|
### `voidSvelte(options?)` {#voidsvelte-options}
|
|
@@ -147,8 +204,9 @@ interface VoidSvelteOptions {
|
|
|
147
204
|
svelte?: SveltePluginOptions; // passed through to @sveltejs/vite-plugin-svelte
|
|
148
205
|
viewTransitions?: boolean; // enable View Transitions API
|
|
149
206
|
prefetch?: {
|
|
150
|
-
|
|
151
|
-
|
|
207
|
+
defaultStrategy?: boolean | LinkPrefetchStrategy | LinkPrefetchStrategy[]; // default: false
|
|
208
|
+
hoverDelay?: number; // default: 75 (ms)
|
|
209
|
+
cacheFor?: number | string | [string, string]; // default: '30s'
|
|
152
210
|
};
|
|
153
211
|
}
|
|
154
212
|
```
|
|
@@ -157,16 +215,16 @@ interface VoidSvelteOptions {
|
|
|
157
215
|
|
|
158
216
|
Imported from `"@void/svelte"`.
|
|
159
217
|
|
|
160
|
-
| Export | Description
|
|
161
|
-
| ---------------------------------- |
|
|
162
|
-
| `Link` | Svelte component for SPA navigation. Renders `<a>` for GET, `<button>` for non-GET methods. Props: `href`, `method`, `data`, `prefetch`, `cacheFor`, `preserveScroll`, `preserveState`, `replace`, `reloadDocument`, `viewTransition`, `onNavigate`. |
|
|
163
|
-
| `useForm(url, defaults, options?)` | Form helper using Svelte 5 runes. Returns `{ data, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`.
|
|
164
|
-
| `useIslandForm(defaults)` | Form helper for island components. Same form state as `useForm()`, plus `submit(url, method)`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`.
|
|
165
|
-
| `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`.
|
|
166
|
-
| `useShared()` | Returns shared data
|
|
167
|
-
| `useRouter()` | Returns the Void Router with current route state (`url`, `path`, `query`, `params`) and navigation methods: `visit`, `refresh`, awaitable `prefetch`, `flush`, `flushAll`.
|
|
168
|
-
| `useParams()` | Returns dynamic route params for the page currently being rendered.
|
|
169
|
-
| `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination.
|
|
218
|
+
| Export | Description |
|
|
219
|
+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
220
|
+
| `Link` | Svelte component for SPA navigation. Renders `<a>` for GET, `<button>` for non-GET methods. Props: `href`, `method`, `data`, `prefetch`, `cacheFor`, `preserveScroll`, `preserveState`, `replace`, `reloadDocument`, `viewTransition`, `activeMatch`, `onNavigate`. Adds `aria-current="page"` and `data-void-active` to the link to the current page ([active links](../../guide/pages-routing/overview.md#active-links)), and `data-void-pending` to links to a page while it loads ([pending links](../../guide/pages-routing/overview.md#pending-links)). |
|
|
221
|
+
| `useForm(url, defaults, options?)` | Form helper using Svelte 5 runes. Returns `{ data, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`. |
|
|
222
|
+
| `useIslandForm(defaults)` | Form helper for island components. Same form state as `useForm()`, plus `submit(url, method)`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`. |
|
|
223
|
+
| `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`. |
|
|
224
|
+
| `useShared()` | Returns shared data. Middleware sets it with `c.set("shared", {...})`; a loader or action can update it. See [Shared data](../../guide/pages-routing/layouts.md#shared-data). |
|
|
225
|
+
| `useRouter()` | Returns the Void Router with current route state (`url`, `path`, `query`, `params`) and navigation methods: `visit`, `refresh`, awaitable `prefetch`, `flush`, `flushAll`. |
|
|
226
|
+
| `useParams()` | Returns dynamic route params for the page currently being rendered. |
|
|
227
|
+
| `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination. |
|
|
170
228
|
|
|
171
229
|
Svelte `Link` GET `data` is merged into the rendered `href` query string. Primitive values are serialized with `String(value)`, arrays become repeated keys, `null` and `undefined` are omitted, and nested objects throw. `prefetch` and `reloadDocument` are GET-only and throw for mutation links.
|
|
172
230
|
|
|
@@ -197,8 +255,9 @@ interface VoidSolidOptions {
|
|
|
197
255
|
solid?: SolidPluginOptions; // passed through to vite-plugin-solid
|
|
198
256
|
viewTransitions?: boolean; // enable View Transitions API
|
|
199
257
|
prefetch?: {
|
|
200
|
-
|
|
201
|
-
|
|
258
|
+
defaultStrategy?: boolean | LinkPrefetchStrategy | LinkPrefetchStrategy[]; // default: false
|
|
259
|
+
hoverDelay?: number; // default: 75 (ms)
|
|
260
|
+
cacheFor?: number | string | [string, string]; // default: '30s'
|
|
202
261
|
};
|
|
203
262
|
}
|
|
204
263
|
```
|
|
@@ -207,16 +266,16 @@ interface VoidSolidOptions {
|
|
|
207
266
|
|
|
208
267
|
Imported from `"@void/solid"`.
|
|
209
268
|
|
|
210
|
-
| Export | Description
|
|
211
|
-
| ---------------------------------- |
|
|
212
|
-
| `Link` | Solid component for SPA navigation. Renders `<a>` for GET, `<button>` for non-GET methods. Props: `href`, `method`, `data`, `prefetch`, `cacheFor`, `preserveScroll`, `preserveState`, `replace`, `reloadDocument`, `viewTransition`, `onNavigate`. |
|
|
213
|
-
| `useForm(url, defaults, options?)` | Form helper using Solid stores. Returns `{ data, setData, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`.
|
|
214
|
-
| `useIslandForm(defaults)` | Form helper for island components. Same form state as `useForm()`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`.
|
|
215
|
-
| `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`.
|
|
216
|
-
| `useShared()` | Returns shared data
|
|
217
|
-
| `useRouter()` | Returns the Void Router with current route state (`url`, `path`, `query`, `params`) and navigation methods: `visit`, `refresh`, awaitable `prefetch`, `flush`, `flushAll`.
|
|
218
|
-
| `useParams()` | Returns dynamic route params for the page currently being rendered.
|
|
219
|
-
| `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination.
|
|
269
|
+
| Export | Description |
|
|
270
|
+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
271
|
+
| `Link` | Solid component for SPA navigation. Renders `<a>` for GET, `<button>` for non-GET methods. Props: `href`, `method`, `data`, `prefetch`, `cacheFor`, `preserveScroll`, `preserveState`, `replace`, `reloadDocument`, `viewTransition`, `activeMatch`, `onNavigate`. Adds `aria-current="page"` and `data-void-active` to the link to the current page ([active links](../../guide/pages-routing/overview.md#active-links)), and `data-void-pending` to links to a page while it loads ([pending links](../../guide/pages-routing/overview.md#pending-links)). |
|
|
272
|
+
| `useForm(url, defaults, options?)` | Form helper using Solid stores. Returns `{ data, setData, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`. |
|
|
273
|
+
| `useIslandForm(defaults)` | Form helper for island components. Same form state as `useForm()`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`. |
|
|
274
|
+
| `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`. |
|
|
275
|
+
| `useShared()` | Returns shared data. Middleware sets it with `c.set("shared", {...})`; a loader or action can update it. See [Shared data](../../guide/pages-routing/layouts.md#shared-data). |
|
|
276
|
+
| `useRouter()` | Returns the Void Router with current route state (`url`, `path`, `query`, `params`) and navigation methods: `visit`, `refresh`, awaitable `prefetch`, `flush`, `flushAll`. |
|
|
277
|
+
| `useParams()` | Returns dynamic route params for the page currently being rendered. |
|
|
278
|
+
| `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination. |
|
|
220
279
|
|
|
221
280
|
Solid `Link` GET `data` is merged into the rendered `href` query string. Primitive values are serialized with `String(value)`, arrays become repeated keys, `null` and `undefined` are omitted, and nested objects throw. `prefetch` and `reloadDocument` are GET-only and throw for mutation links.
|
|
222
281
|
|
|
@@ -16,10 +16,10 @@ export default defineConfig({
|
|
|
16
16
|
});
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
| Option | Type | Description
|
|
20
|
-
| ------------------ | ------------------------- |
|
|
21
|
-
| `persistTo` | `string` | Directory path for persisting local dev state (D1, KV, R2). Defaults to `.void/` in the project root.
|
|
22
|
-
| `auxiliaryWorkers` | `AuxiliaryWorkerConfig[]` | Additional
|
|
19
|
+
| Option | Type | Description |
|
|
20
|
+
| ------------------ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `persistTo` | `string` | Directory path for persisting local dev state (D1, KV, R2). Defaults to `.void/` in the project root. |
|
|
22
|
+
| `auxiliaryWorkers` | `AuxiliaryWorkerConfig[]` | Additional Workers to run alongside your app, such as a separate API Worker and dashboard that share bindings. Each entry accepts `configPath` (JSON, JSONC, or TOML), `config` (settings or a callback), `viteEnvironment`, and `devOnly`. |
|
|
23
23
|
|
|
24
24
|
## Project configuration {#project-configuration}
|
|
25
25
|
|
|
@@ -128,6 +128,9 @@ import { logger } from 'void/log';
|
|
|
128
128
|
|
|
129
129
|
logger.info('checkout completed', { orderId, userId });
|
|
130
130
|
logger.error('webhook failed', { provider: 'stripe', attempt: 3 });
|
|
131
|
+
|
|
132
|
+
const log = logger.child({ component: 'queue', queue: 'tasks' });
|
|
133
|
+
log.info('task.started', { taskId });
|
|
131
134
|
```
|
|
132
135
|
|
|
133
|
-
**Methods:** `logger.error(message, fields?)`, `logger.warn(message, fields?)`, `logger.info(message, fields?)`.
|
|
136
|
+
**Methods:** `logger.error(message, fields?)`, `logger.warn(message, fields?)`, `logger.info(message, fields?)`, `logger.child(fields)`.
|
|
@@ -10,7 +10,27 @@ URL rewrites re-dispatch a request at a different internal path without changing
|
|
|
10
10
|
|
|
11
11
|
Re-dispatches the current request at `destination` and returns the resulting `Response`. The browser URL does not change — this is a server-side hop. If `destination` has no query string, the original request query is preserved. If `destination` includes a query string, it replaces the original query. `destination` must start with `/`; known generated routes autocomplete via [`RewriteDestination`](#rewritedestination), while arbitrary strings remain accepted for dynamic paths.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Pass a [`RouteDestination`](./types.md#route-types) object to check the route pattern and its parameters:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
return c.rewrite({
|
|
17
|
+
pathname: '/users/:id',
|
|
18
|
+
params: { id: 42 },
|
|
19
|
+
query: { tab: 'activity' },
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
With [`routing.typedRoutes`](../config.md#routing-typedroutes), a string destination must be a [`RouteUrl`](./types.md#route-types): a URL that matches one of your routes. Cast a path built at runtime, such as ``c.rewrite(`/${locale}${path}` as RouteUrl)``.
|
|
24
|
+
|
|
25
|
+
For a typed redirect, build the URL with [`routeUrl()`](./types.md#routeurl-path-options):
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { routeUrl } from 'void/routes';
|
|
29
|
+
|
|
30
|
+
return c.redirect(routeUrl('/users/:id', { params: { id: 42 } }));
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`c.redirect()` merges request query parameters into internal destinations, with destination values taking precedence. Redirecting a [named action](../../guide/pages-routing/actions-and-forms.md#named-actions) to a GET page drops the action key: `POST /users/42?delete&tab=profile` redirects to `/users/42?tab=profile`. Redirects that preserve the request method keep the action key: `307` and `308`, or `301` and `302` after a `PUT`, `PATCH`, or `DELETE`.
|
|
14
34
|
|
|
15
35
|
```ts
|
|
16
36
|
import { defineHandler } from 'void';
|
|
@@ -25,7 +45,8 @@ export const GET = defineHandler((c) => {
|
|
|
25
45
|
|
|
26
46
|
```ts
|
|
27
47
|
interface CloudContext {
|
|
28
|
-
|
|
48
|
+
// RouteUrl instead of RewriteDestination with routing.typedRoutes
|
|
49
|
+
rewrite(destination: RewriteDestination | RouteDestination): Promise<Response>;
|
|
29
50
|
}
|
|
30
51
|
```
|
|
31
52
|
|
|
@@ -70,7 +91,7 @@ import type { RewriteDestination } from 'void/routes';
|
|
|
70
91
|
|
|
71
92
|
Suggests known route patterns in your editor while also accepting dynamic strings. Used as:
|
|
72
93
|
|
|
73
|
-
- The parameter type of [`c.rewrite()`](#c-rewrite-destination).
|
|
94
|
+
- The parameter type of [`c.rewrite()`](#c-rewrite-destination), unless `routing.typedRoutes` is on.
|
|
74
95
|
- The type of `destination` entries in `routing.rewrites` and `routing.fallbacks` in [`void.config.ts`](../config.md#routing).
|
|
75
96
|
|
|
76
97
|
Like [`RouteMap`](./types.md#routemap), `RewriteDestination` lives in the virtual `void/routes` module and is refreshed whenever routes change.
|
|
@@ -91,3 +91,48 @@ Generated route types used by the typed `fetch` client. Contains each route’s
|
|
|
91
91
|
```ts
|
|
92
92
|
import type { RouteMap } from 'void/routes';
|
|
93
93
|
```
|
|
94
|
+
|
|
95
|
+
## `void/routes` {#void-routes}
|
|
96
|
+
|
|
97
|
+
### `routeUrl(path, options?)` {#routeurl-path-options}
|
|
98
|
+
|
|
99
|
+
Build a relative URL string from a known page, HTTP, or WebSocket route pattern:
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
import { routeUrl } from 'void/routes';
|
|
103
|
+
|
|
104
|
+
routeUrl('/users/:id', {
|
|
105
|
+
params: { id: 42 },
|
|
106
|
+
query: { tab: 'activity' },
|
|
107
|
+
hash: 'details',
|
|
108
|
+
});
|
|
109
|
+
// /users/42?tab=activity#details
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
| Option | Type | Description |
|
|
113
|
+
| -------- | -------------- | ---------------------------------------------------------------------------------- |
|
|
114
|
+
| `params` | Route-specific | Required for dynamic routes. Each parameter accepts a `string` or `number`. |
|
|
115
|
+
| `query` | `RouteQuery` | Query parameters. Arrays become repeated keys; `null` and `undefined` are omitted. |
|
|
116
|
+
| `hash` | `string` | URL fragment, such as `'details'` or `'#details'`. |
|
|
117
|
+
|
|
118
|
+
Static routes accept optional `query` and `hash` options. Pass raw parameter values for URL encoding. Catch-all parameters preserve `/` separators between segments. Invalid or missing path parameters throw a `TypeError`.
|
|
119
|
+
|
|
120
|
+
Use the returned [`RouteUrl`](#route-types) with `Link`, `<a>`, and `c.redirect()`. See [Typed URLs and Navigation](../../guide/type-safety.md#typed-urls-and-navigation) for setup and examples.
|
|
121
|
+
|
|
122
|
+
### Route types {#route-types}
|
|
123
|
+
|
|
124
|
+
Import these types from `void/routes`:
|
|
125
|
+
|
|
126
|
+
| Type | Description |
|
|
127
|
+
| --------------------- | ------------------------------------------------------------------------------------------------- |
|
|
128
|
+
| `RoutePathMap` | Generated map of page, HTTP, and WebSocket route patterns to their parameter names. |
|
|
129
|
+
| `RoutePath` | Union of the known route patterns in `RoutePathMap`. |
|
|
130
|
+
| `RouteOptions<P>` | Options for a route pattern `P`, including its required `params`, optional `query`, and `hash`. |
|
|
131
|
+
| `RouteDestination<P>` | `{ pathname: P }` with `RouteOptions<P>`. Defaults to all known routes when `P` is omitted. |
|
|
132
|
+
| `RouteUrl` | The URL of one of your routes, returned by `routeUrl()`. `string` unless `typedRoutes` is on. |
|
|
133
|
+
| `Href` | A `RouteUrl`, a same-page query or hash, or an external URL. `string` unless `typedRoutes` is on. |
|
|
134
|
+
| `RouteUrlInput` | `Href`, `URL`, or `RouteDestination`; accepted by router navigation methods. |
|
|
135
|
+
| `RouteQuery` | Query keys mapped to `RouteQueryValue` or readonly arrays of those values. |
|
|
136
|
+
| `RouteQueryValue` | `string`, `number`, `boolean`, `null`, or `undefined`. |
|
|
137
|
+
|
|
138
|
+
`typedRoutes` is [`routing.typedRoutes`](../config.md#routing-typedroutes). See [Checked URL strings](../../guide/type-safety.md#checked-url-strings).
|
package/docs/reference/api.md
CHANGED
|
@@ -26,7 +26,7 @@ Use this reference to find public imports, signatures, and return types. For set
|
|
|
26
26
|
| [Database and seeding](./api/database.md) | Queries, operators, and seed scripts. |
|
|
27
27
|
| [KV, storage, AI, and logging](./api/resources.md) | Resource clients, cache revalidation, and logs. |
|
|
28
28
|
| [Deployment artifacts](./api/deploy.md) | Package built apps for managed deployment. |
|
|
29
|
-
| [Types](./api/types.md) |
|
|
29
|
+
| [Types](./api/types.md) | Typed URLs, route types, handler context, and head metadata. |
|
|
30
30
|
| [Environment variables](./api/env.md) | Validated environment values and binding types. |
|
|
31
31
|
| [Pages adapters](./api/pages.md) | React, Vue, Svelte, Solid, and Markdown. |
|
|
32
32
|
|
|
@@ -64,7 +64,7 @@ Import Void's app-facing APIs from these paths:
|
|
|
64
64
|
| `void/limits` | `UsageLimit`, `UsageLimitData`, and `readUsageLimit`. AI and Sandbox limits reject with `UsageLimit`; uncaught limits in Void routes and Pages actions return structured HTTP 429 responses. |
|
|
65
65
|
| `void/isr` | `revalidate(options)` for on-demand ISR cache invalidation |
|
|
66
66
|
| `void/log` | `logger` structured logging helper |
|
|
67
|
-
| `void/routes` | `
|
|
67
|
+
| `void/routes` | [`routeUrl()`](./api/types.md#routeurl-path-options), `RouteDestination`, `RoutePath`, `RouteOptions`, `RouteUrl`, `Href`, `RouteUrlInput`, and generated route maps |
|
|
68
68
|
| `void/queues` | `queues` proxy for sending messages to typed queues |
|
|
69
69
|
| `void/email` | `sendEmail`, `createEmail`, `defineEmail`, `parseEmail`, `replyEmail`, `MimeError`, `ParseEmailError`, and address, attachment, result, and handler types. See [Email](../guide/email.md). |
|
|
70
70
|
| `void/email/testing` | `createEmailTestHarness` and `createInboundTestHarness` to capture sends and deliver test messages to `email/` handlers. |
|