void 1.6.2 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/dist/{account-cmd-D903EEWQ.mjs → account-cmd-CZKntRH2.mjs} +6 -6
  2. package/dist/action-key-ByZ6DDld.mjs +64 -0
  3. package/dist/{application-analysis-DlUG-XNT.mjs → application-analysis-CyTagJQM.mjs} +31 -10
  4. package/dist/{application-routing-GCBSwXA9.mjs → application-routing-BLrMVpqi.mjs} +2 -1
  5. package/dist/{auth-CL-p_rqV.mjs → auth-BN0NU9dz.mjs} +1 -1
  6. package/dist/{auth-CH4PLAX1.d.mts → auth-Bk9VGtQW.d.mts} +9 -2
  7. package/dist/{auth-Dy8svcqQ.mjs → auth-CCk9Seol.mjs} +2 -2
  8. package/dist/{auth-YVjBX5NY.mjs → auth-DyWp-fSo.mjs} +7 -1
  9. package/dist/{auth-link-g9J7MSmP.mjs → auth-link-BOaQWMKw.mjs} +6 -6
  10. package/dist/{auth-router-DMZbG9Qn.mjs → auth-router-D0-VcmDs.mjs} +3 -3
  11. package/dist/{better-auth-shared-BJyG2mH0.d.mts → better-auth-shared-CQFdtguU.d.mts} +2 -2
  12. package/dist/{better-auth-shared-C958aM7W.mjs → better-auth-shared-CdVyCUou.mjs} +1 -1
  13. package/dist/boundary-plans-CRmWH68v.d.mts +25 -0
  14. package/dist/{build-cmd-DmjbuT6d.mjs → build-cmd-JTsXXf2F.mjs} +5 -5
  15. package/dist/{cache-2khBO1MR.mjs → cache-D0m3Z_Xf.mjs} +5 -5
  16. package/dist/{cancel-deploy-_itbbvY3.mjs → cancel-deploy-Ce6Os4fa.mjs} +4 -4
  17. package/dist/{cf-build-output-B1C8U83u.mjs → cf-build-output-CWNOH-KA.mjs} +2 -1
  18. package/dist/cf-build-output-DUZnAeZ1.mjs +1 -0
  19. package/dist/{cf-config-migrate-Dy8MrKgF.mjs → cf-config-migrate-Bb-EdAQq.mjs} +5 -1
  20. package/dist/cli/cli.mjs +68 -1868
  21. package/dist/cli/cloudflare-operation-process.mjs +101 -26
  22. package/dist/cli/env-schema-probe.d.mts +1 -1
  23. package/dist/cli/env-schema-probe.mjs +3 -3
  24. package/dist/cli-main-rkrJy2Ge.mjs +1889 -0
  25. package/dist/client-D1Vz1Zep.mjs +1 -0
  26. package/dist/{client-CoxPEhJq.mjs → client-SZPyj4X_.mjs} +10 -4
  27. package/dist/{cloudflare-auth-CuS42-9A.mjs → cloudflare-auth-7jTqy9Bx.mjs} +1 -1
  28. package/dist/{cloudflare-cmd-DTF19-j-.mjs → cloudflare-cmd-ChPLQcTP.mjs} +5 -5
  29. package/dist/{cloudflare-config-Ce8j5S7V.mjs → cloudflare-config-DtOGAbeB.mjs} +2 -2
  30. package/dist/{cloudflare-connect-BN4dHp8i.mjs → cloudflare-connect-Co93VYTo.mjs} +3 -3
  31. package/dist/{cloudflare-operations-DrZGzQap.mjs → cloudflare-operations-CXaDKYj2.mjs} +6 -6
  32. package/dist/{cloudflare-operations-laxRA8HN.mjs → cloudflare-operations-DATekLwI.mjs} +1 -1
  33. package/dist/{cloudflare-process-D9aC-jXr.mjs → cloudflare-process-DmTxZR-N.mjs} +2 -2
  34. package/dist/{config-hL-S-Y9D.mjs → config-5oSQhZNj.mjs} +3 -1
  35. package/dist/{config-CPxJmt4M.d.mts → config-CTlUaXWZ.d.mts} +3 -1
  36. package/dist/{config-CNDjO-15.mjs → config-DcqUBGCb.mjs} +1 -1
  37. package/dist/config-entry.d.mts +1 -1
  38. package/dist/{config-DMR0i3Z2.mjs → config-wo2EaH0X.mjs} +1 -1
  39. package/dist/{connect-DHepM7Xs.mjs → connect-DlvXt1JR.mjs} +7 -7
  40. package/dist/{create-project-Bq0M8MtO.mjs → create-project-CC_7hmYJ.mjs} +5 -5
  41. package/dist/{create-project-BiMmR5wA.mjs → create-project-DzY05xqC.mjs} +1 -1
  42. package/dist/{db-CqfT6lhV.mjs → db-FhyYGcJJ.mjs} +39 -39
  43. package/dist/{db-types-DRmxBJ2K.mjs → db-types-sVwEpyPR.mjs} +4 -2
  44. package/dist/{delete-CY4L8fi2.mjs → delete-CModjyOC.mjs} +5 -5
  45. package/dist/{deploy-La_Ly8g_.mjs → deploy-Cz9TEzZy.mjs} +502 -110
  46. package/dist/deploy-DMieisRu.mjs +2 -0
  47. package/dist/{deploy-managed-static-CESLfKHN.mjs → deploy-managed-static-DlxxXkAM.mjs} +16 -16
  48. package/dist/{deploy-transport-DcI6LXhY.mjs → deploy-transport-DUvm6-CR.mjs} +3 -3
  49. package/dist/deploy.mjs +8 -8
  50. package/dist/{dispatch-DM4Xdd2l.mjs → dispatch-CCiaAnSK.mjs} +7 -7
  51. package/dist/{dist-eV_Ep60B.mjs → dist-Cp4b1_T9.mjs} +1 -1
  52. package/dist/{dist-D23AAMxT.mjs → dist-STQXl8ck.mjs} +86 -138
  53. package/dist/{domain-BD1KOQL3.mjs → domain-DvdZPA50.mjs} +6 -6
  54. package/dist/{drizzle-C8MPqt5m.mjs → drizzle-D4V_06-B.mjs} +1 -1
  55. package/dist/{drizzle-lFdzSEa9.mjs → drizzle-DBSpPpU1.mjs} +34 -8
  56. package/dist/{email-XAspopcj.mjs → email-ASpNrfLd.mjs} +10 -10
  57. package/dist/{email-cloudflare-RxIQoPc9.mjs → email-cloudflare-kqoN9jst.mjs} +25 -16
  58. package/dist/{entry-DFBca6aS.mjs → entry-BweGTCgj.mjs} +1 -1
  59. package/dist/{env-DrYUh55t.mjs → env-Bpkg3G5i.mjs} +7 -7
  60. package/dist/{env-CuzZZyjB.mjs → env-UqS-21xi.mjs} +8 -1
  61. package/dist/env-mask-D31Qztl9.mjs +46 -0
  62. package/dist/{env-public-CeNeO_AT.d.mts → env-public-DtJL_hZq.d.mts} +8 -7
  63. package/dist/{env-validation-Del3C8AY.mjs → env-validation-BpCCQE_6.mjs} +6 -6
  64. package/dist/{env-validation-Bosj7EVg.mjs → env-validation-CN386Utu.mjs} +1 -1
  65. package/dist/{fetch-C8yhLoF3.mjs → fetch-CAIVkLvW.mjs} +1 -1
  66. package/dist/{fetch-B-gLGYVl.d.mts → fetch-CbI6lNnk.d.mts} +6 -4
  67. package/dist/{fetch-stream-DafNtVJC.mjs → fetch-stream-6Op0qlLd.mjs} +1 -1
  68. package/dist/{fetch-stream-DuwxWmBM.d.mts → fetch-stream-DoED9atq.d.mts} +1 -1
  69. package/dist/gen-M5fNQKfH.mjs +1 -0
  70. package/dist/{gen-DSkScMIz.mjs → gen-upKJChvd.mjs} +7 -7
  71. package/dist/{github-cmd-CA-lBdkn.mjs → github-cmd-BvMOlb8Z.mjs} +6 -6
  72. package/dist/{handler-BR6Tvjkp.d.mts → handler-BO7Od-z9.d.mts} +22 -8
  73. package/dist/{handler-DnI_au0K.mjs → handler-C9SnmeW1.mjs} +5 -4
  74. package/dist/{headers--cbz6iZ8.mjs → headers-COGEDoMN.mjs} +11 -2
  75. package/dist/help-CItQVDL4.mjs +1 -0
  76. package/dist/{help-1OCFDsRr.mjs → help-TPCjTu6e.mjs} +7 -3
  77. package/dist/index.d.mts +5 -5
  78. package/dist/index.mjs +379 -265
  79. package/dist/{info-BpxpsX0B.mjs → info-EsDyihwf.mjs} +4 -4
  80. package/dist/{init-DpVXO5S-.mjs → init-a4lVagrb.mjs} +33 -32
  81. package/dist/{link-DAXOT-G_.mjs → link-CE55DDzS.mjs} +6 -6
  82. package/dist/{list-BFQ0gcML.mjs → list-CxRthQks.mjs} +7 -7
  83. package/dist/{live-DF4HUl2m.mjs → live-CYJ4KGoR.mjs} +2 -2
  84. package/dist/{live-0xrcVpyq.d.mts → live-Kc55iuOQ.d.mts} +2 -2
  85. package/dist/{local-d1-CLVPP6v7.mjs → local-d1-CFcH9Bx3.mjs} +2 -2
  86. package/dist/{login-RIw7ffPe.mjs → login-AfcSGSmE.mjs} +5 -5
  87. package/dist/login-ZHsAm-I6.mjs +1 -0
  88. package/dist/{logs-B2OeLS4X.mjs → logs-BgRJuvb1.mjs} +6 -6
  89. package/dist/{migrate-DiI50Chz.mjs → migrate-BNAh6m_C.mjs} +5 -5
  90. package/dist/migrate-BflbbZQK.mjs +1 -0
  91. package/dist/nitro.d.mts +5 -0
  92. package/dist/nitro.mjs +27 -8
  93. package/dist/{node-Bc-dBAGL.mjs → node-CXFUw0Uz.mjs} +5 -5
  94. package/dist/{operator-args-D79WQP70.mjs → operator-args-DGTuCdSE.mjs} +9 -1
  95. package/dist/{operator-auth-CfDcmzpo.mjs → operator-auth-CD3pap65.mjs} +1 -1
  96. package/dist/{operator-client-BIY4-N_6.mjs → operator-client-XvXTkea6.mjs} +2 -2
  97. package/dist/{operator-cmd-CEI5Aaza.mjs → operator-cmd-C-viB7Si.mjs} +7 -7
  98. package/dist/operator-cmd-D6qNuJ_z.mjs +1 -0
  99. package/dist/output-BsdnNpxa.mjs +1 -0
  100. package/dist/{output-BCdLioKP.mjs → output-DNVILSz2.mjs} +1 -1
  101. package/dist/pages/client.d.mts +43 -15
  102. package/dist/pages/client.mjs +165 -80
  103. package/dist/pages/index.d.mts +6 -4
  104. package/dist/pages/index.mjs +6 -6
  105. package/dist/pages/islands-plugin.d.mts +1 -1
  106. package/dist/pages/islands-plugin.mjs +13 -2
  107. package/dist/pages/protocol.d.mts +2 -2
  108. package/dist/pages/protocol.mjs +1 -1
  109. package/dist/pages/serialize.d.mts +2 -2
  110. package/dist/pages/serialize.mjs +1 -1
  111. package/dist/{platform-args-Cx1M-7bq.mjs → platform-args-CiYeZmc5.mjs} +1 -1
  112. package/dist/platform-args-DJvF1-kl.mjs +1 -0
  113. package/dist/{platform-auth-config-ZrYm8KVs.mjs → platform-auth-config-Dt2qEc2w.mjs} +10 -10
  114. package/dist/{platform-auth-protection-t6mdY4nn.mjs → platform-auth-protection-B7TaF-PZ.mjs} +8 -8
  115. package/dist/{platform-auth-recovery-XeBmPTXx.mjs → platform-auth-recovery-suXSteJ6.mjs} +7 -7
  116. package/dist/{platform-cmd-EXehmSYA.mjs → platform-cmd-9rvYBBtr.mjs} +9 -9
  117. package/dist/{platform-cmd-C7BevP9b.mjs → platform-cmd-DuAsIxbU.mjs} +1 -1
  118. package/dist/{platform-domain-DR263ObA.mjs → platform-domain-DhH_vDr6.mjs} +5 -5
  119. package/dist/{platform-lifecycle-CN4aXldN.mjs → platform-lifecycle-3uI-E2bF.mjs} +1 -1
  120. package/dist/{platform-lifecycle-BvU_TNji.mjs → platform-lifecycle-CXmXe2xt.mjs} +17 -17
  121. package/dist/{platform-management-_UE1_GM8.mjs → platform-management-BBCHfwji.mjs} +4 -4
  122. package/dist/{platform-management-yS2sve3V.mjs → platform-management-PdrgDQTe.mjs} +1 -1
  123. package/dist/{platform-plans-config-Dx1agneU.mjs → platform-plans-config-BGwkXYDM.mjs} +5 -5
  124. package/dist/{platform-recovery-CPVk9-Q4.mjs → platform-recovery-C8NxXGRR.mjs} +3 -3
  125. package/dist/{platform-setup-Vw1AaUN8.mjs → platform-setup-Casiffqj.mjs} +3 -3
  126. package/dist/{plugin-inference-bQ1Be840.mjs → plugin-inference-CErfTgEx.mjs} +4 -4
  127. package/dist/{prepare-D8L9AQbw.mjs → prepare-BDKWZgfL.mjs} +12 -9
  128. package/dist/{prepare-BkRhDnxw.mjs → prepare-BLrzXjIl.mjs} +3 -3
  129. package/dist/prepare-a1_5usAn.mjs +1 -0
  130. package/dist/{prerender-render-RlAj6hh8.mjs → prerender-render-BAdYhivW.mjs} +44 -15
  131. package/dist/prerender-render.d.mts +12 -2
  132. package/dist/prerender-render.mjs +1 -1
  133. package/dist/{project-cmd-DH3CuFC6.mjs → project-cmd-DzGvxXKH.mjs} +18 -18
  134. package/dist/{project-team-MjT5K4rQ.mjs → project-team-C5XtHbZk.mjs} +5 -5
  135. package/dist/{project-token-BKHGwY3k.mjs → project-token-B4D5yhHQ.mjs} +5 -5
  136. package/dist/{project-tsconfig-BMveFb4b.mjs → project-tsconfig-nhnTWO_Y.mjs} +3 -1
  137. package/dist/{project-zero-trust-Bzdd05-h.mjs → project-zero-trust--0LvktDg.mjs} +5 -5
  138. package/dist/{protocol-COyySMki.mjs → protocol-B1Tvc9-x.mjs} +232 -74
  139. package/dist/{protocol-CkwjASep.d.mts → protocol-Cg2I81NA.d.mts} +13 -4
  140. package/dist/{provision-B0HqoRuI.mjs → provision-C3yiHdld.mjs} +2 -2
  141. package/dist/{provision-CYhZR_Mn.mjs → provision-CAcrauvr.mjs} +1 -1
  142. package/dist/{requests-daJmVpjk.mjs → requests-CrRiTgQA.mjs} +4 -4
  143. package/dist/resolve-project-C5wC-Hoi.mjs +1 -0
  144. package/dist/{resolve-project-D0YNnJfm.mjs → resolve-project-Da3OgCU1.mjs} +1 -1
  145. package/dist/{rollback-AVwiMAkk.mjs → rollback-BsmQyj-Q.mjs} +7 -7
  146. package/dist/{route-types-e69EqY88.mjs → route-types-CgtlFCDz.mjs} +268 -14
  147. package/dist/{route-url-C_YIH_zO.d.mts → route-url-C3JwYrER.d.mts} +8 -3
  148. package/dist/{route-url-CRDF-I0I.mjs → route-url-CfCR4oMj.mjs} +4 -3
  149. package/dist/routes-stub.d.mts +14 -4
  150. package/dist/routes-stub.mjs +1 -1
  151. package/dist/{runner-QMeOpScZ.mjs → runner-CTk21HrO.mjs} +1 -1
  152. package/dist/{runner-mysql-0zVmB1JW.mjs → runner-mysql-CHvEg_sy.mjs} +1 -1
  153. package/dist/runtime/ai.mjs +1 -1
  154. package/dist/runtime/auth.d.mts +2 -2
  155. package/dist/runtime/auth.mjs +1 -1
  156. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  157. package/dist/runtime/better-auth-mysql.mjs +1 -1
  158. package/dist/runtime/better-auth-pg.d.mts +1 -1
  159. package/dist/runtime/better-auth-pg.mjs +1 -1
  160. package/dist/runtime/better-auth.d.mts +1 -1
  161. package/dist/runtime/better-auth.mjs +1 -1
  162. package/dist/runtime/client-react.d.mts +3 -3
  163. package/dist/runtime/client-react.mjs +2 -2
  164. package/dist/runtime/client-solid.d.mts +3 -3
  165. package/dist/runtime/client-solid.mjs +2 -2
  166. package/dist/runtime/client-svelte.d.mts +3 -3
  167. package/dist/runtime/client-svelte.mjs +2 -2
  168. package/dist/runtime/client-vue.d.mts +3 -3
  169. package/dist/runtime/client-vue.mjs +2 -2
  170. package/dist/runtime/client.d.mts +3 -3
  171. package/dist/runtime/client.mjs +2 -2
  172. package/dist/runtime/db.d.mts +6 -3
  173. package/dist/runtime/db.mjs +2 -2
  174. package/dist/runtime/email/testing.mjs +2 -2
  175. package/dist/runtime/email.mjs +3 -3
  176. package/dist/runtime/env-public.d.mts +1 -1
  177. package/dist/runtime/env-public.mjs +55 -85
  178. package/dist/runtime/fetch-server.d.mts +1 -1
  179. package/dist/runtime/fetch-server.mjs +1 -1
  180. package/dist/runtime/fetch-stream.d.mts +2 -2
  181. package/dist/runtime/fetch-stream.mjs +1 -1
  182. package/dist/runtime/fetch.d.mts +1 -1
  183. package/dist/runtime/fetch.mjs +1 -1
  184. package/dist/runtime/handler.d.mts +1 -1
  185. package/dist/runtime/handler.mjs +1 -1
  186. package/dist/runtime/isr.d.mts +3 -1
  187. package/dist/runtime/live-client.d.mts +11 -2
  188. package/dist/runtime/live-client.mjs +8 -0
  189. package/dist/runtime/live-server.mjs +1 -1
  190. package/dist/runtime/live.d.mts +1 -1
  191. package/dist/runtime/live.mjs +1 -1
  192. package/dist/runtime/log.mjs +1 -1
  193. package/dist/runtime/remote/index.mjs +1 -1
  194. package/dist/runtime/route-url.d.mts +2 -2
  195. package/dist/runtime/route-url.mjs +1 -1
  196. package/dist/runtime/routing.d.mts +21 -5
  197. package/dist/runtime/routing.mjs +251 -29
  198. package/dist/runtime/sandbox.mjs +1 -1
  199. package/dist/runtime/sse-client.d.mts +9 -1
  200. package/dist/runtime/sse-client.mjs +7 -0
  201. package/dist/runtime/validator.d.mts +1 -1
  202. package/dist/runtime/validator.mjs +1 -1
  203. package/dist/runtime/ws-server.d.mts +3 -3
  204. package/dist/runtime/ws-server.mjs +1 -1
  205. package/dist/runtime/ws.d.mts +1 -1
  206. package/dist/runtime/ws.mjs +1 -1
  207. package/dist/{scan-F0psanp7.mjs → scan-BJ3bj6aP.mjs} +236 -32
  208. package/dist/{secret-szNdoeKa.mjs → secret-D0g5oBsP.mjs} +7 -7
  209. package/dist/serialize-DN-envGQ.d.mts +18 -0
  210. package/dist/serialize-Pf-CIQK_.mjs +39 -0
  211. package/dist/{skills-D393E4lB.mjs → skills-CoBB9_Ao.mjs} +1 -1
  212. package/dist/{ast-bindings-BkivMJIo.mjs → static-exports-DFkzL-NX.mjs} +96 -33
  213. package/dist/{subcommand-prompt-CxJXporl.mjs → subcommand-prompt-0yIARXf2.mjs} +2 -2
  214. package/dist/{types-agfx0alu.d.mts → types-IPut3_Yx.d.mts} +15 -1
  215. package/dist/url-CuoEn0o3.mjs +43 -0
  216. package/dist/validator-8-NZs2Xr.mjs +168 -0
  217. package/dist/{version-metadata-BC3LK7Y-.mjs → version-metadata-eUd6Ar_U.mjs} +1 -1
  218. package/dist/wrangler-R3kMdJfw.mjs +1 -0
  219. package/dist/{wrangler-Gn4EoY4-.mjs → wrangler-k40T7XTQ.mjs} +2 -2
  220. package/dist/{wrapper-B9W9RE8z.mjs → wrapper-CVMZarxf.mjs} +11 -8
  221. package/dist/{ws-Dmjg5NH2.d.mts → ws--U7QicYy.d.mts} +2 -2
  222. package/docs/guide/ai.md +3 -0
  223. package/docs/guide/app-types.md +1 -0
  224. package/docs/guide/auth.md +63 -0
  225. package/docs/guide/database/d1.md +16 -1
  226. package/docs/guide/database/mysql.md +1 -0
  227. package/docs/guide/database/postgresql.md +1 -0
  228. package/docs/guide/database.md +34 -0
  229. package/docs/guide/deployment.md +9 -0
  230. package/docs/guide/durable-state.md +1 -0
  231. package/docs/guide/edge/headers.md +1 -0
  232. package/docs/guide/edge/prerendering.md +10 -4
  233. package/docs/guide/edge/redirects.md +1 -0
  234. package/docs/guide/edge/revalidation.md +6 -0
  235. package/docs/guide/edge/rewrites.md +1 -0
  236. package/docs/guide/edge/static-assets.md +1 -0
  237. package/docs/guide/email/domains.md +1 -0
  238. package/docs/guide/email/receiving.md +3 -2
  239. package/docs/guide/email/sending.md +3 -2
  240. package/docs/guide/email.md +1 -0
  241. package/docs/guide/env-vars.md +4 -0
  242. package/docs/guide/index.md +1 -0
  243. package/docs/guide/jobs.md +1 -0
  244. package/docs/guide/kv.md +1 -0
  245. package/docs/guide/live.md +3 -0
  246. package/docs/guide/pages-routing/actions-and-forms.md +51 -28
  247. package/docs/guide/pages-routing/errors.md +101 -0
  248. package/docs/guide/pages-routing/head.md +4 -1
  249. package/docs/guide/pages-routing/islands.md +2 -1
  250. package/docs/guide/pages-routing/layouts.md +3 -0
  251. package/docs/guide/pages-routing/loaders.md +3 -0
  252. package/docs/guide/pages-routing/markdown.md +3 -3
  253. package/docs/guide/pages-routing/overview.md +142 -10
  254. package/docs/guide/pages-routing/view-transitions.md +1 -0
  255. package/docs/guide/platform/administration/access.md +1 -0
  256. package/docs/guide/platform/administration/connected-apps.md +4 -0
  257. package/docs/guide/platform/administration/email.md +1 -0
  258. package/docs/guide/platform/administration/operations.md +1 -0
  259. package/docs/guide/platform/administration/plans.md +1 -0
  260. package/docs/guide/platform/administration/projects.md +11 -0
  261. package/docs/guide/platform/administration/zero-trust.md +1 -0
  262. package/docs/guide/platform/development/local.md +1 -0
  263. package/docs/guide/platform/development/runtime.md +1 -0
  264. package/docs/guide/platform/development/schema-ci.md +1 -0
  265. package/docs/guide/platform/installation/ci.md +1 -0
  266. package/docs/guide/platform/installation/credentials.md +1 -0
  267. package/docs/guide/platform/installation/domains.md +1 -0
  268. package/docs/guide/platform/installation/first-deployment.md +1 -0
  269. package/docs/guide/platform/installation/maintenance.md +1 -0
  270. package/docs/guide/platform/installation/prerequisites.md +1 -0
  271. package/docs/guide/platform/installation/setup.md +1 -0
  272. package/docs/guide/platform/installation/uninstall.md +1 -0
  273. package/docs/guide/platform-administration.md +1 -0
  274. package/docs/guide/platform-development.md +1 -0
  275. package/docs/guide/project-collaboration.md +1 -0
  276. package/docs/guide/queues.md +3 -0
  277. package/docs/guide/quickstart.md +4 -2
  278. package/docs/guide/remote-dev.md +1 -0
  279. package/docs/guide/sandboxes.md +1 -0
  280. package/docs/guide/self-hosted-platform.md +1 -0
  281. package/docs/guide/server-routing.md +1 -0
  282. package/docs/guide/sse.md +3 -0
  283. package/docs/guide/ssg.md +24 -2
  284. package/docs/guide/ssr.md +1 -0
  285. package/docs/guide/storage.md +7 -2
  286. package/docs/guide/testing.md +62 -0
  287. package/docs/guide/type-safety.md +308 -26
  288. package/docs/guide/typed-fetch.md +8 -3
  289. package/docs/guide/websockets.md +6 -5
  290. package/docs/index.md +1 -0
  291. package/docs/integrations/agents.md +1 -0
  292. package/docs/integrations/cloudflare.md +11 -10
  293. package/docs/integrations/frameworks/analog.md +1 -0
  294. package/docs/integrations/frameworks/astro.md +1 -0
  295. package/docs/integrations/frameworks/nuxt.md +3 -0
  296. package/docs/integrations/frameworks/overview.md +3 -0
  297. package/docs/integrations/frameworks/react-router.md +1 -0
  298. package/docs/integrations/frameworks/sveltekit.md +1 -0
  299. package/docs/integrations/frameworks/tanstack-start.md +1 -0
  300. package/docs/integrations/hono.md +1 -0
  301. package/docs/integrations/nodejs-bun-deno.md +66 -0
  302. package/docs/reference/api/auth.md +20 -0
  303. package/docs/reference/api/client.md +7 -4
  304. package/docs/reference/api/database.md +24 -1
  305. package/docs/reference/api/deploy.md +4 -0
  306. package/docs/reference/api/durable.md +1 -0
  307. package/docs/reference/api/env.md +1 -0
  308. package/docs/reference/api/handlers.md +4 -1
  309. package/docs/reference/api/pages.md +30 -12
  310. package/docs/reference/api/plugin.md +1 -0
  311. package/docs/reference/api/resources.md +4 -1
  312. package/docs/reference/api/rewrites.md +18 -5
  313. package/docs/reference/api/types.md +10 -2
  314. package/docs/reference/api.md +1 -0
  315. package/docs/reference/cli/auth.md +1 -0
  316. package/docs/reference/cli/database.md +3 -0
  317. package/docs/reference/cli/deploy.md +18 -11
  318. package/docs/reference/cli/domains.md +1 -0
  319. package/docs/reference/cli/email.md +1 -0
  320. package/docs/reference/cli/generate.md +1 -0
  321. package/docs/reference/cli/github.md +1 -0
  322. package/docs/reference/cli/platform-config.md +1 -0
  323. package/docs/reference/cli/platform-email.md +1 -0
  324. package/docs/reference/cli/platform-installation.md +1 -0
  325. package/docs/reference/cli/platform-operations.md +1 -0
  326. package/docs/reference/cli/platform-users.md +23 -0
  327. package/docs/reference/cli/platform-zero-trust.md +1 -0
  328. package/docs/reference/cli/platform.md +1 -0
  329. package/docs/reference/cli/project.md +1 -0
  330. package/docs/reference/cli/secrets.md +1 -0
  331. package/docs/reference/cli/setup.md +1 -0
  332. package/docs/reference/cli.md +6 -0
  333. package/docs/reference/config.md +25 -2
  334. package/docs/reference/resource-inference.md +1 -0
  335. package/docs/reference/structure.md +1 -0
  336. package/package.json +27 -25
  337. package/schema.json +4 -0
  338. package/skills/void/SKILL.md +7 -0
  339. package/dist/action-key-XtKKbbsi.mjs +0 -25
  340. package/dist/cf-build-output-CmDOcA7K.mjs +0 -1
  341. package/dist/client-CEtr5UOR.mjs +0 -1
  342. package/dist/deploy-DMhOyebt.mjs +0 -2
  343. package/dist/gen-BbT1Ku1P.mjs +0 -1
  344. package/dist/help-Ba8Dq5-r.mjs +0 -1
  345. package/dist/login-BX2gzHUt.mjs +0 -1
  346. package/dist/migrate-CUGMGaIM.mjs +0 -1
  347. package/dist/operator-cmd-oTT2MA9G.mjs +0 -1
  348. package/dist/output-E6gecbbV.mjs +0 -1
  349. package/dist/platform-args-C7XUw9mw.mjs +0 -1
  350. package/dist/prepare-CZRVGNld.mjs +0 -1
  351. package/dist/resolve-project-CgfjtOwz.mjs +0 -1
  352. package/dist/serialize-DUuYuaY3.mjs +0 -29
  353. package/dist/serialize-I4EmS-Wf.d.mts +0 -16
  354. package/dist/validator-CTfmzZYb.mjs +0 -69
  355. package/dist/wrangler-CQ5c-MtJ.mjs +0 -1
  356. package/dist/{cf-access-BmBT2h8_.mjs → cf-access-Dnyw8KFY.mjs} +1 -1
  357. package/dist/{config-s6TkpSat.mjs → config-eeDzKBS9.mjs} +1 -1
  358. package/dist/{env-types-Bd8DkQhl.mjs → env-types-Dz9qkiOn.mjs} +1 -1
  359. package/dist/{inbound-CdO-qY0w.mjs → inbound-C2H6Dzz1.mjs} +2 -2
  360. package/dist/{runner-5MCSimKx.mjs → runner-CMZb7jNU.mjs} +1 -1
  361. package/dist/{runner-mysql-Bdmsp_x4.mjs → runner-mysql-BXfcQQj3.mjs} +1 -1
