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,8 +1,8 @@
1
+ import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-BQdgCVQF.mjs";
2
+ import { c as getToken } from "./auth-CCk9Seol.mjs";
3
+ import { r as PlatformClient } from "./client-BEZmTP6p.mjs";
4
+ import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-CXJTIAtF.mjs";
1
5
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
2
- import { c as getToken } from "./auth-Dy8svcqQ.mjs";
3
- import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-D23AAMxT.mjs";
4
- import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
5
- import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-BCdLioKP.mjs";
6
6
  // src/cli/rollback.ts
7
7
  async function runRollbackCommand(root, deployId, explicitPlatform) {
8
8
  console.log();
@@ -74,7 +74,7 @@ async function runRollbackCommand(root, deployId, explicitPlatform) {
74
74
  }
75
75
  }
76
76
  async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
77
- const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-laxRA8HN.mjs");
77
+ const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-CZkjFrzH.mjs");
78
78
  const context = resolveCloudflareOperationContext(root);
79
79
  const status = await readCloudflareWorkerStatus(context);
80
80
  const deployedVersionIds = new Set(status.deployedVersionIds);
@@ -100,7 +100,7 @@ async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
100
100
  options: candidates.map((version) => ({
101
101
  value: version.id,
102
102
  label: `${version.id} ${dim(version.createdAt ? formatRelativeTime(version.createdAt) : "")}`,
103
- hint: version.metadata ? formatCount(version.metadata.migrations.length, "migration") : "migration state unknown"
103
+ hint: version.metadata?.migrations ? formatCount(version.metadata.migrations.length, "migration") : "migration state unknown"
104
104
  }))
105
105
  });
106
106
  if (isCancel(result)) {
@@ -111,7 +111,7 @@ async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
111
111
  }
112
112
  const current = status.versions.find((version) => version.id === status.activeVersionId);
113
113
  if (target.metadata?.schema !== 2 || current?.metadata?.schema !== 2 || target.metadata.triggerConfig.preserve || current.metadata.triggerConfig.preserve) log.info("This rollback keeps the current domains, routes, and schedules. The selected version has no complete trigger snapshot.");
