void 1.9.1 → 1.10.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 (372) hide show
  1. package/dist/{account-cmd-BEMOdwtl.mjs → account-cmd-CZhbDfp4.mjs} +3 -3
  2. package/dist/{application-analysis-3VVsflWZ.mjs → application-analysis-Do1WaGAY.mjs} +81 -7
  3. package/dist/{application-routing-CJRlXCc2.mjs → application-routing-DrOFahHO.mjs} +1 -1
  4. package/dist/{routing-assets-DJIVOrCh.mjs → assets-DZBd7yqh.mjs} +1 -1
  5. package/dist/{auth-aMuFOZeI.mjs → auth-YtP6K4J3.mjs} +1 -1
  6. package/dist/{auth-link-B1IynRW5.mjs → auth-link-DFQTA1jN.mjs} +3 -3
  7. package/dist/{auth-router-DVaWJdRB.mjs → auth-router-BOiaDmcQ.mjs} +2 -2
  8. package/dist/{base64-ikl9yBy3.mjs → base64-DwTR12ej.mjs} +1 -1
  9. package/dist/{better-auth-shared-ajs3LNrY.d.mts → better-auth-shared-BqsMzU14.d.mts} +1 -1
  10. package/dist/{better-auth-shared-C7LHvF4L.mjs → better-auth-shared-DRHo5FoG.mjs} +116 -20
  11. package/dist/{build-cmd-Dq8tdqQG.mjs → build-cmd-BCiXgjn9.mjs} +1 -1
  12. package/dist/{cache-DGMnskX7.mjs → cache-CUulshOu.mjs} +1 -1
  13. package/dist/{cancel-deploy-96S5hD1E.mjs → cancel-deploy-BHGZo6KC.mjs} +1 -1
  14. package/dist/cf-build-output-D3_x71H6.mjs +1 -0
  15. package/dist/{cf-build-output-CWNOH-KA.mjs → cf-build-output-bBx1gDll.mjs} +27 -16
  16. package/dist/{cf-config-migrate-Bb-EdAQq.mjs → cf-config-migrate-CHtnM3_C.mjs} +21 -3
  17. package/dist/cli/cli.mjs +1 -1
  18. package/dist/cli/cloudflare-operation-process.mjs +3 -2
  19. package/dist/cli/env-schema-probe.d.mts +1 -1
  20. package/dist/cli/env-schema-probe.mjs +2 -2
  21. package/dist/{cli-main-CQRLxZAu.mjs → cli-main-hM7rhIbB.mjs} +27 -27
  22. package/dist/{client-66c0RLDM.mjs → client-BEYbgqZw.mjs} +1 -1
  23. package/dist/{auth-client-DwCdwKbw.mjs → client-Ypa4Immo.mjs} +1 -1
  24. package/dist/{client-D6w5x7hM.mjs → client-aIv5UQf3.mjs} +3 -3
  25. package/dist/{auth-client-react-CJdeErvM.mjs → client-react-B-ZqH8Ao.mjs} +1 -1
  26. package/dist/{auth-client-solid-BRvgvp6h.mjs → client-solid-D2PSeKLm.mjs} +1 -1
  27. package/dist/{auth-client-svelte-BSqUCEed.mjs → client-svelte-DbJbN7Ey.mjs} +1 -1
  28. package/dist/{auth-client-vue-CPkbRtOO.mjs → client-vue-PBawsrwk.mjs} +1 -1
  29. package/dist/{cloudflare-cmd-BuuHUM4z.mjs → cloudflare-cmd-DLcgInCa.mjs} +1 -1
  30. package/dist/{cloudflare-config-PxbinLLE.mjs → cloudflare-config-BfEfIEuY.mjs} +1 -1
  31. package/dist/{cloudflare-connect-D1QOosLd.mjs → cloudflare-connect-CMcKtA02.mjs} +1 -1
  32. package/dist/{cloudflare-operations-I4t3mt4R.mjs → cloudflare-operations-C5RTQNnh.mjs} +1 -1
  33. package/dist/{cloudflare-operations-G5AObYzF.mjs → cloudflare-operations-DLhn_Bom.mjs} +4 -4
  34. package/dist/{config-DlWQ_hIJ.mjs → config-CbKmMpHK.mjs} +1 -1
  35. package/dist/{config-C1DPf8EK.mjs → config-CtkCfPpv.mjs} +1 -1
  36. package/dist/{config-CCWVY7DY.d.mts → config-DuiDZbq7.d.mts} +3 -2
  37. package/dist/config-entry.d.mts +1 -1
  38. package/dist/{config-CzFdJYNA.mjs → config-qgt863GH.mjs} +7 -2
  39. package/dist/{connect-4uImOwut.mjs → connect-DM3yCNPG.mjs} +4 -4
  40. package/dist/{sandbox-container-BuxhwCgt.mjs → container-CR_tqFtd.mjs} +1 -1
  41. package/dist/{sandbox-container-CZFZdMso.d.mts → container-D584jUxY.d.mts} +1 -1
  42. package/dist/{create-project-BaUzZnLZ.mjs → create-project-BkVGXGNt.mjs} +1 -1
  43. package/dist/{create-project-CQMyzTvK.mjs → create-project-C-hNdYvD.mjs} +1 -1
  44. package/dist/{migration-handler-DCehTlWs.mjs → d1-handler-C1LH2K2s.mjs} +1 -1
  45. package/dist/{db-DEpDeDsi.mjs → db-DQAi7Ckr.mjs} +23 -23
  46. package/dist/{delete-BVD2kI82.mjs → delete-BtVnPGO2.mjs} +1 -1
  47. package/dist/{deploy-Dyeo5soA.mjs → deploy-Cs93Af-d.mjs} +32 -31
  48. package/dist/{deploy-managed-static-Kn73R83A.mjs → deploy-managed-static-CZIx3cc1.mjs} +20 -11
  49. package/dist/deploy-rUunHBNJ.mjs +2 -0
  50. package/dist/{deploy-transport-BpKBs_KR.mjs → deploy-transport-DT-ALuDj.mjs} +2 -2
  51. package/dist/deploy.mjs +7 -6
  52. package/dist/{dev-inbox-CUUS6iUg.mjs → dev-inbox-BiamQEAa.mjs} +2 -2
  53. package/dist/{dispatch-BBfb519j.mjs → dispatch-DPEuEblR.mjs} +1 -1
  54. package/dist/{domain-BTIdyUVk.mjs → domain-cOhYYiHU.mjs} +2 -2
  55. package/dist/{email-DvrS-I0U.mjs → email-CnnDqvXV.mjs} +7 -7
  56. package/dist/{email-cloudflare-DAGpgzY1.mjs → email-cloudflare-CCIoQueP.mjs} +4 -4
  57. package/dist/email-pattern-BYr-EFq5.mjs +91 -0
  58. package/dist/{env-D7vORwpn.mjs → env-5bphL5mV.mjs} +3 -3
  59. package/dist/env-registry-BbCdIOXP.mjs +10 -0
  60. package/dist/{env-validation-DeYNRp1d.mjs → env-validation-DfJ9Fzfa.mjs} +2 -2
  61. package/dist/{env-validation-DKDcpxbt.mjs → env-validation-ly_Q9Kgd.mjs} +1 -1
  62. package/dist/{error-pages-COVBnzK7.mjs → error-pages-QNeBXiRR.mjs} +6 -6
  63. package/dist/{fetch-CAIVkLvW.mjs → fetch-DdK9eGin.mjs} +3 -3
  64. package/dist/{fetch-error-DmlRM6e4.mjs → fetch-error-EXhBRoxI.mjs} +1 -1
  65. package/dist/{fetch-stream-6Op0qlLd.mjs → fetch-stream-DQAavFdm.mjs} +4 -4
  66. package/dist/gen-BQ7itmK7.mjs +1 -0
  67. package/dist/{gen-DimkGNve.mjs → gen-CjcH6DJS.mjs} +4 -3
  68. package/dist/{github-cmd-D-zs6VQr.mjs → github-cmd-CVDLb51-.mjs} +1 -1
  69. package/dist/{handler-C9SnmeW1.mjs → handler-w_FAiIRu.mjs} +5 -5
  70. package/dist/{headers-Q0kZDpk8.mjs → headers-Cyr87J6Z.mjs} +1 -1
  71. package/dist/{help-Cgdcd-SG.mjs → help-B1cH8518.mjs} +8 -1
  72. package/dist/help-Ld6XFol7.mjs +1 -0
  73. package/dist/{env-helpers-Dj_SIwPu.mjs → helpers-_OdpnjkJ.mjs} +1 -1
  74. package/dist/{inbound-C2H6Dzz1.mjs → inbound--OF7zkwX.mjs} +4 -4
  75. package/dist/{sandbox-DE1WsxuB.d.mts → index-BESZTC1z.d.mts} +2 -2
  76. package/dist/{ws-C2zy0QBf.d.mts → index-BTmhCDbw.d.mts} +36 -7
  77. package/dist/{handler-6fzr_ikp.d.mts → index-BXdP39qx.d.mts} +4 -6
  78. package/dist/{live-DBybyDt0.d.mts → index-CmqHYj2R.d.mts} +2 -2
  79. package/dist/index.d.mts +4 -4
  80. package/dist/index.mjs +62 -48
  81. package/dist/{info-BbxQ34kk.mjs → info-BE3snw2_.mjs} +4 -4
  82. package/dist/{init-zyRj3QRw.mjs → init-BrS5MAiJ.mjs} +67 -42
  83. package/dist/{limits-CrHLm5Tk.mjs → limits-BCoQLpn3.mjs} +1 -1
  84. package/dist/{link-DAFXuIER.mjs → link-BbzyrCBD.mjs} +2 -2
  85. package/dist/{list-BTIcC3W9.mjs → list-DmppHjVc.mjs} +2 -2
  86. package/dist/{live-Dw7NF1t2.mjs → live-DvtxTUhW.mjs} +5 -5
  87. package/dist/{load-user-env-ztmIyiLx.mjs → load-user-env-BltIJLtl.mjs} +1 -1
  88. package/dist/{local-d1-BnVb7Fem.mjs → local-d1-DLxsKmkw.mjs} +1 -1
  89. package/dist/login-C-n1rA0s.mjs +1 -0
  90. package/dist/{login-DOE-MkeK.mjs → login-Cihxnu7m.mjs} +2 -2
  91. package/dist/{logs-CUsjihc3.mjs → logs-BCgLeLNd.mjs} +2 -2
  92. package/dist/migrate-CKn30rmw.mjs +1 -0
  93. package/dist/{migrate-DtoKdGas.mjs → migrate-DOK67gE-.mjs} +3 -3
  94. package/dist/{auth-migrations-DDeifS3v.mjs → migrations-ByS7r3HV.mjs} +1 -1
  95. package/dist/{mime-CtP6-qAF.mjs → mime-BGoZ8ZLL.mjs} +1 -1
  96. package/dist/{mysql-migration-sql-CI9VTwjt.mjs → mysql-sql-SlpS6OMg.mjs} +3 -3
  97. package/dist/nitro.mjs +3 -3
  98. package/dist/{node-D9dPyUr0.mjs → node-qXD3FbIU.mjs} +2 -2
  99. package/dist/{operator-ai-logging-DFTEp81Z.mjs → operator-ai-logging-CNuX5uKg.mjs} +1 -1
  100. package/dist/operator-cmd-BnLoIO2A.mjs +1 -0
  101. package/dist/{operator-cmd-CQOQrUiO.mjs → operator-cmd-D0vSUVle.mjs} +4 -4
  102. package/dist/pages/client.d.mts +4 -4
  103. package/dist/pages/client.mjs +4 -4
  104. package/dist/pages/index.d.mts +3 -3
  105. package/dist/pages/index.mjs +4 -4
  106. package/dist/pages/islands-plugin.d.mts +1 -1
  107. package/dist/pages/islands-plugin.mjs +1 -1
  108. package/dist/pages/prefetch.d.mts +1 -1
  109. package/dist/pages/prefetch.mjs +1 -1
  110. package/dist/pages/protocol.d.mts +3 -3
  111. package/dist/pages/protocol.mjs +3 -3
  112. package/dist/{pg-DoyPxa_X.mjs → pgpass-CEtnBOZO.mjs} +1 -1
  113. package/dist/{platform-args-DtpHS_75.mjs → platform-args-DQSMW4EP.mjs} +24 -5
  114. package/dist/platform-args-Rgp86xa7.mjs +1 -0
  115. package/dist/{platform-auth-config-fLwIS5VG.mjs → platform-auth-config-V2ifSLQ-.mjs} +4 -4
  116. package/dist/{platform-auth-protection-BTRI_YwD.mjs → platform-auth-protection-BybVCUzi.mjs} +2 -2
  117. package/dist/{platform-auth-recovery-DPK2Mvmo.mjs → platform-auth-recovery-kH1-h8Ch.mjs} +2 -2
  118. package/dist/{platform-cmd-BLy5uCa-.mjs → platform-cmd-B1jtqXnu.mjs} +1 -1
  119. package/dist/{platform-cmd-HS_FSthn.mjs → platform-cmd-BHWdh1Hx.mjs} +5 -5
  120. package/dist/{platform-domain-CHpcq_qg.mjs → platform-domain-DB_KpVhg.mjs} +2 -2
  121. package/dist/{platform-lifecycle-B6LUBwjS.mjs → platform-lifecycle-BoOTmH6H.mjs} +1 -1
  122. package/dist/{platform-lifecycle-D2RS7DE0.mjs → platform-lifecycle-C6fUuj4y.mjs} +146 -71
  123. package/dist/{platform-management-C-T0ch4y.mjs → platform-management-7Bf_OgS5.mjs} +1 -1
  124. package/dist/{platform-management-d3ETv3Dw.mjs → platform-management-B8-pOxoJ.mjs} +9 -2
  125. package/dist/{platform-plans-config-B7yJQKf7.mjs → platform-plans-config-iczSDkQK.mjs} +1 -1
  126. package/dist/{platform-recovery-DS5CAsly.mjs → platform-recovery-ZAXin6WK.mjs} +2 -2
  127. package/dist/{platform-setup-Casiffqj.mjs → platform-setup-CpcHLI-0.mjs} +1 -0
  128. package/dist/{plugin-inference-DZHmVe1f.mjs → plugin-inference-BGamcCqB.mjs} +1 -2
  129. package/dist/{prefetch-Dx2jIbtg.mjs → prefetch-C_OUvg5g.mjs} +4 -0
  130. package/dist/{prefetch-NdNeubbH.d.mts → prefetch-UINRrqL4.d.mts} +1 -0
  131. package/dist/{prepare-AVM4Hj3T.mjs → prepare-BrAkXTTB.mjs} +3 -3
  132. package/dist/prepare-CI7_C9Xf.mjs +1 -0
  133. package/dist/{prepare-DMk8NAO-.mjs → prepare-Cjt6EM0d.mjs} +1 -1
  134. package/dist/{project-cmd-TQKAOTMV.mjs → project-cmd-wtCuc8Ln.mjs} +15 -15
  135. package/dist/{project-team-B1OKeb-T.mjs → project-team-CZFvPIJ-.mjs} +1 -1
  136. package/dist/{project-token-RW_wpmN-.mjs → project-token-C3TxkWeC.mjs} +1 -1
  137. package/dist/{project-zero-trust-TNc66p0_.mjs → project-zero-trust-DrRyAHW1.mjs} +1 -1
  138. package/dist/{protocol-YS3tbxWE.d.mts → protocol-BlAiF-hc.d.mts} +5 -3
  139. package/dist/{email-protocol-DTs_TjCS.mjs → protocol-ChF3kDjf.mjs} +1 -1
  140. package/dist/{protocol-a3ZUQq5W.mjs → protocol-W5EQcIzN.mjs} +40 -20
  141. package/dist/{provision-bgQTi5QZ.mjs → provision-CknEbPuw.mjs} +3 -2
  142. package/dist/{provision-BLdkpFT4.mjs → provision-DdWqRmmr.mjs} +1 -1
  143. package/dist/{env-public-DtJL_hZq.d.mts → public-B80SwOFp.d.mts} +14 -9
  144. package/dist/{env-raw-e8qgqAzQ.mjs → raw-7pQirZpQ.mjs} +1 -1
  145. package/dist/raw-CtfNvKyY.d.mts +3 -0
  146. package/dist/{requests-Cj15-yrI.mjs → requests-FaA9M3RX.mjs} +1 -1
  147. package/dist/{response-HmNjB30w.mjs → response-CyXsGfOy.mjs} +1 -1
  148. package/dist/{rollback-CYnkng7B.mjs → rollback-DM6pZ23Y.mjs} +2 -2
  149. package/dist/{route-types-C6eAOmOj.mjs → route-types-CrODgORq.mjs} +36 -6
  150. package/dist/{route-url-CfCR4oMj.mjs → route-url-BBdkU7rb.mjs} +1 -1
  151. package/dist/{route-url-C3JwYrER.d.mts → route-url-Di1kB8D_.d.mts} +6 -2
  152. package/dist/routes-stub.d.mts +1 -3
  153. package/dist/routes-stub.mjs +1 -1
  154. package/dist/{runner-mysql-BXfcQQj3.mjs → runner-mysql-CJ-HyqxV.mjs} +1 -1
  155. package/dist/{runner-mysql-CHvEg_sy.mjs → runner-mysql-C_PrAUTm.mjs} +1 -1
  156. package/dist/runtime/{ai.mjs → ai/index.mjs} +6 -6
  157. package/dist/runtime/{better-auth.d.mts → auth/better-auth-d1.d.mts} +1 -1
  158. package/dist/runtime/{better-auth.mjs → auth/better-auth-d1.mjs} +3 -3
  159. package/dist/runtime/{better-auth-mysql.d.mts → auth/better-auth-mysql.d.mts} +1 -1
  160. package/dist/runtime/{better-auth-mysql.mjs → auth/better-auth-mysql.mjs} +3 -3
  161. package/dist/runtime/{better-auth-pg.d.mts → auth/better-auth-postgres.d.mts} +1 -1
  162. package/dist/runtime/{better-auth-pg.mjs → auth/better-auth-postgres.mjs} +4 -4
  163. package/dist/runtime/auth/client-react.d.mts +2 -0
  164. package/dist/runtime/auth/client-react.mjs +1 -0
  165. package/dist/runtime/auth/client-solid.d.mts +2 -0
  166. package/dist/runtime/auth/client-solid.mjs +1 -0
  167. package/dist/runtime/auth/client-svelte.d.mts +2 -0
  168. package/dist/runtime/auth/client-svelte.mjs +1 -0
  169. package/dist/runtime/auth/client-vue.d.mts +2 -0
  170. package/dist/runtime/auth/client-vue.mjs +1 -0
  171. package/dist/runtime/auth/client.d.mts +2 -0
  172. package/dist/runtime/auth/client.mjs +1 -0
  173. package/dist/runtime/{auth.d.mts → auth/index.d.mts} +1 -1
  174. package/dist/runtime/auth/index.mjs +1 -0
  175. package/dist/runtime/{fetch-server.d.mts → client/fetch-server.d.mts} +1 -1
  176. package/dist/runtime/{fetch-server.mjs → client/fetch-server.mjs} +3 -3
  177. package/dist/runtime/client/fetch-stream.d.mts +3 -0
  178. package/dist/runtime/client/fetch-stream.mjs +3 -0
  179. package/dist/runtime/{fetch.d.mts → client/fetch.d.mts} +1 -1
  180. package/dist/runtime/client/fetch.mjs +3 -0
  181. package/dist/runtime/client/index.d.mts +5 -0
  182. package/dist/runtime/client/index.mjs +5 -0
  183. package/dist/runtime/client/react.d.mts +5 -0
  184. package/dist/runtime/client/react.mjs +5 -0
  185. package/dist/runtime/client/solid.d.mts +5 -0
  186. package/dist/runtime/client/solid.mjs +5 -0
  187. package/dist/runtime/client/svelte.d.mts +5 -0
  188. package/dist/runtime/client/svelte.mjs +5 -0
  189. package/dist/runtime/client/vue.d.mts +5 -0
  190. package/dist/runtime/client/vue.mjs +5 -0
  191. package/dist/runtime/{db.mjs → db/index.mjs} +2 -2
  192. package/dist/runtime/{migration-handler.d.mts → db/migrations/d1-handler.d.mts} +1 -1
  193. package/dist/runtime/{migration-handler.mjs → db/migrations/d1-handler.mjs} +1 -1
  194. package/dist/runtime/{migration-handler-mysql.d.mts → db/migrations/mysql-handler.d.mts} +1 -1
  195. package/dist/runtime/{migration-handler-mysql.mjs → db/migrations/mysql-handler.mjs} +2 -2
  196. package/dist/runtime/{migration-handler-pg.d.mts → db/migrations/postgres-handler.d.mts} +1 -1
  197. package/dist/runtime/{migration-handler-pg.mjs → db/migrations/postgres-handler.mjs} +2 -2
  198. package/dist/runtime/{seed.mjs → db/seed.mjs} +1 -1
  199. package/dist/runtime/{durable.mjs → durable/index.mjs} +3 -3
  200. package/dist/runtime/{email.d.mts → email/index.d.mts} +1 -1
  201. package/dist/runtime/{email.mjs → email/index.mjs} +6 -6
  202. package/dist/runtime/{email-protocol.mjs → email/protocol.mjs} +1 -1
  203. package/dist/runtime/email/testing.mjs +4 -4
  204. package/dist/runtime/{env-public-client.d.mts → env/public-client.d.mts} +1 -1
  205. package/dist/runtime/{env-public-client.mjs → env/public-client.mjs} +2 -2
  206. package/dist/runtime/env/public.d.mts +4 -0
  207. package/dist/runtime/{env-public.mjs → env/public.mjs} +144 -75
  208. package/dist/runtime/{env.d.mts → env/runtime.d.mts} +1 -2
  209. package/dist/runtime/{env.mjs → env/runtime.mjs} +1 -1
  210. package/dist/runtime/{handler.d.mts → handler/index.d.mts} +1 -1
  211. package/dist/runtime/{handler.mjs → handler/index.mjs} +2 -2
  212. package/dist/runtime/{response.mjs → handler/response.mjs} +1 -1
  213. package/dist/runtime/handler/validator.d.mts +2 -0
  214. package/dist/runtime/handler/validator.mjs +1 -0
  215. package/dist/runtime/{isr.mjs → isr/index.mjs} +2 -2
  216. package/dist/runtime/{kv.mjs → kv/index.mjs} +2 -2
  217. package/dist/runtime/{limits.d.mts → limits/index.d.mts} +1 -1
  218. package/dist/runtime/{limits.mjs → limits/index.mjs} +1 -1
  219. package/dist/runtime/{live-client.d.mts → live/client.d.mts} +2 -2
  220. package/dist/runtime/{live-client.mjs → live/client.mjs} +1 -1
  221. package/dist/runtime/{live.d.mts → live/index.d.mts} +1 -1
  222. package/dist/runtime/live/index.mjs +1 -0
  223. package/dist/runtime/{live-server.mjs → live/server.mjs} +3 -3
  224. package/dist/runtime/{log.mjs → log/index.mjs} +1 -1
  225. package/dist/runtime/queues/index.d.mts +2 -0
  226. package/dist/runtime/{queues.mjs → queues/index.mjs} +2 -2
  227. package/dist/runtime/remote/binding-handler.mjs +1 -1
  228. package/dist/runtime/remote/index.mjs +1 -1
  229. package/dist/runtime/{routing.d.mts → routing/index.d.mts} +7 -2
  230. package/dist/runtime/{routing.mjs → routing/index.mjs} +51 -17
  231. package/dist/runtime/{route-url.d.mts → routing/route-url.d.mts} +1 -1
  232. package/dist/runtime/{route-url.mjs → routing/route-url.mjs} +1 -1
  233. package/dist/runtime/{sandbox-container.d.mts → sandbox/container.d.mts} +1 -1
  234. package/dist/runtime/{sandbox-container.mjs → sandbox/container.mjs} +1 -1
  235. package/dist/runtime/{sandbox.d.mts → sandbox/index.d.mts} +2 -2
  236. package/dist/runtime/{sandbox.mjs → sandbox/index.mjs} +5 -5
  237. package/dist/runtime/{sse-client.d.mts → sse/client.d.mts} +1 -1
  238. package/dist/runtime/{sse-client.mjs → sse/client.mjs} +1 -1
  239. package/dist/runtime/sse/index.mjs +1 -0
  240. package/dist/runtime/{storage.mjs → storage/index.mjs} +2 -2
  241. package/dist/runtime/ws/index.d.mts +2 -0
  242. package/dist/runtime/{ws.mjs → ws/index.mjs} +3 -3
  243. package/dist/runtime/ws/room.d.mts +30 -0
  244. package/dist/runtime/ws/room.mjs +37 -0
  245. package/dist/runtime/{ws-server.d.mts → ws/server.d.mts} +18 -3
  246. package/dist/runtime/ws/server.mjs +1 -0
  247. package/dist/{env-DtKg5G26.mjs → runtime-zDDinDI5.mjs} +2 -2
  248. package/dist/{dist-BWNkVq50.mjs → scan-tDExXbA1.mjs} +978 -11
  249. package/dist/{secret-BSf7dgg_.mjs → secret-DDNLIQOT.mjs} +3 -3
  250. package/dist/{runtime/ws-server.mjs → server-CfUbeOjx.mjs} +60 -19
  251. package/dist/{sse-CxR30yMF.mjs → sse-BXnTfcf3.mjs} +1 -1
  252. package/dist/{static-asset-marker-DsQKz6lt.mjs → static-asset-marker-lxYeKvFP.mjs} +2 -2
  253. package/dist/{types-IPut3_Yx.d.mts → types-FDH6NuY1.d.mts} +0 -5
  254. package/dist/{validation-error-uAAjlsiW.mjs → validation-error-CtcAvyI7.mjs} +1 -1
  255. package/dist/{validator-8-NZs2Xr.mjs → validator-Duafcnh7.mjs} +1 -1
  256. package/dist/{version-metadata-CeftH0fQ.mjs → version-metadata-DEmItNdS.mjs} +1 -1
  257. package/dist/{wrangler-B1gkT_wC.mjs → wrangler-D1zq1rXr.mjs} +20 -3
  258. package/dist/wrangler-DM3GOqck.mjs +1 -0
  259. package/dist/{wrapper-xJ4LP5A7.mjs → wrapper-C2gMY432.mjs} +11 -6
  260. package/docs/guide/ai.md +3 -2
  261. package/docs/guide/auth.md +19 -14
  262. package/docs/guide/database.md +0 -7
  263. package/docs/guide/email/sending.md +0 -1
  264. package/docs/guide/pages-routing/errors.md +23 -1
  265. package/docs/guide/pages-routing/head.md +15 -10
  266. package/docs/guide/pages-routing/loaders.md +19 -0
  267. package/docs/guide/pages-routing/markdown.md +14 -10
  268. package/docs/guide/pages-routing/view-transitions.md +0 -16
  269. package/docs/guide/platform/administration/plans.md +13 -13
  270. package/docs/guide/platform/administration/projects.md +14 -4
  271. package/docs/guide/platform/installation/ci.md +5 -2
  272. package/docs/guide/platform/installation/maintenance.md +5 -2
  273. package/docs/guide/platform/installation/prerequisites.md +1 -1
  274. package/docs/guide/platform/installation/setup.md +12 -0
  275. package/docs/guide/queues.md +9 -5
  276. package/docs/guide/storage.md +0 -4
  277. package/docs/guide/type-safety.md +18 -12
  278. package/docs/guide/websockets.md +72 -1
  279. package/docs/integrations/frameworks/overview.md +7 -0
  280. package/docs/integrations/hono.md +4 -3
  281. package/docs/reference/api/auth.md +8 -8
  282. package/docs/reference/api/deploy.md +1 -1
  283. package/docs/reference/api/pages.md +2 -0
  284. package/docs/reference/api.md +2 -1
  285. package/docs/reference/cli/platform-config.md +33 -7
  286. package/docs/reference/cli/platform-installation.md +4 -1
  287. package/docs/reference/cli/platform-users.md +48 -35
  288. package/docs/reference/cli.md +2 -2
  289. package/docs/reference/config.md +13 -1
  290. package/package.json +165 -160
  291. package/schema.json +12 -1
  292. package/dist/cf-build-output-DUZnAeZ1.mjs +0 -1
  293. package/dist/deploy-Dr_Qamzw.mjs +0 -2
  294. package/dist/email-BHY72ixO.mjs +0 -165
  295. package/dist/gen-DmEeVEs4.mjs +0 -1
  296. package/dist/help-Cp3K5m1w.mjs +0 -1
  297. package/dist/login-DBs8JuSl.mjs +0 -1
  298. package/dist/migrate-BYhoIK9R.mjs +0 -1
  299. package/dist/operator-cmd-xCACDtT1.mjs +0 -1
  300. package/dist/platform-args-DSi4_M8n.mjs +0 -1
  301. package/dist/prepare-BSXKz6m8.mjs +0 -1
  302. package/dist/runtime/auth-client-react.d.mts +0 -2
  303. package/dist/runtime/auth-client-react.mjs +0 -1
  304. package/dist/runtime/auth-client-solid.d.mts +0 -2
  305. package/dist/runtime/auth-client-solid.mjs +0 -1
  306. package/dist/runtime/auth-client-svelte.d.mts +0 -2
  307. package/dist/runtime/auth-client-svelte.mjs +0 -1
  308. package/dist/runtime/auth-client-vue.d.mts +0 -2
  309. package/dist/runtime/auth-client-vue.mjs +0 -1
  310. package/dist/runtime/auth-client.d.mts +0 -2
  311. package/dist/runtime/auth-client.mjs +0 -1
  312. package/dist/runtime/auth.mjs +0 -1
  313. package/dist/runtime/client-react.d.mts +0 -5
  314. package/dist/runtime/client-react.mjs +0 -5
  315. package/dist/runtime/client-solid.d.mts +0 -5
  316. package/dist/runtime/client-solid.mjs +0 -5
  317. package/dist/runtime/client-svelte.d.mts +0 -5
  318. package/dist/runtime/client-svelte.mjs +0 -5
  319. package/dist/runtime/client-vue.d.mts +0 -5
  320. package/dist/runtime/client-vue.mjs +0 -5
  321. package/dist/runtime/client.d.mts +0 -5
  322. package/dist/runtime/client.mjs +0 -5
  323. package/dist/runtime/env-public.d.mts +0 -4
  324. package/dist/runtime/fetch-stream.d.mts +0 -3
  325. package/dist/runtime/fetch-stream.mjs +0 -3
  326. package/dist/runtime/fetch.mjs +0 -3
  327. package/dist/runtime/live.mjs +0 -1
  328. package/dist/runtime/queues.d.mts +0 -2
  329. package/dist/runtime/sse.mjs +0 -1
  330. package/dist/runtime/validator.d.mts +0 -2
  331. package/dist/runtime/validator.mjs +0 -1
  332. package/dist/runtime/ws.d.mts +0 -2
  333. package/dist/scan-4YOxDaw2.mjs +0 -970
  334. package/dist/wrangler-fNGvPTlO.mjs +0 -1
  335. /package/dist/{auth-client-6-Ft9i9T.d.mts → client-6-Ft9i9T.d.mts} +0 -0
  336. /package/dist/{auth-client-react-DvQLe5Zb.d.mts → client-react-DvQLe5Zb.d.mts} +0 -0
  337. /package/dist/{auth-client-solid-P9pEtKGp.d.mts → client-solid-P9pEtKGp.d.mts} +0 -0
  338. /package/dist/{auth-client-svelte-B5j8irT6.d.mts → client-svelte-B5j8irT6.d.mts} +0 -0
  339. /package/dist/{auth-client-vue-BEiAfavk.d.mts → client-vue-BEiAfavk.d.mts} +0 -0
  340. /package/dist/{migration-handler-D8mDx3Ew.d.mts → d1-handler-D8mDx3Ew.d.mts} +0 -0
  341. /package/dist/{env-helpers-U56xuFgL.d.mts → helpers-U56xuFgL.d.mts} +0 -0
  342. /package/dist/{auth-CV9kXHKe.d.mts → index-CV9kXHKe.d.mts} +0 -0
  343. /package/dist/{queues-DdM42xXW.d.mts → index-DdM42xXW.d.mts} +0 -0
  344. /package/dist/{limits-_xIf5z_P.d.mts → index-_xIf5z_P.d.mts} +0 -0
  345. /package/dist/runtime/{ai.d.mts → ai/index.d.mts} +0 -0
  346. /package/dist/runtime/{db.d.mts → db/index.d.mts} +0 -0
  347. /package/dist/runtime/{db-mysql.d.mts → db/mysql.d.mts} +0 -0
  348. /package/dist/runtime/{db-mysql.mjs → db/mysql.mjs} +0 -0
  349. /package/dist/runtime/{db-pg.d.mts → db/postgres.d.mts} +0 -0
  350. /package/dist/runtime/{db-pg.mjs → db/postgres.mjs} +0 -0
  351. /package/dist/runtime/{schema-d1.d.mts → db/schema/d1.d.mts} +0 -0
  352. /package/dist/runtime/{schema-d1.mjs → db/schema/d1.mjs} +0 -0
  353. /package/dist/runtime/{schema-mysql.d.mts → db/schema/mysql.d.mts} +0 -0
  354. /package/dist/runtime/{schema-mysql.mjs → db/schema/mysql.mjs} +0 -0
  355. /package/dist/runtime/{schema-pg.d.mts → db/schema/postgres.d.mts} +0 -0
  356. /package/dist/runtime/{schema-pg.mjs → db/schema/postgres.mjs} +0 -0
  357. /package/dist/runtime/{seed.d.mts → db/seed.d.mts} +0 -0
  358. /package/dist/runtime/{drizzle-arktype.d.mts → db/validators/drizzle-arktype.d.mts} +0 -0
  359. /package/dist/runtime/{drizzle-arktype.mjs → db/validators/drizzle-arktype.mjs} +0 -0
  360. /package/dist/runtime/{drizzle-valibot.d.mts → db/validators/drizzle-valibot.d.mts} +0 -0
  361. /package/dist/runtime/{drizzle-valibot.mjs → db/validators/drizzle-valibot.mjs} +0 -0
  362. /package/dist/runtime/{drizzle-zod.d.mts → db/validators/drizzle-zod.d.mts} +0 -0
  363. /package/dist/runtime/{drizzle-zod.mjs → db/validators/drizzle-zod.mjs} +0 -0
  364. /package/dist/runtime/{durable.d.mts → durable/index.d.mts} +0 -0
  365. /package/dist/runtime/{email-protocol.d.mts → email/protocol.d.mts} +0 -0
  366. /package/dist/runtime/{response.d.mts → handler/response.d.mts} +0 -0
  367. /package/dist/runtime/{isr.d.mts → isr/index.d.mts} +0 -0
  368. /package/dist/runtime/{kv.d.mts → kv/index.d.mts} +0 -0
  369. /package/dist/runtime/{live-server.d.mts → live/server.d.mts} +0 -0
  370. /package/dist/runtime/{log.d.mts → log/index.d.mts} +0 -0
  371. /package/dist/runtime/{sse.d.mts → sse/index.d.mts} +0 -0
  372. /package/dist/runtime/{storage.d.mts → storage/index.d.mts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { A as confirm, H as outro, L as log, O as cancel, U as password, tt as isCancel } from "./dist-STQXl8ck.mjs";
2
2
  import { c as getToken } from "./auth-CCk9Seol.mjs";
3
- import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
4
- import { _ as validateSecretValues } from "./env-validation-DeYNRp1d.mjs";
3
+ import { r as PlatformClient } from "./client-aIv5UQf3.mjs";
4
+ import { _ as validateSecretValues } from "./env-validation-DfJ9Fzfa.mjs";
5
5
  import { m as printSuccess, o as formatCount, p as note } from "./output-DNVILSz2.mjs";
6
6
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
7
7
  import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Da3OgCU1.mjs";
@@ -97,7 +97,7 @@ async function resolveSecretBackend(root, args) {
97
97
  }
98
98
  async function resolveCloudflareSecretBackend(root, args) {
99
99
  if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
100
- const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-I4t3mt4R.mjs");
100
+ const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-C5RTQNnh.mjs");
101
101
  const context = resolveCloudflareOperationContext(root);
102
102
  return {
103
103
  target: "Cloudflare Worker",
@@ -1,6 +1,7 @@
1
- import { t as authContext } from "../auth-aMuFOZeI.mjs";
2
- import { o as withRuntimeEnv } from "../env-DtKg5G26.mjs";
3
- // src/runtime/ws-server.ts
1
+ import { t as authContext } from "./auth-YtP6K4J3.mjs";
2
+ import { o as withRuntimeEnv } from "./runtime-zDDinDI5.mjs";
3
+ import { DurableObject } from "cloudflare:workers";
4
+ // src/runtime/ws/server.ts
4
5
  function matchRoute(pattern, pathname) {
5
6
  const patternSegments = pattern.split("/").filter(Boolean);
6
7
  const pathSegments = pathname.split("/").filter(Boolean);
@@ -58,6 +59,33 @@ function buildWebSocketInstanceId(route, params) {
58
59
  if (entries.length > 1 && entries.some(([, value]) => value.includes("&"))) return `v2:${JSON.stringify(entries)}`;
59
60
  return route.params.map((name) => `${name}=${params[name] ?? ""}`).join("&");
60
61
  }
62
+ /** Present bracket parameters without changing the router's compiled patterns. */
63
+ function canonicalWebSocketPattern(pattern) {
64
+ return pattern.split("/").map((segment) => {
65
+ if (segment === "[...]") return "*";
66
+ const param = segment.match(/^\[\.\.\.([^\]]+)\]$/);
67
+ if (param) return `:${param[1]}{.+}`;
68
+ const named = segment.match(/^\[([^\]]+)\]$/);
69
+ return named ? `:${named[1]}` : segment;
70
+ }).join("/");
71
+ }
72
+ /**
73
+ * Route metadata for `getRoom()`. The generated route table registers it once per
74
+ * worker, so server code can address the same instance a client's `connect()` does.
75
+ * Shared through `globalThis` because dev can evaluate this module more than once.
76
+ */
77
+ const WEB_SOCKET_ROUTES_SYMBOL = Symbol.for("void.webSocketRoutes.v1");
78
+ const sharedWebSocketRoutes = globalThis;
79
+ const webSocketRoutes = sharedWebSocketRoutes[WEB_SOCKET_ROUTES_SYMBOL] ??= /* @__PURE__ */ new Map();
80
+ /** @internal Called by the generated route table. */
81
+ function __registerWebSocketRoutes(routes) {
82
+ webSocketRoutes.clear();
83
+ for (const route of routes) webSocketRoutes.set(canonicalWebSocketPattern(route.pattern), route);
84
+ }
85
+ /** @internal Route metadata registered by the generated route table. */
86
+ function __getWebSocketRoute(pattern) {
87
+ return webSocketRoutes.get(canonicalWebSocketPattern(pattern));
88
+ }
61
89
  async function serializeServerEvent(schema, event) {
62
90
  const result = await schema["~standard"].validate(event);
63
91
  if (result.issues) throw new Error(`ws: Message validation failed: ${result.issues.map((issue) => issue.message).join("; ")}.`);
@@ -172,20 +200,33 @@ function createWebSocketDurableObject(definition, route, authRuntime, resolveAut
172
200
  ...route,
173
201
  key: definition.key
174
202
  };
175
- class VoidWebSocketDurableObject {
203
+ class VoidWebSocketDurableObject extends DurableObject {
176
204
  state;
177
- env;
178
205
  constructor(state, env) {
206
+ super(state, env);
179
207
  this.state = state;
180
- this.env = env;
181
208
  }
182
209
  fetch(request) {
183
- return withRuntimeEnv(this.env, () => this.handleFetch(request));
210
+ return withRuntimeEnv(this.env, () => this.#handleFetch(request));
211
+ }
212
+ async __voidRoomAction(request) {
213
+ return withRuntimeEnv(this.env, () => {
214
+ const actions = definition.__kind === "room" ? definition.actions : void 0;
215
+ const action = actions && Object.hasOwn(actions, request.name) ? actions[request.name] : void 0;
216
+ if (typeof action !== "function") throw new Error(`ws: Unknown room action "${request.name}".`);
217
+ return action({
218
+ id: request.id,
219
+ params: request.params,
220
+ env: this.env,
221
+ storage: this.state.storage,
222
+ room: createRoomController(this.state, definition.messages.server)
223
+ }, ...request.args);
224
+ });
184
225
  }
185
- context(request, webSocket, stored) {
226
+ #context(request, webSocket, stored) {
186
227
  return createHookContext(definition, this.state, this.env, request, webSocket, stored);
187
228
  }
188
- async handleFetch(request) {
229
+ async #handleFetch(request) {
189
230
  const params = getRouteMatch(request, route) ?? {};
190
231
  const roomId = buildWebSocketInstanceId(instanceRoute, params);
191
232
  const authState = authRuntime && resolveAuthState ? await resolveAuthState(request, this.env, authRuntime) : null;
@@ -202,11 +243,11 @@ function createWebSocketDurableObject(definition, route, authRuntime, resolveAut
202
243
  authState
203
244
  };
204
245
  setStoredConnection(server, stored);
205
- const beforeConnectCtx = this.context(request, server, stored);
246
+ const beforeConnectCtx = this.#context(request, server, stored);
206
247
  const decision = await withAuthState(authState, () => definition.onBeforeConnect?.(beforeConnectCtx));
207
248
  if (decision instanceof Response) return decision;
208
249
  this.state.acceptWebSocket(server);
209
- const connectCtx = this.context(request, server, stored);
250
+ const connectCtx = this.#context(request, server, stored);
210
251
  await withAuthState(authState, () => definition.onConnect?.(connectCtx));
211
252
  return new Response(null, {
212
253
  status: 101,
@@ -221,13 +262,13 @@ function createWebSocketDurableObject(definition, route, authRuntime, resolveAut
221
262
  user,
222
263
  authState
223
264
  };
224
- const ctx = this.context(request, new WebSocketPair()[1], stored);
265
+ const ctx = this.#context(request, new WebSocketPair()[1], stored);
225
266
  return withAuthState(authState, () => definition.onRequest(ctx));
226
267
  }
227
268
  webSocketMessage(webSocket, message) {
228
- return withRuntimeEnv(this.env, () => this.handleWebSocketMessage(webSocket, message));
269
+ return withRuntimeEnv(this.env, () => this.#handleWebSocketMessage(webSocket, message));
229
270
  }
230
- async handleWebSocketMessage(webSocket, message) {
271
+ async #handleWebSocketMessage(webSocket, message) {
231
272
  const stored = getStoredConnection(webSocket);
232
273
  const raw = parseIncomingMessage(message);
233
274
  let parsed;
@@ -243,17 +284,17 @@ function createWebSocketDurableObject(definition, route, authRuntime, resolveAut
243
284
  return;
244
285
  }
245
286
  const request = new Request(`https://void.local${route.pattern}`);
246
- const ctx = this.context(request, webSocket, stored);
287
+ const ctx = this.#context(request, webSocket, stored);
247
288
  await withAuthState(stored.authState ?? null, () => definition.onMessage?.(ctx, result.value));
248
289
  }
249
290
  webSocketClose(webSocket, code, reason, wasClean) {
250
- return withRuntimeEnv(this.env, () => this.handleWebSocketClose(webSocket, code, reason, wasClean));
291
+ return withRuntimeEnv(this.env, () => this.#handleWebSocketClose(webSocket, code, reason, wasClean));
251
292
  }
252
- async handleWebSocketClose(webSocket, code, reason, wasClean) {
293
+ async #handleWebSocketClose(webSocket, code, reason, wasClean) {
253
294
  completeWebSocketClose(webSocket, code, reason);
254
295
  const stored = getStoredConnection(webSocket);
255
296
  const request = new Request(`https://void.local${route.pattern}`);
256
- const ctx = this.context(request, webSocket, stored);
297
+ const ctx = this.#context(request, webSocket, stored);
257
298
  await withAuthState(stored.authState ?? null, () => definition.onClose?.(ctx, {
258
299
  code,
259
300
  reason,
@@ -294,4 +335,4 @@ async function forwardWebSocketRequest(request, env, route) {
294
335
  if (!stub) return new Response(`Missing Durable Object binding "${route.bindingName}"`, { status: 503 });
295
336
  return stub.fetch(request);
296
337
  }
297
- export { buildWebSocketInstanceId, createWebSocketDurableObject, createWebSocketTombstoneDurableObject, forwardWebSocketRequest };
338
+ export { createWebSocketTombstoneDurableObject as a, createWebSocketDurableObject as i, __registerWebSocketRoutes as n, forwardWebSocketRequest as o, buildWebSocketInstanceId as r, __getWebSocketRoute as t };
@@ -1,4 +1,4 @@
1
- // src/runtime/sse.ts
1
+ // src/runtime/sse/index.ts
2
2
  const DEFAULT_KEEP_ALIVE_INTERVAL_MS = 15e3;
3
3
  const DEFAULT_KEEP_ALIVE_COMMENT = "keep-alive";
4
4
  var SseStreamClosedError = class extends Error {
@@ -1,11 +1,11 @@
1
- // src/runtime/auth-response.ts
1
+ // src/runtime/auth/response.ts
2
2
  const authDependentRequests = /* @__PURE__ */ new WeakSet();
3
3
  const SHARED_CACHE_HEADERS = [
4
4
  "cdn-cache-control",
5
5
  "cloudflare-cdn-cache-control",
6
6
  "surrogate-control"
7
7
  ];
8
- // src/runtime/static-asset-marker.ts
8
+ // src/runtime/routing/static-asset-marker.ts
9
9
  const STATIC_ASSET_KEY = "__voidStaticAsset";
10
10
  /**
11
11
  * Records that the fallback answered with a file from the ASSETS binding: the
@@ -8,7 +8,6 @@ type PageDefinition = {
8
8
  pattern: string;
9
9
  /** Route params, e.g. ["id"] */
10
10
  params: Array<string>;
11
- /** Whether this is a catch-all route */
12
11
  catchAll: boolean;
13
12
  /** Component file relative path, e.g. "users/[id].vue" */
14
13
  componentPath: string;
@@ -28,9 +27,7 @@ type PageDefinition = {
28
27
  ssrMode: SsrMode;
29
28
  /** Normalized prerender mode from the public `prerender` export */
30
29
  prerenderMode: PrerenderMode;
31
- /** Normalized page render mode */
32
30
  renderMode: PageRenderMode;
33
- /** Whether this page should participate in prerender collection */
34
31
  shouldPrerender: boolean;
35
32
  /** Whether `export function getPrerenderPaths` is defined in server handler */
36
33
  hasGetPrerenderPaths?: boolean;
@@ -55,13 +52,11 @@ type LayoutDefinition = {
55
52
  island?: boolean;
56
53
  };
57
54
  type NamedLayoutDefinition = {
58
- /** Layout name, e.g. "home", "post" */
59
55
  name: string;
60
56
  /** Directory containing _layouts/, e.g. "" (root) or "guide" */
61
57
  directory: string;
62
58
  /** File path relative to pages/, e.g. "_layouts/home.vue" */
63
59
  filePath: string;
64
- /** Whether this is an island layout */
65
60
  island?: boolean;
66
61
  };
67
62
  type PageScanResult = {
@@ -1,4 +1,4 @@
1
- // src/runtime/handler-composition.ts
1
+ // src/runtime/handler/composition.ts
2
2
  const compositionKey = "__voidHandlerComposition";
3
3
  function getHandlerComposition(handler) {
4
4
  return handler?.[compositionKey];
@@ -1,4 +1,4 @@
1
- // src/runtime/validator.ts
1
+ // src/runtime/handler/validator.ts
2
2
  function flattenIssues(issues) {
3
3
  return Array.from(issues, (issue) => ({
4
4
  message: issue.message,
@@ -1,5 +1,5 @@
1
1
  import { a as join } from "./dist-DMYe8CZJ.mjs";
2
- import { l as bindingNamesForField, p as findBindingNameOwner } from "./wrangler-B1gkT_wC.mjs";
2
+ import { l as bindingNamesForField, p as findBindingNameOwner } from "./wrangler-D1zq1rXr.mjs";
3
3
  // src/shared/untrusted-env.ts
4
4
  /** Authentication inputs that Wrangler may consume from the environment. */
5
5
  const WRANGLER_AUTH_CREDENTIAL_ENV_VARS = [
@@ -1,7 +1,7 @@
1
1
  import { a as join, c as resolve, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
2
- import { a as persistCloudflareConfig, i as materializeCloudflareConfig, r as ignoreMaterializedCloudflareConfig } from "./cloudflare-config-PxbinLLE.mjs";
2
+ import { a as persistCloudflareConfig, i as materializeCloudflareConfig, r as ignoreMaterializedCloudflareConfig } from "./cloudflare-config-BfEfIEuY.mjs";
3
3
  import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-CUhCPMpK.mjs";
4
- import { h as validateConfig, p as readConfig } from "./config-CzFdJYNA.mjs";
4
+ import { h as validateConfig, p as readConfig } from "./config-qgt863GH.mjs";
5
5
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
6
6
  import { parseSync } from "vite";
7
7
  import { appendSqliteClassMigration, isRecord } from "@void/deploy-core";
@@ -506,6 +506,7 @@ function readManagedQueueProvenance(text) {
506
506
  const none = {
507
507
  producerBindings: [],
508
508
  consumerQueues: [],
509
+ consumerConcurrencyQueues: [],
509
510
  pendingConsumerRemovals: []
510
511
  };
511
512
  const encoded = MANAGED_QUEUES_MARKER.exec(text)?.[1];
@@ -517,6 +518,7 @@ function readManagedQueueProvenance(text) {
517
518
  return {
518
519
  producerBindings: strings(parsed.producerBindings),
519
520
  consumerQueues: strings(parsed.consumerQueues),
521
+ consumerConcurrencyQueues: strings(parsed.consumerConcurrencyQueues),
520
522
  pendingConsumerRemovals: strings(parsed.pendingConsumerRemovals)
521
523
  };
522
524
  } catch {
@@ -527,10 +529,11 @@ function writeManagedQueueProvenance(text, provenance) {
527
529
  const normalized = {
528
530
  producerBindings: [...new Set(provenance.producerBindings)].sort(),
529
531
  consumerQueues: [...new Set(provenance.consumerQueues)].sort(),
532
+ consumerConcurrencyQueues: [...new Set(provenance.consumerConcurrencyQueues)].sort(),
530
533
  pendingConsumerRemovals: [...new Set(provenance.pendingConsumerRemovals)].sort()
531
534
  };
532
535
  const existing = MANAGED_QUEUES_MARKER.exec(text);
533
- if (normalized.producerBindings.length === 0 && normalized.consumerQueues.length === 0 && normalized.pendingConsumerRemovals.length === 0) {
536
+ if (normalized.producerBindings.length === 0 && normalized.consumerQueues.length === 0 && normalized.consumerConcurrencyQueues.length === 0 && normalized.pendingConsumerRemovals.length === 0) {
534
537
  if (!existing) return text;
535
538
  const start = existing.index;
536
539
  const end = start + existing[0].length;
@@ -722,6 +725,7 @@ function writeProvisionedWranglerConfig(root, patch, options) {
722
725
  const managedQueueProvenance = readManagedQueueProvenance(text);
723
726
  const managedProducerBindings = new Set(managedQueueProvenance.producerBindings);
724
727
  const managedConsumerQueues = new Set(managedQueueProvenance.consumerQueues);
728
+ const managedConsumerConcurrencyQueues = new Set(managedQueueProvenance.consumerConcurrencyQueues);
725
729
  const pendingConsumerRemovals = new Set(managedQueueProvenance.pendingConsumerRemovals);
726
730
  const upsertQueueEntries = (section, entries) => {
727
731
  if (!entries || entries.length === 0) return;
@@ -744,6 +748,18 @@ function writeProvisionedWranglerConfig(root, patch, options) {
744
748
  const owner = workerBindingOwners.get(bindingName);
745
749
  if (owner !== void 0) throw new Error(`deploy: cannot update "${configPath}" — queue producer binding ${JSON.stringify(bindingName)} is already used by a ${owner} binding. Wrangler requires every binding name to be unique across the whole worker, so this producer would make the config undeployable. Rename the conflicting binding (or the queue) and retry.`);
746
750
  } else index = currentList.findIndex((existing) => isRecord(existing) && existing.queue === entry.queue);
751
+ if (reconcileManagedQueues && section === "consumers" && typeof entry.queue === "string") {
752
+ if (entry.max_concurrency !== void 0) managedConsumerConcurrencyQueues.add(entry.queue);
753
+ else if (managedConsumerConcurrencyQueues.delete(entry.queue) && index >= 0) {
754
+ set([
755
+ "queues",
756
+ section,
757
+ index,
758
+ "max_concurrency"
759
+ ], void 0);
760
+ delete currentList[index].max_concurrency;
761
+ }
762
+ }
747
763
  if (index >= 0) {
748
764
  const existing = currentList[index];
749
765
  for (const [key, value] of Object.entries(entry)) {
@@ -852,6 +868,7 @@ function writeProvisionedWranglerConfig(root, patch, options) {
852
868
  text = writeManagedQueueProvenance(text, {
853
869
  producerBindings: [...managedProducerBindings].filter((binding) => finalProducerBindings.has(binding)),
854
870
  consumerQueues: [...managedConsumerQueues].filter((queue) => finalConsumerQueues.has(queue)),
871
+ consumerConcurrencyQueues: [...managedConsumerConcurrencyQueues].filter((queue) => finalConsumerQueues.has(queue)),
855
872
  pendingConsumerRemovals: [...pendingConsumerRemovals]
856
873
  });
857
874
  }
@@ -0,0 +1 @@
1
+ export { b as readRootWranglerConfig } from "./wrangler-D1zq1rXr.mjs";
@@ -1,7 +1,9 @@
1
1
  import { a as join, l as toSlash, n as dirname, r as extname } from "./dist-DMYe8CZJ.mjs";
2
- import { l as getDatabaseDialect, p as readConfig } from "./config-CzFdJYNA.mjs";
3
- import { c as voidDbBundlerPlugin, r as cloudflareQueueName, t as generateQueueResolverSource } from "./dispatch-BBfb519j.mjs";
2
+ import { t as findEnvFile } from "./env-types-WEZw5D-r.mjs";
3
+ import { l as getDatabaseDialect, p as readConfig } from "./config-qgt863GH.mjs";
4
+ import { c as voidDbBundlerPlugin, r as cloudflareQueueName, t as generateQueueResolverSource } from "./dispatch-DPEuEblR.mjs";
4
5
  import { n as readProjectPaths } from "./project-paths-CUhCPMpK.mjs";
6
+ import { t as ENV_REGISTRY_KEY } from "./env-registry-BbCdIOXP.mjs";
5
7
  import { t as WORKER_CONDITIONS } from "./worker-conditions-CBZ0RYsZ.mjs";
6
8
  import { t as MagicString } from "./dist-B6eN80gc.mjs";
7
9
  import { n as isIdentifier, r as isLiteral } from "./ast-Cv0JwXqb.mjs";
@@ -158,11 +160,11 @@ async function generateWrapper(workerDir, workerMain, root, features) {
158
160
  const migrationsDir = readProjectPaths(root).migrationsDir;
159
161
  migrations = collectMigrations(migrationsDir);
160
162
  migrationPlanBundle = features.migrationDialect === "sqlite" ? buildMigrationPlanBundle(migrations) : void 0;
161
- const handlerName = features.migrationDialect === "postgresql" ? "migration-handler-pg" : features.migrationDialect === "mysql" ? "migration-handler-mysql" : "migration-handler";
163
+ const handlerName = features.migrationDialect === "postgresql" ? "postgres-handler" : features.migrationDialect === "mysql" ? "mysql-handler" : "d1-handler";
162
164
  const handlerFilename_ = `${handlerName}.mjs`;
163
- let handlerPath = join(import.meta.dirname, "..", "runtime", `${handlerName}.ts`);
164
- if (!existsSync(handlerPath)) handlerPath = join(import.meta.dirname, "runtime", handlerFilename_);
165
- if (!existsSync(handlerPath)) handlerPath = join(import.meta.dirname, "..", "runtime", handlerFilename_);
165
+ let handlerPath = join(import.meta.dirname, "..", "runtime", "db", "migrations", `${handlerName}.ts`);
166
+ if (!existsSync(handlerPath)) handlerPath = join(import.meta.dirname, "runtime", "db", "migrations", handlerFilename_);
167
+ if (!existsSync(handlerPath)) handlerPath = join(import.meta.dirname, "..", "runtime", "db", "migrations", handlerFilename_);
166
168
  if (!existsSync(handlerPath)) throw new Error(`Migration handler not found: ${handlerFilename_}. Run "pnpm -C packages/void build" first.`);
167
169
  await bundleMigrationHandler(root, workerDir, handlerPath, features.migrationDialect ?? "sqlite");
168
170
  }
@@ -568,6 +570,7 @@ function generateHandlersSource(root, features, dialect) {
568
570
  const paths = readProjectPaths(root);
569
571
  const scoped = dialect !== "sqlite";
570
572
  if (scoped) lines.push(`import { withRuntimeEnv } from ${JSON.stringify(envModuleFile)};`);
573
+ const prepareEnv = findEnvFile(root) ? ` await globalThis[Symbol.for(${JSON.stringify(ENV_REGISTRY_KEY)})]?.prepare?.(env);` : void 0;
571
574
  if (features.crons.length > 0) {
572
575
  for (let i = 0; i < features.crons.length; i++) {
573
576
  const absPath = join(paths.cronsDir, features.crons[i].filePath);
@@ -575,6 +578,7 @@ function generateHandlersSource(root, features, dialect) {
575
578
  }
576
579
  lines.push("");
577
580
  lines.push(scoped ? "async function __runScheduled(controller, env, ctx) {" : "export async function handleScheduled(controller, env, ctx) {");
581
+ if (prepareEnv) lines.push(prepareEnv);
578
582
  lines.push(" const tasks = [];");
579
583
  for (let i = 0; i < features.crons.length; i++) {
580
584
  lines.push(` if (${JSON.stringify(features.crons[i].crons)}.includes(controller.cron)) {`);
@@ -609,6 +613,7 @@ function generateHandlersSource(root, features, dialect) {
609
613
  lines.push(generateQueueResolverSource(queueNames, cloudflareNames && queueNames.map((name) => cloudflareQueueName(name, cloudflareNames))));
610
614
  lines.push("");
611
615
  lines.push(scoped ? "async function __runQueue(batch, env, ctx) {" : "export async function handleQueue(batch, env, ctx) {");
616
+ if (prepareEnv) lines.push(prepareEnv);
612
617
  lines.push(" const queueSuffix = batch.queue;");
613
618
  lines.push(" const __queueIndex = __resolveQueueIndex(queueSuffix);");
614
619
  lines.push(" if (__queueIndex === -1) {");
package/docs/guide/ai.md CHANGED
@@ -80,7 +80,6 @@ Use `ai.models()` to list available models:
80
80
  ```ts
81
81
  const models = await ai.models();
82
82
 
83
- // Filter by task
84
83
  const textModels = await ai.models({ task: 'Text Generation' });
85
84
  ```
86
85
 
@@ -142,7 +141,9 @@ const result = await ai.run('google/gemini-2.5-flash', {
142
141
  });
143
142
  ```
144
143
 
145
- Pass AI Gateway options as the third argument: `ai.run(model, inputs, { gateway: { skipCache: true } })`. On a team platform, the platform chooses the gateway and sets its metadata and logging; options such as `skipCache` and `cacheTtl` still apply. The platform's logging setting also covers `void dev` in a linked project; an unlinked project uses your own Cloudflare account and its gateway settings.
144
+ Pass AI Gateway options as the third argument: `ai.run(model, inputs, { gateway: { skipCache: true } })`.
145
+
146
+ On a team platform, Void selects the gateway and request metadata, and administrators control the [logging policy](./platform/administration/projects.md#ai-logging). Apps can still set cache options such as `skipCache` and `cacheTtl`. The same logging policy applies during `void dev` for a linked project. An unlinked project uses your own Cloudflare account and gateway settings.
146
147
 
147
148
  For provider-native requests on a direct deployment, configure [`ai.gateway`](../integrations/cloudflare.md#ai-self-host).
148
149
 
@@ -24,14 +24,12 @@ Use the preconfigured auth client from `void/client`:
24
24
  ```tsx
25
25
  import { auth } from 'void/client';
26
26
 
27
- // sign up
28
27
  await auth.signUp.email({
29
28
  email: 'alice@example.com',
30
29
  password: 'example-password-123',
31
30
  name: 'Alice',
32
31
  });
33
32
 
34
- // sign in
35
33
  await auth.signIn.email({
36
34
  email: 'alice@example.com',
37
35
  password: 'example-password-123',
@@ -53,7 +51,7 @@ export const GET = defineHandler((c) => {
53
51
  });
54
52
  ```
55
53
 
56
- In a page loader, pass `throwRedirect` to send unauthenticated visitors to your login page instead of a plain-text `401`:
54
+ For a page that requires sign-in, pass `throwRedirect` with your login URL:
57
55
 
58
56
  ```ts
59
57
  // pages/dashboard.server.ts
@@ -70,9 +68,7 @@ export const loader = defineHandler((c) => {
70
68
  });
71
69
  ```
72
70
 
73
- The same option works in actions and middleware. It throws a redirect, stopping execution: `302` for GET/HEAD requests and `303` for other methods. Document requests follow the redirect normally; Pages client navigation follows it without reloading the document.
74
-
75
- Signing in does not replay a rejected action.
71
+ An unauthenticated visitor is sent to `/login`, and the rest of the loader does not run. The same option works in actions and middleware. Signing in does not repeat the action that required it.
76
72
 
77
73
  To allow unauthenticated access, use `getUser()` and return the nullable user. For custom guards, you can also [throw a redirect](../integrations/hono.md#redirects) from a helper.
78
74
 
@@ -93,12 +89,13 @@ Auth turns on automatically when you:
93
89
 
94
90
  Email/password is enabled by default. To add social providers:
95
91
 
96
- ```json
97
- {
98
- "auth": {
99
- "providers": ["email", "google", "github"]
100
- }
101
- }
92
+ ```ts
93
+ // void.config.ts
94
+ import { defineConfig } from 'void/config';
95
+
96
+ export default defineConfig({
97
+ auth: { providers: ['email', 'google', 'github'] },
98
+ });
102
99
  ```
103
100
 
104
101
  Provider credentials come from `AUTH_<PROVIDER>_CLIENT_ID` and `AUTH_<PROVIDER>_CLIENT_SECRET`. `cognito` also needs a domain, region, and user pool ID: set `AUTH_COGNITO_DOMAIN`, `AUTH_COGNITO_REGION`, and `AUTH_COGNITO_USER_POOL_ID`, or set them in `auth.ts`.
@@ -128,10 +125,18 @@ import { getSession, getUser, requireAuth } from 'void/auth';
128
125
  - `getSession()` returns `{ user, session } | null`
129
126
  - `requireAuth(c)` returns the authenticated user or throws `401`
130
127
  - `requireAuth(c, { throwRedirect: '/login' })` returns the user or throws a login redirect
131
- - [`getAuth(c)`](../reference/api/auth.md#getauth-c) returns the request's Better Auth instance, with plugin APIs inferred from `auth.ts`, for use with Better Auth helpers.
128
+ - [`getAuth(c)`](../reference/api/auth.md#getauth-c) returns the request's Better Auth instance, including plugin APIs inferred from `auth.ts`.
132
129
 
133
130
  Import `AuthUser` and `AuthSession` from `void/auth` for type annotations. They include the fields your Better Auth plugins and `user.additionalFields` add, such as `role` from `admin()`. See their fields in the [API reference](../reference/api/auth.md#authuser).
134
131
 
132
+ ### Calling Better Auth APIs
133
+
134
+ Use `getAuth(c).api` to call Better Auth from a handler. Void sends any cookies it sets with the response, so changes to the browser's session take effect on its next request.
135
+
136
+ `getUser()` and `getSession()` return the session from the start of the request. After an action changes the signed-in user, redirect to load the page with the updated session.
137
+
138
+ Calls such as `signUpEmail` sign the current browser in as the new user. To create an account for someone else, use the admin plugin's `createUser` instead.
139
+
135
140
  ## Querying Authentication Tables
136
141
 
137
142
  To query users or reference them from your own tables, import Void's generated authentication schema. It exports `userTable`, `sessionTable`, `accountTable`, `verificationTable`, and any tables added by your Better Auth plugins.
@@ -240,7 +245,7 @@ export default defineAuth(({ defaults }) => ({
240
245
 
241
246
  `defaults` already includes Void's conventions. Extend it explicitly instead of expecting a deep merge.
242
247
 
243
- In `auth.ts`, load helpers that import `@auth-schema` inside the hook that uses them, with `await import('./server/users')`. This lets `void prepare` generate the authentication schema on a fresh clone. The same applies when a helper imports your app's database schema and that schema references authentication tables.
248
+ If an auth hook uses a helper that imports `@auth-schema`, load that helper inside the hook with `await import('./server/users')`. The generated schema does not exist yet on a fresh clone. This also applies to helpers that import your own tables when those tables reference the auth schema.
244
249
 
245
250
  For the full set of available options, see the official [Better Auth options reference](https://www.better-auth.com/docs/reference/options).
246
251
 
@@ -166,16 +166,13 @@ const allUsers = await db.select().from(users);
166
166
  import { users } from '@schema';
167
167
  import { db, eq, and, or } from 'void/db';
168
168
 
169
- // Single condition
170
169
  const user = await db.select().from(users).where(eq(users.id, 1));
171
170
 
172
- // Multiple conditions
173
171
  const admins = await db
174
172
  .select()
175
173
  .from(users)
176
174
  .where(and(eq(users.role, 'admin'), eq(users.name, 'Alice')));
177
175
 
178
- // OR conditions
179
176
  const result = await db
180
177
  .select()
181
178
  .from(users)
@@ -185,19 +182,16 @@ const result = await db
185
182
  ### Insert
186
183
 
187
184
  ```ts
188
- // Single row
189
185
  await db.insert(users).values({
190
186
  name: 'Alice',
191
187
  email: 'alice@example.com',
192
188
  });
193
189
 
194
- // Insert and return the created row
195
190
  const [created] = await db
196
191
  .insert(users)
197
192
  .values({ name: 'Bob', email: 'bob@example.com' })
198
193
  .returning();
199
194
 
200
- // Multiple rows
201
195
  await db.insert(users).values([
202
196
  { name: 'Alice', email: 'alice@example.com' },
203
197
  { name: 'Bob', email: 'bob@example.com' },
@@ -209,7 +203,6 @@ await db.insert(users).values([
209
203
  ```ts
210
204
  await db.update(users).set({ role: 'admin' }).where(eq(users.id, 1));
211
205
 
212
- // Update and return the modified row
213
206
  const [updated] = await db.update(users).set({ role: 'admin' }).where(eq(users.id, 1)).returning();
214
207
  ```
215
208
 
@@ -23,7 +23,6 @@ if (!result.ok) {
23
23
  // A request-level failure; OUTCOME_UNKNOWN may already have been submitted.
24
24
  console.error(result.error.code, result.error.message);
25
25
  } else {
26
- // Some recipients failed. `deliveries` says which.
27
26
  for (const d of result.deliveries.filter((d) => !d.ok)) {
28
27
  console.error(d.recipient, d.error.code, d.error.message);
29
28
  }
@@ -88,7 +88,29 @@ In middleware, `c.notFound()` shows the root `_not-found` without running a page
88
88
 
89
89
  `_error` handles unexpected loader and rendering failures. In production, visitors see a generic message and error details stay in your server logs. Development shows the error message.
90
90
 
91
- Action errors that reach a client boundary keep their HTTP status and public message. Redirects, authentication responses, and API errors keep their usual behavior.
91
+ Action errors that reach a client boundary keep their HTTP status and public message. See [Actions & Forms](./actions-and-forms.md) for handling failures inline.
92
+
93
+ ## HTTP exceptions
94
+
95
+ Throw an `HTTPException` to show a specific error in your page's layout. For example, a suspended account can return `403` with an explanation:
96
+
97
+ ```ts
98
+ // pages/account.server.ts
99
+ import { HTTPException } from 'hono/http-exception';
100
+ import { defineHandler } from 'void/handler';
101
+
102
+ export const loader = defineHandler(() => {
103
+ throw new HTTPException(403, { message: 'Your account is suspended' });
104
+ });
105
+ ```
106
+
107
+ The nearest `_error` receives `{ status: 403, message: 'Your account is suspended' }`, and the response uses HTTP `403`. This works for both document requests and client-side page navigation. Use only messages that are safe to show to visitors.
108
+
109
+ Use a 4xx or 5xx status; `404` shows `_not-found`. If middleware throws before the loader runs, Void shows the root error component and skips the loader. Without a matching error component, Void returns the exception's response.
110
+
111
+ Error components handle these exceptions on page GET and HEAD requests. API routes and actions keep their own error handling. Return `c.text()` or `c.json()` to send a custom response, or [throw a redirect](../../integrations/hono.md#redirects) to send the visitor elsewhere. Checks that determine the response status must finish before deferred streaming starts.
112
+
113
+ Use [`c.status()`](./loaders.md#response-status) instead when you want an error status while rendering the requested page with its normal props.
92
114
 
93
115
  ## Nested errors
94
116
 
@@ -111,15 +111,9 @@ When multiple layers provide head data, they merge with this precedence:
111
111
  | `htmlAttrs` | Shallow merge, page wins conflicts. |
112
112
  | `bodyAttrs` | Shallow merge, page wins conflicts. |
113
113
 
114
- ## Absolute crawler URLs
114
+ ## Social Preview URLs {#absolute-crawler-urls}
115
115
 
116
- Social crawlers and link previews only read an absolute URL. These meta tags are resolved against the request URL when their `content` is a relative path, so you can write them without knowing the origin:
117
-
118
- - `og:image`, `og:image:url`, `og:image:secure_url`
119
- - `og:video`, `og:video:url`, `og:video:secure_url`
120
- - `og:audio`, `og:audio:url`, `og:audio:secure_url`
121
- - `og:url`
122
- - `twitter:image`
116
+ Use a relative path for a social preview image. Void turns it into an absolute URL using the incoming request:
123
117
 
124
118
  ```ts
125
119
  // void.config.ts
@@ -132,9 +126,20 @@ export default defineConfig({
132
126
  });
133
127
  ```
134
128
 
135
- A request to `https://example.com/posts/hello` renders `<meta property="og:image" content="https://example.com/og-image.jpg">`. Values that are already absolute, and every other tag, are left as written. Config, middleware and page values resolve the same way, and the client receives the same absolute value on navigation.
129
+ A request to `https://example.com/posts/hello` produces:
130
+
131
+ ```html
132
+ <meta property="og:image" content="https://example.com/og-image.jpg" />
133
+ ```
134
+
135
+ This works in config, middleware, and page head data, including client-side navigation. Void resolves the following tags:
136
+
137
+ - `og:image`, `og:image:url`, `og:image:secure_url`
138
+ - `og:video`, `og:video:url`, `og:video:secure_url`
139
+ - `og:audio`, `og:audio:url`, `og:audio:secure_url`
140
+ - `og:url` and `twitter:image`
136
141
 
137
- Prerendered pages keep the value relative, because the build does not know the site's origin.
142
+ Absolute URLs and other tags keep the values you provide. For prerendered pages, provide an absolute URL such as `https://example.com/og-image.jpg`: the build does not know your site's origin and leaves relative paths as written.
138
143
 
139
144
  ## HeadDescriptor
140
145
 
@@ -31,6 +31,25 @@ Return data directly to preserve values such as `Date`, `Map`, `Set`, `bigint`,
31
31
 
32
32
  Returning `Response.json()` uses JSON conversion instead. Functions and custom class instances can't be sent as page data.
33
33
 
34
+ ## Response Status
35
+
36
+ Use `c.status()` to render the current page with an HTTP error status, such as `403` or `503`. Return the page's props as usual:
37
+
38
+ ```ts
39
+ // pages/maintenance.server.ts
40
+ import { defineHandler } from 'void/handler';
41
+
42
+ export const loader = defineHandler((c) => {
43
+ c.status(503);
44
+ c.header('Retry-After', '120');
45
+ return { message: 'Down for maintenance' };
46
+ });
47
+ ```
48
+
49
+ The browser receives HTTP `503` and a `Retry-After` header, while the page renders with `{ message: 'Down for maintenance' }`. Client-side navigation uses the same status, props, and layouts.
50
+
51
+ You can also set the status in middleware before `await next()`. Set it before deferred streaming starts. To show an error component instead of the requested page, [throw an `HTTPException`](./errors.md#http-exceptions).
52
+
34
53
  ## Using the Data in Page Components
35
54
 
36
55
  The page component receives the loader's result as props. Export the inferred type from the server file so the component stays in sync: