void 1.6.2 → 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 (268) hide show
  1. package/dist/{account-cmd-D903EEWQ.mjs → account-cmd-BfkJ_1PC.mjs} +6 -6
  2. package/dist/{application-analysis-DlUG-XNT.mjs → application-analysis-OV0CBJ80.mjs} +8 -7
  3. package/dist/{application-routing-GCBSwXA9.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-g9J7MSmP.mjs → auth-link-CW1Zh6FM.mjs} +6 -6
  9. package/dist/{auth-router-DMZbG9Qn.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-CuS42-9A.mjs → cloudflare-auth-DGIivpTb.mjs} +1 -1
  25. package/dist/{cloudflare-cmd-DTF19-j-.mjs → cloudflare-cmd-DJaxC-bc.mjs} +5 -5
  26. package/dist/{cloudflare-config-Ce8j5S7V.mjs → cloudflare-config-DtOGAbeB.mjs} +2 -2
  27. package/dist/{cloudflare-connect-BN4dHp8i.mjs → cloudflare-connect-BjpWmglw.mjs} +3 -3
  28. package/dist/{cloudflare-operations-laxRA8HN.mjs → cloudflare-operations-CZkjFrzH.mjs} +1 -1
  29. package/dist/{cloudflare-operations-DrZGzQap.mjs → cloudflare-operations-k7wYUv56.mjs} +6 -6
  30. package/dist/{cloudflare-process-D9aC-jXr.mjs → cloudflare-process-BcPvlMFd.mjs} +2 -2
  31. package/dist/{config-hL-S-Y9D.mjs → config-5oSQhZNj.mjs} +3 -1
  32. package/dist/{config-CPxJmt4M.d.mts → config-CTlUaXWZ.d.mts} +3 -1
  33. package/dist/{config-CNDjO-15.mjs → config-DcqUBGCb.mjs} +1 -1
  34. package/dist/config-entry.d.mts +1 -1
  35. package/dist/{config-DMR0i3Z2.mjs → config-wo2EaH0X.mjs} +1 -1
  36. package/dist/{connect-DHepM7Xs.mjs → connect-j1F1C_rW.mjs} +7 -7
  37. package/dist/{create-project-Bq0M8MtO.mjs → create-project-CE3jOmd5.mjs} +5 -5
  38. package/dist/{create-project-BiMmR5wA.mjs → create-project-DZH3aYGQ.mjs} +1 -1
  39. package/dist/{db-CqfT6lhV.mjs → db-DyLzzxvM.mjs} +38 -38
  40. package/dist/{db-types-DRmxBJ2K.mjs → db-types-DdHHUVPy.mjs} +1 -1
  41. package/dist/{delete-CY4L8fi2.mjs → delete-Dey6YoMA.mjs} +5 -5
  42. package/dist/{deploy-La_Ly8g_.mjs → deploy-Ccw2D2lw.mjs} +491 -109
  43. package/dist/deploy-DEZkUS77.mjs +2 -0
  44. package/dist/{deploy-managed-static-CESLfKHN.mjs → deploy-managed-static-BBVtpuGv.mjs} +16 -16
  45. package/dist/{deploy-transport-DcI6LXhY.mjs → deploy-transport-Dt0IvSVW.mjs} +2 -2
  46. package/dist/deploy.mjs +8 -8
  47. package/dist/{dispatch-DM4Xdd2l.mjs → dispatch-pYaww76u.mjs} +4 -4
  48. package/dist/{dist-D23AAMxT.mjs → dist-BQdgCVQF.mjs} +1 -1
  49. package/dist/{dist-eV_Ep60B.mjs → dist-DeTdhbZc.mjs} +1 -1
  50. package/dist/{domain-BD1KOQL3.mjs → domain-Dh3mG8Vs.mjs} +6 -6
  51. package/dist/{email-XAspopcj.mjs → email-DKyMjOYM.mjs} +10 -10
  52. package/dist/{email-cloudflare-RxIQoPc9.mjs → email-cloudflare-CTt2n_W2.mjs} +13 -9
  53. package/dist/{env-DrYUh55t.mjs → env-DkZzh_Dd.mjs} +7 -7
  54. package/dist/env-mask-D31Qztl9.mjs +46 -0
  55. package/dist/{env-validation-Del3C8AY.mjs → env-validation-1snjKtDX.mjs} +4 -4
  56. package/dist/{env-validation-Bosj7EVg.mjs → env-validation-C8NL3lEH.mjs} +1 -1
  57. package/dist/{fetch-C8yhLoF3.mjs → fetch-CAIVkLvW.mjs} +1 -1
  58. package/dist/{fetch-B-gLGYVl.d.mts → fetch-CbI6lNnk.d.mts} +6 -4
  59. package/dist/{fetch-stream-DafNtVJC.mjs → fetch-stream-6Op0qlLd.mjs} +1 -1
  60. package/dist/{fetch-stream-DuwxWmBM.d.mts → fetch-stream-DoED9atq.d.mts} +1 -1
  61. package/dist/{gen-DSkScMIz.mjs → gen-BZmFOGDQ.mjs} +7 -7
  62. package/dist/gen-C6iknRdI.mjs +1 -0
  63. package/dist/{github-cmd-CA-lBdkn.mjs → github-cmd-7Oky9qgH.mjs} +6 -6
  64. package/dist/{handler-DnI_au0K.mjs → handler-C9SnmeW1.mjs} +5 -4
  65. package/dist/{handler-BR6Tvjkp.d.mts → handler-DjqciiDc.d.mts} +20 -7
  66. package/dist/{headers--cbz6iZ8.mjs → headers-CimYIfQI.mjs} +1 -1
  67. package/dist/{help-1OCFDsRr.mjs → help-CNuUb47C.mjs} +7 -3
  68. package/dist/help-C_cqTByy.mjs +1 -0
  69. package/dist/index.d.mts +4 -4
  70. package/dist/index.mjs +154 -109
  71. package/dist/{info-BpxpsX0B.mjs → info-DwB8IWIx.mjs} +4 -4
  72. package/dist/{init-DpVXO5S-.mjs → init-CUGSmcED.mjs} +33 -31
  73. package/dist/{link-DAXOT-G_.mjs → link-BlRTGHan.mjs} +6 -6
  74. package/dist/{list-BFQ0gcML.mjs → list-iCg7d5Pa.mjs} +7 -7
  75. package/dist/{live-DF4HUl2m.mjs → live-CYJ4KGoR.mjs} +2 -2
  76. package/dist/{live-0xrcVpyq.d.mts → live-zKGbRT4h.d.mts} +2 -2
  77. package/dist/{local-d1-CLVPP6v7.mjs → local-d1-CFcH9Bx3.mjs} +2 -2
  78. package/dist/login-C4q1S-5b.mjs +1 -0
  79. package/dist/{login-RIw7ffPe.mjs → login-TA51e5Fw.mjs} +5 -5
  80. package/dist/{logs-B2OeLS4X.mjs → logs-BlyAxlvx.mjs} +6 -6
  81. package/dist/{migrate-DiI50Chz.mjs → migrate-BH6LCr00.mjs} +5 -5
  82. package/dist/migrate-CVBsSFhC.mjs +1 -0
  83. package/dist/nitro.d.mts +5 -0
  84. package/dist/nitro.mjs +27 -8
  85. package/dist/{node-Bc-dBAGL.mjs → node-B0otYjDv.mjs} +4 -4
  86. package/dist/{operator-args-D79WQP70.mjs → operator-args-DuKAQ3Ks.mjs} +1 -1
  87. package/dist/{operator-auth-CfDcmzpo.mjs → operator-auth-CD3pap65.mjs} +1 -1
  88. package/dist/{operator-client-BIY4-N_6.mjs → operator-client-XvXTkea6.mjs} +2 -2
  89. package/dist/{operator-cmd-CEI5Aaza.mjs → operator-cmd-CoHlJjcT.mjs} +7 -7
  90. package/dist/operator-cmd-DnaCnCSP.mjs +1 -0
  91. package/dist/output-CNsMDEd2.mjs +1 -0
  92. package/dist/{output-BCdLioKP.mjs → output-CXJTIAtF.mjs} +1 -1
  93. package/dist/pages/client.d.mts +16 -13
  94. package/dist/pages/client.mjs +34 -66
  95. package/dist/pages/index.d.mts +4 -3
  96. package/dist/pages/index.mjs +6 -6
  97. package/dist/pages/islands-plugin.mjs +1 -1
  98. package/dist/pages/protocol.d.mts +2 -2
  99. package/dist/pages/protocol.mjs +1 -1
  100. package/dist/pages/serialize.d.mts +2 -2
  101. package/dist/pages/serialize.mjs +1 -1
  102. package/dist/platform-args-B7-wQ0_B.mjs +1 -0
  103. package/dist/{platform-args-Cx1M-7bq.mjs → platform-args-DfT8yQBF.mjs} +1 -1
  104. package/dist/{platform-auth-config-ZrYm8KVs.mjs → platform-auth-config-MO0VdVs9.mjs} +10 -10
  105. package/dist/{platform-auth-protection-t6mdY4nn.mjs → platform-auth-protection-Dv208eyL.mjs} +8 -8
  106. package/dist/{platform-auth-recovery-XeBmPTXx.mjs → platform-auth-recovery-DvAQ674F.mjs} +7 -7
  107. package/dist/{platform-cmd-C7BevP9b.mjs → platform-cmd-BpUA19r_.mjs} +1 -1
  108. package/dist/{platform-cmd-EXehmSYA.mjs → platform-cmd-dlSxrcQ7.mjs} +9 -9
  109. package/dist/{platform-domain-DR263ObA.mjs → platform-domain-DSO4eUEw.mjs} +5 -5
  110. package/dist/{platform-lifecycle-BvU_TNji.mjs → platform-lifecycle-BSvsyB_x.mjs} +17 -17
  111. package/dist/{platform-lifecycle-CN4aXldN.mjs → platform-lifecycle-CfcFygHb.mjs} +1 -1
  112. package/dist/{platform-management-yS2sve3V.mjs → platform-management-BMdyt667.mjs} +1 -1
  113. package/dist/{platform-management-_UE1_GM8.mjs → platform-management-CrP1XhVd.mjs} +4 -4
  114. package/dist/{platform-plans-config-Dx1agneU.mjs → platform-plans-config-CgDiwflR.mjs} +5 -5
  115. package/dist/{platform-recovery-CPVk9-Q4.mjs → platform-recovery-CHWwXVZ6.mjs} +3 -3
  116. package/dist/{platform-setup-Vw1AaUN8.mjs → platform-setup-BTQVbnTC.mjs} +3 -3
  117. package/dist/{plugin-inference-bQ1Be840.mjs → plugin-inference-g66Q1Mx9.mjs} +4 -4
  118. package/dist/prepare-Bx4a8cb1.mjs +1 -0
  119. package/dist/{prepare-BkRhDnxw.mjs → prepare-DJYHjpzq.mjs} +3 -3
  120. package/dist/{prepare-D8L9AQbw.mjs → prepare-DXduEwQp.mjs} +11 -8
  121. package/dist/{prerender-render-RlAj6hh8.mjs → prerender-render-BN9Lmebs.mjs} +29 -13
  122. package/dist/prerender-render.d.mts +10 -2
  123. package/dist/prerender-render.mjs +1 -1
  124. package/dist/{project-cmd-DH3CuFC6.mjs → project-cmd-Dfb1Sg8w.mjs} +18 -18
  125. package/dist/{project-team-MjT5K4rQ.mjs → project-team-BO2dyc7S.mjs} +5 -5
  126. package/dist/{project-token-BKHGwY3k.mjs → project-token-ByO2mEI2.mjs} +5 -5
  127. package/dist/{project-tsconfig-BMveFb4b.mjs → project-tsconfig-nhnTWO_Y.mjs} +3 -1
  128. package/dist/{project-zero-trust-Bzdd05-h.mjs → project-zero-trust-CoQfwRBR.mjs} +5 -5
  129. package/dist/{protocol-CkwjASep.d.mts → protocol-xZMvWsrg.d.mts} +5 -3
  130. package/dist/{protocol-COyySMki.mjs → protocol-yxdHxFLN.mjs} +47 -11
  131. package/dist/{provision-CYhZR_Mn.mjs → provision-CMH4-8ri.mjs} +1 -1
  132. package/dist/{provision-B0HqoRuI.mjs → provision-D5q-ptD3.mjs} +2 -2
  133. package/dist/{requests-daJmVpjk.mjs → requests-CPOiDkjh.mjs} +4 -4
  134. package/dist/resolve-project-BALVa9q0.mjs +1 -0
  135. package/dist/{resolve-project-D0YNnJfm.mjs → resolve-project-ClvLMTI9.mjs} +1 -1
  136. package/dist/{rollback-AVwiMAkk.mjs → rollback-BfCs2la4.mjs} +7 -7
  137. package/dist/{route-types-e69EqY88.mjs → route-types-Cl3x0Q8B.mjs} +265 -12
  138. package/dist/{route-url-C_YIH_zO.d.mts → route-url-C3JwYrER.d.mts} +8 -3
  139. package/dist/{route-url-CRDF-I0I.mjs → route-url-CfCR4oMj.mjs} +4 -3
  140. package/dist/routes-stub.d.mts +10 -1
  141. package/dist/routes-stub.mjs +1 -1
  142. package/dist/{runner-QMeOpScZ.mjs → runner-CTk21HrO.mjs} +1 -1
  143. package/dist/{runner-mysql-0zVmB1JW.mjs → runner-mysql-CHvEg_sy.mjs} +1 -1
  144. package/dist/runtime/ai.mjs +1 -1
  145. package/dist/runtime/auth.d.mts +2 -2
  146. package/dist/runtime/auth.mjs +1 -1
  147. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  148. package/dist/runtime/better-auth-mysql.mjs +1 -1
  149. package/dist/runtime/better-auth-pg.d.mts +1 -1
  150. package/dist/runtime/better-auth-pg.mjs +1 -1
  151. package/dist/runtime/better-auth.d.mts +1 -1
  152. package/dist/runtime/better-auth.mjs +1 -1
  153. package/dist/runtime/client-react.d.mts +3 -3
  154. package/dist/runtime/client-react.mjs +2 -2
  155. package/dist/runtime/client-solid.d.mts +3 -3
  156. package/dist/runtime/client-solid.mjs +2 -2
  157. package/dist/runtime/client-svelte.d.mts +3 -3
  158. package/dist/runtime/client-svelte.mjs +2 -2
  159. package/dist/runtime/client-vue.d.mts +3 -3
  160. package/dist/runtime/client-vue.mjs +2 -2
  161. package/dist/runtime/client.d.mts +3 -3
  162. package/dist/runtime/client.mjs +2 -2
  163. package/dist/runtime/email/testing.mjs +2 -2
  164. package/dist/runtime/email.mjs +3 -3
  165. package/dist/runtime/env-public.mjs +2 -46
  166. package/dist/runtime/fetch-server.d.mts +1 -1
  167. package/dist/runtime/fetch-server.mjs +1 -1
  168. package/dist/runtime/fetch-stream.d.mts +2 -2
  169. package/dist/runtime/fetch-stream.mjs +1 -1
  170. package/dist/runtime/fetch.d.mts +1 -1
  171. package/dist/runtime/fetch.mjs +1 -1
  172. package/dist/runtime/handler.d.mts +1 -1
  173. package/dist/runtime/handler.mjs +1 -1
  174. package/dist/runtime/isr.d.mts +3 -1
  175. package/dist/runtime/live-client.d.mts +11 -2
  176. package/dist/runtime/live-client.mjs +8 -0
  177. package/dist/runtime/live-server.mjs +1 -1
  178. package/dist/runtime/live.d.mts +1 -1
  179. package/dist/runtime/live.mjs +1 -1
  180. package/dist/runtime/log.mjs +1 -1
  181. package/dist/runtime/remote/index.mjs +1 -1
  182. package/dist/runtime/route-url.d.mts +2 -2
  183. package/dist/runtime/route-url.mjs +1 -1
  184. package/dist/runtime/routing.d.mts +15 -4
  185. package/dist/runtime/routing.mjs +93 -11
  186. package/dist/runtime/sandbox.mjs +1 -1
  187. package/dist/runtime/sse-client.d.mts +9 -1
  188. package/dist/runtime/sse-client.mjs +7 -0
  189. package/dist/runtime/validator.d.mts +1 -1
  190. package/dist/runtime/validator.mjs +1 -1
  191. package/dist/runtime/ws-server.d.mts +3 -3
  192. package/dist/runtime/ws-server.mjs +1 -1
  193. package/dist/runtime/ws.d.mts +1 -1
  194. package/dist/runtime/ws.mjs +1 -1
  195. package/dist/{scan-F0psanp7.mjs → scan-L8OSv1f7.mjs} +10 -7
  196. package/dist/{secret-szNdoeKa.mjs → secret-CuI6LTpD.mjs} +7 -7
  197. package/dist/serialize-DN-envGQ.d.mts +18 -0
  198. package/dist/serialize-Pf-CIQK_.mjs +39 -0
  199. package/dist/{skills-D393E4lB.mjs → skills-BBO9wMjB.mjs} +1 -1
  200. package/dist/{subcommand-prompt-CxJXporl.mjs → subcommand-prompt-BZMnCA8T.mjs} +2 -2
  201. package/dist/url-CuoEn0o3.mjs +43 -0
  202. package/dist/validator-8-NZs2Xr.mjs +168 -0
  203. package/dist/{version-metadata-BC3LK7Y-.mjs → version-metadata-eUd6Ar_U.mjs} +1 -1
  204. package/dist/wrangler-R3kMdJfw.mjs +1 -0
  205. package/dist/{wrangler-Gn4EoY4-.mjs → wrangler-k40T7XTQ.mjs} +2 -2
  206. package/dist/{wrapper-B9W9RE8z.mjs → wrapper-BGsi_uHs.mjs} +11 -8
  207. package/dist/{ws-Dmjg5NH2.d.mts → ws-DB8Feytg.d.mts} +2 -2
  208. package/docs/guide/ai.md +2 -0
  209. package/docs/guide/auth.md +62 -0
  210. package/docs/guide/database.md +33 -0
  211. package/docs/guide/deployment.md +8 -0
  212. package/docs/guide/edge/prerendering.md +9 -4
  213. package/docs/guide/edge/revalidation.md +3 -0
  214. package/docs/guide/live.md +2 -0
  215. package/docs/guide/pages-routing/actions-and-forms.md +15 -10
  216. package/docs/guide/pages-routing/head.md +3 -1
  217. package/docs/guide/pages-routing/islands.md +1 -1
  218. package/docs/guide/pages-routing/loaders.md +2 -0
  219. package/docs/guide/pages-routing/markdown.md +2 -2
  220. package/docs/guide/pages-routing/overview.md +139 -10
  221. package/docs/guide/quickstart.md +1 -0
  222. package/docs/guide/sse.md +2 -0
  223. package/docs/guide/ssg.md +23 -2
  224. package/docs/guide/storage.md +6 -2
  225. package/docs/guide/type-safety.md +307 -26
  226. package/docs/guide/typed-fetch.md +7 -3
  227. package/docs/guide/websockets.md +5 -5
  228. package/docs/integrations/cloudflare.md +10 -10
  229. package/docs/integrations/frameworks/nuxt.md +2 -0
  230. package/docs/integrations/frameworks/overview.md +2 -0
  231. package/docs/integrations/nodejs-bun-deno.md +65 -0
  232. package/docs/reference/api/auth.md +19 -0
  233. package/docs/reference/api/client.md +6 -4
  234. package/docs/reference/api/handlers.md +3 -1
  235. package/docs/reference/api/pages.md +8 -8
  236. package/docs/reference/api/resources.md +3 -1
  237. package/docs/reference/api/rewrites.md +16 -4
  238. package/docs/reference/api/types.md +9 -2
  239. package/docs/reference/cli/database.md +2 -0
  240. package/docs/reference/cli/deploy.md +17 -11
  241. package/docs/reference/cli.md +3 -0
  242. package/docs/reference/config.md +24 -2
  243. package/package.json +25 -23
  244. package/schema.json +4 -0
  245. package/skills/void/SKILL.md +5 -0
  246. package/dist/cf-build-output-CmDOcA7K.mjs +0 -1
  247. package/dist/client-CEtr5UOR.mjs +0 -1
  248. package/dist/deploy-DMhOyebt.mjs +0 -2
  249. package/dist/gen-BbT1Ku1P.mjs +0 -1
  250. package/dist/help-Ba8Dq5-r.mjs +0 -1
  251. package/dist/login-BX2gzHUt.mjs +0 -1
  252. package/dist/migrate-CUGMGaIM.mjs +0 -1
  253. package/dist/operator-cmd-oTT2MA9G.mjs +0 -1
  254. package/dist/output-E6gecbbV.mjs +0 -1
  255. package/dist/platform-args-C7XUw9mw.mjs +0 -1
  256. package/dist/prepare-CZRVGNld.mjs +0 -1
  257. package/dist/resolve-project-CgfjtOwz.mjs +0 -1
  258. package/dist/serialize-DUuYuaY3.mjs +0 -29
  259. package/dist/serialize-I4EmS-Wf.d.mts +0 -16
  260. package/dist/validator-CTfmzZYb.mjs +0 -69
  261. package/dist/wrangler-CQ5c-MtJ.mjs +0 -1
  262. package/dist/{cf-access-BmBT2h8_.mjs → cf-access-Dnyw8KFY.mjs} +1 -1
  263. package/dist/{config-s6TkpSat.mjs → config-eeDzKBS9.mjs} +1 -1
  264. package/dist/{entry-DFBca6aS.mjs → entry-Bw-G1VVx.mjs} +1 -1
  265. package/dist/{env-types-Bd8DkQhl.mjs → env-types-Dz9qkiOn.mjs} +1 -1
  266. package/dist/{inbound-CdO-qY0w.mjs → inbound-C2H6Dzz1.mjs} +2 -2
  267. package/dist/{runner-5MCSimKx.mjs → runner-CMZb7jNU.mjs} +1 -1
  268. package/dist/{runner-mysql-Bdmsp_x4.mjs → runner-mysql-BXfcQQj3.mjs} +1 -1