114
- if (!current?.metadata || !target.metadata) {
114
+ if (!current?.metadata?.migrations || !target.metadata?.migrations) {
115
115
  log.warn("Void migration metadata is unavailable for one of these versions. Database migrations are forward-only and will not be reverted.");
116
116
  await confirmRollbackOrExit();
117
117
  } else {
@@ -1,6 +1,212 @@
1
1
  import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
2
- import { i as writeFileIfChanged } from "./project-tsconfig-BMveFb4b.mjs";
2
+ import { i as writeFileIfChanged } from "./project-tsconfig-nhnTWO_Y.mjs";
3
3
  import { existsSync, rmSync } from "node:fs";
4
+ // src/codegen/binding-types.ts
5
+ const bindingTypes = [
6
+ [
7
+ "kv_namespaces",
8
+ "binding",
9
+ "KVNamespace"
10
+ ],
11
+ [
12
+ "d1_databases",
13
+ "binding",
14
+ "D1Database"
15
+ ],
16
+ [
17
+ "r2_buckets",
18
+ "binding",
19
+ "R2Bucket"
20
+ ],
21
+ [
22
+ "services",
23
+ "binding",
24
+ "Fetcher"
25
+ ],
26
+ [
27
+ "queues.producers",
28
+ "binding",
29
+ "Queue"
30
+ ],
31
+ [
32
+ "durable_objects.bindings",
33
+ "name",
34
+ "DurableObjectNamespace"
35
+ ],
36
+ [
37
+ "workflows",
38
+ "binding",
39
+ "Workflow"
40
+ ],
41
+ [
42
+ "hyperdrive",
43
+ "binding",
44
+ "Hyperdrive"
45
+ ],
46
+ [
47
+ "vectorize",
48
+ "binding",
49
+ "VectorizeIndex"
50
+ ],
51
+ [
52
+ "analytics_engine_datasets",
53
+ "binding",
54
+ "AnalyticsEngineDataset"
55
+ ],
56
+ [
57
+ "send_email",
58
+ "name",
59
+ "SendEmail"
60
+ ],
61
+ [
62
+ "ratelimits",
63
+ "name",
64
+ "RateLimit"
65
+ ],
66
+ [
67
+ "dispatch_namespaces",
68
+ "binding",
69
+ "DispatchNamespace"
70
+ ],
71
+ [
72
+ "mtls_certificates",
73
+ "binding",
74
+ "Fetcher"
75
+ ],
76
+ [
77
+ "secrets_store_secrets",
78
+ "binding",
79
+ "SecretsStoreSecret"
80
+ ],
81
+ [
82
+ "worker_loaders",
83
+ "binding",
84
+ "WorkerLoader"
85
+ ],
86
+ [
87
+ "vpc_services",
88
+ "binding",
89
+ "Fetcher"
90
+ ],
91
+ [
92
+ "vpc_networks",
93
+ "binding",
94
+ "Fetcher"
95
+ ],
96
+ [
97
+ "ai_search_namespaces",
98
+ "binding",
99
+ "AiSearchNamespace"
100
+ ],
101
+ [
102
+ "ai_search",
103
+ "binding",
104
+ "AiSearchInstance"
105
+ ],
106
+ [
107
+ "agent_memory",
108
+ "binding",
109
+ "AgentMemoryNamespace"
110
+ ],
111
+ [
112
+ "artifacts",
113
+ "binding",
114
+ "Artifacts"
115
+ ],
116
+ [
117
+ "flagship",
118
+ "binding",
119
+ "Flagship"
120
+ ],
121
+ [
122
+ "ai",
123
+ "binding",
124
+ "Ai"
125
+ ],
126
+ [
127
+ "browser",
128
+ "binding",
129
+ "BrowserRun"
130
+ ],
131
+ [
132
+ "analytics",
133
+ "binding",
134
+ "AnalyticsSQLBinding"
135
+ ],
136
+ [
137
+ "images",
138
+ "binding",
139
+ "ImagesBinding"
140
+ ],
141
+ [
142
+ "stream",
143
+ "binding",
144
+ "StreamBinding"
145
+ ],
146
+ [
147
+ "media",
148
+ "binding",
149
+ "MediaBinding"
150
+ ],
151
+ [
152
+ "version_metadata",
153
+ "binding",
154
+ "WorkerVersionMetadata"
155
+ ],
156
+ [
157
+ "assets",
158
+ "binding",
159
+ "Fetcher"
160
+ ],
161
+ [
162
+ "pipelines",
163
+ "binding",
164
+ "import(\"cloudflare:pipelines\").Pipeline<import(\"cloudflare:pipelines\").PipelineRecord>"
165
+ ],
166
+ [
167
+ "k2",
168
+ "binding",
169
+ "{ send(records: Array<{ content: ArrayBuffer; headers?: Record<string, string> }> | Array<{ content: Uint8Array; headers?: Record<string, string> }>): Promise<{ success: true } | { success: false; error: { code: number; message: string; retryable: boolean } }> }"
170
+ ]
171
+ ];
172
+ const managedBindings = /* @__PURE__ */ new Set([
173
+ "DB",
174
+ "KV",
175
+ "STORAGE",
176
+ "AI",
177
+ "SANDBOX",
178
+ "ASSETS"
179
+ ]);
180
+ /** Generate types for explicitly configured bindings without changing managed types. */
181
+ function generateBindingTypes(config) {
182
+ if (config.target && config.target !== "cloudflare") return null;
183
+ const bindings = /* @__PURE__ */ new Map();
184
+ for (const [path, nameField, type] of bindingTypes) {
185
+ let value = config.cloudflare;
186
+ for (const field of path.split(".")) value = value && typeof value === "object" ? value[field] : void 0;
187
+ for (const entry of Array.isArray(value) ? value : [value]) {
188
+ const name = entry && typeof entry === "object" ? entry[nameField] : void 0;
189
+ if (typeof name === "string" && !managedBindings.has(name)) bindings.set(name, type);
190
+ }
191
+ }
192
+ if (bindings.size === 0) return null;
193
+ return [
194
+ "// Auto-generated by void — do not edit",
195
+ "export {};",
196
+ "declare global {",
197
+ " interface VoidGeneratedEnvBindings {",
198
+ ...[...bindings].sort(([a], [b]) => a.localeCompare(b)).map(([name, type]) => ` ${JSON.stringify(name)}: ${type};`),
199
+ " }",
200
+ "}",
201
+ ""
202
+ ].join("\n");
203
+ }
204
+ function syncBindingTypes(root, config) {
205
+ const path = join(root, ".void", "bindings.d.ts");
206
+ const dts = generateBindingTypes(config);
207
+ if (dts) writeFileIfChanged(path, dts);
208
+ else rmSync(path, { force: true });
209
+ }
4
210
  // src/codegen/auth-types.ts
5
211
  /**
6
212
  * Generate `.void/auth.d.ts` content. Fills `void/auth`'s `VoidAuthTypes`
@@ -22,12 +228,13 @@ function generateAuthTypes(authFileAbs, outDir) {
22
228
  lines.push("// Auto-generated by void — do not edit");
23
229
  lines.push("export {}");
24
230
  lines.push("");
25
- lines.push("import type { InferAuthSession } from \"void/auth\";");
231
+ lines.push("import type { InferAuthInstance, InferAuthSession } from \"void/auth\";");
26
232
  lines.push("");
27
233
  lines.push(`type _VoidAuthSession = InferAuthSession<typeof import("${importPath}")["default"]>;`);
28
234
  lines.push("");
29
235
  lines.push("declare module \"void/auth\" {");
30
236
  lines.push(" interface VoidAuthTypes {");
237
+ lines.push(` auth: InferAuthInstance<typeof import("${importPath}")["default"]>;`);
31
238
  lines.push(" user: _VoidAuthSession[\"user\"];");
32
239
  lines.push(" session: _VoidAuthSession[\"session\"];");
33
240
  lines.push(" }");
@@ -78,10 +285,27 @@ function generateQueueTypes(queues, queuesDir, outDir) {
78
285
  return lines.join("\n");
79
286
  }
80
287
  // src/codegen/route-types.ts
288
+ /** Present bracket parameters without changing the router's compiled patterns. */
289
+ function publicRoutePattern(pattern) {
290
+ return pattern.split("/").map((segment) => {
291
+ if (segment === "*") return "[...]";
292
+ const param = segment.match(/^:([^/{}]+)(\{\.\+\})?$/);
293
+ return param ? `[${param[2] ? "..." : ""}${param[1]}]` : segment;
294
+ }).join("/");
295
+ }
296
+ /** Legacy keys stay indexable and carry the exact same contract as the public key. */
297
+ function legacyRouteAlias(lines, map, pattern) {
298
+ const publicPattern = publicRoutePattern(pattern);
299
+ if (publicPattern !== pattern) {
300
+ const label = JSON.stringify(publicPattern).replace(/\*\//g, "*\\/");
301
+ lines.push(` /** @deprecated Use ${label} instead. */`);
302
+ lines.push(` ${JSON.stringify(pattern)}: ${map}[${JSON.stringify(publicPattern)}];`);
303
+ }
304
+ }
81
305
  /** Percent-encode a pattern's fixed segments the way `routeUrl()` serializes its pathname. */
82
306
  function encodeRoutePattern(pattern) {
83
307
  return pattern.split("/").map((segment) => {
84
- if (segment.startsWith(":") || segment === "*") return segment;
308
+ if (segment.startsWith(":") || segment === "*" || /^\[.*\]$/.test(segment)) return segment;
85
309
  const url = new URL("https://void.invalid");
86
310
  url.pathname = `/${segment}`;
87
311
  return url.pathname.slice(1);
@@ -152,11 +376,13 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
152
376
  lines.push(" export type RouteDestination<P extends RoutePath = RoutePath> = P extends RoutePath");
153
377
  lines.push(" ? { pathname: P } & RouteOptions<P>");
154
378
  lines.push(" : never;");
155
- lines.push(" type RouteUrlSegment<S extends string> = S extends `:${string}` | \"*\" ? string : S;");
379
+ lines.push(" type RouteUrlSegment<S extends string> = S extends `:${string}` | `[${string}]` | \"*\" ? string : S;");
156
380
  lines.push(" type RouteSegmentsUrl<P extends string> = P extends `${infer Segment}/${infer Rest}`");
157
381
  lines.push(" ? `${RouteUrlSegment<Segment>}/${RouteSegmentsUrl<Rest>}`");
158
382
  lines.push(" : RouteUrlSegment<P>;");
159
- lines.push(" type RoutePatternUrl<P extends string> = P extends `${infer Prefix}/*`");
383
+ lines.push(" type RoutePatternUrl<P extends string> = P extends `${infer Prefix}/${\"*\" | \"[...]\"}/`");
384
+ lines.push(" ? `${RouteSegmentsUrl<Prefix>}/` | `${RouteSegmentsUrl<Prefix>}/${string}/`");
385
+ lines.push(" : P extends `${infer Prefix}/${\"*\" | \"[...]\"}`");
160
386
  lines.push(" ? (Prefix extends \"\" ? \"/\" : RouteSegmentsUrl<Prefix>) | `${RouteSegmentsUrl<Prefix>}/${string}`");
161
387
  lines.push(" : RouteSegmentsUrl<P>;");
162
388
  lines.push(" type EncodedRoutePath = EncodedRoutePathMap[keyof EncodedRoutePathMap] & string;");
@@ -194,14 +420,38 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
194
420
  }
195
421
  for (const [pattern, params] of paths) {
196
422
  const names = [...params].map((name) => JSON.stringify(name)).join(" | ") || "never";
197
- lines.push(` ${JSON.stringify(pattern)}: ${names};`);
423
+ lines.push(` ${JSON.stringify(publicRoutePattern(pattern))}: ${names};`);
424
+ legacyRouteAlias(lines, "RoutePathMap", pattern);
425
+ }
426
+ lines.push(" }");
427
+ lines.push("");
428
+ lines.push(" export interface PagePathMap {");
429
+ const pagePaths = /* @__PURE__ */ new Map();
430
+ for (const page of scan.pages.pages) {
431
+ const params = pagePaths.get(page.pattern) ?? /* @__PURE__ */ new Set();
432
+ for (const name of page.params) params.add(name);
433
+ if (page.pattern.split("/").includes("*")) params.add("*");
434
+ pagePaths.set(page.pattern, params);
435
+ }
436
+ for (const [pattern, params] of pagePaths) {
437
+ const names = [...params].map((name) => JSON.stringify(name)).join(" | ") || "never";
438
+ lines.push(` ${JSON.stringify(publicRoutePattern(pattern))}: ${names};`);
439
+ legacyRouteAlias(lines, "PagePathMap", pattern);
198
440
  }
199
441
  lines.push(" }");
442
+ lines.push(" export type PagePath = keyof PagePathMap & string;");
443
+ lines.push(" export type PageParams<P extends PagePath> = P extends PagePath");
444
+ lines.push(" ? { [K in Exclude<PagePathMap[P], \"*\"> & string]: string }");
445
+ lines.push(" : never;");
200
446
  lines.push("");
201
447
  lines.push(" export interface EncodedRoutePathMap {");
202
448
  for (const pattern of paths.keys()) {
203
- const encoded = encodeRoutePattern(pattern);
204
- if (encoded !== pattern) lines.push(` ${JSON.stringify(pattern)}: ${JSON.stringify(encoded)};`);
449
+ const publicPattern = publicRoutePattern(pattern);
450
+ const encoded = encodeRoutePattern(publicPattern);
451
+ if (encoded !== publicPattern) {
452
+ lines.push(` ${JSON.stringify(publicPattern)}: ${JSON.stringify(encoded)};`);
453
+ if (publicPattern !== pattern) lines.push(` ${JSON.stringify(pattern)}: ${JSON.stringify(encodeRoutePattern(pattern))};`);
454
+ }
205
455
  }
206
456
  lines.push(" }");
207
457
  lines.push("");
@@ -293,7 +543,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
293
543
  sources.push(route);
294
544
  }
295
545
  for (const [pattern, methods] of routesByPattern) {
296
- lines.push(` ${JSON.stringify(pattern)}: {`);
546
+ lines.push(` ${JSON.stringify(publicRoutePattern(pattern))}: {`);
297
547
  for (const [method, sources] of methods) {
298
548
  const imports = sources.map((route) => {
299
549
  const importPath = relative(outDir, `${routesDir}/${route.filePath}`);
@@ -305,6 +555,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
305
555
  lines.push(" };");
306
556
  }
307
557
  lines.push(" };");
558
+ legacyRouteAlias(lines, "RouteMap", pattern);
308
559
  }
309
560
  lines.push(" }");
310
561
  lines.push("");
@@ -320,11 +571,12 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
320
571
  const importPath = relative(outDir, `${routesDir}/${route.filePath}`);
321
572
  return `(typeof import(${JSON.stringify(importPath)}))["default"]["messages"]`;
322
573
  });
323
- lines.push(` ${JSON.stringify(pattern)}: {`);
574
+ lines.push(` ${JSON.stringify(publicRoutePattern(pattern))}: {`);
324
575
  lines.push(` params: RouteParams<${JSON.stringify(sources[0].params)}>;`);
325
576
  lines.push(` client: ${imports.map((source) => `ExtractInput<${source}["client"]>`).join(" & ")};`);
326
577
  lines.push(` server: ${imports.map((source) => `ExtractOutput<${source}["server"]>`).join(" | ")};`);
327
578
  lines.push(" };");
579
+ legacyRouteAlias(lines, "WebSocketRouteMap", pattern);
328
580
  }
329
581
  lines.push(" }");
330
582
  const actionPages = scan.pages.pages.filter((p) => p.methods.includes("action") || p.methods.includes("actions"));
@@ -355,12 +607,13 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
355
607
  else bodiesByPattern.set(page.pattern, [body]);
356
608
  }
357
609
  for (const [pattern, bodies] of bodiesByPattern) {
358
- lines.push(` ${JSON.stringify(pattern)}: {`);
610
+ lines.push(` ${JSON.stringify(publicRoutePattern(pattern))}: {`);
359
611
  bodies.forEach((body, index) => {
360
612
  if (index > 0) lines.push(" } | {");
361
613
  lines.push(...body);
362
614
  });
363
615
  lines.push(" };");
616
+ legacyRouteAlias(lines, "PageActionMap", pattern);
364
617
  }
365
618
  lines.push(" }");
366
619
  }
@@ -368,4 +621,4 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
368
621
  lines.push("");
369
622
  return { dts: lines.join("\n") };
370
623
  }
