void 1.6.1 → 1.7.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.
Files changed (276) hide show
  1. package/dist/{account-cmd-DRhmCWcm.mjs → account-cmd-BfkJ_1PC.mjs} +6 -6
  2. package/dist/{application-analysis-HRFsZOv3.mjs → application-analysis-OV0CBJ80.mjs} +8 -19
  3. package/dist/{application-routing-P4TggvWp.mjs → application-routing-QpyC5G8z.mjs} +2 -1
  4. package/dist/{auth-CL-p_rqV.mjs → auth-BN0NU9dz.mjs} +1 -1
  5. package/dist/{auth-Dy8svcqQ.mjs → auth-CCk9Seol.mjs} +2 -2
  6. package/dist/{auth-CH4PLAX1.d.mts → auth-CZrthGxs.d.mts} +8 -1
  7. package/dist/{auth-YVjBX5NY.mjs → auth-DyWp-fSo.mjs} +7 -1
  8. package/dist/{auth-link-CVXP1G6G.mjs → auth-link-CW1Zh6FM.mjs} +6 -6
  9. package/dist/{auth-router-D1pGdbvB.mjs → auth-router-CNBKnEZi.mjs} +3 -3
  10. package/dist/{better-auth-shared-BJyG2mH0.d.mts → better-auth-shared-C-0uZg8-.d.mts} +1 -1
  11. package/dist/{better-auth-shared-C958aM7W.mjs → better-auth-shared-CdVyCUou.mjs} +1 -1
  12. package/dist/{build-cmd-DmjbuT6d.mjs → build-cmd-C9qOKW9W.mjs} +5 -5
  13. package/dist/{cache-2khBO1MR.mjs → cache-DVBBbWQL.mjs} +5 -5
  14. package/dist/{cancel-deploy-_itbbvY3.mjs → cancel-deploy-COavnjud.mjs} +4 -4
  15. package/dist/{cf-build-output-B1C8U83u.mjs → cf-build-output-CWNOH-KA.mjs} +2 -1
  16. package/dist/cf-build-output-DUZnAeZ1.mjs +1 -0
  17. package/dist/{cf-config-migrate-Dy8MrKgF.mjs → cf-config-migrate-Bb-EdAQq.mjs} +5 -1
  18. package/dist/cli/cli.mjs +68 -1868
  19. package/dist/cli/cloudflare-operation-process.mjs +10 -8
  20. package/dist/cli/env-schema-probe.mjs +3 -3
  21. package/dist/cli-main-DFteHrJI.mjs +1889 -0
  22. package/dist/client-BAxLpSKv.mjs +1 -0
  23. package/dist/{client-CoxPEhJq.mjs → client-BEZmTP6p.mjs} +10 -4
  24. package/dist/{cloudflare-auth-CEu-1Ps_.mjs → cloudflare-auth-DGIivpTb.mjs} +1 -1
  25. package/dist/{cloudflare-cmd-fZ6AMSWk.mjs → cloudflare-cmd-DJaxC-bc.mjs} +5 -5
  26. package/dist/{cloudflare-config-eQunqX6A.mjs → cloudflare-config-DtOGAbeB.mjs} +3 -3
  27. package/dist/{cloudflare-connect-9OZe4XVQ.mjs → cloudflare-connect-BjpWmglw.mjs} +3 -3
  28. package/dist/{cloudflare-operations-oLvAd9Nd.mjs → cloudflare-operations-CZkjFrzH.mjs} +1 -1
  29. package/dist/{cloudflare-operations-CrskD4_O.mjs → cloudflare-operations-k7wYUv56.mjs} +6 -6
  30. package/dist/{cloudflare-process-DjJ638A-.mjs → cloudflare-process-BcPvlMFd.mjs} +3 -3
  31. package/dist/{config-BITKQ3O6.mjs → config-5oSQhZNj.mjs} +7 -5
  32. package/dist/{config-CPxJmt4M.d.mts → config-CTlUaXWZ.d.mts} +3 -1
  33. package/dist/{config-BBlVXZCU.mjs → config-DcqUBGCb.mjs} +3 -3
  34. package/dist/{config-WlvEcL82.mjs → config-eeDzKBS9.mjs} +2 -2
  35. package/dist/config-entry.d.mts +1 -1
  36. package/dist/{config-BgysUhnm.mjs → config-wo2EaH0X.mjs} +1 -1
  37. package/dist/{connect-CKvmkl2R.mjs → connect-j1F1C_rW.mjs} +7 -7
  38. package/dist/{create-project-Bq0M8MtO.mjs → create-project-CE3jOmd5.mjs} +5 -5
  39. package/dist/{create-project-BiMmR5wA.mjs → create-project-DZH3aYGQ.mjs} +1 -1
  40. package/dist/{db-DjtGAcOz.mjs → db-DyLzzxvM.mjs} +39 -39
  41. package/dist/{db-types-C_8amnB0.mjs → db-types-DdHHUVPy.mjs} +1 -1
  42. package/dist/{delete-CY4L8fi2.mjs → delete-Dey6YoMA.mjs} +5 -5
  43. package/dist/{deploy-D_gEojD2.mjs → deploy-Ccw2D2lw.mjs} +507 -122
  44. package/dist/deploy-DEZkUS77.mjs +2 -0
  45. package/dist/{deploy-managed-static-BHVbB_-A.mjs → deploy-managed-static-BBVtpuGv.mjs} +18 -18
  46. package/dist/{deploy-transport-DEyOUfac.mjs → deploy-transport-Dt0IvSVW.mjs} +2 -2
  47. package/dist/deploy.mjs +8 -8
  48. package/dist/discover-1DJD4YXD.mjs +1 -0
  49. package/dist/{discover-Dhkzxgdt.mjs → discover-CVFCWU7W.mjs} +1 -1
  50. package/dist/{dispatch-BNLB5_Gm.mjs → dispatch-pYaww76u.mjs} +6 -6
  51. package/dist/{dist-D23AAMxT.mjs → dist-BQdgCVQF.mjs} +1 -1
  52. package/dist/{dist-eV_Ep60B.mjs → dist-DeTdhbZc.mjs} +1 -1
  53. package/dist/{domain-BlH90Ods.mjs → domain-Dh3mG8Vs.mjs} +6 -6
  54. package/dist/{email-Bkq8ZL1p.mjs → email-DKyMjOYM.mjs} +11 -11
  55. package/dist/{email-cloudflare-MvJIxrwx.mjs → email-cloudflare-CTt2n_W2.mjs} +13 -9
  56. package/dist/{entry-CBZsCy3O.mjs → entry-Bw-G1VVx.mjs} +2 -2
  57. package/dist/{env-AvuCSeCH.mjs → env-DkZzh_Dd.mjs} +7 -7
  58. package/dist/env-mask-D31Qztl9.mjs +46 -0
  59. package/dist/{env-types-DqzVBKnS.mjs → env-types-Dz9qkiOn.mjs} +1 -1
  60. package/dist/{env-validation-GV1oD4EV.mjs → env-validation-1snjKtDX.mjs} +4 -4
  61. package/dist/{env-validation-C8Cmvas0.mjs → env-validation-C8NL3lEH.mjs} +1 -1
  62. package/dist/{fetch-C8yhLoF3.mjs → fetch-CAIVkLvW.mjs} +1 -1
  63. package/dist/{fetch-B-gLGYVl.d.mts → fetch-CbI6lNnk.d.mts} +6 -4
  64. package/dist/{fetch-stream-DafNtVJC.mjs → fetch-stream-6Op0qlLd.mjs} +1 -1
  65. package/dist/{fetch-stream-DuwxWmBM.d.mts → fetch-stream-DoED9atq.d.mts} +1 -1
  66. package/dist/{gen-B9bCV5qu.mjs → gen-BZmFOGDQ.mjs} +7 -7
  67. package/dist/gen-C6iknRdI.mjs +1 -0
  68. package/dist/{github-cmd-CA-lBdkn.mjs → github-cmd-7Oky9qgH.mjs} +6 -6
  69. package/dist/{handler-CKeTtYID.mjs → handler-C9SnmeW1.mjs} +6 -5
  70. package/dist/{handler-BR6Tvjkp.d.mts → handler-DjqciiDc.d.mts} +20 -7
  71. package/dist/{headers-CuTEdP9C.mjs → headers-CimYIfQI.mjs} +1 -1
  72. package/dist/{help-1OCFDsRr.mjs → help-CNuUb47C.mjs} +7 -3
  73. package/dist/help-C_cqTByy.mjs +1 -0
  74. package/dist/index.d.mts +4 -4
  75. package/dist/index.mjs +155 -110
  76. package/dist/{info-CJxua_db.mjs → info-DwB8IWIx.mjs} +4 -4
  77. package/dist/{init-B-4CluYx.mjs → init-CUGSmcED.mjs} +34 -32
  78. package/dist/{link-DAXOT-G_.mjs → link-BlRTGHan.mjs} +6 -6
  79. package/dist/{list-BYSOo9fm.mjs → list-iCg7d5Pa.mjs} +7 -7
  80. package/dist/{live-DF4HUl2m.mjs → live-CYJ4KGoR.mjs} +2 -2
  81. package/dist/{live-0xrcVpyq.d.mts → live-zKGbRT4h.d.mts} +2 -2
  82. package/dist/{local-d1-BLgsNUj9.mjs → local-d1-CFcH9Bx3.mjs} +2 -2
  83. package/dist/login-C4q1S-5b.mjs +1 -0
  84. package/dist/{login-CJopTWX4.mjs → login-TA51e5Fw.mjs} +5 -5
  85. package/dist/{logs-DE0weBsR.mjs → logs-BlyAxlvx.mjs} +6 -6
  86. package/dist/{migrate-ChHHZBTi.mjs → migrate-BH6LCr00.mjs} +6 -6
  87. package/dist/migrate-CVBsSFhC.mjs +1 -0
  88. package/dist/nitro.d.mts +5 -0
  89. package/dist/nitro.mjs +27 -8
  90. package/dist/{node-CZ6lGNLn.mjs → node-B0otYjDv.mjs} +4 -4
  91. package/dist/{operator-args-D79WQP70.mjs → operator-args-DuKAQ3Ks.mjs} +1 -1
  92. package/dist/{operator-auth-CfDcmzpo.mjs → operator-auth-CD3pap65.mjs} +1 -1
  93. package/dist/{operator-client-BIY4-N_6.mjs → operator-client-XvXTkea6.mjs} +2 -2
  94. package/dist/{operator-cmd-BUqsdk2K.mjs → operator-cmd-CoHlJjcT.mjs} +7 -7
  95. package/dist/operator-cmd-DnaCnCSP.mjs +1 -0
  96. package/dist/output-CNsMDEd2.mjs +1 -0
  97. package/dist/{output-BCdLioKP.mjs → output-CXJTIAtF.mjs} +1 -1
  98. package/dist/pages/client.d.mts +18 -13
  99. package/dist/pages/client.mjs +40 -69
  100. package/dist/pages/index.d.mts +4 -3
  101. package/dist/pages/index.mjs +11 -7
  102. package/dist/pages/islands-plugin.mjs +1 -1
  103. package/dist/pages/protocol.d.mts +2 -2
  104. package/dist/pages/protocol.mjs +1 -1
  105. package/dist/pages/serialize.d.mts +2 -2
  106. package/dist/pages/serialize.mjs +1 -1
  107. package/dist/platform-args-B7-wQ0_B.mjs +1 -0
  108. package/dist/{platform-args-Cx1M-7bq.mjs → platform-args-DfT8yQBF.mjs} +1 -1
  109. package/dist/{platform-auth-config-K4m_LE8b.mjs → platform-auth-config-MO0VdVs9.mjs} +10 -10
  110. package/dist/{platform-auth-protection-KF5Vo-1I.mjs → platform-auth-protection-Dv208eyL.mjs} +8 -8
  111. package/dist/{platform-auth-recovery-BOdFrl7R.mjs → platform-auth-recovery-DvAQ674F.mjs} +7 -7
  112. package/dist/{platform-cmd-DpCHawGF.mjs → platform-cmd-BpUA19r_.mjs} +1 -1
  113. package/dist/{platform-cmd-Ds3EAV5t.mjs → platform-cmd-dlSxrcQ7.mjs} +9 -9
  114. package/dist/{platform-domain-rWJshybd.mjs → platform-domain-DSO4eUEw.mjs} +5 -5
  115. package/dist/{platform-lifecycle-D9RdGub1.mjs → platform-lifecycle-BSvsyB_x.mjs} +17 -17
  116. package/dist/{platform-lifecycle-BH34I0rh.mjs → platform-lifecycle-CfcFygHb.mjs} +1 -1
  117. package/dist/{platform-management-BfLW0Zlo.mjs → platform-management-BMdyt667.mjs} +1 -1
  118. package/dist/{platform-management-BRefdHGD.mjs → platform-management-CrP1XhVd.mjs} +4 -4
  119. package/dist/{platform-plans-config-Dx1agneU.mjs → platform-plans-config-CgDiwflR.mjs} +5 -5
  120. package/dist/{platform-recovery-DZuZGJtt.mjs → platform-recovery-CHWwXVZ6.mjs} +3 -3
  121. package/dist/{platform-setup-Vw1AaUN8.mjs → platform-setup-BTQVbnTC.mjs} +3 -3
  122. package/dist/{plugin-inference-CdLbxZL_.mjs → plugin-inference-g66Q1Mx9.mjs} +5 -8
  123. package/dist/prepare-Bx4a8cb1.mjs +1 -0
  124. package/dist/{prepare-BuNbuFlA.mjs → prepare-DJYHjpzq.mjs} +3 -3
  125. package/dist/{prepare-BerOZiD4.mjs → prepare-DXduEwQp.mjs} +12 -9
  126. package/dist/{prerender-render-RlAj6hh8.mjs → prerender-render-BN9Lmebs.mjs} +29 -13
  127. package/dist/prerender-render.d.mts +10 -2
  128. package/dist/prerender-render.mjs +1 -1
  129. package/dist/{project-cmd-B_bUyZ3J.mjs → project-cmd-Dfb1Sg8w.mjs} +18 -18
  130. package/dist/{project-paths-CdGv9Tmi.mjs → project-paths-G0yut6Zz.mjs} +12 -8
  131. package/dist/{project-team-MjT5K4rQ.mjs → project-team-BO2dyc7S.mjs} +5 -5
  132. package/dist/{project-token-BKHGwY3k.mjs → project-token-ByO2mEI2.mjs} +5 -5
  133. package/dist/{project-tsconfig-Cf2NFjlM.mjs → project-tsconfig-nhnTWO_Y.mjs} +4 -2
  134. package/dist/{project-zero-trust-Bzdd05-h.mjs → project-zero-trust-CoQfwRBR.mjs} +5 -5
  135. package/dist/{protocol-CkwjASep.d.mts → protocol-xZMvWsrg.d.mts} +5 -3
  136. package/dist/{protocol-COyySMki.mjs → protocol-yxdHxFLN.mjs} +47 -11
  137. package/dist/{provision-DQF6Kw-6.mjs → provision-CMH4-8ri.mjs} +1 -1
  138. package/dist/{provision-BbCzpbXs.mjs → provision-D5q-ptD3.mjs} +2 -2
  139. package/dist/{requests-daJmVpjk.mjs → requests-CPOiDkjh.mjs} +4 -4
  140. package/dist/resolve-project-BALVa9q0.mjs +1 -0
  141. package/dist/{resolve-project-D0YNnJfm.mjs → resolve-project-ClvLMTI9.mjs} +1 -1
  142. package/dist/{rollback-BgL0wY1J.mjs → rollback-BfCs2la4.mjs} +7 -7
  143. package/dist/{route-types-CZc1YXjF.mjs → route-types-Cl3x0Q8B.mjs} +265 -12
  144. package/dist/{route-url-C_YIH_zO.d.mts → route-url-C3JwYrER.d.mts} +8 -3
  145. package/dist/{route-url-CRDF-I0I.mjs → route-url-CfCR4oMj.mjs} +4 -3
  146. package/dist/routes-stub.d.mts +10 -1
  147. package/dist/routes-stub.mjs +1 -1
  148. package/dist/{runner-QMeOpScZ.mjs → runner-CTk21HrO.mjs} +1 -1
  149. package/dist/{runner-mysql-0zVmB1JW.mjs → runner-mysql-CHvEg_sy.mjs} +1 -1
  150. package/dist/runtime/ai.mjs +1 -1
  151. package/dist/runtime/auth.d.mts +2 -2
  152. package/dist/runtime/auth.mjs +1 -1
  153. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  154. package/dist/runtime/better-auth-mysql.mjs +1 -1
  155. package/dist/runtime/better-auth-pg.d.mts +1 -1
  156. package/dist/runtime/better-auth-pg.mjs +1 -1
  157. package/dist/runtime/better-auth.d.mts +1 -1
  158. package/dist/runtime/better-auth.mjs +1 -1
  159. package/dist/runtime/client-react.d.mts +3 -3
  160. package/dist/runtime/client-react.mjs +2 -2
  161. package/dist/runtime/client-solid.d.mts +3 -3
  162. package/dist/runtime/client-solid.mjs +2 -2
  163. package/dist/runtime/client-svelte.d.mts +3 -3
  164. package/dist/runtime/client-svelte.mjs +2 -2
  165. package/dist/runtime/client-vue.d.mts +3 -3
  166. package/dist/runtime/client-vue.mjs +2 -2
  167. package/dist/runtime/client.d.mts +3 -3
  168. package/dist/runtime/client.mjs +2 -2
  169. package/dist/runtime/email/testing.mjs +2 -2
  170. package/dist/runtime/email.mjs +3 -3
  171. package/dist/runtime/env-public.mjs +2 -46
  172. package/dist/runtime/fetch-server.d.mts +1 -1
  173. package/dist/runtime/fetch-server.mjs +1 -1
  174. package/dist/runtime/fetch-stream.d.mts +2 -2
  175. package/dist/runtime/fetch-stream.mjs +1 -1
  176. package/dist/runtime/fetch.d.mts +1 -1
  177. package/dist/runtime/fetch.mjs +1 -1
  178. package/dist/runtime/handler.d.mts +1 -1
  179. package/dist/runtime/handler.mjs +1 -1
  180. package/dist/runtime/isr.d.mts +3 -1
  181. package/dist/runtime/live-client.d.mts +11 -2
  182. package/dist/runtime/live-client.mjs +8 -0
  183. package/dist/runtime/live-server.mjs +1 -1
  184. package/dist/runtime/live.d.mts +1 -1
  185. package/dist/runtime/live.mjs +1 -1
  186. package/dist/runtime/log.mjs +1 -1
  187. package/dist/runtime/remote/index.mjs +1 -1
  188. package/dist/runtime/route-url.d.mts +2 -2
  189. package/dist/runtime/route-url.mjs +1 -1
  190. package/dist/runtime/routing.d.mts +15 -4
  191. package/dist/runtime/routing.mjs +94 -12
  192. package/dist/runtime/sandbox.mjs +1 -1
  193. package/dist/runtime/sse-client.d.mts +9 -1
  194. package/dist/runtime/sse-client.mjs +7 -0
  195. package/dist/runtime/validator.d.mts +1 -1
  196. package/dist/runtime/validator.mjs +1 -1
  197. package/dist/runtime/ws-server.d.mts +3 -3
  198. package/dist/runtime/ws-server.mjs +1 -1
  199. package/dist/runtime/ws.d.mts +1 -1
  200. package/dist/runtime/ws.mjs +1 -1
  201. package/dist/{scan-X2rDDRNa.mjs → scan-L8OSv1f7.mjs} +68 -19
  202. package/dist/{secret-CPq-B_vp.mjs → secret-CuI6LTpD.mjs} +7 -7
  203. package/dist/serialize-DN-envGQ.d.mts +18 -0
  204. package/dist/serialize-Pf-CIQK_.mjs +39 -0
  205. package/dist/{skills-D393E4lB.mjs → skills-BBO9wMjB.mjs} +1 -1
  206. package/dist/{subcommand-prompt-CxJXporl.mjs → subcommand-prompt-BZMnCA8T.mjs} +2 -2
  207. package/dist/url-CuoEn0o3.mjs +43 -0
  208. package/dist/validator-8-NZs2Xr.mjs +168 -0
  209. package/dist/{version-metadata-C8hLzQkv.mjs → version-metadata-eUd6Ar_U.mjs} +1 -1
  210. package/dist/wrangler-R3kMdJfw.mjs +1 -0
  211. package/dist/{wrangler-DESSbN8L.mjs → wrangler-k40T7XTQ.mjs} +3 -3
  212. package/dist/{wrapper-C9SUxoj7.mjs → wrapper-BGsi_uHs.mjs} +12 -9
  213. package/dist/{ws-Dmjg5NH2.d.mts → ws-DB8Feytg.d.mts} +2 -2
  214. package/docs/guide/ai.md +2 -0
  215. package/docs/guide/auth.md +62 -0
  216. package/docs/guide/database.md +33 -0
  217. package/docs/guide/deployment.md +8 -0
  218. package/docs/guide/edge/headers.md +3 -1
  219. package/docs/guide/edge/prerendering.md +9 -4
  220. package/docs/guide/edge/redirects.md +1 -0
  221. package/docs/guide/edge/revalidation.md +3 -0
  222. package/docs/guide/edge/static-assets.md +1 -1
  223. package/docs/guide/live.md +2 -0
  224. package/docs/guide/pages-routing/actions-and-forms.md +29 -10
  225. package/docs/guide/pages-routing/head.md +3 -1
  226. package/docs/guide/pages-routing/islands.md +1 -1
  227. package/docs/guide/pages-routing/loaders.md +2 -0
  228. package/docs/guide/pages-routing/markdown.md +2 -2
  229. package/docs/guide/pages-routing/overview.md +139 -10
  230. package/docs/guide/quickstart.md +1 -0
  231. package/docs/guide/server-routing.md +14 -0
  232. package/docs/guide/sse.md +2 -0
  233. package/docs/guide/ssg.md +23 -2
  234. package/docs/guide/storage.md +6 -2
  235. package/docs/guide/type-safety.md +307 -26
  236. package/docs/guide/typed-fetch.md +7 -3
  237. package/docs/guide/websockets.md +5 -5
  238. package/docs/integrations/cloudflare.md +10 -10
  239. package/docs/integrations/frameworks/nuxt.md +2 -0
  240. package/docs/integrations/frameworks/overview.md +2 -0
  241. package/docs/integrations/nodejs-bun-deno.md +65 -0
  242. package/docs/reference/api/auth.md +19 -0
  243. package/docs/reference/api/client.md +6 -4
  244. package/docs/reference/api/handlers.md +3 -1
  245. package/docs/reference/api/pages.md +16 -8
  246. package/docs/reference/api/resources.md +3 -1
  247. package/docs/reference/api/rewrites.md +19 -5
  248. package/docs/reference/api/types.md +9 -2
  249. package/docs/reference/cli/database.md +2 -0
  250. package/docs/reference/cli/deploy.md +17 -11
  251. package/docs/reference/cli.md +3 -0
  252. package/docs/reference/config.md +24 -2
  253. package/package.json +25 -23
  254. package/schema.json +4 -0
  255. package/skills/void/SKILL.md +5 -0
  256. package/dist/cf-build-output-CmDOcA7K.mjs +0 -1
  257. package/dist/client-CEtr5UOR.mjs +0 -1
  258. package/dist/deploy-B029oHlE.mjs +0 -2
  259. package/dist/discover-D4mQthao.mjs +0 -1
  260. package/dist/gen-cCxrFp9L.mjs +0 -1
  261. package/dist/help-Ba8Dq5-r.mjs +0 -1
  262. package/dist/login-BpbYeu-n.mjs +0 -1
  263. package/dist/migrate-HdA6Kh2p.mjs +0 -1
  264. package/dist/operator-cmd-wBYyp8iQ.mjs +0 -1
  265. package/dist/output-E6gecbbV.mjs +0 -1
  266. package/dist/platform-args-C7XUw9mw.mjs +0 -1
  267. package/dist/prepare-Cz18kLkF.mjs +0 -1
  268. package/dist/resolve-project-CgfjtOwz.mjs +0 -1
  269. package/dist/serialize-DUuYuaY3.mjs +0 -29
  270. package/dist/serialize-I4EmS-Wf.d.mts +0 -16
  271. package/dist/validator-CTfmzZYb.mjs +0 -69
  272. package/dist/wrangler-DUB3MGHV.mjs +0 -1
  273. package/dist/{cf-access-BmBT2h8_.mjs → cf-access-Dnyw8KFY.mjs} +1 -1
  274. package/dist/{inbound-CdO-qY0w.mjs → inbound-C2H6Dzz1.mjs} +2 -2
  275. package/dist/{runner-5MCSimKx.mjs → runner-CMZb7jNU.mjs} +1 -1
  276. package/dist/{runner-mysql-Bdmsp_x4.mjs → runner-mysql-BXfcQQj3.mjs} +1 -1