@@ -1,5 +1,5 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-CH4PLAX1.mjs";
1
+ import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
2
3
  import { n as createAuthClient, t as auth } from "../auth-client-6-Ft9i9T.mjs";
3
- import { c as FetchError, s as fetch } from "../fetch-B-gLGYVl.mjs";
4
- import { t as fetchStream } from "../fetch-stream-DuwxWmBM.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CZrthGxs.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { n as fetch } from "../fetch-C8yhLoF3.mjs";
3
- import { t as fetchStream } from "../fetch-stream-DafNtVJC.mjs";
2
+ import { n as fetch } from "../fetch-CAIVkLvW.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-6Op0qlLd.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-DwCdwKbw.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,7 +1,7 @@
1
- import { a as normalizeEmail, r as buildMime } from "../../mime-CtP6-qAF.mjs";
2
1
  import { n as compileEmailPattern, t as compareEmailRoutes } from "../../email-BHY72ixO.mjs";
3
2
  import { y as registerEmailSink } from "../../dev-inbox-CUUS6iUg.mjs";
4
- import { a as createMessageProxy, n as MAX_INBOUND_HEADERS, t as MAX_INBOUND_BYTES } from "../../inbound-CdO-qY0w.mjs";
3
+ import { a as createMessageProxy, n as MAX_INBOUND_HEADERS, t as MAX_INBOUND_BYTES } from "../../inbound-C2H6Dzz1.mjs";
4
+ import { a as normalizeEmail, r as buildMime } from "../../mime-CtP6-qAF.mjs";
5
5
  // src/runtime/email/testing.ts
