void 1.12.1 → 1.13.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/README.md +1 -0
  2. package/dist/{account-cmd-BU1Fy_Bf.mjs → account-cmd-4fQiXYX7.mjs} +6 -6
  3. package/dist/{application-analysis-DVeN8yoi.mjs → application-analysis-BjEwHTV2.mjs} +19 -13
  4. package/dist/{application-routing-KKw4Y84h.mjs → application-routing-COCfD2yc.mjs} +1 -1
  5. package/dist/args-DrnTI35r.mjs +88 -0
  6. package/dist/args-MnQnqypt.mjs +1 -0
  7. package/dist/{auth-CqwJwItO.mjs → auth-CeBmolb-.mjs} +3 -3
  8. package/dist/{auth-A7cZ8aXA.mjs → auth-CvaDxOMi.mjs} +1 -1
  9. package/dist/{auth-link-Duu2NvN5.mjs → auth-link-I4omV0pL.mjs} +6 -6
  10. package/dist/{auth-router-vgtOdb9j.mjs → auth-router-CXq4q7bb.mjs} +6 -5
  11. package/dist/{better-auth-shared-BS3pDQbT.d.mts → better-auth-shared-CrIkcN8I.d.mts} +2 -1
  12. package/dist/bindings-C7zOgxT3.d.mts +28 -0
  13. package/dist/browser-run-BKgZVwLk.mjs +124 -0
  14. package/dist/{build-cmd-B7OJ0U5R.mjs → build-cmd-Biz6u4rn.mjs} +6 -6
  15. package/dist/{cache-wSpi3aeM.mjs → cache-WkLMUrjQ.mjs} +6 -6
  16. package/dist/{cancel-deploy-DMWzkAlb.mjs → cancel-deploy-BRsrmyTk.mjs} +6 -5
  17. package/dist/{cf-access-DHklo7Rg.mjs → cf-access-B21j-nd6.mjs} +1 -1
  18. package/dist/{cf-build-output-Cso7Vh-t.mjs → cf-build-output-G-7Tdd8b.mjs} +6 -5
  19. package/dist/cf-build-output-Qc43LWzE.mjs +1 -0
  20. package/dist/{cf-command-values-5BPBRc9Z.mjs → cf-command-values-cUnJwCyG.mjs} +24 -1
  21. package/dist/{cf-config-migrate-D271BTiw.mjs → cf-config-migrate-CsbQGzMf.mjs} +200 -94
  22. package/dist/cf-user-agent-HHTRzfud.mjs +15 -0
  23. package/dist/cf-version-api-BWHMVtzw.mjs +1 -0
  24. package/dist/cf-version-api-XEEK2B9A.mjs +856 -0
  25. package/dist/cf-worker-settings-DJKdy97k.mjs +127 -0
  26. package/dist/cli/cli.mjs +1 -1
  27. package/dist/cli/cloudflare-operation-process.mjs +111 -47
  28. package/dist/cli/env-schema-probe.mjs +3 -3
  29. package/dist/cli/json-command-process.d.mts +6 -0
  30. package/dist/cli/json-command-process.mjs +91 -0
  31. package/dist/{cli-main-BrChcpE3.mjs → cli-main-CJTGhcYN.mjs} +84 -113
  32. package/dist/{client-eLZwqkPH.mjs → client-0um7Lzze.mjs} +1 -1
  33. package/dist/{client-DE2m2ldh.mjs → client-BEHI4UWn.mjs} +14 -8
  34. package/dist/{cloudflare-auth-eWfhdZCk.mjs → cloudflare-auth-iOgRurWm.mjs} +1 -1
  35. package/dist/{cloudflare-cmd-SsFlJe2B.mjs → cloudflare-cmd-DsSlXbNy.mjs} +5 -5
  36. package/dist/{cloudflare-config-D9UFH_A5.mjs → cloudflare-config-KPHKf57C.mjs} +2 -2
  37. package/dist/{cloudflare-connect-BgpHcSg3.mjs → cloudflare-connect-bEtneBjT.mjs} +5 -4
  38. package/dist/{cloudflare-operations-ByjFGats.mjs → cloudflare-operations-BmICrRnm.mjs} +1 -1
  39. package/dist/{cloudflare-operations-BIRQkYwL.mjs → cloudflare-operations-D-9psgPQ.mjs} +19 -11
  40. package/dist/cloudflare-preview-8eLSQPdO.mjs +1 -0
  41. package/dist/cloudflare-preview-BaeU-m74.mjs +112 -0
  42. package/dist/{cloudflare-process-60r4Z2Zf.mjs → cloudflare-process-DFNpqV_m.mjs} +57 -29
  43. package/dist/cloudflare-user-output-DFbD0l4l.mjs +36 -0
  44. package/dist/collect-Aam0GwAU.mjs +1 -0
  45. package/dist/{collect-rNLybAnF.mjs → collect-KC4cizWM.mjs} +6 -1
  46. package/dist/{config-DA6ZbLXO.d.mts → config-BdmM5ZzP.d.mts} +12 -2
  47. package/dist/{config-BFX5ZB1J.mjs → config-CUYGZqdN.mjs} +2 -2
  48. package/dist/{config-BSoW3QCB.mjs → config-C_UjzkVS.mjs} +3 -3
  49. package/dist/{config-DtjrUtPo.mjs → config-Ge-MytMU.mjs} +1 -1
  50. package/dist/{config-Dv5jri1-.mjs → config-KZAiI3gG.mjs} +32 -6
  51. package/dist/config-entry.d.mts +1 -1
  52. package/dist/config-write-dKLINlm2.mjs +80 -0
  53. package/dist/{connect-D0V0o40j.mjs → connect-Bqq3b9sX.mjs} +10 -9
  54. package/dist/{create-project-CbuDH5Hv.mjs → create-project-MXoP_rte.mjs} +1 -1
  55. package/dist/{create-project-8FdN6D2i.mjs → create-project-T-9AIQDe.mjs} +7 -6
  56. package/dist/{db-BNPIjLkK.mjs → db-B3eoVDNA.mjs} +50 -47
  57. package/dist/{db-args-CiQVg8SJ.mjs → db-args-BcvTZ8KE.mjs} +1 -1
  58. package/dist/db-args-Cx1y4vZn.mjs +1 -0
  59. package/dist/{db-types-B4Cf9dzR.mjs → db-types-BpgXVtQZ.mjs} +1 -1
  60. package/dist/{delete-WtLEfap2.mjs → delete-Cf6SroAw.mjs} +7 -6
  61. package/dist/deploy-DZ9j7MC4.mjs +2 -0
  62. package/dist/{deploy-BgSbagIP.mjs → deploy-UojYUEWr.mjs} +803 -1415
  63. package/dist/{deploy-managed-static-BWBsxOww.mjs → deploy-managed-static-DV_OmTWf.mjs} +54 -393
  64. package/dist/{deploy-security-notice-IRGy6Edf.mjs → deploy-security-notice-3jX71IeP.mjs} +6 -4
  65. package/dist/deploy-summary-Dkl0zvQy.mjs +377 -0
  66. package/dist/{deploy-transport-BKP_oV9q.mjs → deploy-transport-4ISWxx8n.mjs} +4 -3
  67. package/dist/deploy.mjs +14 -10
  68. package/dist/discover-BZWVWeQs.mjs +1 -0
  69. package/dist/{discover-IcspacCg.mjs → discover-BeFs7OPS.mjs} +1 -1
  70. package/dist/{dispatch-DIhDA3NI.mjs → dispatch-BUKbPdqb.mjs} +7 -7
  71. package/dist/{dist-Cr_xGE_K.mjs → dist-BngS28id.mjs} +6 -6
  72. package/dist/{dist-C47zy_kJ.mjs → dist-x99fIj4n.mjs} +1 -1
  73. package/dist/{domain-mweyYXSw.mjs → domain-BK6NWkWK.mjs} +7 -7
  74. package/dist/{drizzle-BJDMPrj7.mjs → drizzle-CnSbVeiZ.mjs} +12 -13
  75. package/dist/{drizzle-CQ5jWuDL.mjs → drizzle-CrkwVwK8.mjs} +1 -1
  76. package/dist/{email-DcQNP40O.mjs → email-BBSDV0J5.mjs} +13 -12
  77. package/dist/{email-cloudflare-DeYH3Ke7.mjs → email-cloudflare-C-guKEbz.mjs} +10 -8
  78. package/dist/{env-DaAoYR2-.mjs → env-BVnKiGYJ.mjs} +8 -8
  79. package/dist/{env-EjHqc7m9.mjs → env-CU2tMDdO.mjs} +6 -1
  80. package/dist/{env-types-D2hBodXP.mjs → env-types-B33fEHRH.mjs} +1 -1
  81. package/dist/{env-validation-j9pjCDfA.mjs → env-validation-BnAsx6gz.mjs} +1 -1
  82. package/dist/{env-validation-D-v5_CWL.mjs → env-validation-SXsjd6-Z.mjs} +4 -4
  83. package/dist/{fetch-CiEsvjpP.mjs → fetch-DL7OCgwB.mjs} +1 -1
  84. package/dist/{fetch-stream-BIG5lHW6.mjs → fetch-stream-DEilLTCc.mjs} +2 -2
  85. package/dist/{gen-aOtHhZLD.mjs → gen-BxuIN1bz.mjs} +10 -9
  86. package/dist/gen-DaayFP9v.mjs +1 -0
  87. package/dist/{generate-Dq2Bgw75.mjs → generate-Ck-L3e0e.mjs} +1 -1
  88. package/dist/{generate-C3ZAqCy-.mjs → generate-t1dDUYZZ.mjs} +1 -1
  89. package/dist/{github-cmd-BR19Ffdz.mjs → github-cmd-B7U9Hjmi.mjs} +7 -6
  90. package/dist/{handler-DCrDLzw2.mjs → handler-2wAywJgj.mjs} +11 -9
  91. package/dist/{headers-DqBsjDxg.mjs → headers-DPI4MDGC.mjs} +1 -1
  92. package/dist/{help-DvClCzqL.mjs → help-Bgiu5PMX.mjs} +36 -4
  93. package/dist/help-DWGHmt_n.mjs +1 -0
  94. package/dist/html-5sfGLjiI.d.mts +3 -0
  95. package/dist/html-DPSOBDCh.mjs +1 -0
  96. package/dist/{index-Dn2mkPr2.d.mts → index-CqF8_p9C.d.mts} +5 -105
  97. package/dist/index-Cvqotnhc.d.mts +91 -0
  98. package/dist/{index-BQ5qYiAw.d.mts → index-DAinHkj8.d.mts} +1 -1
  99. package/dist/{index-8cAgNdb6.d.mts → index-lnEWwVAS.d.mts} +1 -1
  100. package/dist/index.d.mts +3 -2
  101. package/dist/index.mjs +536 -170
  102. package/dist/{info-P6MBiVJi.mjs → info-7COlpAfY.mjs} +32 -20
  103. package/dist/{init-C8YpkGIP.mjs → init-DftAx3L4.mjs} +237 -88
  104. package/dist/input-jcps6lAn.mjs +64 -0
  105. package/dist/interactive-prompts-EK0dilFu.mjs +43 -0
  106. package/dist/{limits-BCoQLpn3.mjs → limits-3I3VdX2E.mjs} +4 -1
  107. package/dist/{link-Dyz9IGcM.mjs → link-C3WMNFTG.mjs} +7 -7
  108. package/dist/{list-VGYBMjmx.mjs → list-K4EGVUZN.mjs} +9 -9
  109. package/dist/{load-user-env-B8qC0Q2Y.mjs → load-user-env-uMmQJ-Th.mjs} +1 -1
  110. package/dist/{local-d1-CYOYkVwO.mjs → local-d1-BtLCVC1p.mjs} +2 -2
  111. package/dist/login-BJwPhV_S.mjs +1 -0
  112. package/dist/{login-CWFr-G2I.mjs → login-DaugBfBG.mjs} +6 -5
  113. package/dist/{logs-kS1wuR4b.mjs → logs-BR2szdN5.mjs} +6 -6
  114. package/dist/migrate-BHD46A31.mjs +1 -0
  115. package/dist/{migrate-BNZL1hee.mjs → migrate-Dtlg8fC6.mjs} +7 -7
  116. package/dist/nitro.mjs +3 -3
  117. package/dist/{node-DVJWfV6s.mjs → node-BbKlLpHa.mjs} +5 -5
  118. package/dist/{operator-ai-logging-DD0n6zc2.mjs → operator-ai-logging-4Nvs6Ut3.mjs} +5 -5
  119. package/dist/{operator-args-nvetCWuz.mjs → operator-args-DWvqq3Ws.mjs} +31 -15
  120. package/dist/{operator-auth-DMvn-y9X.mjs → operator-auth-DtRMGXYY.mjs} +2 -2
  121. package/dist/{operator-client-dFNnXfyB.mjs → operator-client-BG0VIMMM.mjs} +2 -2
  122. package/dist/operator-cmd-CR3Q9k4c.mjs +1 -0
  123. package/dist/{operator-cmd-a7yOf2tH.mjs → operator-cmd-D4YcMKO-.mjs} +9 -9
  124. package/dist/{operator-security-D5MToU0p.mjs → operator-security-nVLo8vDt.mjs} +11 -5
  125. package/dist/{output-BZLnu0z8.mjs → output-DhJgS6Ve.mjs} +1 -1
  126. package/dist/output-OYwcEwok.mjs +1 -0
  127. package/dist/pages/client.d.mts +34 -20
  128. package/dist/pages/client.mjs +172 -74
  129. package/dist/pages/index.d.mts +11 -4
  130. package/dist/pages/index.mjs +5 -5
  131. package/dist/pages/islands-plugin.d.mts +2 -2
  132. package/dist/pages/islands-plugin.mjs +5 -3
  133. package/dist/pages/protocol.d.mts +3 -3
  134. package/dist/pages/protocol.mjs +3 -3
  135. package/dist/pages/serialize.d.mts +2 -2
  136. package/dist/pages/serialize.mjs +1 -1
  137. package/dist/parse-filename-DIPUjoCh.d.mts +2 -0
  138. package/dist/platform-C3Q44RJ8.mjs +250 -0
  139. package/dist/platform-args-BSyVZESg.mjs +1 -0
  140. package/dist/{platform-args-CvZSuhYS.mjs → platform-args-BnocJDC_.mjs} +1 -1
  141. package/dist/{platform-auth-config-CpszX-Ne.mjs → platform-auth-config-BbfNhjBc.mjs} +9 -9
  142. package/dist/{platform-auth-protection-DA6Tw8Og.mjs → platform-auth-protection-BHPV4MUf.mjs} +9 -8
  143. package/dist/{platform-auth-recovery-Cztrb1JC.mjs → platform-auth-recovery-DE0nArYy.mjs} +8 -7
  144. package/dist/{platform-cmd-m6Asj6nO.mjs → platform-cmd-CLRU3BRb.mjs} +11 -10
  145. package/dist/{platform-cmd-u1j88ggF.mjs → platform-cmd-Cs2LkT5L.mjs} +1 -1
  146. package/dist/{platform-discovery-CLxtixHJ.mjs → platform-discovery-CKeeeD82.mjs} +1 -1
  147. package/dist/{platform-domain-DJSznNTA.mjs → platform-domain-kn3WuKPG.mjs} +6 -5
  148. package/dist/{platform-lifecycle-BC-9p58d.mjs → platform-lifecycle-BoCEYy2w.mjs} +1 -1
  149. package/dist/{platform-lifecycle-GFeXv3NC.mjs → platform-lifecycle-CKwOg8wz.mjs} +244 -104
  150. package/dist/{platform-management-BwHkz46V.mjs → platform-management-CaSdFthX.mjs} +1 -1
  151. package/dist/{platform-management-DX1zINou.mjs → platform-management-fyrsq2Ra.mjs} +27 -14
  152. package/dist/{platform-plans-config-DiydtNKY.mjs → platform-plans-config-BSI-6Inu.mjs} +11 -5
  153. package/dist/{platform-recovery-CnzBbudV.mjs → platform-recovery-PwJ54AIZ.mjs} +3 -3
  154. package/dist/{platform-registry-DHH6fivm.mjs → platform-registry-zHH3RiIm.mjs} +2 -1
  155. package/dist/{platform-setup-Lph9i-rh.mjs → platform-setup-DwYITHfY.mjs} +3 -3
  156. package/dist/{plugin-inference-COlq96WJ.mjs → plugin-inference-D5MjBVMB.mjs} +60 -142
  157. package/dist/prepare-CLl_TA_r.mjs +1 -0
  158. package/dist/{prepare-WvijE289.mjs → prepare-DZEs5AGr.mjs} +3 -3
  159. package/dist/{prepare-co1o1FFd.mjs → prepare-DhVzN7CB.mjs} +14 -12
  160. package/dist/{project-uXKua1it.mjs → project-BXpm-vgG.mjs} +1 -1
  161. package/dist/{project-dh9431bN.mjs → project-DC-BqHef.mjs} +1 -1
  162. package/dist/{project-cmd-BWJTplpc.mjs → project-cmd-BKN3qT4R.mjs} +31 -21
  163. package/dist/{project-paths-2ENfCCih.mjs → project-paths-BeAxxqGh.mjs} +1 -1
  164. package/dist/{project-security-BV1xfj1K.mjs → project-security-B-SHxprt.mjs} +1 -1
  165. package/dist/{project-security-CY_aahvW.mjs → project-security-BWTd6cTU.mjs} +87 -46
  166. package/dist/{project-team-BlIFXlmT.mjs → project-team-jcn9reIB.mjs} +6 -6
  167. package/dist/{project-token-CMsB7I1-.mjs → project-token-BHkBKtzt.mjs} +6 -6
  168. package/dist/{project-tsconfig-BOA4ym99.mjs → project-tsconfig-LjgxDdj_.mjs} +1 -1
  169. package/dist/{project-zero-trust-BI6pdpx4.mjs → project-zero-trust-2t_qI6xa.mjs} +4 -4
  170. package/dist/{protocol-4rEnumif.mjs → protocol-DhMbnxzy.mjs} +120 -35
  171. package/dist/{protocol-ERy-n3jf.d.mts → protocol-wG7JP5Mm.d.mts} +27 -4
  172. package/dist/{provision-DFv7SJDn.mjs → provision-C04aXE3a.mjs} +1 -1
  173. package/dist/{provision-Bh44omGA.mjs → provision-CQykn8gu.mjs} +8 -4
  174. package/dist/{redirect-Dyvuil0Q.mjs → redirect-DjyA_hx_.mjs} +1 -1
  175. package/dist/{requests-CfmJxNYg.mjs → requests-BznxnxTT.mjs} +5 -5
  176. package/dist/resolve-project-Bob_rEi2.mjs +1 -0
  177. package/dist/{resolve-project-8WZ3iVmr.mjs → resolve-project-s_FGWyr-.mjs} +2 -2
  178. package/dist/resource-binding-5nI30acw.mjs +20 -0
  179. package/dist/{resource-name-DlJ9QXzg.mjs → resource-name-D_gw36kh.mjs} +5 -1
  180. package/dist/{rollback-DL5HuAsM.mjs → rollback-CLiINtpt.mjs} +25 -14
  181. package/dist/{route-types-CSed9-Dp.mjs → route-types-DxvqN5bL.mjs} +59 -9
  182. package/dist/{route-url-B41eQ8QI.mjs → route-url-CRC8yR_2.mjs} +2 -3
  183. package/dist/{route-url-Bd6IX-JZ.d.mts → route-url-zDfC-7DD.d.mts} +33 -5
  184. package/dist/routes-stub.d.mts +18 -2
  185. package/dist/routes-stub.mjs +1 -1
  186. package/dist/{runner-CeguHWJx.mjs → runner-CnUrhc8H.mjs} +1 -1
  187. package/dist/{runner-mysql-DOjbj-N1.mjs → runner-mysql-CW6bFa67.mjs} +1 -1
  188. package/dist/{runner-mysql-D549vGGm.mjs → runner-mysql-DSLGFOlC.mjs} +1 -1
  189. package/dist/{runner-pg-Buzw17hl.mjs → runner-pg-BcGF7iBR.mjs} +1 -1
  190. package/dist/{runner-pg-DMJquR3d.mjs → runner-pg-OeP0JpEo.mjs} +1 -1
  191. package/dist/{runner-Bf94YVJK.mjs → runner-rnXCGa20.mjs} +1 -1
  192. package/dist/runtime/ai/index.mjs +1 -1
  193. package/dist/runtime/auth/better-auth-d1.d.mts +1 -1
  194. package/dist/runtime/auth/better-auth-mysql.d.mts +1 -1
  195. package/dist/runtime/auth/better-auth-postgres.d.mts +1 -1
  196. package/dist/runtime/client/fetch-server.mjs +1 -1
  197. package/dist/runtime/client/fetch-stream.mjs +1 -1
  198. package/dist/runtime/client/fetch.mjs +1 -1
  199. package/dist/runtime/client/index.mjs +2 -2
  200. package/dist/runtime/client/react.mjs +2 -2
  201. package/dist/runtime/client/solid.mjs +2 -2
  202. package/dist/runtime/client/svelte.mjs +2 -2
  203. package/dist/runtime/client/vue.mjs +2 -2
  204. package/dist/runtime/durable/index.mjs +11 -26
  205. package/dist/runtime/env/runtime.d.mts +2 -10
  206. package/dist/runtime/handler/index.d.mts +3 -2
  207. package/dist/runtime/handler/index.mjs +2 -2
  208. package/dist/runtime/handler/validator.d.mts +1 -1
  209. package/dist/runtime/handler/validator.mjs +1 -1
  210. package/dist/runtime/html.d.mts +2 -0
  211. package/dist/runtime/html.mjs +1 -0
  212. package/dist/runtime/image/index.d.mts +103 -0
  213. package/dist/runtime/image/index.mjs +89 -0
  214. package/dist/runtime/jsx/index.d.mts +3 -0
  215. package/dist/runtime/jsx/index.mjs +2 -0
  216. package/dist/runtime/jsx/jsx-dev-runtime.d.mts +1 -0
  217. package/dist/runtime/jsx/jsx-dev-runtime.mjs +2 -0
  218. package/dist/runtime/jsx/jsx-runtime.d.mts +1 -0
  219. package/dist/runtime/jsx/jsx-runtime.mjs +2 -0
  220. package/dist/runtime/limits/index.mjs +1 -1
  221. package/dist/runtime/live/client.d.mts +2 -2
  222. package/dist/runtime/live/index.d.mts +1 -1
  223. package/dist/runtime/routing/index.d.mts +87 -4
  224. package/dist/runtime/routing/index.mjs +59 -20
  225. package/dist/runtime/routing/route-url.d.mts +2 -2
  226. package/dist/runtime/routing/route-url.mjs +1 -1
  227. package/dist/runtime/sandbox/index.mjs +1 -1
  228. package/dist/runtime/sse/client.d.mts +1 -1
  229. package/dist/runtime/workflows/entry.d.mts +8 -0
  230. package/dist/runtime/workflows/entry.mjs +49 -0
  231. package/dist/runtime/workflows/index.d.mts +3 -0
  232. package/dist/runtime/workflows/index.mjs +77 -0
  233. package/dist/runtime/ws/index.d.mts +1 -1
  234. package/dist/runtime/ws/index.mjs +2 -2
  235. package/dist/runtime/ws/room.d.mts +1 -1
  236. package/dist/runtime/ws/server.d.mts +2 -2
  237. package/dist/runtime-Db72hLY-.d.mts +11 -0
  238. package/dist/scan-BxhB4BA-.mjs +946 -0
  239. package/dist/scan-D2ISAobj.mjs +308 -0
  240. package/dist/{secret-C-WBaUSS.mjs → secret-Ck9N5xbU.mjs} +9 -8
  241. package/dist/{security-sarif-ClyYwtAW.mjs → security-sarif-DzTIqNwZ.mjs} +1 -1
  242. package/dist/{serialize-DN-envGQ.d.mts → serialize-Dr9B-0yV.d.mts} +10 -1
  243. package/dist/{serialize-BmB4BfKu.mjs → serialize-nW4IeEBI.mjs} +23 -2
  244. package/dist/{skills-C-csz78e.mjs → skills-BR7YHAF7.mjs} +1 -1
  245. package/dist/{scan-Ct_SEzH4.mjs → source-analysis-cache-Ccm_JSOl.mjs} +340 -902
  246. package/dist/standard-schema-DvMcZGMK.mjs +8 -0
  247. package/dist/{subcommand-prompt-B4LOLosl.mjs → subcommand-prompt-AFf2LcrC.mjs} +2 -2
  248. package/dist/{types-FDH6NuY1.d.mts → types-RYVujNS6.d.mts} +4 -2
  249. package/dist/{version-metadata-DqgLa6gc.mjs → untrusted-env-4oW0TdBP.mjs} +1 -23
  250. package/dist/{url-DBQluotE.mjs → url-DAQ1c3lh.mjs} +45 -1
  251. package/dist/{validate-CtBWCzez.mjs → validate-B1PsQ_mt.mjs} +1 -1
  252. package/dist/validate-p9b3r1k4.mjs +1 -0
  253. package/dist/{validation-error-CtcAvyI7.mjs → validation-error-EKI0wMWX.mjs} +2 -2
  254. package/dist/{validator-Dfh9kCDm.mjs → validator-JJcf9E48.mjs} +5 -8
  255. package/dist/version-metadata-CEla0kgi.mjs +23 -0
  256. package/dist/{wrangler-DVe5KV5G.mjs → wrangler-AyMfdVJK.mjs} +34 -69
  257. package/dist/wrangler-BT7qrzWc.mjs +1 -0
  258. package/dist/{wrapper-CcMYpOS8.mjs → wrapper-DPlTBVOx.mjs} +5 -5
  259. package/docs/guide/ai.md +1 -1
  260. package/docs/guide/app-types.md +6 -23
  261. package/docs/guide/auth.md +2 -4
  262. package/docs/guide/database/d1.md +21 -67
  263. package/docs/guide/database/mysql.md +8 -0
  264. package/docs/guide/database/postgresql.md +2 -2
  265. package/docs/guide/database.md +1 -1
  266. package/docs/guide/deployment.md +18 -0
  267. package/docs/guide/edge/prerendering.md +3 -7
  268. package/docs/guide/edge/redirects.md +1 -1
  269. package/docs/guide/edge/revalidation.md +8 -17
  270. package/docs/guide/edge/rewrites.md +1 -1
  271. package/docs/guide/edge/static-assets.md +10 -22
  272. package/docs/guide/email/domains.md +3 -1
  273. package/docs/guide/email/receiving.md +2 -2
  274. package/docs/guide/email/sending.md +3 -1
  275. package/docs/guide/env-vars.md +2 -0
  276. package/docs/guide/image-generation.md +142 -0
  277. package/docs/guide/index.md +17 -15
  278. package/docs/guide/jobs.md +2 -4
  279. package/docs/guide/kv.md +1 -1
  280. package/docs/guide/og-images.md +83 -0
  281. package/docs/guide/pages-routing/actions-and-forms.md +6 -4
  282. package/docs/guide/pages-routing/errors.md +20 -4
  283. package/docs/guide/pages-routing/head.md +5 -5
  284. package/docs/guide/pages-routing/islands.md +4 -14
  285. package/docs/guide/pages-routing/markdown.md +2 -2
  286. package/docs/guide/pages-routing/overview.md +129 -15
  287. package/docs/guide/platform/administration/plans.md +47 -16
  288. package/docs/guide/platform/administration/projects.md +10 -0
  289. package/docs/guide/platform/administration/security-audits.md +76 -30
  290. package/docs/guide/platform/administration/zero-trust.md +1 -1
  291. package/docs/guide/platform/installation/ci.md +0 -4
  292. package/docs/guide/platform/installation/credentials.md +1 -1
  293. package/docs/guide/platform/installation/maintenance.md +11 -9
  294. package/docs/guide/platform/installation/prerequisites.md +3 -1
  295. package/docs/guide/platform/installation/setup.md +7 -15
  296. package/docs/guide/platform/installation/uninstall.md +6 -12
  297. package/docs/guide/project-collaboration.md +1 -4
  298. package/docs/guide/queues.md +6 -8
  299. package/docs/guide/quickstart.md +6 -8
  300. package/docs/guide/sandboxes.md +1 -1
  301. package/docs/guide/self-hosted-platform.md +4 -7
  302. package/docs/guide/server-routing.md +5 -3
  303. package/docs/guide/ssg.md +1 -1
  304. package/docs/guide/type-safety.md +74 -10
  305. package/docs/guide/websockets.md +5 -7
  306. package/docs/guide/workflows.md +122 -0
  307. package/docs/index.md +2 -3
  308. package/docs/integrations/agents.md +3 -16
  309. package/docs/integrations/cloudflare.md +98 -2
  310. package/docs/integrations/frameworks/analog.md +9 -11
  311. package/docs/integrations/frameworks/astro.md +16 -17
  312. package/docs/integrations/frameworks/nuxt.md +11 -13
  313. package/docs/integrations/frameworks/overview.md +18 -20
  314. package/docs/integrations/frameworks/react-router.md +55 -6
  315. package/docs/integrations/frameworks/sveltekit.md +8 -6
  316. package/docs/integrations/frameworks/tanstack-start.md +10 -6
  317. package/docs/integrations/hono.md +27 -12
  318. package/docs/integrations/nodejs-bun-deno.md +10 -2
  319. package/docs/reference/api/database.md +8 -10
  320. package/docs/reference/api/env.md +2 -2
  321. package/docs/reference/api/handlers.md +1 -1
  322. package/docs/reference/api/html.md +45 -0
  323. package/docs/reference/api/pages.md +118 -167
  324. package/docs/reference/api/rewrites.md +5 -5
  325. package/docs/reference/api/types.md +13 -6
  326. package/docs/reference/api/workflows.md +48 -0
  327. package/docs/reference/api.md +7 -1
  328. package/docs/reference/cli/database.md +22 -10
  329. package/docs/reference/cli/deploy.md +49 -4
  330. package/docs/reference/cli/domains.md +7 -3
  331. package/docs/reference/cli/email.md +3 -1
  332. package/docs/reference/cli/platform-installation.md +9 -53
  333. package/docs/reference/cli/platform-security.md +36 -8
  334. package/docs/reference/cli/platform-users.md +11 -1
  335. package/docs/reference/cli/platform-zero-trust.md +1 -1
  336. package/docs/reference/cli/project.md +52 -11
  337. package/docs/reference/cli/setup.md +8 -10
  338. package/docs/reference/cli.md +49 -47
  339. package/docs/reference/config.md +22 -8
  340. package/docs/reference/resource-inference.md +8 -1
  341. package/docs/reference/structure.md +5 -0
  342. package/package.json +52 -25
  343. package/schema.json +20 -1
  344. package/skills/void/SKILL.md +60 -54
  345. package/dist/cf-build-output-Wpk_e5CI.mjs +0 -1
  346. package/dist/cf-worker-settings-BBdlhm9U.mjs +0 -41
  347. package/dist/cli/db-execute-process.d.mts +0 -2
  348. package/dist/cli/db-execute-process.mjs +0 -57
  349. package/dist/cloudflare-user-output-CCR99eQY.mjs +0 -19
  350. package/dist/collect-B6nlSnsb.mjs +0 -1
  351. package/dist/db-args-BvMwAber.mjs +0 -1
  352. package/dist/deploy-Do6FWqon.mjs +0 -2
  353. package/dist/discover-D2KGP3cR.mjs +0 -1
  354. package/dist/entry-Bwb9ev8K.mjs +0 -113
  355. package/dist/gen-vhBDHs3q.mjs +0 -1
  356. package/dist/help-fKPzcTJv.mjs +0 -1
  357. package/dist/isr-config-DiTnL9Tb.mjs +0 -115
  358. package/dist/login-DECm3e9b.mjs +0 -1
  359. package/dist/migrate-C9aoWLvY.mjs +0 -1
  360. package/dist/operator-cmd-CVfK5U0B.mjs +0 -1
  361. package/dist/output-D7K9TWIA.mjs +0 -1
  362. package/dist/platform-args-CMwMoiLp.mjs +0 -1
  363. package/dist/prepare-DcwigRUS.mjs +0 -1
  364. package/dist/providers-D5P8j_8D.d.mts +0 -5
  365. package/dist/resolve-project-YsTH-U9I.mjs +0 -1
  366. package/dist/static-exports-s7P86Ngp.mjs +0 -354
  367. package/dist/validate-CZYUIfR-.mjs +0 -1
  368. package/dist/wrangler-Dq269bjx.mjs +0 -1
  369. package/docs/guide/platform/development/local.md +0 -120
  370. package/docs/guide/platform/development/runtime.md +0 -115
  371. package/docs/guide/platform/development/schema-ci.md +0 -44
  372. package/docs/guide/platform-development.md +0 -16