@@ -1 +1 @@
1
- export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-B0HqoRuI.mjs";
1
+ export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-C3yiHdld.mjs";
@@ -1,8 +1,8 @@
1
+ import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
2
+ import { c as getToken } from "./auth-CCk9Seol.mjs";
3
+ import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
4
+ import { f as import_picocolors, i as dim } from "./output-DNVILSz2.mjs";
1
5
  import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
2
- import { c as getToken } from "./auth-Dy8svcqQ.mjs";
3
- import { H as outro, L as log } from "./dist-D23AAMxT.mjs";
4
- import { r as PlatformClient } from "./client-CoxPEhJq.mjs";
5
- import { f as import_picocolors, i as dim } from "./output-BCdLioKP.mjs";
6
6
  // src/cli/requests.ts
7
7
  async function runRequestsCommand(root, range, status) {
8
8
  console.log();
@@ -0,0 +1 @@
1
+ export { n as inferDefaultSlug } from "./resolve-project-Da3OgCU1.mjs";
@@ -1,6 +1,6 @@
1
+ import { L as log } from "./dist-STQXl8ck.mjs";
1
2
  import { a as join } from "./dist-DMYe8CZJ.mjs";
2
3
  import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
3
- import { L as log } from "./dist-D23AAMxT.mjs";
4
4
  import { readFileSync } from "node:fs";
5
5
  // src/cli/resolve-project.ts
6
6
  function getRequestedProjectSlug(options) {
@@ -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-STQXl8ck.mjs";
2
+ import { c as getToken } from "./auth-CCk9Seol.mjs";
3
+ import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
4
+ import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-DNVILSz2.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-DATekLwI.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("");
@@ -221,7 +471,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
221
471
  lines.push("");
222
472
  lines.push(" export type ParseActionUrl<U extends string> = U extends `${infer Base}?${infer Action}` ? {");
223
473
  lines.push(" base: Base;");
224
- lines.push(" action: Action;");
474
+ lines.push(" action: Action extends `${infer Name}&${string}` ? Name : Action;");
225
475
  lines.push(" } : {");
226
476
  lines.push(" base: U;");
227
477
  lines.push(" action: never;");
@@ -242,7 +492,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
242
492
  lines.push(" type PageActionUrl<K extends string, P> = P extends { body: any }");
243
493
  lines.push(" ? K");
244
494
  lines.push(" : P extends { actions: infer A }");
245
- lines.push(" ? `${K}?${keyof A & string}`");
495
+ lines.push(" ? `${K}?${keyof A & string}${'' | `&${string}`}`");
246
496
  lines.push(" : never;");
247
497
  lines.push("");
248
498
  lines.push(" export type ResolveActionBody<U extends string> =");
@@ -266,6 +516,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
266
516
  lines.push("");
267
517
  lines.push(" type ActionFormBaseOptions = {");
268
518
  lines.push(" resetOnSuccess?: boolean;");
519
+ lines.push(" throwOnError?: boolean;");
269
520
  lines.push(" };");
270
521
  lines.push("");
271
522
  lines.push(" export type ActionFormOptions<U extends string> = ActionFormBaseOptions &");
@@ -293,7 +544,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
293
544
  sources.push(route);
294
545
  }
295
546
  for (const [pattern, methods] of routesByPattern) {
296
- lines.push(` ${JSON.stringify(pattern)}: {`);
547
+ lines.push(` ${JSON.stringify(publicRoutePattern(pattern))}: {`);
297
548
  for (const [method, sources] of methods) {
298
549
  const imports = sources.map((route) => {
299
550
  const importPath = relative(outDir, `${routesDir}/${route.filePath}`);
@@ -305,6 +556,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
305
556
  lines.push(" };");
306
557
  }
307
558
  lines.push(" };");
559
+ legacyRouteAlias(lines, "RouteMap", pattern);
308
560
  }
309
561
  lines.push(" }");
310
562
  lines.push("");
@@ -320,11 +572,12 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
320
572
  const importPath = relative(outDir, `${routesDir}/${route.filePath}`);
321
573
  return `(typeof import(${JSON.stringify(importPath)}))["default"]["messages"]`;
322
574
  });
323
- lines.push(` ${JSON.stringify(pattern)}: {`);
575
+ lines.push(` ${JSON.stringify(publicRoutePattern(pattern))}: {`);
324
576
  lines.push(` params: RouteParams<${JSON.stringify(sources[0].params)}>;`);
325
577
  lines.push(` client: ${imports.map((source) => `ExtractInput<${source}["client"]>`).join(" & ")};`);
326
578
  lines.push(` server: ${imports.map((source) => `ExtractOutput<${source}["server"]>`).join(" | ")};`);
327
579
  lines.push(" };");
580
+ legacyRouteAlias(lines, "WebSocketRouteMap", pattern);
328
581
  }