6
6
  /**
7
7
  * Test harnesses for void/email.
@@ -1,8 +1,8 @@
1
1
  import { n as bytesToBase64 } from "../base64-ikl9yBy3.mjs";
2
- import { a as normalizeEmail, i as newId, n as MimeError, r as buildMime } from "../mime-CtP6-qAF.mjs";
3
- import { a as DEV_INBOX_ENV_VAR, b as serializeCapturedMessage, c as DEV_INBOX_TOKEN_ENV_VAR, d as captureMessage, h as hasActiveSink, i as DEV_INBOX_CAPTURE_URL, p as dispatchToSinks } from "../dev-inbox-CUUS6iUg.mjs";
4
2
  import { o as withTimeout, r as readBoundedJson } from "../email-protocol-DTs_TjCS.mjs";
5
- import { a as createMessageProxy, c as isForwardableEmailMessage, d as readProjectSlug, f as replyEmail, i as bytesToReadableStream, l as parseEmail, o as defineEmail, p as tryGetRawRuntimeEnv, r as ParseEmailError, s as enactEmailActions, u as readEnvString } from "../inbound-CdO-qY0w.mjs";
3
+ import { a as DEV_INBOX_ENV_VAR, b as serializeCapturedMessage, c as DEV_INBOX_TOKEN_ENV_VAR, d as captureMessage, h as hasActiveSink, i as DEV_INBOX_CAPTURE_URL, p as dispatchToSinks } from "../dev-inbox-CUUS6iUg.mjs";
4
+ import { a as createMessageProxy, c as isForwardableEmailMessage, d as readProjectSlug, f as replyEmail, i as bytesToReadableStream, l as parseEmail, o as defineEmail, p as tryGetRawRuntimeEnv, r as ParseEmailError, s as enactEmailActions, u as readEnvString } from "../inbound-C2H6Dzz1.mjs";
5
+ import { a as normalizeEmail, i as newId, n as MimeError, r as buildMime } from "../mime-CtP6-qAF.mjs";
6
6
  import { isRecord } from "@void/deploy-core";
7
7
  // src/runtime/email.ts
8
8
  function makeError(code, message, cause) {
@@ -1,51 +1,7 @@
1
+ import { n as redactMessage, t as isUnmaskActive } from "../env-mask-D31Qztl9.mjs";
1
2
  import { a as getRawRuntimeEnv } from "../env-raw-e8qgqAzQ.mjs";
2
3
  import { i as isInternalBinding, n as getRuntimeEnv } from "../env-DtKg5G26.mjs";
3
4
  import { a as oneOf, i as number, n as email, o as string, r as json, s as url, t as boolean } from "../env-helpers-Dj_SIwPu.mjs";
4
- // src/shared/env-mask.ts
5
- /**
6
- * Secret redaction helpers for env-validation output.
7
- *
8
- * Values are redacted (replaced with `<redacted>`) whenever they flow into
9
- * a user-visible string — `EnvValidationError` messages, CLI reports, the
10
- * dev-server warning block. The key name is never masked (the user needs
11
- * it to locate the offending entry).
12
- *
13
- * Server env values are production secrets by definition, so validator
14
- * messages redact the raw input unconditionally.
15
- *
16
- * Users can opt out of the guard for local debugging via
17
- * `VOID_ENV_UNMASK=1` in the environment; that path prints a one-shot
18
- * notice on stderr so the loosened output is visibly attributed.
19
- *
20
- * This module is a leaf — no imports from non-leaf modules, safe to reach
21
- * from both the runtime (worker bundle) and the CLI host.
22
- */
23
- /** Sentinel emitted in place of a redacted value. */
24
- const REDACTED = "<redacted>";
25
- /** Environment variable that disables redaction when set to `1`. */
26
- const UNMASK_ENV_VAR = "VOID_ENV_UNMASK";
27
- /** Replace raw input in validator messages, regardless of its name or shape. */
28
- function redactMessage(rawValue, message, options = {}) {
29
- if (options.unmask) return message;
30
- if (typeof rawValue !== "string" || rawValue.length === 0) return message;
31
- return message.split(rawValue).join(REDACTED);
32
- }
33
- let unmaskResolved = null;
34
- /**
35
- * Resolve the effective unmask flag, consulting `process.env` exactly once
36
- * per process. On the first affirmative read, we print a one-shot notice to
37
- * stderr so CI logs clearly show the guard is off.
38
- */
39
- function isUnmaskActive() {
40
- if (unmaskResolved !== null) return unmaskResolved;
41
- try {
42
- unmaskResolved = globalThis.process?.env?.[UNMASK_ENV_VAR] === "1";
43
- } catch {
44
- unmaskResolved = false;
45
- }
46
- if (unmaskResolved) console.error(`[void/env] ${UNMASK_ENV_VAR}=1 is set — env validation errors will include raw values. Unset it before sharing logs.`);
47
- return unmaskResolved;
48
- }
49
5
  // src/runtime/env-public.ts
