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,5 +1,5 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-CH4PLAX1.mjs";
1
+ import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
2
3
  import { n as createAuthClient, t as auth } from "../auth-client-react-DvQLe5Zb.mjs";
3
- import { c as FetchError, s as fetch } from "../fetch-B-gLGYVl.mjs";
4
- import { t as fetchStream } from "../fetch-stream-DuwxWmBM.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { n as fetch } from "../fetch-C8yhLoF3.mjs";
3
- import { t as fetchStream } from "../fetch-stream-DafNtVJC.mjs";
2
+ import { n as fetch } from "../fetch-CAIVkLvW.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-6Op0qlLd.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-react-CJdeErvM.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-CH4PLAX1.mjs";
1
+ import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
2
3
  import { n as createAuthClient, t as auth } from "../auth-client-solid-P9pEtKGp.mjs";
3
- import { c as FetchError, s as fetch } from "../fetch-B-gLGYVl.mjs";
4
- import { t as fetchStream } from "../fetch-stream-DuwxWmBM.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { n as fetch } from "../fetch-C8yhLoF3.mjs";
3
- import { t as fetchStream } from "../fetch-stream-DafNtVJC.mjs";
2
+ import { n as fetch } from "../fetch-CAIVkLvW.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-6Op0qlLd.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-solid-BRvgvp6h.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-CH4PLAX1.mjs";
1
+ import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
2
3
  import { n as createAuthClient, t as auth } from "../auth-client-svelte-B5j8irT6.mjs";
3
- import { c as FetchError, s as fetch } from "../fetch-B-gLGYVl.mjs";
4
- import { t as fetchStream } from "../fetch-stream-DuwxWmBM.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { n as fetch } from "../fetch-C8yhLoF3.mjs";
3
- import { t as fetchStream } from "../fetch-stream-DafNtVJC.mjs";
2
+ import { n as fetch } from "../fetch-CAIVkLvW.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-6Op0qlLd.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-svelte-BSqUCEed.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-CH4PLAX1.mjs";
1
+ import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
2
3
  import { n as createAuthClient, t as auth } from "../auth-client-vue-BEiAfavk.mjs";
3
- import { c as FetchError, s as fetch } from "../fetch-B-gLGYVl.mjs";
4
- import { t as fetchStream } from "../fetch-stream-DuwxWmBM.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { n as fetch } from "../fetch-C8yhLoF3.mjs";
3
- import { t as fetchStream } from "../fetch-stream-DafNtVJC.mjs";
2
+ import { n as fetch } from "../fetch-CAIVkLvW.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-6Op0qlLd.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-vue-CPkbRtOO.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
- import { n as AuthState, r as AuthUser, t as AuthSession } from "../auth-CH4PLAX1.mjs";
1
+ import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
2
3
  import { n as createAuthClient, t as auth } from "../auth-client-6-Ft9i9T.mjs";
3
- import { c as FetchError, s as fetch } from "../fetch-B-gLGYVl.mjs";
4
- import { t as fetchStream } from "../fetch-stream-DuwxWmBM.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { n as fetch } from "../fetch-C8yhLoF3.mjs";
3
- import { t as fetchStream } from "../fetch-stream-DafNtVJC.mjs";
2
+ import { n as fetch } from "../fetch-CAIVkLvW.mjs";
3
+ import { t as fetchStream } from "../fetch-stream-6Op0qlLd.mjs";
4
4
  import { n as createAuthClient, t as auth } from "../auth-client-DwCdwKbw.mjs";