@@ -57,6 +57,25 @@ const state = getSession();
57
57
  function getSession(): AuthState | null;
58
58
  ```
59
59
 
60
+ ## `getAuth(c)` {#getauth-c}
61
+
62
+ Returns the Better Auth instance for the current request, including plugin APIs inferred from `auth.ts`. Use it with Better Auth plugin helpers or to forward requests to `auth.handler`.
63
+
64
+ ```ts
65
+ import { defineHandler } from 'void';
66
+ import { getAuth } from 'void/auth';
67
+
68
+ export const GET = defineHandler((c) => getAuth(c).handler(c.req.raw));
69
+ ```
70
+
71
+ Requires [authentication](../../guide/auth.md) to be enabled. Throws if no instance is available on the request. It is available to anonymous requests too; use `requireAuth(c)` when a route requires a signed-in user.
72
+
73
+ **Signature:**
74
+
75
+ ```ts
76
+ function getAuth(c: CloudContext): AuthInstance;
77
+ ```
78
+
60
79
  ## `requireAuth(c)` {#requireauth-c}
61
80
 
62
81
  Extracts the authenticated user from the request context. Throws a 401 `HTTPException` if no session is present.
@@ -15,7 +15,7 @@ import { fetch } from 'void/client';
15
15
 
16
16
  // Types are fully inferred from your route handlers
17
17
  const users = await fetch('/api/users');
18
- const user = await fetch('/api/users/:id', {
18
+ const user = await fetch('/api/users/[id]', {
19
19
  params: { id: '1' },
20
20
  });
21
21
  ```