50
6
  /**
51
7
  * Public env API — `void/env`.
@@ -218,7 +174,7 @@ function readKey(key) {
218
174
  const clientValues = getClientEnvValues();
219
175
  const rawValue = Object.hasOwn(clientValues, key) ? clientValues[key] : filtered[key];
220
176
  if (!registry.schema) return rawValue;
221
- const validator = registry.schema[key];
177
+ const validator = Object.hasOwn(registry.schema, key) ? registry.schema[key] : void 0;
222
178
  if (!validator) return rawValue;
223
179
  const cache = getValidatedCache(rawEnv);
224
180
  if (cache.has(key)) return cache.get(key);
@@ -1,4 +1,4 @@
1
- import { a as UntypedFetchOptions, c as FetchError } from "../fetch-B-gLGYVl.mjs";
1
+ import { a as UntypedFetchOptions, c as FetchError } from "../fetch-CbI6lNnk.mjs";
2
2
  /** Keep local calls in the app while using the browser client's request and error handling. */
3
3
  export declare function createServerFetch<Context extends {
4
4
  request?: Request;
@@ -1,5 +1,5 @@
1
+ import { t as createRouteFetch } from "../fetch-CAIVkLvW.mjs";
1
2
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { t as createRouteFetch } from "../fetch-C8yhLoF3.mjs";
3
3
  // src/runtime/fetch-server.ts
4
4
  /** Keep local calls in the app while using the browser client's request and error handling. */
5
5
  function createServerFetch(dispatch, getContext, fallbackOrigin) {
@@ -1,3 +1,3 @@
1
- import { c as FetchError } from "../fetch-B-gLGYVl.mjs";
2
- import { t as fetchStream } from "../fetch-stream-DuwxWmBM.mjs";
1
+ import { c as FetchError } from "../fetch-CbI6lNnk.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
3
3
  export { FetchError as StreamError, fetchStream };
@@ -1,3 +1,3 @@
1
1
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { t as fetchStream } from "../fetch-stream-DafNtVJC.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-6Op0qlLd.mjs";
3
3
  export { FetchError as StreamError, fetchStream };
@@ -1,2 +1,2 @@
1
- import { a as UntypedFetchOptions, c as FetchError, i as QueryOption, n as MethodsOf, o as createRouteFetch, r as ParamsOption, s as fetch, t as BodyOption } from "../fetch-B-gLGYVl.mjs";
1
+ import { a as UntypedFetchOptions, c as FetchError, i as QueryOption, n as MethodsOf, o as createRouteFetch, r as ParamsOption, s as fetch, t as BodyOption } from "../fetch-CbI6lNnk.mjs";
2
2
  export { BodyOption, FetchError, MethodsOf, ParamsOption, QueryOption, UntypedFetchOptions, createRouteFetch, fetch };
@@ -1,3 +1,3 @@
1
1
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { n as fetch, t as createRouteFetch } from "../fetch-C8yhLoF3.mjs";
2
+ import { n as fetch, t as createRouteFetch } from "../fetch-CAIVkLvW.mjs";
3
3
  export { FetchError, createRouteFetch, fetch };
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-BR6Tvjkp.mjs";
2
+ import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-DjqciiDc.mjs";
3
3
  export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, type Deferred, type HandlerInput, type InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
@@ -1,3 +1,3 @@
1
1
  import { r as defer, t as ValidationError } from "../validation-error-uAAjlsiW.mjs";
2
- import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "../handler-DnI_au0K.mjs";
2
+ import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "../handler-C9SnmeW1.mjs";
3
3
  export { ValidationError, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
@@ -1,5 +1,7 @@
1
+ import { RouteUrl } from "void/routes";
1
2
  export type RevalidateOptions = {
2
- paths?: Array<string>;
3
+ /** Paths to purge. Checked against the app's routes when `routing.typedRoutes` is on. */
4
+ paths?: Array<RouteUrl>;
3
5
  all?: boolean;
4
6
  };
5
7
  /**
@@ -1,4 +1,5 @@
1
- import { t as LiveClientEvent } from "../live-0xrcVpyq.mjs";
1
+ import { t as LiveClientEvent } from "../live-zKGbRT4h.mjs";
2
+ import { n as RequestUrl } from "../route-url-C3JwYrER.mjs";
2
3
  export type LiveSubscribeOptions<Data = unknown> = {
3
4
  id: string;
4
5
  topic: string;
@@ -27,5 +28,13 @@ type EventSourceLike = {
27
28
  type EventSourceConstructor = new (url: string, options?: {
28
29
  withCredentials?: boolean;
29
30
  }) => EventSourceLike;
30
- export declare function connectLiveStream(url: string | URL, options?: ConnectLiveStreamOptions): LiveClient;
31
+ /**
32
+ * Open one `EventSource` to a `defineLiveStream()` route and send subscribe and
33
+ * unsubscribe requests to the same URL.
34
+ *
35
+ * With `routing.typedRoutes`, a string `url` must match one of the app's routes
36
+ * or be an absolute `http://`/`https://` URL. Cast a path built at runtime with
37
+ * `as RouteUrl`.
38
+ */
39
+ export declare function connectLiveStream(url: RequestUrl | URL, options?: ConnectLiveStreamOptions): LiveClient;
31
40
  export {};
@@ -1,4 +1,12 @@
1
1
  // src/runtime/live-client.ts
2
+ /**
3
+ * Open one `EventSource` to a `defineLiveStream()` route and send subscribe and
4
+ * unsubscribe requests to the same URL.
5
+ *
6
+ * With `routing.typedRoutes`, a string `url` must match one of the app's routes
7
+ * or be an absolute `http://`/`https://` URL. Cast a path built at runtime with
8
+ * `as RouteUrl`.
9
+ */
2
10
  function connectLiveStream(url, options = {}) {
3
11
  const EventSourceCtor = options.eventSource ?? globalThis.EventSource;
4
12
  if (!EventSourceCtor) throw new Error("live: EventSource is not available in this runtime.");
@@ -1,5 +1,5 @@
1
+ import { a as connectionInstanceName, c as topicInstanceName, o as internalUrl, s as topicDigest, t as __getLiveBindingName } from "../live-CYJ4KGoR.mjs";
1
2
  import { n as eventStream } from "../sse-CxR30yMF.mjs";
2
- import { a as connectionInstanceName, c as topicInstanceName, o as internalUrl, s as topicDigest, t as __getLiveBindingName } from "../live-DF4HUl2m.mjs";
3
3
  // src/runtime/live-server.ts
4
4
  const GENERATION_KEY = "connection:generation";
5
5
  const TOPIC_PRUNE_ALARM_DELAY_MS = 6e4;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-0xrcVpyq.mjs";
2
+ import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-zKGbRT4h.mjs";
3
3
  export { LiveClientEvent, LiveConnectHookContext, LiveConnectOptions, LiveControlError, LiveControlErrorCode, LiveControlOperation, LiveControlOperationResult, LiveControlOptions, LiveControlRequest, LiveControlResponse, LiveHookContext, LiveLimits, LivePublishOptions, LiveStream, LiveStreamOptions, LiveSubscribeHookContext, __getLiveBindingName, __setLiveBindingName, __setLiveDev, defineLiveStream };
@@ -1 +1 @@
1
- export { t as __getLiveBindingName, n as __setLiveBindingName, r as __setLiveDev, i as defineLiveStream } from "../live-DF4HUl2m.mjs";
1
+ export { t as __getLiveBindingName, n as __setLiveBindingName, r as __setLiveDev, i as defineLiveStream } from "../live-CYJ4KGoR.mjs";
@@ -24,7 +24,7 @@ function format(message, boundFields = [], fields) {
24
24
  for (const source of [...boundFields, fields]) {
25
25
  if (!source) continue;
26
26
  for (const [key, value] of Object.entries(source)) {
27
- if (key === "msg" || key === "toJSON" || key === "__proto__" || key === "constructor") continue;
27
+ if (key === "msg" || key === "toJSON") continue;
28
28
  if (typeof value === "function") continue;
29
29
  payload[key] = value;
30
30
  }
@@ -1,5 +1,5 @@
1
- import { n as bytesToBase64 } from "../../base64-ikl9yBy3.mjs";
2
1
  import { t as cfAccessHeaders } from "../../cf-access-pejlJmuy.mjs";
2
+ import { n as bytesToBase64 } from "../../base64-ikl9yBy3.mjs";
3
3
  import { a as serializeR2HttpMetadata, i as serializeR2Conditional, t as R2_OBJECT_HEADER } from "../../r2-conditions-BqkQNt2n.mjs";
4
4
  // src/runtime/remote/client.ts
5
5
  function readableMessage(value) {
@@ -1,2 +1,2 @@
1
- import { a as RouteQuery, c as RouteUrlInput, d as routeUrl, f as toUrlString, i as RoutePath, l as TypedRoutes, n as RouteDestination, o as RouteQueryValue, r as RouteOptions, s as RouteUrl, t as Href, u as interpolateRouteParams } from "../route-url-C_YIH_zO.mjs";
2
- export { Href, RouteDestination, RouteOptions, RoutePath, RouteQuery, RouteQueryValue, RouteUrl, RouteUrlInput, TypedRoutes, interpolateRouteParams, routeUrl, toUrlString };
1
+ import { a as RoutePath, c as RouteUrl, d as interpolateRouteParams, f as routeUrl, i as RouteOptions, l as RouteUrlInput, n as RequestUrl, o as RouteQuery, p as toUrlString, r as RouteDestination, s as RouteQueryValue, t as Href, u as TypedRoutes } from "../route-url-C3JwYrER.mjs";
2
+ export { Href, RequestUrl, RouteDestination, RouteOptions, RoutePath, RouteQuery, RouteQueryValue, RouteUrl, RouteUrlInput, TypedRoutes, interpolateRouteParams, routeUrl, toUrlString };
@@ -1 +1 @@
1
- export { t as interpolateRouteParams, n as routeUrl, r as toUrlString } from "../route-url-CRDF-I0I.mjs";
1
+ export { t as interpolateRouteParams, n as routeUrl, r as toUrlString } from "../route-url-CfCR4oMj.mjs";
@@ -1,5 +1,5 @@
1
- import { A as filterInternalBindings, M as createClientAssetTags, N as createManifestLoader, O as createAssetFallback, j as ClientAssetTags, k as createWorkerFetch } from "../handler-BR6Tvjkp.mjs";
2
- import { a as handlePageMutation, i as handlePageGet } from "../protocol-CkwjASep.mjs";
1
+ import { A as filterInternalBindings, M as ClientAssetTags, N as createClientAssetTags, O as createAssetFallback, P as createManifestLoader, j as prerenderPathsResponse, k as createWorkerFetch, r as CloudContext } from "../handler-DjqciiDc.mjs";
2
+ import { a as handlePageMutation, i as handlePageGet } from "../protocol-xZMvWsrg.mjs";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { Context, Hono, MiddlewareHandler, TypedResponse } from "hono";
5
5
  import { RouteDestination, RouteUrlInput } from "void/routes";
@@ -33,6 +33,8 @@ type PageRouteOptions = {
33
33
  headConfig: PageGetArguments[6] | null;
34
34
  renderOptions: PageGetArguments[7];
35
35
  namedActions?: boolean;
36
+ trailingSlash?: boolean;
37
+ catchAllParam?: string;
36
38
  };
37
39
  /** Records a handler that answers a route, so the marker can tell it from middleware. */
38
40
  export declare function markRouteHandler<T extends Function>(handler: T): T;
@@ -50,6 +52,8 @@ export declare function createNamedActionMarker(matchedRoutes: (c: Context) => A
50
52
  export declare function createPageGetHandler(options: PageRouteOptions): (c: Context) => Promise<Response>;
51
53
  export declare function createPageMutationHandler(options: PageRouteOptions): (c: Context) => Promise<Response>;
52
54
  export declare function createPagesFallback(options: {
55
+ trailingSlash?: boolean;
56
+ pagePatterns?: Array<RegExp>;
53
57
  routing: RoutingRuntime;
54
58
  errors: ErrorRenderer;
55
59
  fallbackRules?: Array<RoutingRule>;
@@ -73,6 +77,13 @@ export declare function createAssetNotFound(options: {
73
77
  fallbackRules?: Array<RoutingRule>;
74
78
  assetsDir?: string;
75
79
  }): (c: Context) => Promise<Response>;
80
+ /**
81
+ * Build the URL for one entry a page's `getPrerenderPaths()` returned. Values
82
+ * are percent-encoded like `routeUrl()`. Errors name the server file and the
83
+ * entry index, and fail the build: a wrong entry must not silently produce a
84
+ * missing or misplaced page.
85
+ */
86
+ export declare function buildPrerenderPath(pattern: string, params: unknown, file: string, index: number): string;
76
87
  export type RoutingRule = {
77
88
  source: string;
78
89
  destination: string;
@@ -112,6 +123,6 @@ export declare function createRoutingRuntime(app: Hono, options?: {
112
123
  blockedAssetExtensions?: Array<string>;
113
124
  }): RoutingRuntime;
114
125
  export declare function markNoMatch(request: Request, response: Response): Response;
115
- export declare function createHttpRouteHandler(load: () => Promise<Record<string, (c: Context) => unknown>>, method: string): (c: Context) => Promise<Response>;
126
+ export declare function createHttpRouteHandler(load: () => Promise<Record<string, (c: CloudContext) => unknown>>, method: string): (c: Context) => Promise<Response>;
116
127
  export declare function createModuleLoader<T>(load: () => Promise<T>, cache?: boolean): () => Promise<T>;
117
- export { createAssetFallback, createClientAssetTags, createManifestLoader, createWorkerFetch, filterInternalBindings };
128
+ export { createAssetFallback, createClientAssetTags, createManifestLoader, createWorkerFetch, filterInternalBindings, prerenderPathsResponse };
@@ -1,11 +1,12 @@
1
- import { n as createClientAssetTags, r as createManifestLoader, t as ASSET_EXTENSIONS } from "../routing-assets-DJIVOrCh.mjs";
2
- import { t as renderDefaultErrorPage } from "../error-pages-COVBnzK7.mjs";
3
- import { t as convertReturnValue } from "../response-HmNjB30w.mjs";
4
1
  import { i as searchWithoutActionKey, n as hasActionKey, r as markActionKey, t as actionKeySegment } from "../action-key-XtKKbbsi.mjs";
5
- import { n as handlePageGet, r as handlePageMutation } from "../protocol-COyySMki.mjs";
6
- import { t as VoidAssetRewriteError } from "../handler-DnI_au0K.mjs";
7
2
  import { i as authDependentRequests, n as markStaticAsset, r as SHARED_CACHE_HEADERS, t as isUnchangedStaticAsset } from "../static-asset-marker-DsQKz6lt.mjs";
8
- import { r as toUrlString } from "../route-url-CRDF-I0I.mjs";
3
+ import { t as VoidAssetRewriteError } from "../handler-C9SnmeW1.mjs";
4
+ import { t as convertReturnValue } from "../response-HmNjB30w.mjs";
5
+ import { r as toUrlString, t as interpolateRouteParams } from "../route-url-CfCR4oMj.mjs";
6
+ import { n as createClientAssetTags, r as createManifestLoader, t as ASSET_EXTENSIONS } from "../routing-assets-DJIVOrCh.mjs";
7
+ import { n as handlePageGet, r as handlePageMutation } from "../protocol-yxdHxFLN.mjs";
8
+ import { t as decodePagePath } from "../url-CuoEn0o3.mjs";
9
+ import { t as renderDefaultErrorPage } from "../error-pages-COVBnzK7.mjs";
9
10
  import { AsyncLocalStorage } from "node:async_hooks";
10
11
  import { compilePattern, matchPattern, matchPatternCaptures, mergeQueryIntoLocation, redirectToHttps, substituteParams } from "@void/edge";
11
12
  // src/runtime/routing-worker.ts
@@ -105,6 +106,17 @@ function filterInternalBindings(env, prefixes, exactNames = []) {
105
106
  getOwnPropertyDescriptor: (target, prop) => hidden(prop) ? void 0 : Reflect.getOwnPropertyDescriptor(target, prop)
106
107
  });
107
108
  }
109
+ /**
110
+ * Answer the prerender runner. A getPrerenderPaths() error is returned in the
111
+ * body so the build can show which page and entry to fix, not only HTTP 500.
112
+ */
113
+ async function prerenderPathsResponse(collect) {
114
+ try {
115
+ return Response.json({ paths: await collect() });
116
+ } catch (error) {
117
+ return Response.json({ error: error instanceof Error ? error.message : String(error) }, { status: 500 });
118
+ }
119
+ }
108
120
  function createWorkerFetch(options) {
109
121
  return async (request, originalEnv, ctx) => {
110
122
  const url = new URL(request.url);
@@ -126,7 +138,7 @@ function createWorkerFetch(options) {
126
138
  }
127
139
  const internal = await options.internalRoute(request, env, ctx);
128
140
  if (internal) return internal;
129
- if (discovery) return Response.json({ paths: await options.collectPrerenderPaths(request, env, ctx) });
141
+ if (discovery) return prerenderPathsResponse(() => options.collectPrerenderPaths(request, env, ctx));
130
142
  if (options.alwaysUseHttps) {
131
143
  const redirect = redirectToHttps(request);
132
144
  if (redirect) return redirect;
@@ -142,6 +154,16 @@ function createWorkerFetch(options) {
142
154
  };
143
155
  }
144
156
  // src/runtime/routing-pages.ts
157
+ function preparePageRequest(c, options) {
158
+ if (!options.trailingSlash) return true;
159
+ if (!c.req.path.endsWith("/")) return false;
160
+ if (options.catchAllParam) {
161
+ const params = c.req.param();
162
+ params[options.catchAllParam] = params[options.catchAllParam].slice(0, -1);
163
+ c.req.param = ((key) => key ? params[key] : { ...params });
164
+ }
165
+ return true;
166
+ }
145
167
  function actionNameOf(url) {
146
168
  return new URL(url).searchParams.keys().next().value;
147
169
  }
@@ -169,12 +191,14 @@ function createNamedActionMarker(matchedRoutes) {
169
191
  }
170
192
  function createPageGetHandler(options) {
171
193
  return markRouteHandler(async (context) => {
194
+ if (!preparePageRequest(context, options)) return context.notFound();
172
195
  const mod = options.load ? await options.load() : { head: options.head };
173
196
  return handlePageGet(mod.loader, mod.head, context, options.componentId, options.render, options.assets, options.headConfig ?? void 0, options.renderOptions);
174
197
  });
175
198
  }
176
199
  function createPageMutationHandler(options) {
177
200
  const mutationHandler = async (context) => {
201
+ if (!preparePageRequest(context, options)) return context.notFound();
178
202
  const mod = options.load ? await options.load() : {};
179
203
  const actionName = options.namedActions ? actionNameOf(context.req.url) : void 0;
180
204
  const name = actionName || "default";
@@ -195,13 +219,34 @@ function createPagesFallback(options) {
195
219
  if (path === "/api" || path.startsWith("/api/") || c.req.method !== "GET" && c.req.method !== "HEAD") return c.text("Not Found", 404);
196
220
  const assets = c.env?.ASSETS;
197
221
  const assetResponse = assets && typeof assets.fetch === "function" ? await assets.fetch(c.req.raw) : options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 }));
222
+ const filePath = path.includes("/.") || path.substring(path.lastIndexOf("/") + 1).includes(".");
223
+ const pageNeedsSlash = options.trailingSlash && !path.endsWith("/") && options.pagePatterns?.some((pattern) => pattern.test(decodePagePath(`${path}/`)));
224
+ let directoryIndex = false;
225
+ if (pageNeedsSlash && assetResponse.status === 200 && assetResponse.headers.get("Content-Type")?.split(";")[0] === "text/html" && assets) {
226
+ const url = new URL(c.req.url);
227
+ url.pathname += "/";
228
+ const index = await assets.fetch(new Request(url, {
229
+ method: c.req.method,
230
+ headers: c.req.raw.headers,
231
+ redirect: c.req.raw.redirect,
232
+ signal: c.req.raw.signal
233
+ }));
234
+ directoryIndex = index.status === 200;
235
+ await index.body?.cancel();
236
+ }
237
+ if (pageNeedsSlash && (assetResponse.status === 404 || directoryIndex)) {
238
+ await assetResponse.body?.cancel();
239
+ const url = new URL(c.req.url);
240
+ url.pathname += "/";
241
+ return Response.redirect(url.href, 301);
242
+ }
198
243
  if (assetResponse.status !== 404) return markStaticAsset(c, await cachePolicy(c.req.raw, c.env, assetResponse));
199
244
  const fallback = options.fallbackRules ? await options.routing.applyFallback(c, options.fallbackRules) : void 0;
200
245
  if (fallback) return fallback;
201
- if (path.includes("/.") || path.substring(path.lastIndexOf("/") + 1).includes(".")) return options.errors.serveCustomPage(c, 404, "Not Found");
202
- if (path !== "/" && path.endsWith("/")) {
246
+ if (filePath) return options.errors.serveCustomPage(c, 404, "Not Found");
247
+ if (path !== "/" && (options.trailingSlash ? !path.endsWith("/") : path.endsWith("/"))) {
203
248
  const url = new URL(c.req.url);
204
- url.pathname = path.slice(0, -1);
249
+ url.pathname = options.trailingSlash ? `${path}/` : path.slice(0, -1);
205
250
  return Response.redirect(url.href, 301);
206
251
  }
207
252
  return options.routing.markNoMatch(c.req.raw, await options.errors.serveCustomPage(c, 404, "Not Found"));
@@ -742,6 +787,43 @@ function createErrorRenderer(options) {
742
787
  }
743
788
  };
744
789
  }
790
+ // src/runtime/prerender-path.ts
791
+ const ROUTE_TOKEN = /(?:^|\/)(?::([^/{}]+)(\{\.\+\})?|\*)(?=\/|$)/g;
792
+ function describeValue(value) {
793
+ if (value === null) return "null";
794
+ if (Array.isArray(value)) return "an array";
795
+ if (value === void 0) return "undefined";
796
+ return typeof value === "object" ? "an object" : `a ${typeof value}`;
797
+ }
798
+ /** Validate one `getPrerenderPaths()` entry and convert the values its pattern uses to strings. */
799
+ function routeParams(pattern, params) {
800
+ if (typeof params !== "object" || params === null || Array.isArray(params)) throw new TypeError(`Expected an object of route params, got ${describeValue(params)}.`);
801
+ const values = Object.create(null);
802
+ for (const [, paramName, catchAll] of pattern.matchAll(ROUTE_TOKEN)) {
803
+ const name = paramName ?? "*";
804
+ if (!Object.hasOwn(params, name)) continue;
805
+ const value = params[name];
806
+ if (typeof value !== "string" && typeof value !== "number") throw new TypeError(`Route param "${name}" must be a string or number.`);
807
+ const text = String(value);
808
+ if (paramName !== void 0 && !catchAll && text.includes("/")) throw new TypeError(`Route param "${name}" cannot contain "/". Use a catch-all page ([...${name}]) for nested paths.`);
809
+ values[name] = text;
810
+ }
811
+ return values;
812
+ }
813
+ /**
814
+ * Build the URL for one entry a page's `getPrerenderPaths()` returned. Values
815
+ * are percent-encoded like `routeUrl()`. Errors name the server file and the
816
+ * entry index, and fail the build: a wrong entry must not silently produce a
817
+ * missing or misplaced page.
818
+ */
819
+ function buildPrerenderPath(pattern, params, file, index) {
820
+ try {
821
+ return interpolateRouteParams(pattern, routeParams(pattern, params), true);
822
+ } catch (error) {
823
+ const message = error instanceof Error ? error.message : String(error);
824
+ throw new TypeError(`${file} getPrerenderPaths()[${index}]: ${message}`);
825
+ }
826
+ }
745
827
  // src/runtime/routing.ts
746
828
  /** One state owner per generated app: recursive dispatch shares rewrite and fallback guards. */
747
829
  function createRoutingRuntime(app, options = {}) {
@@ -954,4 +1036,4 @@ function createModuleLoader(load, cache = true) {
954
1036
  return module;
955
1037
  };
956
1038
  }
957
- export { createAssetFallback, createAssetNotFound, createClientAssetTags, createErrorRenderer, createHttpRouteHandler, createManifestLoader, createModuleLoader, createNamedActionMarker, createPageGetHandler, createPageMutationHandler, createPagesFallback, createRoutingRuntime, createSsrFallback, createWorkerFetch, filterInternalBindings, markNoMatch, markRouteHandler };
1039
+ export { buildPrerenderPath, createAssetFallback, createAssetNotFound, createClientAssetTags, createErrorRenderer, createHttpRouteHandler, createManifestLoader, createModuleLoader, createNamedActionMarker, createPageGetHandler, createPageMutationHandler, createPagesFallback, createRoutingRuntime, createSsrFallback, createWorkerFetch, filterInternalBindings, markNoMatch, markRouteHandler, prerenderPathsResponse };
@@ -1,6 +1,6 @@
1
1
  import { a as getRawRuntimeEnv } from "../env-raw-e8qgqAzQ.mjs";
2
- import { t as UsageLimit } from "../limits-CrHLm5Tk.mjs";
3
2
  import { a as requireRuntimeBinding } from "../env-DtKg5G26.mjs";
3
+ import { t as UsageLimit } from "../limits-CrHLm5Tk.mjs";
4
4
  import { i as validateSandboxOptions, n as SANDBOX_PORT_HEADER, r as SandboxContainer } from "../sandbox-container-BuxhwCgt.mjs";
5
5
  export * from "@cloudflare/sandbox";
6
6
  // src/runtime/sandbox.ts
@@ -1,3 +1,4 @@
1
+ import { n as RequestUrl } from "../route-url-C3JwYrER.mjs";
1
2
  export type SseClientEvent<T = unknown> = {
2
3
  data: T;
3
4
  event: string;
@@ -20,4 +21,11 @@ export type ConnectEventStreamOptions = {
20
21
  events?: Array<string>;
21
22
  parse?: "json" | "text" | ((data: string) => unknown);
22
23
  };
23
- export declare function connectEventStream<Events extends SseEventMap = SseEventMap>(url: string | URL, options?: ConnectEventStreamOptions): SseClient<Events>;
24
+ /**
25
+ * Open an `EventSource` to a route that returns `eventStream()`.
26
+ *
27
+ * With `routing.typedRoutes`, a string `url` must match one of the app's routes
28
+ * or be an absolute `http://`/`https://` URL. Cast a path built at runtime with
29
+ * `as RouteUrl`.
30
+ */
31
+ export declare function connectEventStream<Events extends SseEventMap = SseEventMap>(url: RequestUrl | URL, options?: ConnectEventStreamOptions): SseClient<Events>;
@@ -1,4 +1,11 @@
1
1
  // src/runtime/sse-client.ts
2
+ /**
3
+ * Open an `EventSource` to a route that returns `eventStream()`.
4
+ *
5
+ * With `routing.typedRoutes`, a string `url` must match one of the app's routes
6
+ * or be an absolute `http://`/`https://` URL. Cast a path built at runtime with
7
+ * `as RouteUrl`.
8
+ */
2
9
  function connectEventStream(url, options = {}) {
3
10
  const EventSourceCtor = globalThis.EventSource;
4
11
  if (!EventSourceCtor) throw new Error("sse: EventSource is not available in this runtime.");
@@ -1,2 +1,2 @@
1
- import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-BR6Tvjkp.mjs";
1
+ import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-DjqciiDc.mjs";
2
2
  export { HandlerInput, ValidatorSlots, runValidation };
@@ -1 +1 @@
1
- export { t as runValidation } from "../validator-CTfmzZYb.mjs";
1
+ export { t as runValidation } from "../validator-8-NZs2Xr.mjs";
@@ -1,6 +1,6 @@
1
- import { n as AuthState } from "../auth-CH4PLAX1.mjs";
2
- import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-BJyG2mH0.mjs";
3
- import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-Dmjg5NH2.mjs";
1
+ import { r as AuthState } from "../auth-CZrthGxs.mjs";
2
+ import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-C-0uZg8-.mjs";
3
+ import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-DB8Feytg.mjs";
4
4
  export type WebSocketRouteMeta = {
5
5
  name?: string;
6
6
  key?: WebSocketInstanceKey;
@@ -1,4 +1,4 @@
1
- import { t as authContext } from "../auth-YVjBX5NY.mjs";
1
+ import { t as authContext } from "../auth-DyWp-fSo.mjs";
2
2
  import { o as withRuntimeEnv } from "../env-DtKg5G26.mjs";
3
3
  // src/runtime/ws-server.ts
4
4
  function matchRoute(pattern, pathname) {
@@ -1,2 +1,2 @@
1
- import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-Dmjg5NH2.mjs";
1
+ import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-DB8Feytg.mjs";
2
2
  export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, WebSocketInstanceKey, connect, defineRoom, defineWebSocket };
@@ -1,5 +1,5 @@
1
1
  import { t as isResourceName } from "../resource-name-DlJ9QXzg.mjs";
2
- import { t as interpolateRouteParams } from "../route-url-CRDF-I0I.mjs";
2
+ import { t as interpolateRouteParams } from "../route-url-CfCR4oMj.mjs";
3
3
  // src/runtime/ws.ts
4
4
  function defineRoom(definition) {
5
5
  assertResourceName(definition.name);
@@ -1,9 +1,10 @@
1
1
  import { a as join, l as toSlash, n as dirname, r as extname, t as basename } from "./dist-DMYe8CZJ.mjs";
2
- import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
3
2
  import { t as glob } from "./dist-BWNkVq50.mjs";
4
- import { n as isIdentifier, o as moduleExportName, r as isLiteral } from "./ast-Cv0JwXqb.mjs";
5
- import { a as staticLiteral, i as staticExportInitializers, t as bindingNames } from "./ast-bindings-BkivMJIo.mjs";
3
+ import { p as readConfig } from "./config-5oSQhZNj.mjs";
6
4
  import { i as voidWarn } from "./log-D9hwSySP.mjs";
5
+ import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
6
+ import { a as staticLiteral, i as staticExportInitializers, t as bindingNames } from "./ast-bindings-BkivMJIo.mjs";
7
+ import { n as isIdentifier, o as moduleExportName, r as isLiteral } from "./ast-Cv0JwXqb.mjs";
7
8
  import { t as MagicString } from "./dist-B6eN80gc.mjs";
8
9
  import { existsSync, readFileSync, statSync } from "node:fs";
9
10
  import { parseSync } from "vite";
@@ -417,13 +418,14 @@ function isStaticPattern(pattern) {
417
418
  }
418
419
  /** The RegExp literal a page pattern matches with, the same on the client and the server. */
419
420
  function patternToRegex(pattern) {
420
- return `/^${pattern.split("/").map((segment) => {
421
+ const trailingWildcard = pattern.endsWith("/*/");
422
+ return `/^${(trailingWildcard ? pattern.slice(0, -2) : pattern).split("/").map((segment) => {
421
423
  const group = captureGroup(segment);
422
424
  if (group) return group;
423
425
  let literal = "";
424
426
  for (const char of segment) literal += REGEX_SYNTAX.includes(char) ? "\\" + char : char;
425
427
  return literal;
426
- }).join("\\/")}$/`;
428
+ }).join("\\/")}${trailingWildcard ? "(?:(.*)\\/)?" : ""}$/`;
427
429
  }
428
430
  // src/pages/scan.ts
429
431
  const COMPONENT_EXTENSIONS = [
@@ -543,6 +545,7 @@ function pageFileEnvironment(relativePath) {
543
545
  return base.endsWith(".dev") ? "dev" : base.endsWith(".prod") ? "prod" : null;
544
546
  }
545
547
  async function scanPages(root, options) {
548
+ const trailingSlash = options?.trailingSlash ?? readConfig(root).routing?.trailingSlash;
546
549
  const pagesDir = options?.pagesDir ?? options?.paths?.pagesDir ?? readProjectPaths(root).pagesDir;
547
550
  if (!existsSync(pagesDir)) return {
548
551
  pages: [],
@@ -634,7 +637,7 @@ async function scanPages(root, options) {
634
637
  })));
635
638
  } else layout = deriveFromSource(join(pagesDir, file), "page-layout", (source) => componentLayout(source, file));
636
639
  pages.push({
637
- pattern: route.pattern,
640
+ pattern: trailingSlash && route.pattern !== "/" ? `${route.pattern}/` : route.pattern,
638
641
  params: route.params,
639
642
  catchAll: route.catchAll,
640
643
  componentPath: file,
@@ -763,4 +766,4 @@ function extractFrontmatterLayout(source, matter) {
763
766
  if (value === false || value === "false") return false;
764
767
  return typeof value === "string" ? value : JSON.stringify(value);
765
768
  }
766
- export { ROUTE_EXTENSIONS as _, resolveLayoutChain as a, editIslandSource as c, deriveFromSource as d, invalidateSourceAnalysis as f, parseWebSocketFilename as g, parseRouteFilename as h, resolveEffectiveLayoutChain as i, findIslandImports as l, isRouteEnabledForEnvironment as m, scanPages as n, resolveLayoutIds as o, compareRouteSpecificity as p, generateComponentManifest as r, resolveNamedLayout as s, pageFileEnvironment as t, findStaticCssImports as u };
769
+ export { parseWebSocketFilename as _, resolveEffectiveLayoutChain as a, resolveNamedLayout as c, findStaticCssImports as d, deriveFromSource as f, parseRouteFilename as g, isRouteEnabledForEnvironment as h, patternToRegex as i, editIslandSource as l, compareRouteSpecificity as m, scanPages as n, resolveLayoutChain as o, invalidateSourceAnalysis as p, generateComponentManifest as r, resolveLayoutIds as s, pageFileEnvironment as t, findIslandImports as u, ROUTE_EXTENSIONS as v };