371
- export { syncAuthTypesFile as a, removeAuthTypesIfPresent as i, generateQueueTypes as n, generateAuthTypes as r, generateRouteTypes as t };
624
+ export { syncAuthTypesFile as a, removeAuthTypesIfPresent as i, generateQueueTypes as n, generateBindingTypes as o, generateAuthTypes as r, syncBindingTypes as s, generateRouteTypes as t };
@@ -3,9 +3,9 @@ import { EncodedRoutePathMap, RoutePathMap, RouteTypesConfig } from "void/routes
3
3
  declare function interpolateRouteParams(path: string, params?: Record<string, string>, requireParams?: boolean): string;
4
4
  /** Known page, HTTP and WebSocket route patterns. */
5
5
  type RoutePath = keyof RoutePathMap & string;
6
- type RouteUrlSegment<S extends string> = S extends `:${string}` | "*" ? string : S;
6
+ type RouteUrlSegment<S extends string> = S extends `:${string}` | `[${string}]` | "*" ? string : S;
7
7
  type RouteSegmentsUrl<P extends string> = P extends `${infer Segment}/${infer Rest}` ? `${RouteUrlSegment<Segment>}/${RouteSegmentsUrl<Rest>}` : RouteUrlSegment<P>;
8
- type RoutePatternUrl<P extends string> = P extends `${infer Prefix}/*` ? (Prefix extends "" ? "/" : RouteSegmentsUrl<Prefix>) | `${RouteSegmentsUrl<Prefix>}/${string}` : RouteSegmentsUrl<P>;
8
+ type RoutePatternUrl<P extends string> = P extends `${infer Prefix}/${"*" | "[...]"}/` ? `${RouteSegmentsUrl<Prefix>}/` | `${RouteSegmentsUrl<Prefix>}/${string}/` : P extends `${infer Prefix}/${"*" | "[...]"}` ? (Prefix extends "" ? "/" : RouteSegmentsUrl<Prefix>) | `${RouteSegmentsUrl<Prefix>}/${string}` : RouteSegmentsUrl<P>;
9
9
  type EncodedRoutePath = EncodedRoutePathMap[keyof EncodedRoutePathMap] & string;
