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
@@ -1,9 +1,9 @@
1
- import { a as executeComposedHandler, i as separateDeferred, n as DEFERRED, o as getHandlerComposition, t as ValidationError } from "./validation-error-CtcAvyI7.mjs";
1
+ import { a as executeComposedHandler, i as separateDeferred, n as DEFERRED, o as getHandlerComposition, t as ValidationError } from "./validation-error-EKI0wMWX.mjs";
2
2
  import { n as isConvertedResponse } from "./response-CyXsGfOy.mjs";
3
- import { a as hasActionKey, c as searchWithoutActionKey, t as decodePagePath } from "./url-DBQluotE.mjs";
3
+ import { a as isPlainObject, c as hasActionKey, d as searchWithoutActionKey, t as decodePagePath } from "./url-DAQ1c3lh.mjs";
4
4
  import { n as pagesBuildId } from "./build-id-4IV4hC1-.mjs";
5
5
  import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString, t as absolutizeHead } from "./head-BwQ5kgqt.mjs";
6
- import { a as serializePageData, o as escapeScriptJson } from "./serialize-BmB4BfKu.mjs";
6
+ import { c as serializePageData, l as escapeScriptJson } from "./serialize-nW4IeEBI.mjs";
7
7
  import { PAGES_BUILD_HEADER, PAGES_PROTOCOL_VERSION, buildHeaders, isStaleBuild } from "@void/edge";
8
8
  // src/pages/not-found-context.ts
9
9
  const loaderNotFound = /* @__PURE__ */ new WeakSet();
@@ -146,9 +146,9 @@ function attachRenderErrorAssetTags(error, assetTags) {
146
146
  });
147
147
  throw error;
148
148
  }
149
- async function renderWithAssetTags(renderFn, pageObj, assetTags, requestUrl) {
149
+ async function renderWithAssetTags(renderFn, pageObj, assetTags, request) {
150
150
  try {
151
- return await renderFn(pageObj, assetTags, requestUrl);
151
+ return await renderFn(pageObj, assetTags, request.req.url, request.req);
152
152
  } catch (error) {
153
153
  attachRenderErrorAssetTags(error, assetTags);
154
154
  }
@@ -171,7 +171,7 @@ function renderClientOnlyPage(pageObj, assetTags, renderFn) {
171
171
  async function renderPageHtml(c, pageObj, componentId, renderMode, renderFn, getAssetTags) {
172
172
  const assetTags = prepareAssetTags(await getAssetTags(c.req.raw, c.env, componentId));
173
173
  return {
174
- html: renderMode === "client" ? renderClientOnlyPage(pageObj, assetTags, renderFn) : await renderWithAssetTags(renderFn, pageObj, assetTags, c.req.url),
174
+ html: renderMode === "client" ? renderClientOnlyPage(pageObj, assetTags, renderFn) : await renderWithAssetTags(renderFn, pageObj, assetTags, c),
175
175
  assetTags
176
176
  };
177
177
  }
@@ -202,6 +202,20 @@ function requestPathWithSearch(c, withoutActionKey = false) {
202
202
  function requestParams(c) {
203
203
  return c.req.param();
204
204
  }
205
+ function exposedLoaderQuery(query, schema) {
206
+ if (schema && query?.schema !== schema) throw new TypeError("pages: exposeQuery requires the loader to validate with the exported query schema.");
207
+ const validated = query?.value;
208
+ if (isPlainObject(validated)) return validated;
209
+ if (typeof validated === "function" || validated !== null && typeof validated === "object" && !Array.isArray(validated)) throw new TypeError("pages: exposeQuery requires the query schema to return a plain object.");
210
+ }
211
+ /** Fail in dev with the reason, instead of a 500 from page serialization. */
212
+ function assertSerializableQuery(componentId, query) {
213
+ try {
214
+ serializePageData({ query });
215
+ } catch (cause) {
216
+ throw new Error(`pages: '${componentId}' sets exposeQuery, but a value its query schema returned cannot be serialized. Keep class instances and functions out of the schema's output, or leave exposeQuery off.`, { cause });
217
+ }
218
+ }
205
219
  /** Extract props from a handler result, handling Response wrapping from withValidator */
206
220
  async function extractProps(result) {
207
221
  if (result instanceof Response) {
@@ -220,20 +234,36 @@ async function extractProps(result) {
220
234
  * 200s (file downloads, streams). JSON 200s are still extracted as props for
221
235
  * backward compat with loaders using c.json().
222
236
  */
223
- async function runLoader(handler, c, render, recover, ownsNotFoundBoundary = false) {
237
+ async function runLoader(handler, c, render, recover, options) {
224
238
  if (!handler) return render({});
225
239
  return runPageHandler(handler, c, async (leaf) => {
226
240
  let result;
241
+ let validatedQuery;
242
+ let queryUrl;
243
+ if (options?.withoutActionKey) {
244
+ const url = new URL(c.req.url);
245
+ url.search = searchWithoutActionKey(url.search);
246
+ queryUrl = url.href;
247
+ }
248
+ const validation = {
249
+ queryUrl,
250
+ onQuery: options?.exposeQuery ? (schema, value) => {
251
+ validatedQuery = {
252
+ schema,
253
+ value
254
+ };
255
+ } : void 0
256
+ };
227
257
  try {
228
- result = await withLoaderNotFoundDecision(c, ownsNotFoundBoundary, () => leaf(c));
258
+ result = await withLoaderNotFoundDecision(c, options?.ownsNotFoundBoundary === true, () => leaf(c, validation));
229
259
  } catch (error) {
230
- const recovered = await recover?.(error);
260
+ const recovered = await recover?.(error, void 0, validatedQuery);
231
261
  if (recovered) return recovered;
232
262
  throw error;
233
263
  }
234
264
  if (result instanceof Response && !isConvertedResponse(result)) {
235
265
  if (result.status === 404 && !result.headers.get("Content-Disposition")?.includes("attachment")) {
236
- const recovered = await recover?.(void 0, result);
266
+ const recovered = await recover?.(void 0, result, validatedQuery);
237
267
  if (recovered) return recovered;
238
268
  }
239
269
  const contentType = result.headers.get("content-type") || "";
@@ -243,17 +273,20 @@ async function runLoader(handler, c, render, recover, ownsNotFoundBoundary = fal
243
273
  try {
244
274
  props = await extractProps(result);
245
275
  } catch (error) {
246
- const recovered = await recover?.(error);
276
+ const recovered = await recover?.(error, void 0, validatedQuery);
247
277
  if (recovered) return recovered;
248
278
  throw error;
249
279
  }
250
- return render(props);
280
+ return render(props, validatedQuery);
251
281
  });
252
282
  }
253
283
  function isRecoverableHttpException(error) {
254
284
  const exception = error;
255
285
  return !!exception && typeof exception.getResponse === "function" && !exception.res && typeof exception.status === "number" && exception.status >= 400 && exception.status < 600;
256
286
  }
287
+ function isPageResponseError(error) {
288
+ return !!error && typeof error === "object" && "getResponse" in error && typeof error.getResponse === "function";
289
+ }
257
290
  /** Recover HTTP failures outside the loader leaf without executing application code again. */
258
291
  async function recoverPageHttpException(error, c, renderFn, getAssetTags, configHead, options) {
259
292
  if (!isRecoverableHttpException(error) || c.finalized) return;
@@ -261,9 +294,38 @@ async function recoverPageHttpException(error, c, renderFn, getAssetTags, config
261
294
  if (options?.renderMode !== "island" && needsPageReload(context)) return legacyPageResponse(context);
262
295
  return renderPageFailure(context, error, void 0, renderFn, getAssetTags, configHead, options);
263
296
  }
297
+ /**
298
+ * The head for one boundary render: its `.server` companion's head() merged with the config
299
+ * and middleware head, with the built-in title when none is set. An error page must still
300
+ * render when that file fails, so any failure (import, head(), reading what it returned, or
301
+ * a value the page payload or HTML head can't hold) is logged and the default head applies.
302
+ */
303
+ async function boundaryPageHead(c, load, props, configHead, middlewareHead, defaultHead, defaultTitle) {
304
+ const build = (declared, resolved = defaultHead) => ({
305
+ ...resolved,
306
+ title: resolved?.title ?? resolveHead(configHead, middlewareHead, {
307
+ ...declared,
308
+ title: defaultTitle
309
+ })?.title
310
+ });
311
+ if (load) try {
312
+ const declared = (await load()).head?.(c, props);
313
+ if (declared) {
314
+ const head = build(declared, resolveRequestHead(c, configHead, middlewareHead, declared));
315
+ serializePageData({ head });
316
+ renderHeadToString(head);
317
+ renderHtmlAttrs(head);
318
+ renderBodyAttrs(head);
319
+ return head;
320
+ }
321
+ } catch (failure) {
322
+ console.error(failure);
323
+ }
324
+ return build(void 0);
325
+ }
264
326
  /** Recover one completed GET operation without replaying its middleware or loader. */
265
- async function renderPageFailure(c, error, original, renderFn, getAssetTags, configHead, options) {
266
- const httpError = error && typeof error === "object" && "getResponse" in error && typeof error.getResponse === "function";
327
+ async function renderPageFailure(c, error, original, renderFn, getAssetTags, configHead, options, validatedQuery) {
328
+ const httpError = isPageResponseError(error);
267
329
  const explicit = httpError ? error.getResponse() : original;
268
330
  const recoverHttpError = isRecoverableHttpException(error);
269
331
  if (explicit && (!recoverHttpError && explicit.status !== 404 || explicit.headers.has("Content-Disposition"))) return;
@@ -288,24 +350,32 @@ async function renderPageFailure(c, error, original, renderFn, getAssetTags, con
288
350
  } catch (cause) {
289
351
  throw new Error("Unable to render Pages error boundary", { cause });
290
352
  }
353
+ const url = requestPathWithSearch(c);
354
+ let query;
355
+ if (validatedQuery) try {
356
+ const capturedQuery = exposedLoaderQuery(validatedQuery, options?.querySchema);
357
+ if (capturedQuery) {
358
+ serializePageData({ query: capturedQuery });
359
+ query = capturedQuery;
360
+ }
361
+ } catch {}
291
362
  const attempted = /* @__PURE__ */ new Set();
292
363
  for (const component of candidates) {
293
364
  if (!component || attempted.has(component)) continue;
294
365
  attempted.add(component);
366
+ const props = { error: {
367
+ status,
368
+ message
369
+ } };
295
370
  const page = {
296
371
  component,
297
- props: { error: {
298
- status,
299
- message
300
- } },
372
+ props,
301
373
  shared,
302
374
  params: requestParams(c),
303
- url: requestPathWithSearch(c),
375
+ ...query && { query },
376
+ url,
304
377
  errors: null,
305
- head: {
306
- ...head,
307
- title: head?.title ?? resolveHead(configHead, middlewareHead, { title: status === 404 ? "Not Found" : recoverHttpError && status !== 500 ? message : "Internal Server Error" })?.title
308
- }
378
+ head: await boundaryPageHead(c, options?.boundaries?.loadHeads?.[component], props, configHead, middlewareHead, head, status === 404 ? "Not Found" : recoverHttpError && status !== 500 ? message : "Internal Server Error")
309
379
  };
310
380
  try {
311
381
  let response;
@@ -351,7 +421,7 @@ async function renderPageFailure(c, error, original, renderFn, getAssetTags, con
351
421
  */
352
422
  function runPageHandler(handler, c, endpoint) {
353
423
  const composition = getHandlerComposition(handler);
354
- return composition ? executeComposedHandler(c, composition.middlewares, () => endpoint(composition.leaf)) : endpoint(handler);
424
+ return composition ? executeComposedHandler(c, composition.middlewares, () => endpoint(composition.leaf)) : endpoint((context) => handler(context));
355
425
  }
356
426
  /** Flatten withValidator's { issues: [{ slot, issues: [{ message, path }] }] } into { field: message } */
357
427
  function flattenValidationErrors(body) {
@@ -437,8 +507,8 @@ function resolveRequestHead(c, configHead, middlewareHead, pageHead) {
437
507
  async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
438
508
  const renderMode = options?.renderMode ?? "server";
439
509
  if (renderMode !== "island" && needsPageReload(c)) return legacyPageResponse(c);
440
- const recover = (error, response) => renderPageFailure(c, error, response, renderFn, getAssetTags, configHead, options);
441
- return runLoader(handler, c, async (props) => {
510
+ const recover = (error, response, validatedQuery) => renderPageFailure(c, error, response, renderFn, getAssetTags, configHead, options, validatedQuery);
511
+ return runLoader(handler, c, async (props, validatedQuery) => {
442
512
  try {
443
513
  const shared = c.get("shared") ?? {};
444
514
  const pageHead = headFn ? headFn(c, props) : void 0;
@@ -449,12 +519,15 @@ async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTag
449
519
  if (hasDeferred && (options?.boundaries?.notFound || options?.boundaries?.errors.length)) c.header("Cache-Control", "no-store");
450
520
  const deferredKeys = {};
451
521
  for (const [group, { keys }] of Object.entries(deferredMap)) for (const key of keys) deferredKeys[key] = group;
522
+ const url = requestPathWithSearch(c);
523
+ const query = exposedLoaderQuery(validatedQuery, options?.querySchema);
452
524
  const pageObj = {
453
525
  component: componentId,
454
526
  props: immediateProps,
455
527
  params: requestParams(c),
528
+ ...query && { query },
456
529
  shared,
457
- url: requestPathWithSearch(c),
530
+ url,
458
531
  errors: null,
459
532
  ...head && { head },
460
533
  ...hasDeferred && {
@@ -462,6 +535,7 @@ async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTag
462
535
  deferredKeys
463
536
  }
464
537
  };
538
+ if (options?.dev && query) assertSerializableQuery(componentId, query);
465
539
  if (renderMode !== "island" && isPagesRequest(c)) {
466
540
  if (c.req.header("purpose") === "prefetch" && hasDeferred) {
467
541
  const resolvedProps = { ...immediateProps };
@@ -509,11 +583,14 @@ async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTag
509
583
  return `\n<script>(function(e){window.__rejectDeferred?window.__rejectDeferred(${g},e):(window.__deferredQueue??=[]).push([${g},0,e])})(${safeJsonStringify(error)})<\/script>`;
510
584
  }, assetTags);
511
585
  } catch (error) {
512
- const recovered = await recover(error);
586
+ const recovered = await recover(error, void 0, validatedQuery);
513
587
  if (recovered) return recovered;
514
588
  throw error;
515
589
  }
516
- }, recover, options?.boundaries?.notFound !== void 0);
590
+ }, recover, {
591
+ ownsNotFoundBoundary: options?.boundaries?.notFound !== void 0,
592
+ exposeQuery: options?.exposeQuery
593
+ });
517
594
  }
518
595
  function isSameOriginAction(request) {
519
596
  const origin = new URL(request.url).origin;
@@ -536,30 +613,38 @@ async function handlePageMutation(mutationHandler, getHandler, headFn, c, compon
536
613
  async function runPageMutation(mutationHandler, getHandler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
537
614
  if (!isSameOriginAction(c.req.raw)) return new Response("Cross-origin page actions are not allowed.", { status: 403 });
538
615
  const renderMode = options?.renderMode ?? "server";
539
- function buildMutationPageObj(props, errors) {
616
+ function buildMutationPageObj(props, errors, validatedQuery) {
540
617
  const shared = c.get("shared") ?? {};
541
618
  const head = resolveRequestHead(c, configHead, c.get("headDefaults"), headFn ? headFn(c, props) : void 0);
542
- return {
619
+ const url = requestPathWithSearch(c, hasActionKey(c.req.raw));
620
+ const query = exposedLoaderQuery(validatedQuery, options?.querySchema);
621
+ const page = {
543
622
  component: componentId,
544
623
  props,
545
624
  params: requestParams(c),
625
+ ...query && { query },
546
626
  shared,
547
- url: requestPathWithSearch(c, hasActionKey(c.req.raw)),
627
+ url,
548
628
  errors,
549
629
  ...head && { head }
550
630
  };
631
+ if (options?.dev && query) assertSerializableQuery(componentId, query);
632
+ return page;
551
633
  }
552
634
  const rerenderErrors = /* @__PURE__ */ new WeakSet();
553
635
  /** Re-run the GET loader and respond with the page, optionally carrying validation errors. */
554
636
  async function respondWithPage(errors) {
555
637
  if (needsPageReload(c)) return legacyPageResponse(c, errors);
556
638
  try {
557
- return await runLoader(getHandler, c, async (props) => {
558
- const pageObj = buildMutationPageObj(stripDeferred(props), errors);
639
+ return await runLoader(getHandler, c, async (props, validatedQuery) => {
640
+ const pageObj = buildMutationPageObj(stripDeferred(props), errors, validatedQuery);
559
641
  varyPagesResponse(c);
560
642
  if (isPagesRequest(c)) return pageJsonResponse(c, pageObj);
561
643
  const { html, assetTags } = await renderPageHtml(c, pageObj, componentId, renderMode, renderFn, getAssetTags);
562
644
  return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
645
+ }, void 0, {
646
+ exposeQuery: options?.exposeQuery,
647
+ withoutActionKey: options?.exposeQuery && hasActionKey(c.req.raw)
563
648
  });
564
649
  } catch (e) {
565
650
  if (e instanceof Error) rerenderErrors.add(e);
@@ -599,4 +684,4 @@ async function runPageMutation(mutationHandler, getHandler, headFn, c, component
599
684
  throw e;
600
685
  }
601
686
  }
602
- export { safeJsonStringify as a, recoverPageHttpException as i, handlePageGet as n, handlesPageLoaderNotFound as o, handlePageMutation as r, ownsLoaderNotFoundBoundary as s, flattenValidationErrors as t };
687
+ export { recoverPageHttpException as a, ownsLoaderNotFoundBoundary as c, isPageResponseError as i, handlePageGet as n, safeJsonStringify as o, handlePageMutation as r, handlesPageLoaderNotFound as s, flattenValidationErrors as t };
@@ -1,7 +1,10 @@
1
- import { n as CloudBindings, r as CloudContext } from "./index-Dn2mkPr2.mjs";
1
+ import { n as CloudContext } from "./index-CqF8_p9C.mjs";
2
+ import { t as StandardSchemaV1 } from "./standard-schema-CuDawHOC.mjs";
3
+ import { n as CloudBindings } from "./bindings-C7zOgxT3.mjs";
2
4
  import { n as HeadDescriptor, t as HeadConfig } from "./head-fUp8n_QJ.mjs";
3
- import { s as PageRenderMode, t as DevCssAsset } from "./types-FDH6NuY1.mjs";
5
+ import { s as PageRenderMode, t as DevCssAsset } from "./types-RYVujNS6.mjs";
4
6
  import { Context } from "hono";
7
+ import { HTTPException } from "hono/http-exception";
5
8
  /** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
6
9
  declare function safeJsonStringify(value: unknown): string;
7
10
  type PageObject = {
@@ -10,6 +13,8 @@ type PageObject = {
10
13
  component: string;
11
14
  props: Record<string, unknown>;
12
15
  params: Record<string, string>;
16
+ /** The loader's validated query when the page opts into sharing it. */
17
+ query?: Record<string, unknown>;
13
18
  shared: Record<string, unknown>;
14
19
  url: string;
15
20
  errors: Record<string, string> | null;
@@ -22,15 +27,32 @@ type PageObject = {
22
27
  type PageRenderResult = string | ReadableStream<Uint8Array>;
23
28
  type PageHandler = ((c: CloudContext) => unknown | Promise<unknown>) | undefined;
24
29
  type PageHeadHandler = ((c: CloudContext, props: Record<string, unknown>) => HeadConfig | undefined) | undefined;
30
+ type BoundaryHeadHandler = (c: CloudContext, props: {
31
+ error: {
32
+ status: number;
33
+ message: string;
34
+ };
35
+ }) => HeadConfig | undefined;
25
36
  type PageRequestContext = Context | CloudContext;
26
37
  type PageRenderOptions = {
27
38
  renderMode?: PageRenderMode;
28
39
  /** Dev server build: rejected deferred props keep their raw error message. */
29
40
  dev?: boolean;
41
+ /**
42
+ * Whether the page publishes the query its loader validated. Off unless the
43
+ * page sets `export const exposeQuery = true`, since a schema's output can be
44
+ * data the loader never chose to send.
45
+ */
46
+ exposeQuery?: boolean;
47
+ querySchema?: StandardSchemaV1;
30
48
  boundaries?: {
31
49
  notFound?: string;
32
50
  notFoundErrors?: Array<string>;
33
51
  errors: Array<string>;
52
+ /** Loads a boundary's `.server` companion, by plan id. Added at runtime, never serialized. */
53
+ loadHeads?: Readonly<Record<string, () => Promise<{
54
+ head?: BoundaryHeadHandler;
55
+ }>>>;
34
56
  };
35
57
  };
36
58
  type AssetTags = {
@@ -40,8 +62,9 @@ type AssetTags = {
40
62
  devCss?: Array<DevCssAsset>;
41
63
  devCssNonce?: string;
42
64
  };
43
- type RenderPage = (pageObj: PageObject, assetTags: AssetTags, requestUrl: string) => Promise<PageRenderResult>;
65
+ type RenderPage = (pageObj: PageObject, assetTags: AssetTags, requestUrl: string, request: CloudContext["req"]) => Promise<PageRenderResult>;
44
66
  type GetAssetTags = (req: Request, env: CloudBindings, componentId: string) => Promise<AssetTags>;
67
+ declare function isPageResponseError(error: unknown): error is Pick<HTTPException, "getResponse">;
45
68
  /** Recover HTTP failures outside the loader leaf without executing application code again. */
46
69
  declare function recoverPageHttpException(error: unknown, c: PageRequestContext, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, options?: PageRenderOptions): Promise<Response | undefined>;
47
70
  interface FormValidationErrors {
@@ -53,4 +76,4 @@ declare function flattenValidationErrors(body: unknown): FormValidationErrors;
53
76
  declare function handlePageGet(handler: PageHandler, headFn: PageHeadHandler, c: PageRequestContext, componentId: string, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, options?: PageRenderOptions): Promise<Response>;
54
77
  /** Handle POST/PUT/PATCH/DELETE page request — run mutation, then re-run GET or redirect */
55
78
  declare function handlePageMutation(mutationHandler: PageHandler, getHandler: PageHandler, headFn: PageHeadHandler, c: PageRequestContext, componentId: string, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, options?: PageRenderOptions): Promise<Response>;
56
- export { handlePageMutation as a, handlePageGet as i, PageRenderResult as n, recoverPageHttpException as o, flattenValidationErrors as r, safeJsonStringify as s, PageObject as t };
79
+ export { handlePageMutation as a, safeJsonStringify as c, handlePageGet as i, PageRenderResult as n, isPageResponseError as o, flattenValidationErrors as r, recoverPageHttpException as s, PageObject as t };
@@ -1 +1 @@
1
- export { d as isRealD1Id, f as isRealHyperdriveId } from "./provision-Bh44omGA.mjs";
1
+ export { d as isRealD1Id, f as isRealHyperdriveId } from "./provision-CQykn8gu.mjs";
@@ -1,8 +1,8 @@
1
1
  import { a as join, c as resolve$2, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
2
2
  import { i as voidWarn, r as voidLog } from "./log-D9hwSySP.mjs";
3
3
  import { n as scanWranglerDotenvKeys } from "./dotenv-BG6RQavH.mjs";
4
- import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-60r4Z2Zf.mjs";
5
- import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-DVe5KV5G.mjs";
4
+ import { d as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-DFNpqV_m.mjs";
5
+ import { g as persistMaterializedWranglerConfig, j as writeProvisionedWranglerConfig, o as assertNoDuplicateMembers, v as readProvisionedBindingEntry } from "./wrangler-AyMfdVJK.mjs";
6
6
  import { createRequire } from "node:module";
7
7
  import { closeSync, existsSync, fsyncSync, lstatSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, unlinkSync, writeSync } from "node:fs";
8
8
  import { isRecord } from "@void/deploy-core";
@@ -469,7 +469,7 @@ function createDefaultRunWrangler(root, options) {
469
469
  const [command, ...prefix] = launcher;
470
470
  const isWindows = process.platform === "win32";
471
471
  const teardownDeadlineMs = options?.signalTeardownDeadlineMs ?? confirmGraceMs + SIGNAL_TEARDOWN_DEADLINE_MARGIN_MS;
472
- return (args, opts) => new Promise((resolvePromise, rejectPromise) => {
472
+ const execute = (args, opts, argv) => new Promise((resolvePromise, rejectPromise) => {
473
473
  const parallelWorkerUpload = options?.parallelWorkerUpload === true && args.type === "versions.upload";
474
474
  const interactive = (args.type === "versions.upload" || args.type === "worker.deploy") && args.interactive === true;
475
475
  if (activeTeardown !== void 0) {
@@ -480,7 +480,7 @@ function createDefaultRunWrangler(root, options) {
480
480
  rejectPromise(/* @__PURE__ */ new Error("provision: refusing to spawn a Cloudflare operation process — another one is already active in this process (only two immutable Worker uploads may overlap; all other Cloudflare commands and provisions remain sequential)."));
481
481
  return;
482
482
  }
483
- const child = spawn(command, [...prefix, ...encodeCloudflareOperation(args)], {
483
+ const child = spawn(command, [...prefix, ...argv], {
484
484
  cwd: opts.cwd ?? root,
485
485
  shell: false,
486
486
  env: {
@@ -706,6 +706,10 @@ function createDefaultRunWrangler(root, options) {
706
706
  options?.onSpawnedChild?.(child);
707
707
  if (opts.input !== void 0) child.stdin?.end(opts.input);
708
708
  });
709
+ return async (args, opts) => {
710
+ using files = new DisposableStack();
711
+ return await execute(args, opts, encodeCloudflareOperation(args, files));
712
+ };
709
713
  }
710
714
  /**
711
715
  * Normalize a finished child into a {@link RunWranglerResult}. A signal, a spawn error or a
@@ -1,4 +1,4 @@
1
- import { n as isSameOrigin } from "./url-DBQluotE.mjs";
1
+ import { n as isSameOrigin } from "./url-DAQ1c3lh.mjs";
2
2
  // src/pages/redirect.ts
3
3
  const REDIRECT_HEADER = "X-VoidPages-Redirect";
4
4
  const REDIRECT_STATUSES = /* @__PURE__ */ new Set([
@@ -1,8 +1,8 @@
1
- import { H as outro, L as log } from "./dist-Cr_xGE_K.mjs";
2
- import { c as getToken } from "./auth-CqwJwItO.mjs";
3
- import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
4
- import { h as import_picocolors, o as dim } from "./output-BZLnu0z8.mjs";
5
- import { r as readProjectConfig } from "./project-dh9431bN.mjs";
1
+ import { H as outro, L as log } from "./dist-BngS28id.mjs";
2
+ import { c as getToken } from "./auth-CeBmolb-.mjs";
3
+ import { r as PlatformClient } from "./client-BEHI4UWn.mjs";
4
+ import { h as import_picocolors, o as dim } from "./output-DhJgS6Ve.mjs";
5
+ import { r as readProjectConfig } from "./project-DC-BqHef.mjs";
6
6
  // src/cli/requests.ts
7
7
  async function runRequestsCommand(root, range, status) {
8
8
  console.log();
@@ -0,0 +1 @@
1
+ export { n as inferDefaultSlug } from "./resolve-project-s_FGWyr-.mjs";
@@ -1,6 +1,6 @@
1
- import { L as log } from "./dist-Cr_xGE_K.mjs";
1
+ import { L as log } from "./dist-BngS28id.mjs";
2
2
  import { a as join } from "./dist-DMYe8CZJ.mjs";
3
- import { r as readProjectConfig } from "./project-dh9431bN.mjs";
3
+ import { r as readProjectConfig } from "./project-DC-BqHef.mjs";
4
4
  import { readFileSync } from "node:fs";
5
5
  // src/cli/resolve-project.ts
6
6
  function getRequestedProjectSlug(options) {
@@ -0,0 +1,20 @@
1
+ import { a as requireRuntimeBinding } from "./runtime-C_VPIJBF.mjs";
2
+ // src/runtime/resource-binding.ts
3
+ /** Connect a file-based definition to the binding selected by the generated Worker. */
4
+ function createResourceBinding(definition, directory, helper) {
5
+ const prefix = directory === "workflows" ? "workflows" : "durable";
6
+ const noun = helper === "defineDurableState()" ? "state definition" : "definition";
7
+ let binding;
8
+ return {
9
+ bind(name, resourceName) {
10
+ if (definition.name !== resourceName) throw new Error(`${prefix}: name must be statically discoverable in ${helper}. Run void info to inspect this definition.`);
11
+ if (binding && binding !== name) throw new Error(`${prefix}: ${noun} is already bound to '${binding}' and cannot also bind to '${name}'.`);
12
+ binding = name;
13
+ },
14
+ get() {
15
+ if (!binding) throw new Error(`${prefix}: this ${noun} is not bound. Default-export it from a file in ${directory}/.`);
16
+ return requireRuntimeBinding(binding);
17
+ }
18
+ };
19
+ }
20
+ export { createResourceBinding as t };
@@ -2,9 +2,13 @@
2
2
  function resourceNameWords(value) {
3
3
  return value.split(/[^a-zA-Z0-9]+/).filter(Boolean);
4
4
  }
5
+ /** Workflow resource names can start with a digit because the generated class adds a prefix. */
6
+ function isWorkflowName(value) {
7
+ return typeof value === "string" && /[a-zA-Z0-9]/.test(value);
8
+ }
5
9
  function isResourceName(value) {
6
10
  if (typeof value !== "string") return false;
7
11
  const words = resourceNameWords(value);
8
12
  return words.length > 0 && /^[a-zA-Z]/.test(words[0]);
9
13
  }
10
- export { resourceNameWords as n, isResourceName as t };
14
+ export { isWorkflowName as n, resourceNameWords as r, isResourceName as t };
@@ -1,8 +1,9 @@
1
- import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
2
- import { c as getToken } from "./auth-CqwJwItO.mjs";
3
- import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
4
- import { a as createSpinner, c as formatCount, d as formatRelativeTime, o as dim, y as printSuccess } from "./output-BZLnu0z8.mjs";
5
- import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-dh9431bN.mjs";
1
+ import { c as getToken } from "./auth-CeBmolb-.mjs";
2
+ import { r as PlatformClient } from "./client-BEHI4UWn.mjs";
3
+ import { H as outro, L as log, O as cancel, tt as isCancel } from "./dist-BngS28id.mjs";
4
+ import { a as select, n as confirm } from "./interactive-prompts-EK0dilFu.mjs";
5
+ import { a as createSpinner, c as formatCount, d as formatRelativeTime, o as dim, y as printSuccess } from "./output-DhJgS6Ve.mjs";
6
+ import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DC-BqHef.mjs";
6
7
  // src/cli/rollback.ts
7
8
  async function runRollbackCommand(root, deployId, explicitPlatform) {
8
9
  console.log();
@@ -78,7 +79,7 @@ async function runRollbackCommand(root, deployId, explicitPlatform) {
78
79
  }
79
80
  }
80
81
  async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
81
- const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-ByjFGats.mjs");
82
+ const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareWorkerVersion, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BmICrRnm.mjs");
82
83
  const context = resolveCloudflareOperationContext(root);
83
84
  const status = await readCloudflareWorkerStatus(context);
84
85
  const deployedVersionIds = new Set(status.deployedVersionIds);
@@ -101,11 +102,14 @@ async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
101
102
  if (!target) {
102
103
  const result = await select({
103
104
  message: "Select a version to roll back to:",
104
- options: candidates.map((version) => ({
105
- value: version.id,
106
- label: `${version.id} ${dim(version.createdAt ? formatRelativeTime(version.createdAt) : "")}`,
107
- hint: version.metadata?.migrations ? formatCount(version.metadata.migrations.length, "migration") : "migration state unknown"
108
- }))
105
+ options: candidates.map((version) => {
106
+ const count = version.metadata?.migrations?.length ?? version.metadata?.migrationSummary?.count;
107
+ return {
108
+ value: version.id,
109
+ label: `${version.id} ${dim(version.createdAt ? formatRelativeTime(version.createdAt) : "")}`,
110
+ hint: count !== void 0 ? formatCount(count, "migration") : "migration state unknown"
111
+ };
112
+ })
109
113
  });
110
114
  if (isCancel(result)) {
111
115
  cancel("Rollback cancelled.");
@@ -118,11 +122,18 @@ async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
118
122
  }
119
123
  target = selected;
120
124
  }
121
- const current = status.versions.find((version) => version.id === status.activeVersionId);
125
+ const active = status.versions.find((version) => version.id === status.activeVersionId);
126
+ target = await resolveCloudflareWorkerVersion(context, target);
127
+ const current = active && await resolveCloudflareWorkerVersion(context, active);
122
128
  if (target.metadata?.schema !== 2 || current?.metadata?.schema !== 2 || target.metadata.triggerConfig.preserve || current.metadata.triggerConfig.preserve) log.info("This rollback keeps the current domains, routes, and schedules. The selected version has no complete trigger snapshot.");
123
129
  if (!current?.metadata?.migrations || !target.metadata?.migrations) {
124
- log.warn("Void migration metadata is unavailable for one of these versions. Database migrations are forward-only and will not be reverted.");
125
- await confirmRollbackOrExit();
130
+ const { cloudflareMigrationSummary } = await import("@void/deploy-cloudflare");
131
+ const currentHistory = cloudflareMigrationSummary(current?.metadata);
132
+ const targetHistory = cloudflareMigrationSummary(target.metadata);
133
+ if (!currentHistory || !targetHistory || currentHistory.digest !== targetHistory.digest) {
134
+ log.warn(currentHistory && targetHistory ? `The versions have different migration histories (current: ${currentHistory.count}, selected: ${targetHistory.count}). The older code will run against the current database schema.` : "Void migration metadata is unavailable for one of these versions. Database migrations are forward-only and will not be reverted.");
135
+ await confirmRollbackOrExit();
136
+ }
126
137
  } else {
127
138
  const targetSet = new Set(target.metadata.migrations);
128
139
  await confirmUnrevertedMigrations(current.metadata.migrations.filter((migration) => !targetSet.has(migration)), "version", restorePlatformFlag);