329
582
  lines.push(" }");
330
583
  const actionPages = scan.pages.pages.filter((p) => p.methods.includes("action") || p.methods.includes("actions"));
@@ -355,12 +608,13 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
355
608
  else bodiesByPattern.set(page.pattern, [body]);
356
609
  }
357
610
  for (const [pattern, bodies] of bodiesByPattern) {
358
- lines.push(` ${JSON.stringify(pattern)}: {`);
611
+ lines.push(` ${JSON.stringify(publicRoutePattern(pattern))}: {`);
359
612
  bodies.forEach((body, index) => {
360
613
  if (index > 0) lines.push(" } | {");
361
614
  lines.push(...body);
362
615
  });
363
616
  lines.push(" };");
617
+ legacyRouteAlias(lines, "PageActionMap", pattern);
364
618
  }
365
619
  lines.push(" }");
366
620
  }
@@ -368,4 +622,4 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
368
622
  lines.push("");
369
623
  return { dts: lines.join("\n") };
370
624
  }
371
- export { syncAuthTypesFile as a, removeAuthTypesIfPresent as i, generateQueueTypes as n, generateAuthTypes as r, generateRouteTypes as t };
625
+ 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. */
@@ -23,10 +32,10 @@ export type RouteName = keyof RouteMap;
23
32
  export type RewriteDestination = RouteName | (string & {});