5
5
  export { FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,14 +1,17 @@
1
1
  import { DrizzleD1Database, DrizzleD1Database as DrizzleD1Database$1 } from "drizzle-orm/d1";
2
- import { and, asc, avg, between, count, desc, eq, exists, gt, gte, ilike, inArray, isNotNull, isNull, like, lt, lte, max, min, ne, not, notBetween, notExists, notInArray, notLike, or, sql, sum } from "drizzle-orm";
2
+ import { AnyColumn, SQL, SQLWrapper, and, asc, avg, between, count, desc, eq, exists, gt, gte, ilike, inArray, isNotNull, isNull, like, lt, lte, max, min, ne, not, notBetween, notExists, notInArray, notLike, or, sql, sum } from "drizzle-orm";
3
+ import { BatchItem } from "drizzle-orm/batch";
3
4
  /**
4
5
  * Create a Drizzle D1 instance from a custom D1 binding.
5
6
  * Use this when you have multiple D1 databases or need a non-default binding.
6
7
  */
7
- export declare function createDb(d1: D1Database): DrizzleD1Database$1;
8
+ export declare function createDb(d1: D1Database, options?: {
9
+ session?: D1SessionConstraint;
10
+ }): DrizzleD1Database$1;
8
11
  /**
9
12
  * Default Drizzle D1 instance — resolves the `DB` binding from the runtime
10
13
  * environment. When the Void plugin is active, this is replaced with a
11
14
  * schema-aware instance via virtual module.
12
15
  */
13
16
  export declare const db: DrizzleD1Database$1;
14
- export { type DrizzleD1Database, and, asc, avg, between, count, desc, eq, exists, gt, gte, ilike, inArray, isNotNull, isNull, like, lt, lte, max, min, ne, not, notBetween, notExists, notInArray, notLike, or, sql, sum };
17
+ export { type AnyColumn, type BatchItem, type DrizzleD1Database, type SQL, type SQLWrapper, and, asc, avg, between, count, desc, eq, exists, gt, gte, ilike, inArray, isNotNull, isNull, like, lt, lte, max, min, ne, not, notBetween, notExists, notInArray, notLike, or, sql, sum };
@@ -13,8 +13,8 @@ import { and, asc, avg, between, count, desc, eq, exists, gt, gte, ilike, inArra
13
13
  * Create a Drizzle D1 instance from a custom D1 binding.
14
14
  * Use this when you have multiple D1 databases or need a non-default binding.
15
15
  */
16
- function createDb(d1) {
17
- return drizzle(d1.withSession("first-unconstrained"));
16
+ function createDb(d1, options) {
17
+ return drizzle(d1.withSession(options?.session ?? "first-unconstrained"));
18
18
  }
19
19
  function createPrimaryDb(d1) {
20
20
  return drizzle(d1.withSession("first-primary"));
@@ -1,7 +1,7 @@
1
- import { a as normalizeEmail, r as buildMime } from "../../mime-CtP6-qAF.mjs";
2
1
  import { n as compileEmailPattern, t as compareEmailRoutes } from "../../email-BHY72ixO.mjs";
3
2
  import { y as registerEmailSink } from "../../dev-inbox-CUUS6iUg.mjs";
4
- import { a as createMessageProxy, n as MAX_INBOUND_HEADERS, t as MAX_INBOUND_BYTES } from "../../inbound-CdO-qY0w.mjs";
3
+ import { a as createMessageProxy, n as MAX_INBOUND_HEADERS, t as MAX_INBOUND_BYTES } from "../../inbound-C2H6Dzz1.mjs";
4
+ import { a as normalizeEmail, r as buildMime } from "../../mime-CtP6-qAF.mjs";
5
5
  // src/runtime/email/testing.ts
6
6
  /**
7
7
  * Test harnesses for void/email.
@@ -1,8 +1,8 @@
1
1
  import { n as bytesToBase64 } from "../base64-ikl9yBy3.mjs";
2
- import { a as normalizeEmail, i as newId, n as MimeError, r as buildMime } from "../mime-CtP6-qAF.mjs";
3
- import { a as DEV_INBOX_ENV_VAR, b as serializeCapturedMessage, c as DEV_INBOX_TOKEN_ENV_VAR, d as captureMessage, h as hasActiveSink, i as DEV_INBOX_CAPTURE_URL, p as dispatchToSinks } from "../dev-inbox-CUUS6iUg.mjs";
4
2
  import { o as withTimeout, r as readBoundedJson } from "../email-protocol-DTs_TjCS.mjs";
5
- import { a as createMessageProxy, c as isForwardableEmailMessage, d as readProjectSlug, f as replyEmail, i as bytesToReadableStream, l as parseEmail, o as defineEmail, p as tryGetRawRuntimeEnv, r as ParseEmailError, s as enactEmailActions, u as readEnvString } from "../inbound-CdO-qY0w.mjs";
3
+ import { a as DEV_INBOX_ENV_VAR, b as serializeCapturedMessage, c as DEV_INBOX_TOKEN_ENV_VAR, d as captureMessage, h as hasActiveSink, i as DEV_INBOX_CAPTURE_URL, p as dispatchToSinks } from "../dev-inbox-CUUS6iUg.mjs";
4
+ import { a as createMessageProxy, c as isForwardableEmailMessage, d as readProjectSlug, f as replyEmail, i as bytesToReadableStream, l as parseEmail, o as defineEmail, p as tryGetRawRuntimeEnv, r as ParseEmailError, s as enactEmailActions, u as readEnvString } from "../inbound-C2H6Dzz1.mjs";
5
+ import { a as normalizeEmail, i as newId, n as MimeError, r as buildMime } from "../mime-CtP6-qAF.mjs";
6
6
  import { isRecord } from "@void/deploy-core";
7
7
  // src/runtime/email.ts
8
8
  function makeError(code, message, cause) {
@@ -1,4 +1,4 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
2
  import { a as number, c as url, i as json, n as boolean, o as oneOf, r as email, s as string, t as EnvSchema } from "../env-helpers-U56xuFgL.mjs";
3
- import { a as _getSchemaDefaults, c as defineEnv, i as _getRegisteredSchema, l as env, n as EnvValidationReport, o as _hasRegisteredSchema, r as ValidatedEnv, s as _validateEnvOnce, t as EnvValidationError, u as validateAllEnv } from "../env-public-CeNeO_AT.mjs";
3
+ import { a as _getSchemaDefaults, c as defineEnv, i as _getRegisteredSchema, l as env, n as EnvValidationReport, o as _hasRegisteredSchema, r as ValidatedEnv, s as _validateEnvOnce, t as EnvValidationError, u as validateAllEnv } from "../env-public-DtJL_hZq.mjs";
4
4
  export { type EnvSchema, EnvValidationError, EnvValidationReport, ValidatedEnv, _getRegisteredSchema, _getSchemaDefaults, _hasRegisteredSchema, _validateEnvOnce, boolean, defineEnv, email, env, json, number, oneOf, string, url, validateAllEnv };
@@ -1,51 +1,7 @@
1
+ import { n as redactMessage, t as isUnmaskActive } from "../env-mask-D31Qztl9.mjs";
1
2
  import { a as getRawRuntimeEnv } from "../env-raw-e8qgqAzQ.mjs";
2
3
  import { i as isInternalBinding, n as getRuntimeEnv } from "../env-DtKg5G26.mjs";
3
4
  import { a as oneOf, i as number, n as email, o as string, r as json, s as url, t as boolean } from "../env-helpers-Dj_SIwPu.mjs";
4
- // src/shared/env-mask.ts
5
- /**
6
- * Secret redaction helpers for env-validation output.
7
- *
8
- * Values are redacted (replaced with `<redacted>`) whenever they flow into
9
- * a user-visible string — `EnvValidationError` messages, CLI reports, the
10
- * dev-server warning block. The key name is never masked (the user needs
11
- * it to locate the offending entry).
12
- *
13
- * Server env values are production secrets by definition, so validator
14
- * messages redact the raw input unconditionally.
15
- *
16
- * Users can opt out of the guard for local debugging via
17
- * `VOID_ENV_UNMASK=1` in the environment; that path prints a one-shot
18
- * notice on stderr so the loosened output is visibly attributed.
19
- *
20
- * This module is a leaf — no imports from non-leaf modules, safe to reach
21
- * from both the runtime (worker bundle) and the CLI host.
22
- */
23
- /** Sentinel emitted in place of a redacted value. */
24
- const REDACTED = "<redacted>";
25
- /** Environment variable that disables redaction when set to `1`. */
26
- const UNMASK_ENV_VAR = "VOID_ENV_UNMASK";
27
- /** Replace raw input in validator messages, regardless of its name or shape. */
28
- function redactMessage(rawValue, message, options = {}) {
29
- if (options.unmask) return message;
30
- if (typeof rawValue !== "string" || rawValue.length === 0) return message;
31
- return message.split(rawValue).join(REDACTED);
32
- }
33
- let unmaskResolved = null;
34
- /**
35
- * Resolve the effective unmask flag, consulting `process.env` exactly once
36
- * per process. On the first affirmative read, we print a one-shot notice to
37
- * stderr so CI logs clearly show the guard is off.
38
- */
39
- function isUnmaskActive() {
40
- if (unmaskResolved !== null) return unmaskResolved;
41
- try {
42
- unmaskResolved = globalThis.process?.env?.[UNMASK_ENV_VAR] === "1";
43
- } catch {
44
- unmaskResolved = false;
45
- }
46
- if (unmaskResolved) console.error(`[void/env] ${UNMASK_ENV_VAR}=1 is set — env validation errors will include raw values. Unset it before sharing logs.`);
47
- return unmaskResolved;
48
- }
49
5
  // src/runtime/env-public.ts
50
6
  /**
51
7
  * Public env API — `void/env`.
@@ -79,17 +35,14 @@ const ENV_REGISTRY_SYMBOL = Symbol.for("void.env.registry");
79
35
  const registryGlobal = globalThis;
80
36
  const registry = registryGlobal[ENV_REGISTRY_SYMBOL] ??= {
81
37
  schema: null,
82
- hasDefineEnvBeenCalled: false,
83
- bootValidation: null
38
+ hasDefineEnvBeenCalled: false
84
39
  };
85
- const validatedCache = /* @__PURE__ */ new WeakMap();
86
- const cacheList = [];
40
+ let validatedCache = /* @__PURE__ */ new WeakMap();
87
41
  function getValidatedCache(rawEnv) {
88
42
  let cache = validatedCache.get(rawEnv);
89
43
  if (!cache) {
90
44
  cache = /* @__PURE__ */ new Map();
91
45
  validatedCache.set(rawEnv, cache);
92
- cacheList.push(cache);
93
46
  }
94
47
  return cache;
95
48
  }
@@ -112,51 +65,66 @@ function getClientEnvValues() {
112
65
  function defineEnv(schema) {
113
66
  registry.schema = schema;
114
67
  registry.hasDefineEnvBeenCalled = true;
115
- for (const map of cacheList) map.clear();
116
- registry.bootValidation = null;
68
+ validatedCache = /* @__PURE__ */ new WeakMap();
69
+ registry.validation = null;
117
70
  return env;
118
71
  }
119
72
  /**
120
- * Internal: validate the whole schema against the worker env once per isolate,
121
- * from the generated worker entry. Catches remote-secret values the deploy CLI
122
- * cannot see. Async validators are awaited here and their values cached, so
123
- * later synchronous `env.X` reads can serve them.
73
+ * Internal: validate the whole schema against the worker env, from the generated
74
+ * worker entry. Catches remote-secret values the deploy CLI cannot see. A
75
+ * completed validation is reused for the same raw values; an env with other
76
+ * values is validated again. Async validators are awaited here, and their values
77
+ * serve later synchronous `env.X` reads of the env this call receives, and of any
78
+ * other env that holds the same raw values.
124
79
  */
125
80
  async function _validateEnvOnce(envValues) {
126
- if (registry.bootValidation) {
127
- if (!registry.bootValidation.ok) throw registry.bootValidation.error;
128
- return;
129
- }
130
- if (!registry.schema) {
131
- registry.bootValidation = { ok: true };
132
- return;
81
+ const schema = registry.schema;
82
+ if (!schema) return;
83
+ const inputs = readSchemaInputs(schema, envValues);
84
+ const last = registry.validation;
85
+ let state;
86
+ if (last && sameInputs(last.inputs, inputs)) state = last.state;
87
+ else {
88
+ state = await validateSchema(schema, inputs);
89
+ if (registry.schema !== schema) return _validateEnvOnce(envValues);
90
+ registry.validation = {
91
+ inputs,
92
+ state
93
+ };
133
94
  }
134
- const values = {
135
- ...envValues ?? {},
136
- ...getClientEnvValues()
95
+ if (!state.ok) throw state.error;
96
+ seedValidated(envValues, state.values);
97
+ }
98
+ /** The raw value of each schema key that `readKey` would validate for this env. */
99
+ function readSchemaInputs(schema, envValues) {
100
+ const values = typeof envValues === "object" && envValues !== null ? envValues : {};
101
+ const clientValues = getClientEnvValues();
102
+ return new Map(Object.keys(schema).map((key) => [key, Object.hasOwn(clientValues, key) ? clientValues[key] : values[key]]));
103
+ }
104
+ function sameInputs(a, b) {
105
+ if (a.size !== b.size) return false;
106
+ for (const [key, value] of a) if (!b.has(key) || !Object.is(b.get(key), value)) return false;
107
+ return true;
108
+ }
109
+ async function validateSchema(schema, inputs) {
110
+ const report = await validateAllEnvWithValues(schema, Object.fromEntries(inputs));
111
+ if (report.valid) return {
112
+ ok: true,
113
+ values: report.values
137
114
  };
138
- const report = await validateAllEnvWithValues(registry.schema, values);
139
- if (report.valid) {
140
- try {
141
- const cacheKey = getRawRuntimeEnv();
142
- const cache = getValidatedCache(cacheKey);
143
- for (const [key, value] of report.values) {
144
- if (isInternalBinding(key, cacheKey)) continue;
145
- if (!cache.has(key)) cache.set(key, value);
146
- }
147
- } catch {}
148
- registry.bootValidation = { ok: true };
149
- return;
150
- }
151
115
  const lines = ["Env validation failed at worker boot:"];
152
116
  for (const key of report.missing) lines.push(` • ${key} is required but missing`);
153
117
  for (const { key, messages } of report.invalid) lines.push(` • ${key}: ${messages.join("; ")}`);
154
- const error = new EnvValidationError("__init__", [{ message: lines.join("\n") }]);
155
- registry.bootValidation = {
118
+ return {
156
119
  ok: false,
157
- error
120
+ error: new EnvValidationError("__init__", [{ message: lines.join("\n") }])
158
121
  };
159
- throw error;
122
+ }
123
+ /** Seed the per-key cache of `rawEnv`, where `readKey` looks first, with values validated for it. */
124
+ function seedValidated(rawEnv, values) {
125
+ if (typeof rawEnv !== "object" || rawEnv === null || values.size === 0) return;
126
+ const cache = getValidatedCache(rawEnv);
127
+ for (const [key, value] of values) if (!isInternalBinding(key, rawEnv) && !cache.has(key)) cache.set(key, value);
160
128
  }
161
129
  /** Internal: framework-only access to the registered schema (for plugin/CLI). */
162
130
  function _getRegisteredSchema() {
@@ -218,10 +186,12 @@ function readKey(key) {
218
186
  const clientValues = getClientEnvValues();
219
187
  const rawValue = Object.hasOwn(clientValues, key) ? clientValues[key] : filtered[key];
220
188
  if (!registry.schema) return rawValue;
221
- const validator = registry.schema[key];
189
+ const validator = Object.hasOwn(registry.schema, key) ? registry.schema[key] : void 0;
222
190
  if (!validator) return rawValue;
223
191
  const cache = getValidatedCache(rawEnv);
224
192
  if (cache.has(key)) return cache.get(key);
193
+ const latest = registry.validation;
194
+ if (latest?.state.ok && latest.state.values.has(key) && Object.is(latest.inputs.get(key), rawValue)) return latest.state.values.get(key);
225
195
  const result = validator["~standard"].validate(rawValue);
226
196
  if (result instanceof Promise) throw new Error(`env: Async validator for '${key}' cannot be resolved synchronously. Proxy property access is synchronous, so async Standard Schema validators must be pre-resolved by calling \`_validateEnvOnce(env)\` at worker boot (Void splices this into the generated entry) or by awaiting \`validateAllEnv(env)\` before the first \`env.${key}\` read. Once pre-validated, the resolved value is cached and served synchronously here.`);
227
197
  if (result.issues) {
@@ -279,7 +249,7 @@ async function validateAllEnv(envValues) {
279
249
  }
280
250
  /**
281
251
  * Internal: shared core that validates a schema against values and also
282
- * returns the resolved values (for cache seeding).
252
+ * returns the resolved values (for sync reads).
283
253
  */
284
254
  async function validateAllEnvWithValues(schema, envValues) {
285
255
  const report = {
@@ -1,4 +1,4 @@
1
- import { a as UntypedFetchOptions, c as FetchError } from "../fetch-B-gLGYVl.mjs";
1
+ import { a as UntypedFetchOptions, c as FetchError } from "../fetch-CbI6lNnk.mjs";
2
2
  /** Keep local calls in the app while using the browser client's request and error handling. */
3
3
  export declare function createServerFetch<Context extends {
4
4
  request?: Request;
@@ -1,5 +1,5 @@
1
+ import { t as createRouteFetch } from "../fetch-CAIVkLvW.mjs";
1
2
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { t as createRouteFetch } from "../fetch-C8yhLoF3.mjs";
3
3
  // src/runtime/fetch-server.ts
4
4
  /** Keep local calls in the app while using the browser client's request and error handling. */
5
5
  function createServerFetch(dispatch, getContext, fallbackOrigin) {
@@ -1,3 +1,3 @@
1
- import { c as FetchError } from "../fetch-B-gLGYVl.mjs";
2
- import { t as fetchStream } from "../fetch-stream-DuwxWmBM.mjs";
1
+ import { c as FetchError } from "../fetch-CbI6lNnk.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
3
3
  export { FetchError as StreamError, fetchStream };
@@ -1,3 +1,3 @@
1
1
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { t as fetchStream } from "../fetch-stream-DafNtVJC.mjs";
2
+ import { t as fetchStream } from "../fetch-stream-6Op0qlLd.mjs";
3
3
  export { FetchError as StreamError, fetchStream };
@@ -1,2 +1,2 @@
1
- import { a as UntypedFetchOptions, c as FetchError, i as QueryOption, n as MethodsOf, o as createRouteFetch, r as ParamsOption, s as fetch, t as BodyOption } from "../fetch-B-gLGYVl.mjs";
1
+ import { a as UntypedFetchOptions, c as FetchError, i as QueryOption, n as MethodsOf, o as createRouteFetch, r as ParamsOption, s as fetch, t as BodyOption } from "../fetch-CbI6lNnk.mjs";
2
2
  export { BodyOption, FetchError, MethodsOf, ParamsOption, QueryOption, UntypedFetchOptions, createRouteFetch, fetch };
@@ -1,3 +1,3 @@
1
1
  import { t as FetchError } from "../fetch-error-DmlRM6e4.mjs";
2
- import { n as fetch, t as createRouteFetch } from "../fetch-C8yhLoF3.mjs";
2
+ import { n as fetch, t as createRouteFetch } from "../fetch-CAIVkLvW.mjs";
3
3
  export { FetchError, createRouteFetch, fetch };
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-BR6Tvjkp.mjs";
2
+ import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-BO7Od-z9.mjs";
3
3
  export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, type Deferred, type HandlerInput, type InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
@@ -1,3 +1,3 @@
1
1
  import { r as defer, t as ValidationError } from "../validation-error-uAAjlsiW.mjs";
2
- import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "../handler-DnI_au0K.mjs";
2
+ import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "../handler-C9SnmeW1.mjs";
3
3
  export { ValidationError, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
@@ -1,5 +1,7 @@
1
+ import { RouteUrl } from "void/routes";
1
2
  export type RevalidateOptions = {
2
- paths?: Array<string>;
3
+ /** Paths to purge. Checked against the app's routes when `routing.typedRoutes` is on. */
4
+ paths?: Array<RouteUrl>;
3
5
  all?: boolean;
4
6
  };
5
7
  /**
@@ -1,4 +1,5 @@
1
- import { t as LiveClientEvent } from "../live-0xrcVpyq.mjs";
1
+ import { t as LiveClientEvent } from "../live-Kc55iuOQ.mjs";
2
+ import { n as RequestUrl } from "../route-url-C3JwYrER.mjs";
2
3
  export type LiveSubscribeOptions<Data = unknown> = {
3
4
  id: string;
4
5
  topic: string;
@@ -27,5 +28,13 @@ type EventSourceLike = {
27
28
  type EventSourceConstructor = new (url: string, options?: {
28
29
  withCredentials?: boolean;
29
30
  }) => EventSourceLike;
30
- export declare function connectLiveStream(url: string | URL, options?: ConnectLiveStreamOptions): LiveClient;
31
+ /**
32
+ * Open one `EventSource` to a `defineLiveStream()` route and send subscribe and
33
+ * unsubscribe requests to the same URL.
34
+ *
35
+ * With `routing.typedRoutes`, a string `url` must match one of the app's routes
36
+ * or be an absolute `http://`/`https://` URL. Cast a path built at runtime with
37
+ * `as RouteUrl`.
38
+ */
39
+ export declare function connectLiveStream(url: RequestUrl | URL, options?: ConnectLiveStreamOptions): LiveClient;
31
40
  export {};
@@ -1,4 +1,12 @@
1
1
  // src/runtime/live-client.ts
2
+ /**
3
+ * Open one `EventSource` to a `defineLiveStream()` route and send subscribe and
4
+ * unsubscribe requests to the same URL.
5
+ *
6
+ * With `routing.typedRoutes`, a string `url` must match one of the app's routes
7
+ * or be an absolute `http://`/`https://` URL. Cast a path built at runtime with
8
+ * `as RouteUrl`.
9
+ */
2
10
  function connectLiveStream(url, options = {}) {
3
11
  const EventSourceCtor = options.eventSource ?? globalThis.EventSource;
4
12
  if (!EventSourceCtor) throw new Error("live: EventSource is not available in this runtime.");
@@ -1,5 +1,5 @@
1
+ import { a as connectionInstanceName, c as topicInstanceName, o as internalUrl, s as topicDigest, t as __getLiveBindingName } from "../live-CYJ4KGoR.mjs";
1
2
  import { n as eventStream } from "../sse-CxR30yMF.mjs";
2
- import { a as connectionInstanceName, c as topicInstanceName, o as internalUrl, s as topicDigest, t as __getLiveBindingName } from "../live-DF4HUl2m.mjs";
3
3
  // src/runtime/live-server.ts
4
4
  const GENERATION_KEY = "connection:generation";
5
5
  const TOPIC_PRUNE_ALARM_DELAY_MS = 6e4;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-0xrcVpyq.mjs";
2
+ import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-Kc55iuOQ.mjs";
3
3
  export { LiveClientEvent, LiveConnectHookContext, LiveConnectOptions, LiveControlError, LiveControlErrorCode, LiveControlOperation, LiveControlOperationResult, LiveControlOptions, LiveControlRequest, LiveControlResponse, LiveHookContext, LiveLimits, LivePublishOptions, LiveStream, LiveStreamOptions, LiveSubscribeHookContext, __getLiveBindingName, __setLiveBindingName, __setLiveDev, defineLiveStream };
@@ -1 +1 @@
1
- export { t as __getLiveBindingName, n as __setLiveBindingName, r as __setLiveDev, i as defineLiveStream } from "../live-DF4HUl2m.mjs";
1
+ export { t as __getLiveBindingName, n as __setLiveBindingName, r as __setLiveDev, i as defineLiveStream } from "../live-CYJ4KGoR.mjs";
@@ -24,7 +24,7 @@ function format(message, boundFields = [], fields) {
24
24
  for (const source of [...boundFields, fields]) {
25
25
  if (!source) continue;
26
26
  for (const [key, value] of Object.entries(source)) {
27
- if (key === "msg" || key === "toJSON" || key === "__proto__" || key === "constructor") continue;
27
+ if (key === "msg" || key === "toJSON") continue;
28
28
  if (typeof value === "function") continue;
29
29
  payload[key] = value;
30
30
  }
@@ -1,5 +1,5 @@
1
- import { n as bytesToBase64 } from "../../base64-ikl9yBy3.mjs";
2
1
  import { t as cfAccessHeaders } from "../../cf-access-pejlJmuy.mjs";
2
+ import { n as bytesToBase64 } from "../../base64-ikl9yBy3.mjs";
3
3
  import { a as serializeR2HttpMetadata, i as serializeR2Conditional, t as R2_OBJECT_HEADER } from "../../r2-conditions-BqkQNt2n.mjs";
4
4
  // src/runtime/remote/client.ts
5
5
  function readableMessage(value) {
@@ -1,2 +1,2 @@
1
- import { a as RouteQuery, c as RouteUrlInput, d as routeUrl, f as toUrlString, i as RoutePath, l as TypedRoutes, n as RouteDestination, o as RouteQueryValue, r as RouteOptions, s as RouteUrl, t as Href, u as interpolateRouteParams } from "../route-url-C_YIH_zO.mjs";
2
- export { Href, RouteDestination, RouteOptions, RoutePath, RouteQuery, RouteQueryValue, RouteUrl, RouteUrlInput, TypedRoutes, interpolateRouteParams, routeUrl, toUrlString };
1
+ import { a as RoutePath, c as RouteUrl, d as interpolateRouteParams, f as routeUrl, i as RouteOptions, l as RouteUrlInput, n as RequestUrl, o as RouteQuery, p as toUrlString, r as RouteDestination, s as RouteQueryValue, t as Href, u as TypedRoutes } from "../route-url-C3JwYrER.mjs";
2
+ export { Href, RequestUrl, RouteDestination, RouteOptions, RoutePath, RouteQuery, RouteQueryValue, RouteUrl, RouteUrlInput, TypedRoutes, interpolateRouteParams, routeUrl, toUrlString };
@@ -1 +1 @@
1
- export { t as interpolateRouteParams, n as routeUrl, r as toUrlString } from "../route-url-CRDF-I0I.mjs";
1
+ export { t as interpolateRouteParams, n as routeUrl, r as toUrlString } from "../route-url-CfCR4oMj.mjs";
@@ -1,7 +1,7 @@
1
- import { A as filterInternalBindings, M as createClientAssetTags, N as createManifestLoader, O as createAssetFallback, j as ClientAssetTags, k as createWorkerFetch } from "../handler-BR6Tvjkp.mjs";
2
- import { a as handlePageMutation, i as handlePageGet } from "../protocol-CkwjASep.mjs";
1
+ import { A as filterInternalBindings, M as ClientAssetTags, N as createClientAssetTags, O as createAssetFallback, P as createManifestLoader, j as prerenderPathsResponse, k as createWorkerFetch, r as CloudContext } from "../handler-BO7Od-z9.mjs";
2
+ import { a as handlePageMutation, i as handlePageGet } from "../protocol-Cg2I81NA.mjs";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
- import { Context, Hono, MiddlewareHandler, TypedResponse } from "hono";
4
+ import { Context, Hono, MiddlewareHandler, NotFoundHandler, TypedResponse } from "hono";
5
5
  import { RouteDestination, RouteUrlInput } from "void/routes";
6
6
  import { RedirectStatusCode } from "hono/utils/http-status";
7
7
  type ErrorPageStatus = 404 | 500;
@@ -33,6 +33,8 @@ type PageRouteOptions = {
33
33
  headConfig: PageGetArguments[6] | null;
34
34
  renderOptions: PageGetArguments[7];
35
35
  namedActions?: boolean;
36
+ trailingSlash?: boolean;
37
+ catchAllParam?: string;
36
38
  };
37
39
  /** Records a handler that answers a route, so the marker can tell it from middleware. */
38
40
  export declare function markRouteHandler<T extends Function>(handler: T): T;
@@ -48,8 +50,13 @@ export declare function createNamedActionMarker(matchedRoutes: (c: Context) => A
48
50
  handler: Function;
49
51
  }>): MiddlewareHandler;
50
52
  export declare function createPageGetHandler(options: PageRouteOptions): (c: Context) => Promise<Response>;
53
+ /** Build-only rendering bypasses application middleware and serializes no request data. */
54
+ export declare function createStaticNotFound(options: PageRouteOptions): (request: Request, env: Record<string, unknown>) => Promise<Response>;
51
55
  export declare function createPageMutationHandler(options: PageRouteOptions): (c: Context) => Promise<Response>;
52
56
  export declare function createPagesFallback(options: {
57
+ pageNotFound?: (c: Context) => Promise<Response>;
58
+ trailingSlash?: boolean;
59
+ pagePatterns?: Array<RegExp>;
53
60
  routing: RoutingRuntime;
54
61
  errors: ErrorRenderer;
55
62
  fallbackRules?: Array<RoutingRule>;
@@ -73,6 +80,13 @@ export declare function createAssetNotFound(options: {
73
80
  fallbackRules?: Array<RoutingRule>;
74
81
  assetsDir?: string;
75
82
  }): (c: Context) => Promise<Response>;
83
+ /**
84
+ * Build the URL for one entry a page's `getPrerenderPaths()` returned. Values
85
+ * are percent-encoded like `routeUrl()`. Errors name the server file and the
86
+ * entry index, and fail the build: a wrong entry must not silently produce a
87
+ * missing or misplaced page.
88
+ */
89
+ export declare function buildPrerenderPath(pattern: string, params: unknown, file: string, index: number): string;
76
90
  export type RoutingRule = {
77
91
  source: string;
78
92
  destination: string;
@@ -98,6 +112,8 @@ export type RoutingContext = Context & {
98
112
  export type RoutingRuntime = {
99
113
  requestContext: AsyncLocalStorage<RequestContextStore>;
100
114
  contextMiddleware: MiddlewareHandler;
115
+ trackNotFound: (handler?: NotFoundHandler) => NotFoundHandler;
116
+ preserveNotFound: (response: Response) => Response;
101
117
  requestMiddleware: MiddlewareHandler;
102
118
  routingMiddleware: (rules: Array<RoutingRule>) => MiddlewareHandler;
103
119
  headerMiddleware: (rules: Array<RoutingHeaderRule>, phase?: "auth-error") => MiddlewareHandler;
@@ -112,6 +128,6 @@ export declare function createRoutingRuntime(app: Hono, options?: {
112
128
  blockedAssetExtensions?: Array<string>;
113
129
  }): RoutingRuntime;
114
130
  export declare function markNoMatch(request: Request, response: Response): Response;
115
- export declare function createHttpRouteHandler(load: () => Promise<Record<string, (c: Context) => unknown>>, method: string): (c: Context) => Promise<Response>;
131
+ export declare function createHttpRouteHandler(load: () => Promise<Record<string, (c: CloudContext) => unknown>>, method: string): (c: Context) => Promise<Response>;
116
132
  export declare function createModuleLoader<T>(load: () => Promise<T>, cache?: boolean): () => Promise<T>;
117
- export { createAssetFallback, createClientAssetTags, createManifestLoader, createWorkerFetch, filterInternalBindings };
133
+ export { createAssetFallback, createClientAssetTags, createManifestLoader, createWorkerFetch, filterInternalBindings, prerenderPathsResponse };