@@ -5,7 +5,7 @@ outline: deep
5
5
 
6
6
  # React Router v7
7
7
 
8
- Add `voidPlugin()` alongside the [React Router v7](https://reactrouter.com/) Vite plugin to use Void's database, storage, and deployment features. You don't need a separate Cloudflare adapter.
8
+ Add `voidPlugin()` alongside the [React Router v7](https://reactrouter.com/) Vite plugin to use Void's database, storage, and deployment features. Void includes the Cloudflare adapter.
9
9
 
10
10
  ## Setup
11
11
 
@@ -37,21 +37,38 @@ export default defineConfig({
37
37
  });
38
38
  ```
39
39
 
40
+ For React Router v7, set `future.v8_viteEnvironmentApi` to `true` in `react-router.config.ts` to enable the Vite Environment API.
41
+
42
+ If you use React Router 8 with `prerender` in `react-router.config.ts`, set the build command before your first deployment:
43
+
44
+ ```ts
45
+ // void.config.ts
46
+ import { defineConfig } from 'void/config';
47
+
48
+ export default defineConfig({
49
+ inference: { build: 'react-router build' },
50
+ });
51
+ ```
52
+
53
+ This lets the build finish after prerendering so Void can upload the app. The default Vite build can stay open at that point. [React Router issue](https://github.com/remix-run/react-router/issues/15427)
54
+
40
55
  ### 4. Deploy
41
56
 
42
57
  ```bash
43
- void auth login
58
+ void connect --platform cloudflare
44
59
  void deploy
45
60
  ```
46
61
 
47
- ## Using Void Features
62
+ On the first command, sign in and select your Cloudflare account. `void deploy` builds the app and publishes it to that account. To deploy to your team’s Void platform, see [Deployment](../../guide/deployment.md).
48
63
 
49
- Most [Void platform features](../../guide/app-types.md#void-apps) work with React Router. Use them in loaders and actions:
64
+ ## Using Void Features
50
65
 
51
- Void-managed auth is not supported in framework mode yet. Use Better Auth's official React Router integration directly for now.
66
+ Use Void resources in loaders and actions. For authentication, use your framework’s Better Auth integration.
52
67
 
53
68
  ### Database
54
69
 
70
+ To show the users in your database, query the `users` table in the route’s `loader`. React Router passes the result to the route component.
71
+
55
72
  ```tsx
56
73
  import { users } from '@schema';
57
74
  import { db } from 'void/db';
@@ -64,7 +81,9 @@ export async function loader({}: Route.LoaderArgs) {
64
81
 
65
82
  ### Other resources
66
83
 
67
- Use [KV](../../guide/kv.md), [object storage](../../guide/storage.md), and [AI](../../guide/ai.md) from server-side code with the same imports as a Void app. Add [cron jobs](../../guide/jobs.md) in `crons/` and [queue consumers](../../guide/queues.md) in `queues/`.
84
+ See [supported resources and background jobs](./overview.md#feature-support) for KV, storage, AI, cron jobs, and queues.
85
+
86
+ To run a queue consumer locally, start the dev server and use the [manual queue trigger](../../guide/queues.md#local-development). Use the dev server’s port and the token in `.void/dev-trigger-token`. Calling `send()` in dev or preview accepts the message without running the consumer. Preview reads `queues/` and `env.ts` from your project, so keep both as they were when you built the app.
68
87
 
69
88
  ### Environment Variables
70
89
 
@@ -72,6 +91,36 @@ Declare variables in `env.ts` and read them with `import { env } from "void/env"
72
91
 
73
92
  Read server secrets in a `.server.ts` companion module and import it into your loader or action. Void rejects server-secret reads in route files that also contain browser components.
74
93
 
94
+ ## Custom Worker Entry
95
+
96
+ To customize how your Cloudflare Worker handles requests or add named exports such as a `WorkerEntrypoint`, set `cloudflare.main` to a path relative to your app root in `void.config.ts`.
97
+
98
+ ```ts
99
+ import { defineConfig } from 'void/config';
100
+
101
+ export default defineConfig({
102
+ cloudflare: { main: './worker.ts' },
103
+ });
104
+ ```
105
+
106
+ In `worker.ts`, default-export the Worker handler and forward page requests to React Router.
107
+
108
+ ```ts
109
+ import { createRequestHandler } from 'react-router';
110
+
111
+ const handleRequest = createRequestHandler(
112
+ // @ts-expect-error React Router's Vite plugin provides this module.
113
+ () => import('virtual:react-router/server-build'),
114
+ import.meta.env.MODE,
115
+ );
116
+
117
+ export default {
118
+ fetch(request: Request) {
119
+ return handleRequest(request);
120
+ },
121
+ };
122
+ ```
123
+
75
124
  ## Accessing Bindings Directly
76
125
 
77
126
  You can also access Cloudflare bindings via the `cloudflare:workers` module:
@@ -5,7 +5,7 @@ outline: deep
5
5
 
6
6
  # SvelteKit
7
7
 
8
- Use Void with [SvelteKit](https://svelte.dev/docs/kit) for resource detection, typed database queries, and migrations. SvelteKit keeps its own build and Cloudflare integration; Void plugs into its Vite configuration.
8
+ Use Void with [SvelteKit](https://svelte.dev/docs/kit) for resource detection, typed database queries, and migrations.
9
9
 
10
10
  Void supports SvelteKit 3 and SvelteKit 2.62 or later. The setup below uses SvelteKit 3 with `@sveltejs/adapter-cloudflare` 8.
11
11
 
@@ -79,18 +79,20 @@ Run `void prepare` after a fresh clone or before typechecking in CI so `.void/ts
79
79
  ### 6. Deploy
80
80
 
81
81
  ```bash
82
- void auth login
82
+ void connect --platform cloudflare
83
83
  void deploy
84
84
  ```
85
85
 
86
- ## Using Void Features
86
+ `void connect` signs you in to Cloudflare, asks which account to use, and saves it as the deploy target. To deploy to a Void platform run by your team instead, see [Deployment](../../guide/deployment.md).
87
87
 
88
- Most [Void platform features](../../guide/app-types.md#void-apps) work with SvelteKit. Use them in server load functions, actions, and API routes:
88
+ ## Using Void Features
89
89
 
90
- Void-managed auth is not supported in framework mode yet. Use Better Auth's official SvelteKit integration directly for now.
90
+ Use Void resources in server load functions, actions, and API routes. For authentication, use your framework’s Better Auth integration.
91
91
 
92
92
  ### Database
93
93
 
94
+ For a `/users` page, load the rows in `+page.server.ts`. SvelteKit passes the result to the page as `data.users`.
95
+
94
96
  ```ts
95
97
  // src/routes/users/+page.server.ts
96
98
  import { users } from '@schema';
@@ -103,7 +105,7 @@ export async function load() {
103
105
 
104
106
  ### Other resources
105
107
 
106
- Use [KV](../../guide/kv.md), [object storage](../../guide/storage.md), and [AI](../../guide/ai.md) from server-side code with the same imports as a Void app. Add [cron jobs](../../guide/jobs.md) in `crons/` and [queue consumers](../../guide/queues.md) in `queues/`.
108
+ See [supported resources and background jobs](./overview.md#feature-support) for KV, storage, AI, cron jobs, and queues.
107
109
 
108
110
  ### Environment Variables
109
111
 
@@ -5,7 +5,7 @@ outline: deep
5
5
 
6
6
  # TanStack Start
7
7
 
8
- Add `voidPlugin()` alongside the [TanStack Start](https://tanstack.com/start/latest) Vite plugin to use Void's database, storage, and deployment features. You don't need a separate Cloudflare adapter.
8
+ Add `voidPlugin()` alongside the [TanStack Start](https://tanstack.com/start/latest) Vite plugin to use Void's database, storage, and deployment features. Void includes the Cloudflare adapter.
9
9
 
10
10
  ## Setup
11
11
 
@@ -42,18 +42,20 @@ export default defineConfig({
42
42
  ### 4. Deploy
43
43
 
44
44
  ```bash
45
- void auth login
45
+ void connect --platform cloudflare
46
46
  void deploy
47
47
  ```
48
48
 
49
- ## Using Void Features
49
+ `void connect` signs you in to Cloudflare, asks which account to use, and saves it as the deploy target. To deploy to a Void platform run by your team instead, see [Deployment](../../guide/deployment.md).
50
50
 
51
- Most [Void platform features](../../guide/app-types.md#void-apps) work with TanStack Start. Use them in server functions:
51
+ ## Using Void Features
52
52
 
53
- Void-managed auth is not supported in framework mode yet. Use Better Auth's official TanStack Start integration directly for now.
53
+ Use Void resources in server functions. For authentication, use your framework’s Better Auth integration.
54
54
 
55
55
  ### Database
56
56
 
57
+ To fetch your users from a TanStack Start component, define a server function that queries the `users` table.
58
+
57
59
  ```tsx
58
60
  import { users } from '@schema';
59
61
  import { createServerFn } from '@tanstack/react-start';
@@ -66,7 +68,9 @@ const getUsers = createServerFn().handler(async () => {
66
68
 
67
69
  ### Other resources
68
70
 
69
- Use [KV](../../guide/kv.md), [object storage](../../guide/storage.md), and [AI](../../guide/ai.md) from server-side code with the same imports as a Void app. Add [cron jobs](../../guide/jobs.md) in `crons/` and [queue consumers](../../guide/queues.md) in `queues/`.
71
+ See [supported resources and background jobs](./overview.md#feature-support) for KV, storage, AI, cron jobs, and queues.
72
+
73
+ To run a queue consumer locally, start the dev server and use the [manual queue trigger](../../guide/queues.md#local-development). Use the dev server’s port and the token in `.void/dev-trigger-token`. Calling `send()` in dev or preview accepts the message without running the consumer. Preview reads `queues/` and `env.ts` from your project, so keep both as they were when you built the app.
70
74
 
71
75
  ### Environment Variables
72
76
 
@@ -5,13 +5,13 @@ outline: deep
5
5
 
6
6
  # Hono
7
7
 
8
- Void handlers run on [Hono](https://hono.dev). Void depends on Hono internally, but if your app imports from `hono/*` directly, add `hono` to your app's dependencies first.
8
+ Void handlers run on [Hono](https://hono.dev). Add `hono` to your app’s dependencies to import its middleware and helpers.
9
9
 
10
10
  ```bash
11
11
  npm install hono
12
12
  ```
13
13
 
14
- Once `hono` is installed in your app, you can use built-in middleware, helpers, and third-party Hono packages directly.
14
+ Void already exports [HTML templates](../reference/api/html.md) from `void/html` and [JSX for route handlers](../guide/server-routing.md#jsx-handlers) from `void/jsx`. You only need to install Hono for direct `hono/*` imports.
15
15
 
16
16
  ## Built-in Middleware
17
17
 
@@ -22,9 +22,17 @@ Use Hono's built-in middleware in your global middleware files or per-route:
22
22
  import { cors } from 'hono/cors';
23
23
  import { defineMiddleware } from 'void';
24
24
 
25
- export default defineMiddleware(cors({ origin: 'https://example.com' }));
25
+ const apiCors = cors({ origin: 'https://example.com' });
26
+
27
+ export default defineMiddleware((c, next) =>
28
+ c.req.path.startsWith('/api/') ? apiCors(c, next) : next(),
29
+ );
26
30
  ```
27
31
 
32
+ With an `origin` other than `*`, `cors()` adds `Vary: Origin` to every response it handles, and [revalidation](../guide/edge/revalidation.md) does not cache responses that vary by request headers, so this middleware applies it only to paths under `/api/`.
33
+
34
+ Your middleware handles preflight requests in dev and preview as well as in production. If you enable Vite’s [`server.cors`](https://vite.dev/config/server-options#server-cors), Vite answers preflights first. Preview uses that setting unless you override [`preview.cors`](https://vite.dev/config/preview-options#preview-cors).
35
+
28
36
  ```ts
29
37
  // routes/api/products.ts (per-route cache)
30
38
  import { cache } from 'hono/cache';
@@ -42,16 +50,20 @@ export const GET = defineHandler(
42
50
  :::
43
51
 
44
52
  ```ts
45
- // routes/api/webhooks/stripe.ts (per-route usage)
53
+ // routes/api/webhooks/deploy.ts (per-route usage)
46
54
  import { bearerAuth } from 'hono/bearer-auth';
55
+ import { timingSafeEqual } from 'hono/utils/buffer';
47
56
  import { defineHandler } from 'void';
57
+ import { env } from 'void/env';
48
58
 
49
- export const POST = defineHandler(bearerAuth({ token: 'webhook-secret' }), async (c) => {
50
- const body = await c.req.json();
51
- return { received: true };
52
- });
59
+ export const POST = defineHandler(
60
+ bearerAuth({ verifyToken: (token) => timingSafeEqual(token, env.DEPLOY_HOOK_TOKEN) }),
61
+ () => ({ received: true }),
62
+ );
53
63
  ```
54
64
 
65
+ Declare `DEPLOY_HOOK_TOKEN` in [`env.ts`](../guide/env-vars.md) and set it with `void secret put`. Services that sign their webhook requests instead, such as Stripe, need a signature check on the raw body from `c.req.text()`.
66
+
55
67
  ## Response Helpers
56
68
 
57
69
  Hono's context helpers are available on `c` in every handler:
@@ -85,13 +97,16 @@ export const GET = defineHandler((c) => {
85
97
  Any `hono/*` or `@hono/*` package works. Install the package in your app, then use it directly:
86
98
 
87
99
  ```ts
88
- // middleware/01.rate-limit.ts
89
- import { rateLimiter } from 'hono-rate-limiter';
100
+ // middleware/01.block-ai-bots.ts
101
+ import { uaBlocker } from '@hono/ua-blocker';
102
+ import { aiBots } from '@hono/ua-blocker/ai-bots';
90
103
  import { defineMiddleware } from 'void';
91
104
 
92
- export default defineMiddleware(rateLimiter({ windowMs: 60_000, limit: 100 }));
105
+ export default defineMiddleware(uaBlocker({ blocklist: aiBots }));
93
106
  ```
94
107
 
108
+ Workers do not allow timers, random values, or I/O at the top level of a file. A package that uses them when you create its middleware, such as `hono-rate-limiter` with its default store, works in dev but fails in preview and production. To rate-limit requests, keep the count in [Durable State](../guide/durable-state.md) or, on direct Cloudflare deployments, use a [Workers Rate Limiting binding](../guide/type-safety.md#custom-binding-types).
109
+
95
110
  ## Utilities
96
111
 
97
112
  Hono's standalone helpers work anywhere:
@@ -102,7 +117,7 @@ import { HTTPException } from 'hono/http-exception';
102
117
  throw new HTTPException(404, { message: 'User not found' });
103
118
  ```
104
119
 
105
- For the full list of built-in middleware, see the [Hono documentation](https://hono.dev/docs/middleware/builtin).
120
+ For more built-in middleware and helpers, see the [Hono documentation](https://hono.dev/docs#middleware-helpers).
106
121
 
107
122
  ### Redirects
108
123
 
@@ -79,9 +79,11 @@ dist/
79
79
  - **`app.js`:** exports the Hono app instance. Use it for programmatic embedding, testing, or custom server setups.
80
80
  - **`index.js`:** imports `app.js` and starts the server. This is what you run in production.
81
81
 
82
+ For Node.js and Bun, the build stores Brotli and gzip copies of client assets in `dist/ssr/.void-precompressed`. Keep that directory when you deploy the server so it can send compressed assets to clients that accept them. If a CDN or reverse proxy already compresses responses, set [`precompress`](../reference/config.md#precompress) to `false` to skip this build step.
83
+
82
84
  `vite preview` also uses `app.js` to serve your built app locally.
83
85
 
84
- Installed packages that depend on `void` are bundled into `dist/ssr`. If one of their dependencies uses a native addon or reads files next to its own code, add that dependency, in the version the package uses, to your app's `dependencies`. The build then leaves it to Node.
86
+ Void bundles packages that depend on `void` into `dist/ssr`. If one of those packages loads a native addon or reads files from a dependency at runtime, add that dependency to your app’s `dependencies`. Match the version the package uses and deploy it alongside the server.
85
87
 
86
88
  ## What Works
87
89
 
@@ -97,6 +99,10 @@ These Void features work identically across all targets:
97
99
 
98
100
  ## What's Different
99
101
 
102
+ ### Image generation
103
+
104
+ When using [`void/image`](../guide/image-generation.md), pass a renderer that supports your server runtime. The built-in Browser Run renderer requires a Cloudflare binding.
105
+
100
106
  ### Environment variables
101
107
 
102
108
  Supply server values through your host's environment and read them with `process.env` in Node.js or Bun, or `Deno.env.get()` in Deno. The `void/env` schema and secret workflow requires Cloudflare.
@@ -123,7 +129,7 @@ WebSocket route files (`*.ws.ts`) require Cloudflare. You can still use the `voi
123
129
 
124
130
  ### No cron job runtime
125
131
 
126
- You can still define [cron jobs](../guide/jobs.md) in `crons/` and they will compile into the bundle, but there is no built-in scheduler to invoke them. On Cloudflare, Workers Cron Triggers call the `scheduled` handler automatically. On Node.js, you'll need an external scheduler (e.g. `node-cron`, systemd timers, or your hosting platform's cron) to trigger the exported handler.
132
+ To run [cron jobs](../guide/jobs.md) from `crons/`, call the exported `scheduled` handler from your hosting platform's scheduler, a systemd timer, or a library such as `node-cron`.
127
133
 
128
134
  ### No inbound email
129
135
 
@@ -166,6 +172,8 @@ This is useful for testing, embedding in Express/Fastify, or running in serverle
166
172
 
167
173
  To embed your app in a [single executable](https://nodejs.org/api/single-executable-applications.html), pass an `ASSETS` object with a `fetch(request)` method to `app.fetch()`. Void uses it for the client manifest, scripts, styles, and public files instead of reading `dist/client`.
168
174
 
175
+ Your `ASSETS` object controls how the files are served. Set [`precompress`](../reference/config.md#precompress) to `false` when building an executable that supplies its own assets.
176
+
169
177
  For Node.js, store assets under their URL paths, including `/.vite/manifest.json`, `/assets/…`, and files copied from `public/`:
170
178
 
171
179
  ```ts
@@ -69,19 +69,17 @@ function createDb(connectionString: string): MySql2Database<Schema>;
69
69
 
70
70
  ## `setSession(start)` {#setsession}
71
71
 
72
- D1 only. Set the starting bookmark or constraint for the default request's `db`. Call it in middleware before the first use of `db`. It does not change explicitly created clients or later requests.
72
+ Call `setSession()` in middleware to choose where the current request’s first D1 query can run. Set it before reading any property on `db`, including `db.$client`. Use one of these starting values:
73
73
 
74
- Pass `'first-primary'`, `'first-unconstrained'`, or `{ bookmark: string }`. Wrap bookmark strings in an object, including strings returned by `getBookmark()`. If no incoming bookmark is available, pass `'first-unconstrained'`.
74
+ | Value | First query |
75
+ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------- |
76
+ | `'first-primary'` | Read from the primary. |
77
+ | `{ bookmark }` | Read from a database at least as up to date as the bookmark. Use the string from `getBookmark()` on the same database. |
78
+ | `'first-unconstrained'` | Allow a replica when you have no incoming bookmark. This preserves a stronger requirement set by earlier middleware. |
75
79
 
76
- Use bookmarks only with the database that issued them. Keep client-side storage database-specific and clear saved bookmarks when switching databases; clearing them starts a new consistency chain.
80
+ Until the first access to `db`, you can replace the starting value. Once the session is open, you can repeat the original value, pass `'first-unconstrained'`, or supply a bookmark no newer than the current one. A request for a stronger guarantee throws. Use `createDb(binding, { session })` for a separate session.
77
81
 
78
- The session opens when you read a database property, including extracting a method or accessing `$client`; it does not wait for a query to execute. Awaiting or inspecting the `db` object does not open it.
79
-
80
- Passing `'first-unconstrained'` preserves any bookmark or primary-first requirement already configured, even before the first use of `db`. Other starting values replace the configuration until the session opens.
81
-
82
- After the session opens, repeated calls preserve it when the requirement is already satisfied: the original starting value, `'first-unconstrained'`, or a bookmark no newer than the session's current bookmark. This lets middleware run again during a local server-side fetch without resetting database progress. Repeating `'first-primary'` does not force another primary read.
83
-
84
- A newer bookmark or changing an opened session to `'first-primary'` throws. Configure these before using `db`, or use `createDb(binding, { session })` for an independent session.
82
+ The setting applies only to the default `db` for this request. Store bookmarks separately for each database and clear them when you switch databases.
85
83
 
86
84
  ```ts
87
85
  function setSession(start: DbSessionStart): void;
@@ -9,7 +9,7 @@ Imported from `"void/env"`.
9
9
 
10
10
  ## `defineEnv(schema)` {#defineenv-schema}
11
11
 
12
- Register an env schema and return the typed [`env`](#env) proxy. Void auto-discovers `env.ts`, imports it during dev/build/deploy, generates `.void/env.d.ts`, validates production secrets before deploy, and validates values at worker boot.
12
+ Call `defineEnv()` in `env.ts` to register your schema and return the typed [`env`](#env) object. Void validates production secrets before deployment and checks values when the Worker starts.
13
13
 
14
14
  ```ts
15
15
  import { defineEnv, string, number, oneOf, url } from 'void/env';
@@ -36,7 +36,7 @@ const port = env.PORT;
36
36
 
37
37
  `void/env` includes Standard Schema-compatible helpers: `string()`, `number()`, `boolean()`, `url()`, `email()`, `oneOf([...])`, and `json<T>()`. Each helper supports `.optional()` and `.default(value)`.
38
38
 
39
- Non-client keys are server values and use remote secret storage in production. `VITE_*` keys are public build-time client values. Invalid input is redacted uniformly; storage is not selected with schema modifiers.
39
+ Non-client keys are server values and use remote secret storage in production. `VITE_*` keys are public build-time client values. Validation errors redact invalid values.
40
40
 
41
41
  ## Types {#types-1}
42
42
 
@@ -224,7 +224,7 @@ interface RenderAssetTags {
224
224
 
225
225
  ## `defineHead<P>(handler)` {#definehead-p-handler}
226
226
 
227
- Type-safe wrapper for the page `head()` export in `.server.ts` files. It returns a [`HeadConfig`](./types.md#headconfig). Provides [`CloudContext`](./types.md#cloudcontext) typing for the first argument and generic props typing for the second.
227
+ Use `defineHead<Props>()` in a page’s `.server.ts` file when its title or metadata comes from the loader. The callback receives the request’s [`CloudContext`](./types.md#cloudcontext) and the loader props, and returns a [`HeadConfig`](./types.md#headconfig). Here the browser tab uses the title of the post being read.
228
228
 
229
229
  ```ts
230
230
  import { defineHandler, defineHead } from 'void';
@@ -0,0 +1,45 @@
1
+ ---
2
+ description: 'Use HTML templates in route handlers and generated images.'
3
+ ---
4
+
5
+ # HTML Templates
6
+
7
+ Use `html` from `void/html` to put dynamic text in markup. For example, this route displays a greeting:
8
+
9
+ ```ts
10
+ import { defineHandler } from 'void';
11
+ import { html } from 'void/html';
12
+
13
+ export const GET = defineHandler(async (c) => {
14
+ const name = c.req.query('name') ?? 'World';
15
+ return c.html(await html`<h1>Hello ${name}</h1>`);
16
+ });
17
+ ```
18
+
19
+ ## `html` {#html}
20
+
21
+ For `?name=<b>World</b>`, the heading displays `Hello <b>World</b>` as text. Strings are escaped, including quotes. Nested templates keep their markup, and you can interpolate promises:
22
+
23
+ ```ts
24
+ import { html } from 'void/html';
25
+
26
+ const heading = html`<h1>${Promise.resolve('Hello <World>')}</h1>`;
27
+ const page = await html`<main>${heading}</main>`;
28
+ ```
29
+
30
+ The tag returns `HtmlEscapedString | Promise<HtmlEscapedString>`. Await it for `c.html()`. [Image responses](../../guide/image-generation.md) accept either form directly.
31
+
32
+ ## `raw(value)` {#raw}
33
+
34
+ Use `raw` for a string you trust and want to render as HTML. For user input, interpolate the string directly into `html` so it stays text.
35
+
36
+ ```ts
37
+ import { html, raw } from 'void/html';
38
+
39
+ const greeting = raw('<strong>Hello</strong>');
40
+ const page = html`<main>${greeting}</main>`;
41
+ ```
42
+
43
+ ## `HtmlEscapedString`
44
+
45
+ Import `HtmlEscapedString` from `void/html` to type a helper that accepts or returns a template. Include `Promise<HtmlEscapedString>` if the template can contain async values.