@@ -36,13 +36,15 @@ function fetch<P extends keyof RouteMap, M extends MethodsOf<P>>(
36
36
  | `method` | `string` | HTTP method. Defaults to `"GET"`. |
37
37
  | `body` | `unknown` | Request body (auto-serialized as JSON). |
38
38
  | `query` | `Record<string, string>` | Query string parameters. |
39
- | `params` | `Record<string, string>` | URL path parameters (`:id` segments). |
39
+ | `params` | `Record<string, string>` | URL path parameters (`[id]` segments). |
40
40
  | `headers` | `HeadersInit` | Additional request headers. |
41
41
  | `signal` | `AbortSignal` | Abort signal. |
42
42
  | `baseURL` | `string` | Base URL prepended to the path. Useful for external calls. |
43
43
  | `retry` | `number` | Number of retry attempts (ofetch default: 1 for GET). |
44
44
  | `timeout` | `number` | Request timeout in milliseconds. |
45
45
 
46
+ Omitting `method` sends GET. Non-GET calls require an explicit `method`, including calls that specify the method as a generic type argument.
47
+
46
48
  Returns the parsed JSON response body, or `undefined` for 204 responses. Throws `FetchError` on non-2xx responses.
47
49
 
48
50
  ## `FetchError` {#fetcherror}
@@ -53,7 +55,7 @@ Error class thrown by `fetch` on non-2xx responses.
53
55
  import { fetch, FetchError } from 'void/client';
54
56
 
55
57
  try {
56
- await fetch('/api/users/:id', { params: { id: '999' } });
58
+ await fetch('/api/users/[id]', { params: { id: '999' } });
57
59
  } catch (e) {
58
60
  if (e instanceof FetchError) {
59
61
  console.log(e.status); // 404
@@ -78,7 +80,7 @@ The typed client is built on [ofetch](https://github.com/unjs/ofetch) with a typ
78
80
  | ---------------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
79
81
  | **Return type** | `Promise<Response>`, so you call `.json()` yourself | `Promise<T>`, which auto-parses JSON and returns the typed result directly (`undefined` for `204`) |
80
82
  | **Error handling** | Resolves on any HTTP status; you check `response.ok` | Throws `FetchError` on non-2xx responses |
81
- | **URL construction** | Raw URL string | Route path with `:param` interpolation from `options.params` + query string from `options.query` |
83
+ | **URL construction** | Raw URL string | Route path with `[param]` interpolation from `options.params` + query string from `options.query` |
82
84
  | **Body serialization** | Manual `JSON.stringify()` + `Content-Type` header | Auto-serializes `options.body` as JSON and sets `Content-Type: application/json` |
83
85
  | **Type safety** | Accepts any URL or method | Constrains paths to `RouteMap` keys and methods to those defined per route. Invalid combinations fail at compile time. |
84
86
  | **Retry** | None | Auto-retries on 408, 429, and 5xx (configurable via `retry` option) |
@@ -228,11 +228,13 @@ Type-safe wrapper for the page `head()` export in `.server.ts` files. Provides [
228
228
  ```ts
229
229
  import { defineHandler, defineHead } from 'void';
230
230
  import type { InferProps } from 'void';
231
+ import type { PageParams } from 'void/routes';
231
232
 
232
233
  export type Props = InferProps<typeof loader>;
233
234
 
234
235
  export const loader = defineHandler(async (c) => {
235
- const post = await getPost(c.req.param('slug'));
236
+ const { slug } = c.req.param() as PageParams<'/posts/[slug]'>;
237
+ const post = await getPost(slug);
236
238
  return { post };
237
239
  });
238
240
 
@@ -86,11 +86,13 @@ Imported from `"@void/vue"`.
86
86
  | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87
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
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. |
89
+ | `useParams()` | Returns dynamic route params for the page currently being rendered. Pass the page's pattern as the type argument, such as `useParams<'/users/[id]'>()`, to type them. |
90
90
  | `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination. |
91
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()`. |
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()`. With [`routing.typedRoutes`](../config.md#routing-typedroutes), the URL is a [`RouteUrl`](./types.md#route-types). |
93
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
+ | `isVoidActionError(error)` | Returns `true` when `error` is a `VoidActionError` at any status, such as a thrown `401`, `403`, or `500`. Narrows `error` to `VoidActionError`. See [handling thrown errors](../../guide/pages-routing/actions-and-forms.md#validation-errors). |
95
+ | `isCallSiteActionError(error)` | Returns `true` only for the expected `VoidActionError` statuses that `action()` returns, such as `409` or `422`. |
94
96
  | `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). |
95
97
 
96
98
  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.
@@ -139,11 +141,13 @@ Imported from `"@void/react"`.
139
141
  | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
140
142
  | `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
143
  | `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. |
144
+ | `useParams()` | Returns dynamic route params for the page currently being rendered. Pass the page's pattern as the type argument, such as `useParams<'/users/[id]'>()`, to type them. |
143
145
  | `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination. |
144
146
  | `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()`. |
147
+ | `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()`. With [`routing.typedRoutes`](../config.md#routing-typedroutes), the URL is a [`RouteUrl`](./types.md#route-types). |
146
148
  | `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`. |
149
+ | `isVoidActionError(error)` | Returns `true` when `error` is a `VoidActionError` at any status, such as a thrown `401`, `403`, or `500`. Narrows `error` to `VoidActionError`. See [handling thrown errors](../../guide/pages-routing/actions-and-forms.md#validation-errors). |
150
+ | `isCallSiteActionError(error)` | Returns `true` only for the expected `VoidActionError` statuses that `action()` returns, such as `409` or `422`. |
147
151
  | `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
152
  | `Deferred<T>` | React-only prop type for `defer()` results. It is `Promise<T>` and is consumed with React `use()`. |
149
153
 
@@ -219,11 +223,13 @@ Imported from `"@void/svelte"`.
219
223
  | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
220
224
  | `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
225
  | `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()`. |
226
+ | `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()`. With [`routing.typedRoutes`](../config.md#routing-typedroutes), the URL is a [`RouteUrl`](./types.md#route-types). |
223
227
  | `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`. |
228
+ | `isVoidActionError(error)` | Returns `true` when `error` is a `VoidActionError` at any status, such as a thrown `401`, `403`, or `500`. Narrows `error` to `VoidActionError`. See [handling thrown errors](../../guide/pages-routing/actions-and-forms.md#validation-errors). |
229
+ | `isCallSiteActionError(error)` | Returns `true` only for the expected `VoidActionError` statuses that `action()` returns, such as `409` or `422`. |
224
230
  | `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
231
  | `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. |
232
+ | `useParams()` | Returns dynamic route params for the page currently being rendered. Pass the page's pattern as the type argument, such as `useParams<'/users/[id]'>()`, to type them. |
227
233
  | `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination. |
228
234
 
229
235
  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.
@@ -270,11 +276,13 @@ Imported from `"@void/solid"`.
270
276
  | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
271
277
  | `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
278
  | `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()`. |
279
+ | `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()`. With [`routing.typedRoutes`](../config.md#routing-typedroutes), the URL is a [`RouteUrl`](./types.md#route-types). |
274
280
  | `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`. |
281
+ | `isVoidActionError(error)` | Returns `true` when `error` is a `VoidActionError` at any status, such as a thrown `401`, `403`, or `500`. Narrows `error` to `VoidActionError`. See [handling thrown errors](../../guide/pages-routing/actions-and-forms.md#validation-errors). |
282
+ | `isCallSiteActionError(error)` | Returns `true` only for the expected `VoidActionError` statuses that `action()` returns, such as `409` or `422`. |
275
283
  | `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
284
  | `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. |
285
+ | `useParams()` | Returns dynamic route params for the page currently being rendered. Pass the page's pattern as the type argument, such as `useParams<'/users/[id]'>()`, to type them. |
278
286
  | `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination. |
279
287
 
280
288
  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.
@@ -109,10 +109,12 @@ await revalidate({ paths: ['/', '/blog/hello'] });
109
109
  await revalidate({ all: true });
110
110
  ```
111
111
 
112
+ With [`routing.typedRoutes`](../config.md#routing-typedroutes) on, each path in `paths` must match one of your routes; otherwise `RouteUrl` is `string`. Cast a path that TypeScript can't check with `as RouteUrl`. The cast turns the check off for that path.
113
+
112
114
  **Signature:**
113
115
 
114
116
  ```ts
115
- function revalidate(options: { paths?: string[]; all?: boolean }): Promise<void>;
117
+ function revalidate(options: { paths?: RouteUrl[]; all?: boolean }): Promise<void>;
116
118
  ```
117
119
 
118
120
  ## Logging {#logging}
@@ -14,7 +14,7 @@ Pass a [`RouteDestination`](./types.md#route-types) object to check the route pa
14
14
 
15
15
  ```ts
16
16
  return c.rewrite({
17
- pathname: '/users/:id',
17
+ pathname: '/users/[id]',
18
18
  params: { id: 42 },
19
19
  query: { tab: 'activity' },
20
20
  });
@@ -22,15 +22,29 @@ return c.rewrite({
22
22
 
23
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
24
 
25
- For a typed redirect, build the URL with [`routeUrl()`](./types.md#routeurl-path-options):
25
+ With [`routing.typedRoutes`](../config.md#routing-typedroutes), `c.redirect()` checks its location the same way as a link. A string must be a route URL, a same-page query or hash, or an `http://`, `https://`, `mailto:`, or `tel:` URL. An external `https://` literal needs no cast. A `URL`, a [`routeUrl()`](./types.md#routeurl-path-options) string, or a destination object is accepted. Cast a string TypeScript cannot check, such as a checkout URL from a payment provider's SDK, with `as Href`:
26
26
 
27
27
  ```ts
28
- import { routeUrl } from 'void/routes';
28
+ import { routeUrl, type Href } from 'void/routes';
29
29
 
30
- return c.redirect(routeUrl('/users/:id', { params: { id: 42 } }));
30
+ declare const checkoutUrl: string;
31
+
32
+ return c.redirect(routeUrl('/users/[id]', { params: { id: 42 } }));
33
+ return c.redirect({ pathname: '/users/[id]', params: { id: 42 } });
34
+ return c.redirect('https://example.com/login');
35
+ return c.redirect(checkoutUrl as Href);
36
+ ```
37
+
38
+ The cast turns the check off for that value, and Void does not check the location at runtime, so cast only URLs you trust. A URL from the request, such as a `?redirectTo=` parameter, can point to another site. Resolve it against the request URL and redirect only when the origin matches:
39
+
40
+ ```ts
41
+ const requested = new URL(c.req.query('redirectTo') ?? '/', c.req.url);
42
+ return c.redirect(requested.origin === new URL(c.req.url).origin ? requested : '/');
31
43
  ```
32
44
 
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`.
45
+ `c.redirect()` sends the location it is given. The request query is not added to an internal path, a protocol-relative URL, or an absolute URL, so `c.redirect('/notes')` from `/sign-in?redirectTo=/notes` goes to `/notes`. [`routing.redirects`](../../guide/edge/redirects.md) still merge the request query into the destination.
46
+
47
+ A [named action](../../guide/pages-routing/actions-and-forms.md#named-actions) is the exception. Redirecting it to a GET page drops the action key and keeps the page's other query parameters: `POST /users/42?delete&tab=profile` with `c.redirect('/users/42')` goes 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`.
34
48
 
35
49
  ```ts
36
50
  import { defineHandler } from 'void';
@@ -88,6 +88,8 @@ interface HeadDescriptor {
88
88
 
89
89
  Generated route types used by the typed `fetch` client. Contains each route’s methods, inputs, and outputs.
90
90
 
91
+ Keys use route patterns such as `/api/users/[id]` and `/docs/[...slug]`.
92
+
91
93
  ```ts
92
94
  import type { RouteMap } from 'void/routes';
93
95
  ```
@@ -101,7 +103,7 @@ Build a relative URL string from a known page, HTTP, or WebSocket route pattern:
101
103
  ```ts
102
104
  import { routeUrl } from 'void/routes';
103
105
 
104
- routeUrl('/users/:id', {
106
+ routeUrl('/users/[id]', {
105
107
  params: { id: 42 },
106
108
  query: { tab: 'activity' },
107
109
  hash: 'details',
@@ -127,12 +129,17 @@ Import these types from `void/routes`:
127
129
  | --------------------- | ------------------------------------------------------------------------------------------------- |
128
130
  | `RoutePathMap` | Generated map of page, HTTP, and WebSocket route patterns to their parameter names. |
129
131
  | `RoutePath` | Union of the known route patterns in `RoutePathMap`. |
132
+ | `PagePathMap` | Generated map of page patterns to their parameter names. |
133
+ | `PagePath` | Union of the page patterns in `PagePathMap`; accepted by `useParams()`. |
134
+ | `PageParams<P>` | The params page `P` receives, such as `{ id: string }` for `/users/[id]`. |
130
135
  | `RouteOptions<P>` | Options for a route pattern `P`, including its required `params`, optional `query`, and `hash`. |
131
136
  | `RouteDestination<P>` | `{ pathname: P }` with `RouteOptions<P>`. Defaults to all known routes when `P` is omitted. |
132
137
  | `RouteUrl` | The URL of one of your routes, returned by `routeUrl()`. `string` unless `typedRoutes` is on. |
133
138
  | `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. |
139
+ | `RouteUrlInput` | `Href`, `URL`, or `RouteDestination`; accepted by router navigation methods and `c.redirect()`. |
135
140
  | `RouteQuery` | Query keys mapped to `RouteQueryValue` or readonly arrays of those values. |
136
141
  | `RouteQueryValue` | `string`, `number`, `boolean`, `null`, or `undefined`. |
137
142
 
143
+ Annotate a dynamic page's `getPrerenderPaths()` as `Promise<PageParams<P>[]>` so TypeScript checks those param names. See [Prerender paths](../../guide/type-safety.md#prerender-paths).
144
+
138
145
  `typedRoutes` is [`routing.typedRoutes`](../config.md#routing-typedroutes). See [Checked URL strings](../../guide/type-safety.md#checked-url-strings).
@@ -130,6 +130,8 @@ The command saves `DATABASE_URL` in `.env`. When authenticated with a linked Voi
130
130
 
131
131
  Provider-created credentials are never printed. For direct Cloudflare deploys, configure the same URL as a protected `DATABASE_URL` in the shell or CI environment that runs deploy.
132
132
 
133
+ For an existing PostgreSQL database migrated by Drizzle, [adopt its applied migration history](../../guide/database.md#adopt-existing-drizzle) before the first Void deployment.
134
+
133
135
  ## `void db set-url` {#void-db-set-url}
134
136
 
135
137
  Update the PostgreSQL or MySQL connection string for deployment. Available for projects with `"database": "pg"` or `"database": "mysql"`.
@@ -7,7 +7,7 @@ outline: deep
7
7
  ## `void deploy` {#void-deploy}
8
8
 
9
9
  ```
10
- void deploy [--project <name>] [--dir <path>] [--spa] [--skip-build] [--debug]
10
+ void deploy [--project <name>] [--dir <path>] [--spa] [--skip-build] [--skip-migrations] [--debug]
11
11
  void deploy [--platform <cloudflare|void>] [--require-email]
12
12
  void deploy --platform cloudflare --atomic
13
13
  void deploy --platform cloudflare --provision
@@ -34,6 +34,7 @@ For Drizzle projects, deploy performs a read-only schema drift check. If a new m
34
34
  | `--dir <path>` | Deploy a pre-built static directory (skips build) |
35
35
  | `--spa` | Use SPA mode instead of SSG for static deploys |
36
36
  | `--skip-build` | Skip the build step; on Cloudflare this is supported for static/SPA/SSG deploys only |
37
+ | `--skip-migrations` | Deploy without applying application or authentication SQL migrations; supported on Cloudflare and Void platforms |
37
38
  | `--require-email` | Fail when email cannot be set up instead of deploying without it; requires `--platform cloudflare` |
38
39
  | `--provision` | Run resource provisioning again even when every resource exists, for example to enable D1 read replication on an existing database; requires `--platform cloudflare` |
39
40
  | `--atomic` | Publish an existing Durable Object Worker directly; readiness is checked after traffic changes |
@@ -41,6 +42,8 @@ For Drizzle projects, deploy performs a read-only schema drift check. If a new m
41
42
 
42
43
  `--atomic` applies to one deployment. For an existing Durable Object Worker that consistently cannot stage, set `deploy: { cloudflare: { mode: 'atomic' } }` in `void.config.ts` so plain `void deploy` uses atomic publication. The default is `staged`.
43
44
 
45
+ Use `--skip-migrations` when migrations run in a separate release step or when a preview shares an existing database. Ensure the deployed code works with that database's current schema. The flag applies only to this invocation: normal deploys still apply pending migrations. Migration files and schema validation remain required, and Cloudflare Durable Object class migrations still run as part of publishing code. A Void platform must support this option; upgrade the platform if the CLI reports that it does not.
46
+
44
47
  Every deploy writes a JSONL log to `~/.void/logs/`. Failures print the log path and relevant details. Use `--debug` or `VOID_DEPLOY_DEBUG=1` to mirror it to stderr.
45
48
 
46
49
  Keep credentials out of build commands and register them as CI secrets so your CI provider can mask them in logs.
@@ -86,16 +89,19 @@ void deploy --platform cloudflare --require-email # fail instead of deploying
86
89
 
87
90
  Void signs you in through your browser when needed and saves the selected account. In CI, set `CLOUDFLARE_API_TOKEN` and, if the token can access several accounts, `CLOUDFLARE_ACCOUNT_ID`.
88
91
 
89
- | Option or setting | Cloudflare behavior |
90
- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
91
- | `--dir`, `--spa` | Deploy static output through a small Worker and Workers Assets |
92
- | `--skip-build` | Reuse existing static, SPA, or SSG output; unavailable for Worker apps |
93
- | `--project` | Unavailable; the Worker and account come from `void.config.ts` and `void.lock.json` |
94
- | Named environments | Unavailable; use the top-level `cloudflare` config |
95
- | `CLOUDFLARE_WORKERS_SUBDOMAIN` | Needed in fresh CI when versions have no preview URL; cached locally after a deploy |
96
- | `CF_ACCESS_READINESS_ORIGIN` | Lets Access credentials reach the readiness check on a route or Custom Domain, for example `https://app.example.com` |
97
- | `--require-email` | Fail instead of deploying without email when the email step cannot run, as in CI |
98
- | `DATABASE_URL` | Required in the deploy environment for PostgreSQL or MySQL provisioning and migrations |
92
+ | Option or setting | Cloudflare behavior |
93
+ | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
94
+ | `--dir`, `--spa` | Deploy static output through a small Worker and Workers Assets |
95
+ | `--skip-build` | Reuse existing static, SPA, or SSG output; unavailable for Worker apps |
96
+ | `--skip-migrations` | Skip database migrations; existing PostgreSQL/MySQL Hyperdrive bindings do not require `DATABASE_URL` just to skip SQL |
97
+ | `--project` | Unavailable; the Worker and account come from `void.config.ts` and `void.lock.json` |
98
+ | Named environments | Unavailable; use the top-level `cloudflare` config |
99
+ | `CLOUDFLARE_WORKERS_SUBDOMAIN` | Needed in fresh CI when a workers.dev Worker has no preview URL; cached locally after a deploy. It does not apply when `workers_dev` is false |
100
+ | `CF_ACCESS_READINESS_ORIGIN` | Lets Access credentials reach the readiness check on a route or Custom Domain, for example `https://app.example.com` |
101
+ | `--require-email` | Fail instead of deploying without email when the email step cannot run, as in CI |
102
+ | `DATABASE_URL` | Required in the deploy environment for PostgreSQL or MySQL provisioning and migrations |
103
+
104
+ After `--skip-migrations`, native deployment history shows the applied migration state as unknown. Rollback retains its warning that database changes are not reversed.
99
105
 
100
106
  The token needs Workers Scripts: Edit, read access to bound resources, and edit access to products Void provisions. Commit `void.lock.json` after the first deploy before using other machines or CI.
101
107
 
@@ -36,6 +36,7 @@ Use this page as a command reference. If you are setting up a project for the fi
36
36
  | Command | Purpose |
37
37
  | --------------------------------- | ----------------------------------------------------------------------------- |
38
38
  | `void deploy` | Build and deploy to the configured platform |
39
+ | `void deploy --skip-migrations` | Deploy code without applying application or authentication SQL migrations |
39
40
  | `void prepare` | Generate `.void` artifacts without starting Vite |
40
41
  | `void info [--json]` | Inspect persistent resource names before moving their code |
41
42
  | `void gen model <name> [cols...]` | Scaffold a Drizzle table and API routes |
@@ -82,6 +83,8 @@ Use this page as a command reference. If you are setting up a project for the fi
82
83
 
83
84
  The docs use `void` for brevity. Outside package scripts, run it with your package manager: `npx void`, `pnpm void`, `yarn void`, `bunx void`, or `vpx void`.
84
85
 
86
+ The CLI needs Node.js 24.22+ or 26.12+. `npx`, `bunx` and package scripts use the `node` on your `PATH`; `vpx` uses the version in `.node-version`.
87
+
85
88
  Alternatively, you can add `./node_modules/.bin` to your `PATH` so that you can invoke `void` directly when you are in the root directory of your app.
86
89
 
87
90
  :::warning ⚠️ Prefer local install
@@ -220,7 +220,7 @@ Output mode. Controls the default rendering strategy for pages.
220
220
  | `"server"` (default) | `false` | `export const prerender = true` | Deploy-time (platform ISR) |
221
221
  | `"static"` | `true` | `export const prerender = false` | Build or deploy post-build |
222
222
 
223
- When set to `"static"`, pages are prerendered to HTML in `dist/client/`. Individual pages can opt out with `export const prerender = false`. Dynamic pages need `getPrerenderPaths()` to be prerendered.
223
+ When set to `"static"`, pages are prerendered to HTML in `dist/client/`. Individual pages can opt out with `export const prerender = false`. Dynamic pages need [`getPrerenderPaths()`](../guide/ssg.md#per-page-overrides) to be prerendered. Annotate its return type with [`PageParams`](./api/types.md#route-types) so TypeScript checks the param names.
224
224
 
225
225
  When omitted or set to `"server"`, pages are server-rendered on request. Individual pages can opt into deploy-time prerendering with `export const prerender = true`, or opt out of server-rendered component HTML with `export const ssr = false`.
226
226
 
@@ -349,6 +349,8 @@ cloudflare: {
349
349
 
350
350
  Void writes a generated Cloudflare config for its tooling and records provisioned resource IDs and append-only migration history in `void.lock.json`. Commit the lock when it changes. Root `wrangler.jsonc` and `wrangler.json` are migrated on `void init` or `void deploy`; Void keeps backup copies under `.void/config-migration/`.
351
351
 
352
+ Bindings declared here are typed on `c.env` after `void prepare` or starting a dev server or build. See [Custom Binding Types](../guide/type-safety.md#custom-binding-types) for an example and RPC type overrides.
353
+
352
354
  If you need to remove a value that Void previously generated, remove it from the `resolved` object in `void.lock.json`. Void refreshes the generated Cloudflare file on the next command. Put ongoing custom settings in `cloudflare` in `void.config.ts`.
353
355
 
354
356
  ### `deploy.cloudflare.mode`
@@ -376,9 +378,21 @@ routing: {
376
378
  }
377
379
  ```
378
380
 
381
+ #### `routing.trailingSlash`
382
+
383
+ Use trailing-slash Void Pages URLs. Prerendered pages use directory indexes (`posts/index.html` for `/posts/`), and URLs without the slash redirect to the trailing-slash URL. Omitted or `false` preserves the default URLs and `posts.html` output. API routes are unaffected. Third-party frameworks use their own routing settings.
384
+
385
+ ```ts
386
+ routing: {
387
+ trailingSlash: true,
388
+ }
389
+ ```
390
+
391
+ See [Static Site Generation](../guide/ssg.md#trailing-slashes-and-directory-indexes) for hosting details.
392
+
379
393
  #### `routing.typedRoutes`
380
394
 
381
- Type-check URL strings against your app's routes in `Link`'s `href`, `router.visit()`, `router.prefetch()`, `router.flush()`, and `c.rewrite()`. Omitted or `false` means off; `void init` turns it on for new apps. It changes types only, not navigation at runtime. Strings may also be same-page queries or hashes, or `http://`, `https://`, `mailto:`, and `tel:` URLs. See [Checked URL strings](../guide/type-safety#checked-url-strings).
395
+ Type-check URL strings against your app's routes in `Link`'s `href`, `router.visit()`, `router.prefetch()`, `router.flush()`, `c.rewrite()`, `c.redirect()`, `useIslandForm()`, `revalidate({ paths })`, `connectEventStream()`, and `connectLiveStream()`. Omitted or `false` means off; `void init` turns it on for new apps. It changes types only, not navigation at runtime. Link and router strings may also be same-page queries or hashes, or `http://`, `https://`, `mailto:`, and `tel:` URLs. `useIslandForm()` and `revalidate({ paths })` take route URLs; `connectEventStream()` and `connectLiveStream()` also take `http://` and `https://` URLs. `c.redirect()` accepts those strings, a `URL`, or a destination object. An external `https://` literal needs no cast; cast a string TypeScript cannot check with `as Href`. `routing.prerender` takes plain strings unless you annotate them. See [Checked URL strings](../guide/type-safety#checked-url-strings).
382
396
 
383
397
  ```ts
384
398
  routing: {
@@ -505,6 +519,14 @@ Paths to prerender as static HTML at deploy time. Each path must start with `/`.
505
519
  }
506
520
  ```
507
521
 
522
+ In `void.config.ts`, annotate the array with [`RouteUrl`](./api/types.md#route-types) so TypeScript checks the paths when [`routing.typedRoutes`](#routing-typedroutes) is on:
523
+
524
+ ```ts
525
+ import type { RouteUrl } from 'void/routes';
526
+
527
+ prerender: ['/', '/about', '/pricing'] satisfies RouteUrl[],
528
+ ```
529
+
508
530
  #### `routing.notFound`
509
531
 
510
532
  Override how the asset layer answers a request that matched no asset and no worker route. One of `"single-page-application"`, `"404-page"`, or `"none"`. If omitted, Void infers it — see [Static Assets](../guide/edge/static-assets.md#navigation-and-middleware).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "void",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "description": "Full-stack framework and deployment CLI for Cloudflare Workers, powered by Vite.",
5
5
  "homepage": "https://void.cloud",
6
6
  "bugs": {
@@ -343,24 +343,25 @@
343
343
  }
344
344
  },
345
345
  "dependencies": {
346
- "@cloudflare/build-output-utils": "^0.9.7",
347
- "@cloudflare/codemods": "^0.7.1",
348
- "@cloudflare/config": "^0.29.1",
346
+ "@cloudflare/build-output-utils": "^0.9.10",
347
+ "@cloudflare/codemods": "^0.7.4",
348
+ "@cloudflare/config": "^0.30.2",
349
349
  "@cloudflare/sandbox": "^1.0.3",
350
- "@cloudflare/vite-plugin": "^2.0.0-beta.v.9",
351
- "@cloudflare/workers-auth": "^0.15.4",
352
- "@cloudflare/workers-types": "^5.20261102.1",
353
- "@cloudflare/workers-utils": "^0.50.2",
350
+ "@cloudflare/vite-plugin": "^2.0.0-beta.v.12",
351
+ "@cloudflare/workers-auth": "^0.16.0",
352
+ "@cloudflare/workers-types": "^5.20261109.1",
353
+ "@cloudflare/workers-utils": "^0.52.0",
354
354
  "@napi-rs/keyring": "^2.1.2",
355
- "@void/deploy-cloudflare": "1.6.1",
356
- "@void/deploy-core": "1.6.1",
357
- "@void/edge": "1.6.1",
358
- "@void/isr": "1.6.1",
359
- "@void/platform": "1.6.1",
360
- "better-auth": "^1.7.14",
355
+ "@void/deploy-cloudflare": "1.7.0",
356
+ "@void/deploy-core": "1.7.0",
357
+ "@void/edge": "1.7.0",
358
+ "@void/isr": "1.7.0",
359
+ "@void/platform": "1.7.0",
360
+ "better-auth": "^1.7.18",
361
361
  "better-sqlite3": "^13.0.3",
362
362
  "blake3-jit": "^1.1.0",
363
- "cf": "^1.0.0-beta.26",
363
+ "cf": "^1.0.0-beta.28",
364
+ "devalue": "^6.0.3",
364
365
  "drizzle-arktype": "^0.1.3",
365
366
  "drizzle-kit": "^0.31.11",
366
367
  "drizzle-orm": "^0.45.4",
@@ -368,13 +369,13 @@
368
369
  "drizzle-zod": "^0.8.3",
369
370
  "email-validator": "^2.0.4",
370
371
  "gray-matter": "^4.0.3",
371
- "hono": "^4.13.16",
372
+ "hono": "^4.13.17",
372
373
  "ignore": "^7.0.14",
373
374
  "jiti": "^2.7.0",
374
375
  "jsonc-parser": "^3.3.1",
375
376
  "mime": "^4.1.2",
376
- "miniflare": "^5.20261101.0-beta",
377
- "minimatch": "^11.0.3",
377
+ "miniflare": "^5.20261104.0-beta",
378
+ "minimatch": "^11.0.5",
378
379
  "mysql2": "^3.24.6",
379
380
  "pg": "^8.23.1",
380
381
  "postal-mime": "^4.2.0",
@@ -384,17 +385,18 @@
384
385
  "yaml": "^2.9.1"
385
386
  },
386
387
  "devDependencies": {
387
- "@electric-sql/pglite": "0.5.14",
388
+ "@electric-sql/pglite": "0.5.15",
388
389
  "@types/better-sqlite3": "^9.6.0",
389
390
  "@types/node": "^26.6.6",
390
391
  "@types/pg": "^8.23.1",
391
392
  "@types/proper-lockfile": "^4.1.4",
392
- "@voidzero-dev/vite-plus-prompts": "1.4.0",
393
+ "@voidzero-dev/vite-plus-prompts": "1.5.0",
393
394
  "arktype": "^2.2.9",
394
395
  "ci-info": "^4.4.0",
395
396
  "estree-walker": "^3.0.3",
396
397
  "fast-wrap-ansi": "^0.2.2",
397
398
  "magic-string": "^1.4.5",
399
+ "nitro": "^3.0.261103-rc",
398
400
  "ofetch": "2.0.0-alpha.3",
399
401
  "pathslash": "^0.1.0",
400
402
  "pglite-server": "0.1.5",
@@ -402,12 +404,12 @@
402
404
  "tinyglobby": "^0.2.17",
403
405
  "typescript": "7.0.2",
404
406
  "valibot": "^1.5.0",
405
- "vite": "npm:@voidzero-dev/vite-plus-core@1.4.0",
406
- "vite-plus": "1.4.0",
407
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.5.0",
408
+ "vite-plus": "1.5.0",
407
409
  "zod": "^4.6.7"
408
410
  },
409
411
  "peerDependencies": {
410
- "@void/md": "1.6.1",
412
+ "@void/md": "1.7.0",
411
413
  "arktype": ">=2.0.0",
412
414
  "valibot": ">=1.0.0-beta.7",
413
415
  "vite": "^8.0.0",
package/schema.json CHANGED
@@ -148,6 +148,10 @@
148
148
  "type": "boolean",
149
149
  "description": "Redirect HTTP requests to HTTPS with a permanent 308 redirect. Omitted or false means off. Requires the Cloudflare target; localhost stays on HTTP."
150
150
  },
151
+ "trailingSlash": {
152
+ "type": "boolean",
153
+ "description": "Use trailing-slash Pages URLs and directory indexes for prerendered HTML. Omitted or false preserves URLs without trailing slashes."
154
+ },
151
155
  "isr": {
152
156
  "type": "boolean",
153
157
  "description": "Enable inferred ISR caching. Set false to disable ISR and edge prerendering, including per-page prerender and revalidate policies. Does not disable output: static build-time prerendering."
@@ -22,6 +22,9 @@ Use `void` and `@void/*` in imports, examples, and package manifests. Follow the
22
22
  project's existing framework and deployment destination. Deploying to a Void
23
23
  platform requires an explicit `void connect <url>` first; never infer a platform
24
24
  from old examples, tokens, or project IDs.
25
+
26
+ Use bracket route patterns such as `/users/[id]` and `/docs/[...slug]` with
27
+ `routeUrl()`, typed `fetch()`, `useParams()`, page actions, and WebSocket `connect()`.
25
28
  Platform hostnames passed to `void connect` default to HTTPS. Loopback hosts
26
29
  (`localhost`, `127.0.0.1`, and `[::1]`) default to HTTP: `void connect localhost:8787`.
27
30
  An explicit scheme overrides the default.
@@ -29,6 +32,8 @@ For a one-time deployment elsewhere, connect to that platform, then set
29
32
  `VOID_API_URL` for the deploy command and pass `--project <slug>`. This preserves
30
33
  the app's existing saved destination, including when the target project is new.
31
34
 
35
+ Use `void deploy --skip-migrations` when database migrations run separately; it skips application and authentication SQL for that invocation. Ensure the code supports the current database schema and follow `docs/guide/deployment.md` for the release workflow.
36
+
32
37
  ## Task Routing
33
38
 
34
39
  | User intent | Docs file(s) |
@@ -1 +0,0 @@
1
- export { t as prepareCfBuildOutput } from "./cf-build-output-B1C8U83u.mjs";
@@ -1 +0,0 @@
1
- export { r as PlatformClient } from "./client-CoxPEhJq.mjs";
@@ -1,2 +0,0 @@
1
- import "./deploy-transport-DEyOUfac.mjs";
2
- export { i as checkWranglerMigrationApplySet, t as parseRootWranglerConfig, r as runDeploy } from "./deploy-D_gEojD2.mjs";
@@ -1 +0,0 @@
1
- export { t as discoverSchema } from "./discover-Dhkzxgdt.mjs";
@@ -1 +0,0 @@
1
- export { r as runGenCommand } from "./gen-B9bCV5qu.mjs";
@@ -1 +0,0 @@
1
- export { r as printHelpPage } from "./help-1OCFDsRr.mjs";