24
33
  /** Stub interface for page action types — augmented by generated routes.d.ts */
25
34
  export interface PageActionMap {}
26
- /** Parse "/path?action" into base path and action name */
35
+ /** Parse "/path?action&key=value" into base path and action name. */
27
36
  export type ParseActionUrl<U extends string> = U extends `${infer Base}?${infer Action}` ? {
28
37
  base: Base;
29
- action: Action;
38
+ action: Action extends `${infer Name}&${string}` ? Name : Action;
30
39
  } : {
31
40
  base: U;
32
41
  action: never;
@@ -51,6 +60,7 @@ export type ResolveActionParams<U extends string> = ParseActionUrl<U>["base"] ex
51
60
  export type HasActionParams<U extends string> = [ResolveActionParams<U>] extends [never] ? false : ResolveActionParams<U> extends Record<string, string> ? true : false;
52
61
  type ActionFormBaseOptions = {
53
62
  resetOnSuccess?: boolean;
63
+ throwOnError?: boolean;
54
64
  };
55
65
  /** Form options type (requires params for dynamic routes) */
56
66
  export type ActionFormOptions<U extends string> = ActionFormBaseOptions & (HasActionParams<U> extends true ? {
@@ -62,7 +72,7 @@ type PageActionUrl<K extends string, P> = P extends {
62
72
  body: unknown;
63
73
  } ? K : P extends {
64
74
  actions: infer A;
65
- } ? `${K}?${keyof A & string}` : never;
75
+ } ? `${K}?${keyof A & string}${"" | `&${string}`}` : never;
66
76
  /** Valid useForm URLs — single-action pages + "page?name" combos + default actions */
67
77
  export type ActionUrl = { [K in keyof PageActionMap]: PageActionUrl<K & string, PageActionMap[K]>; }[keyof PageActionMap];
68
78
  export { type Href, type RouteDestination, type RouteOptions, type RoutePath, type RouteQuery, type RouteQueryValue, type RouteUrl, type RouteUrlInput, routeUrl };
@@ -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-Bk9VGtQW.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-CQFdtguU.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-CQFdtguU.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-CQFdtguU.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;