10
10
  type RoutePathUrl = RoutePatternUrl<RoutePath | EncodedRoutePath>;
11
11
  /** Whether `routing.typedRoutes` is on in the generated route types. */
@@ -16,6 +16,11 @@ type TypedRoutes = RouteTypesConfig extends {
16
16
  type RouteUrl$1 = TypedRoutes extends true ? RoutePathUrl | `${RoutePathUrl}${"?" | "#"}${string}` : string;
17
17
  /** Anything a link can point to: a route URL, a same-page query or hash, or an external URL. */
18
18
  type Href$1 = TypedRoutes extends true ? RouteUrl$1 | `${"?" | "#"}${string}` | `${"http://" | "https://" | "mailto:" | "tel:"}${string}` : string;
19
+ /**
20
+ * A URL an HTTP request can target: one of the app's routes or an absolute
21
+ * `http://`/`https://` URL. A plain string unless `routing.typedRoutes` is on.
22
+ */
23
+ type RequestUrl = TypedRoutes extends true ? RouteUrl$1 | `${"http://" | "https://"}${string}` : string;
19
24
  type RouteQueryValue = string | number | boolean | null | undefined;
20
25
  type RouteQuery = Record<string, RouteQueryValue | ReadonlyArray<RouteQueryValue>>;
21
26
  type RouteOptions<P extends RoutePath> = {
@@ -34,4 +39,4 @@ type RouteUrlInput$1 = Href$1 | URL | RouteDestination$1;
34
39
  declare function routeUrl<P extends RoutePath>(path: P, ...args: [RoutePathMap[NoInfer<P>]] extends [never] ? [options?: RouteOptions<P>] : [options: RouteOptions<P>]): RouteUrl$1;
35
40
  /** @internal Convert navigation inputs to URL strings without requiring an origin. */
36
41
  declare function toUrlString(value: RouteUrlInput$1): string;
37
- export { RouteQuery as a, RouteUrlInput$1 as c, routeUrl as d, toUrlString as f, RoutePath as i, TypedRoutes as l, RouteDestination$1 as n, RouteQueryValue as o, RouteOptions as r, RouteUrl$1 as s, Href$1 as t, interpolateRouteParams as u };
42
+ export { RoutePath as a, RouteUrl$1 as c, interpolateRouteParams as d, routeUrl as f, RouteOptions as i, RouteUrlInput$1 as l, RequestUrl as n, RouteQuery as o, toUrlString as p, RouteDestination$1 as r, RouteQueryValue as s, Href$1 as t, TypedRoutes as u };
@@ -15,9 +15,9 @@ function interpolateRouteParams(path, params, requireParams = false) {
15
15
  const pathname = suffixIndex === -1 ? path : path.slice(0, suffixIndex);
16
16
  const suffix = suffixIndex === -1 ? "" : path.slice(suffixIndex);
17
17
  let leadingName;
18
- const replaced = pathname.replace(/(^|\/)(?::([^/{}]+)(\{\.\+\})?|\*)(?=\/|$)/g, (token, prefix, name, catchAll, offset) => {
18
+ const replaced = pathname.replace(/(^|\/)(?::([^/{}]+)(\{\.\+\})?|\[(\.\.\.)?([^/[\]]*)\]|\*)(?=\/|$)/g, (token, prefix, name, catchAll, bracketCatchAll, bracketName, offset) => {
19
+ name ??= bracketName || void 0;
19
20
  const anonymous = name === void 0;
20
- if (anonymous && !requireParams) return token;
21
21
  name ??= "*";
22
22
  if (!params || !Object.hasOwn(params, name)) {
23
23
  if (requireParams) throw new TypeError(`Missing route param "${name}".`);
@@ -25,8 +25,9 @@ function interpolateRouteParams(path, params, requireParams = false) {
25
25
  }
26
26
  if (offset === 0) leadingName = name;
27
27
  const value = params[name];
28
+ if (anonymous && value === "" && pathname.slice(offset + token.length) === "/") return "";
28
29
  if (requireParams && !anonymous && value === "") throw new TypeError(`Route param "${name}" must not be empty.`);
29
- return prefix + (catchAll || anonymous ? value.split("/").map((segment) => encodeSegment(name, segment)).join("/") : encodeSegment(name, value));
30
+ return prefix + (catchAll || bracketCatchAll || anonymous ? value.split("/").map((segment) => encodeSegment(name, segment)).join("/") : encodeSegment(name, value));
30
31
  });
31
32
  if (replaced.startsWith("//") && !pathname.startsWith("//")) throw new TypeError(`Route param "${leadingName ?? ""}" would make the request path start with "//", which changes the request host.`);
32
33
  return replaced + suffix;
@@ -1,6 +1,15 @@
1
- import { a as RouteQuery, c as RouteUrlInput, d as routeUrl, i as RoutePath, n as RouteDestination, o as RouteQueryValue, r as RouteOptions, s as RouteUrl, t as Href } from "./route-url-C_YIH_zO.mjs";
1
+ import { a as RoutePath, c as RouteUrl, f as routeUrl, i as RouteOptions, l as RouteUrlInput, o as RouteQuery, r as RouteDestination, s as RouteQueryValue, t as Href } from "./route-url-C3JwYrER.mjs";
2
2
  /** Known URL patterns and their parameter names, augmented by .void/routes.d.ts. */
3
3
  export interface RoutePathMap {}
4
+ /** Page URL patterns and their parameter names, augmented by .void/routes.d.ts. */
5
+ export interface PagePathMap {}
6
+ /** Union of the app's page URL patterns, such as `/users/[id]`. */
7
+ export type PagePath = keyof PagePathMap & string;
8
+ /**
9
+ * Params a page receives: `{ id: string }` for `/users/[id]`. An unnamed `[...]`
10
+ * catch-all has no param. A union of patterns gives a union of params.
11
+ */
12
+ export type PageParams<P extends PagePath> = P extends PagePath ? { [K in Exclude<PagePathMap[P], "*"> & string]: string; } : never;
4
13
  /** Percent-encoded spellings of patterns with encoded fixed segments, augmented by .void/routes.d.ts. */
5
14
  export interface EncodedRoutePathMap {}
6
15
  /** Route type options, augmented by .void/routes.d.ts when `routing.typedRoutes` is on. */
@@ -1 +1 @@
1
- export { n as routeUrl } from "./route-url-CRDF-I0I.mjs";
1
+ export { n as routeUrl } from "./route-url-CfCR4oMj.mjs";
@@ -1 +1 @@
1
- export { t as getApplicationTables, n as getAppliedMigrations, r as getMiniflareDatabasePath, i as openSqliteDatabase, a as runMigrations } from "./runner-5MCSimKx.mjs";
1
+ export { t as getApplicationTables, n as getAppliedMigrations, r as getMiniflareDatabasePath, i as openSqliteDatabase, a as runMigrations } from "./runner-CMZb7jNU.mjs";
@@ -1 +1 @@
1
- export { t as applyMySqlMigrations, n as applyPendingMySqlMigrations, r as getMySqlAppliedMigrations, i as readMySqlAppliedMigrations, a as runMySqlMigrations, o as toMySqlClient, s as withMySqlMigrationLock, c as withMySqlMigrationLockAt } from "./runner-mysql-Bdmsp_x4.mjs";
1
+ export { t as applyMySqlMigrations, n as applyPendingMySqlMigrations, r as getMySqlAppliedMigrations, i as readMySqlAppliedMigrations, a as runMySqlMigrations, o as toMySqlClient, s as withMySqlMigrationLock, c as withMySqlMigrationLockAt } from "./runner-mysql-BXfcQQj3.mjs";
@@ -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 getRawRuntimeEnv } from "../env-raw-e8qgqAzQ.mjs";
4
4
  import { r as limitFromResponse, t as UsageLimit } from "../limits-CrHLm5Tk.mjs";
5
5
  // src/runtime/ai-types.ts
@@ -1,2 +1,2 @@
1
- import { a as VoidAuthConfig, c as authContext, d as getUser, f as requireAuth, i as InferAuthSession, l as defineAuth, n as AuthState, o as VoidAuthConfigContext, r as AuthUser, s as VoidAuthTypes, t as AuthSession, u as getSession } from "../auth-CH4PLAX1.mjs";
2
- export { AuthSession, AuthState, AuthUser, InferAuthSession, VoidAuthConfig, VoidAuthConfigContext, VoidAuthTypes, authContext, defineAuth, getSession, getUser, requireAuth };
1
+ import { a as InferAuthInstance, c as VoidAuthConfigContext, d as defineAuth, f as getAuth, h as requireAuth, i as AuthUser, l as VoidAuthTypes, m as getUser, n as AuthSession, o as InferAuthSession, p as getSession, r as AuthState, s as VoidAuthConfig, t as AuthInstance, u as authContext } from "../auth-CZrthGxs.mjs";
2
+ export { AuthInstance, AuthSession, AuthState, AuthUser, InferAuthInstance, InferAuthSession, VoidAuthConfig, VoidAuthConfigContext, VoidAuthTypes, authContext, defineAuth, getAuth, getSession, getUser, requireAuth };
@@ -1 +1 @@
1
- export { t as authContext, n as defineAuth, r as getSession, i as getUser, a as requireAuth } from "../auth-YVjBX5NY.mjs";
1
+ export { t as authContext, n as defineAuth, r as getAuth, i as getSession, a as getUser, o as requireAuth } from "../auth-DyWp-fSo.mjs";
@@ -1,4 +1,4 @@
1
- import { n as VoidAuthRuntimeApi } from "../better-auth-shared-BJyG2mH0.mjs";
1
+ import { n as VoidAuthRuntimeApi } from "../better-auth-shared-C-0uZg8-.mjs";
2
2
  export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
3
3
  export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
4
4
  export declare const handleVoidAuthRequest: VoidAuthRuntimeApi["handleVoidAuthRequest"];
@@ -1,5 +1,5 @@
1
1
  import { i as mysqlMigrationRunner, t as applyMySqlAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
2
- import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-C958aM7W.mjs";
2
+ import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-CdVyCUou.mjs";
3
3
  // src/runtime/better-auth-mysql.ts
4
4
  async function applyMigrations(env, migrationSchema) {
5
5
  const { createConnection } = await import("mysql2/promise");
@@ -1,4 +1,4 @@
1
- import { n as VoidAuthRuntimeApi } from "../better-auth-shared-BJyG2mH0.mjs";
1
+ import { n as VoidAuthRuntimeApi } from "../better-auth-shared-C-0uZg8-.mjs";
2
2
  export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
3
3
  export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
4
4
  export declare const handleVoidAuthRequest: VoidAuthRuntimeApi["handleVoidAuthRequest"];
@@ -1,5 +1,5 @@
1
1
  import { a as pgMigrationRunner, n as applyPgAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
2
- import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-C958aM7W.mjs";
2
+ import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-CdVyCUou.mjs";
3
3
  import { t as disablePgPassFallback } from "../pg-DoyPxa_X.mjs";
4
4
  // src/runtime/better-auth-pg.ts
5
5
  async function applyMigrations(env, migrationSchema) {
@@ -1,4 +1,4 @@
1
- import { n as VoidAuthRuntimeApi } from "../better-auth-shared-BJyG2mH0.mjs";
1
+ import { n as VoidAuthRuntimeApi } from "../better-auth-shared-C-0uZg8-.mjs";
2
2
  export declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
3
3
  export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
4
4
  export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
@@ -1,5 +1,5 @@
1
1
  import { r as applySqliteAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
2
- import { t as createVoidAuthRuntime } from "../better-auth-shared-C958aM7W.mjs";
2
+ import { t as createVoidAuthRuntime } from "../better-auth-shared-CdVyCUou.mjs";
3
3
  // src/runtime/better-auth.ts
4
4
  async function applyMigrations(env, migrationSchema) {
5
5
  const database = env.DB;
@@ -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-react-DvQLe5Zb.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-react-CJdeErvM.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -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-solid-P9pEtKGp.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-solid-BRvgvp6h.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -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-svelte-B5j8irT6.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-svelte-BSqUCEed.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -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-vue-BEiAfavk.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-vue-CPkbRtOO.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };