void 1.12.2 → 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-CdJQba_Q.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-D9MWA_dj.mjs → auth-link-I4omV0pL.mjs} +6 -6
  10. package/dist/{auth-router-FskgTU3B.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-DaLrQfPS.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-WG4TcR_d.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-BSuWV1PI.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-DtJeunLF.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-DoDqRH6i.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-B2VZ2Hut.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-jUBgfvzk.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-wML5HNfS.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-Bv3oQ2gE.mjs → platform-auth-config-BbfNhjBc.mjs} +9 -9
  142. package/dist/{platform-auth-protection-OqzfhXwx.mjs → platform-auth-protection-BHPV4MUf.mjs} +9 -8
  143. package/dist/{platform-auth-recovery-rmIYjXST.mjs → platform-auth-recovery-DE0nArYy.mjs} +8 -7
  144. package/dist/{platform-cmd-D_4z2Ijv.mjs → platform-cmd-CLRU3BRb.mjs} +11 -10
  145. package/dist/{platform-cmd-B3rO4RhU.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-CUq9odbd.mjs → platform-domain-kn3WuKPG.mjs} +6 -5
  148. package/dist/{platform-lifecycle-DOSYo0UI.mjs → platform-lifecycle-BoCEYy2w.mjs} +1 -1
  149. package/dist/{platform-lifecycle-DuoVruij.mjs → platform-lifecycle-CKwOg8wz.mjs} +164 -72
  150. package/dist/{platform-management-D_gt3qLb.mjs → platform-management-CaSdFthX.mjs} +1 -1
  151. package/dist/{platform-management-MmO9IubR.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-P_FVslfd.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 +10 -10
  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-GT4CW5fs.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-BbSQTZ6d.mjs +0 -1
  359. package/dist/migrate-C9aoWLvY.mjs +0 -1
  360. package/dist/operator-cmd-jnjzuJKX.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
@@ -0,0 +1,127 @@
1
+ import { a as join, c as resolve, l as toSlash } from "./dist-DMYe8CZJ.mjs";
2
+ import { n as getVoidUserAgent } from "./cf-user-agent-HHTRzfud.mjs";
3
+ import { constants, cpSync, mkdtempDisposableSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
4
+ import { isRecord } from "@void/deploy-core";
5
+ import { tmpdir } from "node:os";
6
+ import { cloudflareVersionMessageModule, cloudflareVersionMessageReference, workflowExports, workflowScheduleCount } from "@void/deploy-cloudflare";
7
+ // src/workflows/limits.ts
8
+ const DAY = 864e5;
9
+ /** Without account allocations, check the Workers Free limits before issuing any provider request. */
10
+ function workflowSettingsFit(request, plan = { paid: false }) {
11
+ const steps = plan.steps ?? (plan.paid ? 25e3 : 1024);
12
+ const concurrency = plan.concurrency ?? (plan.paid ? 5e4 : 100);
13
+ const schedules = plan.paid && (plan.concurrency !== void 0 || steps >= 25e3);
14
+ return (!request.schedules || schedules) && request.steps <= steps && request.concurrency <= concurrency && request.retentionMs <= (plan.paid ? 30 : 3) * DAY;
15
+ }
16
+ /** Compute the account limits required by all of this Worker's local Workflows. */
17
+ function requestedWorkflowLimits(workflows) {
18
+ const required = {
19
+ schedules: false,
20
+ steps: 0,
21
+ concurrency: 0,
22
+ retentionMs: 0
23
+ };
24
+ for (const { schedules, limits, concurrency, default_retention } of workflows) {
25
+ required.schedules ||= workflowScheduleCount(schedules) > 0;
26
+ if (isRecord(limits) && typeof limits.steps === "number") required.steps = Math.max(required.steps, limits.steps);
27
+ if (isRecord(concurrency) && typeof concurrency.limit === "number") required.concurrency = Math.max(required.concurrency, concurrency.limit);
28
+ if (isRecord(default_retention)) required.retentionMs = Math.max(required.retentionMs, workflowRetentionMs(default_retention.success_retention), workflowRetentionMs(default_retention.error_retention));
29
+ }
30
+ return required;
31
+ }
32
+ const durationUnits = /* @__PURE__ */ new Map([
33
+ ["second", 1e3],
34
+ ["minute", 6e4],
35
+ ["hour", 36e5],
36
+ ["day", DAY],
37
+ ["week", 7 * DAY],
38
+ ["month", 30 * DAY],
39
+ ["year", 365.25 * DAY]
40
+ ]);
41
+ /** Workflow durations accept milliseconds or a number followed by a duration unit. */
42
+ function workflowRetentionMs(value) {
43
+ if (value === void 0) return 0;
44
+ let milliseconds = value;
45
+ if (typeof value === "string") {
46
+ const parts = /^(\S+)\s+([a-z]+?)s?$/.exec(value.trim());
47
+ const unit = parts && durationUnits.get(parts[2]);
48
+ milliseconds = parts && unit ? Number(parts[1]) * unit : Number(value);
49
+ }
50
+ if (typeof milliseconds !== "number" || !Number.isSafeInteger(milliseconds) || milliseconds <= 0) throw new Error("deploy: Workflow default_retention must be a duration such as \"3 days\" or a whole number of milliseconds.");
51
+ return milliseconds;
52
+ }
53
+ // src/cli/cf-version-message.ts
54
+ /** Prepare a private version upload. Keep the input artifact reusable for a retry or preview. */
55
+ async function withCloudflareVersionMessage(directory, options, upload) {
56
+ const { message } = options;
57
+ const reference = message && cloudflareVersionMessageReference(message);
58
+ if (!reference && !options.deferWorkflowSchedules?.length) return upload(directory, message);
59
+ using temp = mkdtempDisposableSync(join(tmpdir(), "void-cf-version-"));
60
+ const staged = realpathSync(temp.path);
61
+ cpSync(directory, staged, {
62
+ recursive: true,
63
+ verbatimSymlinks: true,
64
+ mode: constants.COPYFILE_FICLONE
65
+ });
66
+ const { getWorkerConfigPath, getWorkerBundleDir } = await import("@cloudflare/build-output-utils");
67
+ const configPath = getWorkerConfigPath(staged);
68
+ if (toSlash(realpathSync(configPath)) !== resolve(configPath)) throw new Error("The private Cloudflare Worker config cannot be changed through a symlink.");
69
+ const config = JSON.parse(readFileSync(configPath, "utf8"));
70
+ if (!isRecord(config)) throw new Error("The private Cloudflare Worker config was not readable.");
71
+ if (options.deferWorkflowSchedules?.length) await deferWorkflowSchedules(config, options.deferWorkflowSchedules);
72
+ if (reference && message) {
73
+ const manifest = config.manifest;
74
+ if (!isRecord(manifest) || manifest.type !== "complete" || !isRecord(manifest.modules)) throw new Error("The Cloudflare recovery snapshot requires a complete Worker bundle.");
75
+ const bundleDir = getWorkerBundleDir(staged);
76
+ if (toSlash(realpathSync(bundleDir)) !== resolve(bundleDir)) throw new Error("The Cloudflare recovery snapshot cannot be written through a symlink.");
77
+ const name = cloudflareVersionMessageModule(reference);
78
+ if (Object.hasOwn(manifest.modules, name)) throw new Error(`Worker module ${name} conflicts with the Cloudflare recovery snapshot.`);
79
+ writeFileSync(join(bundleDir, name), message, {
80
+ flag: "wx",
81
+ mode: 384
82
+ });
83
+ manifest.modules[name] = { type: "text" };
84
+ }
85
+ writeFileSync(configPath, JSON.stringify(config));
86
+ return await upload(staged, reference || message);
87
+ }
88
+ /** cf deploy uses the export declarations both for its upload and for its separate Workflow PUTs. */
89
+ async function deferWorkflowSchedules(config, names) {
90
+ const { exportsFromOutput } = await import("./cf-version-api-BWHMVtzw.mjs");
91
+ const unsafe = isRecord(config.unsafe) ? config.unsafe : {};
92
+ const metadata = isRecord(unsafe.metadata) ? unsafe.metadata : {};
93
+ config.unsafe = {
94
+ ...unsafe,
95
+ metadata: {
96
+ exports: exportsFromOutput(config.exports, []),
97
+ ...metadata
98
+ }
99
+ };
100
+ for (const declaration of Object.values(workflowExports(config.exports))) if (typeof declaration.name === "string" && names.includes(declaration.name)) delete declaration.schedules;
101
+ }
102
+ // src/cli/cf-worker-settings.ts
103
+ /** Version uploads leave Worker-wide settings untouched; publish only explicit configuration. */
104
+ async function publishCloudflareWorkerSettings(options) {
105
+ if (options.observability !== void 0 && !isRecord(options.observability)) throw new Error("The Cloudflare Worker observability settings were not readable.");
106
+ if (options.logpush !== void 0 && typeof options.logpush !== "boolean") throw new Error("The Cloudflare Worker Logpush setting was not readable.");
107
+ const settings = {
108
+ ...options.observability === void 0 ? {} : { observability: options.observability },
109
+ ...options.logpush === void 0 ? {} : { logpush: options.logpush }
110
+ };
111
+ if (Object.keys(settings).length === 0) return;
112
+ const endpoint = `${options.apiBaseUrl.replace(/\/$/, "")}/accounts/${encodeURIComponent(options.accountId)}/workers/scripts/${encodeURIComponent(options.workerName)}/script-settings`;
113
+ const response = await fetch(endpoint, {
114
+ method: "PATCH",
115
+ headers: {
116
+ "User-Agent": getVoidUserAgent(),
117
+ ...options.headers,
118
+ "Content-Type": "application/json"
119
+ },
120
+ body: JSON.stringify(settings),
121
+ redirect: "error",
122
+ signal: AbortSignal.timeout(3e4)
123
+ });
124
+ const body = await response.json();
125
+ if (!response.ok || !isRecord(body) || body.success !== true) throw new Error(`Cloudflare did not update Worker settings (HTTP ${response.status}).`);
126
+ }
127
+ export { workflowSettingsFit as i, withCloudflareVersionMessage as n, requestedWorkflowLimits as r, publishCloudflareWorkerSettings as t };
package/dist/cli/cli.mjs CHANGED
@@ -84,5 +84,5 @@ const message = unsupportedRuntimeMessage(process.versions, process.execPath);
84
84
  if (message) {
85
85
  process.stderr.write(`${message}\n`);
86
86
  process.exitCode = 1;
87
- } else await import("../cli-main-DaLrQfPS.mjs");
87
+ } else await import("../cli-main-CJTGhcYN.mjs");
88
88
  export {};
@@ -1,11 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as __toESM } from "../rolldown-runtime-uD8oG6U2.mjs";
3
3
  import { a as join, c as resolve, n as dirname } from "../dist-DMYe8CZJ.mjs";
4
- import { i as safePositional, n as isD1Bookmark, r as readCfUploadOutput, t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "../cf-command-values-5BPBRc9Z.mjs";
4
+ import { i as workflowSettingsFit, n as withCloudflareVersionMessage, t as publishCloudflareWorkerSettings } from "../cf-worker-settings-DJKdy97k.mjs";
5
+ import { a as safePositional, i as readCfUploadOutput, n as isD1Bookmark, t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "../cf-command-values-cUnJwCyG.mjs";
5
6
  import { t as sanitizeTerminalLogText } from "../terminal-log-text-CfS2JKM6.mjs";
6
- import { n as getCfCliVersion, r as getVoidUserAgent, t as publishCloudflareWorkerSettings } from "../cf-worker-settings-BBdlhm9U.mjs";
7
+ import { n as getVoidUserAgent, t as getCfCliVersion } from "../cf-user-agent-HHTRzfud.mjs";
7
8
  import { t as require_picocolors } from "../picocolors-D1NxSLw-.mjs";
8
- import { f as formatUrl } from "../output-BZLnu0z8.mjs";
9
+ import { f as formatUrl } from "../output-DhJgS6Ve.mjs";
9
10
  import { t as Buffer } from "../node-buffer-D7kgjaDs.mjs";
10
11
  import { copyFileSync, mkdtempSync, openAsBlob, readFileSync, rmSync, writeFileSync } from "node:fs";
11
12
  import { fileURLToPath } from "node:url";
@@ -15,6 +16,7 @@ import { tmpdir } from "node:os";
15
16
  import { stripVTControlCharacters } from "node:util";
16
17
  import { parse } from "jsonc-parser";
17
18
  import { spawn, spawnSync } from "node:child_process";
19
+ import { cloudflareVersionMessageReference } from "@void/deploy-cloudflare";
18
20
  import { setGlobalProxyFromEnv } from "node:http";
19
21
  import { setTimeout } from "node:timers/promises";
20
22
  import { getCloudflareAuthUseKeyringFromEnv } from "@cloudflare/workers-auth";
@@ -287,10 +289,16 @@ function platformWorkerUploadAttribution(config) {
287
289
  }
288
290
  }
289
291
  // src/cli/cloudflare-operation-process.ts
292
+ /**
293
+ * Execute typed Cloudflare operations using the pinned provider CLI and API.
294
+ * Secret values arrive on stdin; captured results use one structured envelope.
295
+ */
290
296
  const cf = join(dirname(fileURLToPath(import.meta.resolve("cf/package.json"))), "bin", "cf");
291
297
  const operation = (() => {
292
298
  try {
293
- return JSON.parse(process.argv[2] ?? "null");
299
+ const argument = process.argv[2];
300
+ const encoded = argument?.startsWith("--operation-file=") ? readFileSync(argument.slice(17), "utf8") : argument;
301
+ return JSON.parse(encoded ?? "null");
294
302
  } catch {
295
303
  return null;
296
304
  }
@@ -426,7 +434,7 @@ function runInteractiveCf(command) {
426
434
  });
427
435
  });
428
436
  }
429
- async function withBuildOutput(raw, sourceMain, action) {
437
+ async function withBuildOutput(raw, sourceMain, action, options = {}) {
430
438
  const scratch = mkdtempSync(join(tmpdir(), "void-cf-command-"));
431
439
  try {
432
440
  const main = "index.js";
@@ -442,12 +450,14 @@ async function withBuildOutput(raw, sourceMain, action) {
442
450
  }), { mode: 384 });
443
451
  const accountId = process.env.CLOUDFLARE_ACCOUNT_ID ?? raw.account_id;
444
452
  if (typeof accountId !== "string" || !accountId) throw new Error("Cloudflare account is not pinned for Worker deployment.");
445
- const { prepareCfBuildOutput } = await import("../cf-build-output-Wpk_e5CI.mjs");
453
+ const { prepareCfBuildOutput } = await import("../cf-build-output-Qc43LWzE.mjs");
446
454
  const output = await prepareCfBuildOutput(scratch, accountId);
447
455
  if (!output) throw new Error("Could not prepare the Cloudflare Worker build output.");
448
456
  try {
449
- await assertExistingProvisionableResources(output.directory, accountId);
450
- return action(output.directory);
457
+ return await withCloudflareVersionMessage(output.directory, options, async (directory, annotation) => {
458
+ await assertExistingProvisionableResources(directory, accountId);
459
+ return action(directory, annotation);
460
+ });
451
461
  } finally {
452
462
  await output.dispose();
453
463
  }
@@ -521,53 +531,66 @@ function accountId() {
521
531
  if (typeof accountId !== "string" || !accountId) throw new Error("Cloudflare account is not pinned for API inspection.");
522
532
  return accountId;
523
533
  }
524
- async function cloudflareApiGet(path, failure, extraHeaders = {}) {
525
- const url = `${apiBaseUrl()}${path}`;
526
- const response = await fetch(url, {
527
- headers: {
528
- ...await apiHeaders(),
529
- ...extraHeaders
534
+ /** Account API reads and trigger replacements use the same pinned credentials and request bounds. */
535
+ function fetchCloudflareResource(url, headers, replacement) {
536
+ return fetch(url, {
537
+ method: replacement === void 0 ? "GET" : "PUT",
538
+ headers: replacement === void 0 ? headers : {
539
+ ...headers,
540
+ "Content-Type": "application/json"
530
541
  },
542
+ body: JSON.stringify(replacement),
531
543
  redirect: "error",
532
544
  signal: AbortSignal.timeout(3e4)
533
545
  });
546
+ }
547
+ async function cloudflareApiGet(path, failure, extraHeaders = {}) {
548
+ const response = await fetchCloudflareResource(`${apiBaseUrl()}${path}`, {
549
+ ...await apiHeaders(),
550
+ ...extraHeaders
551
+ });
534
552
  const body = object(await response.json());
535
553
  if (!response.ok || body.success !== true) throw new Error(`${failure} (HTTP ${response.status})`);
536
554
  return body;
537
555
  }
538
556
  async function clearWorkerCronSchedules(worker) {
539
- const endpoint = `${apiBaseUrl()}/accounts/${encodeURIComponent(accountId())}/workers/scripts/${encodeURIComponent(worker)}/schedules`;
540
- const response = await fetch(endpoint, {
541
- method: "PUT",
542
- headers: {
543
- ...await apiHeaders(),
544
- "Content-Type": "application/json"
545
- },
546
- body: "[]",
547
- redirect: "error",
548
- signal: AbortSignal.timeout(3e4)
549
- });
557
+ const response = await fetchCloudflareResource(`${apiBaseUrl()}/accounts/${encodeURIComponent(accountId())}/workers/scripts/${encodeURIComponent(worker)}/schedules`, await apiHeaders(), []);
550
558
  const body = object(await response.json());
551
559
  const schedules = object(body.result).schedules;
552
560
  if (!response.ok || body.success !== true || !Array.isArray(schedules) || schedules.length !== 0) throw new Error(`Cloudflare did not clear the Worker Cron Triggers (HTTP ${response.status}).`);
553
561
  return result(0);
554
562
  }
563
+ async function clearWorkflowSchedules(request) {
564
+ const { workerName: worker, workflowName: workflow, className } = request;
565
+ if (!/^[A-Za-z0-9_][A-Za-z0-9_-]{0,63}$/.test(workflow)) throw new Error("Invalid Cloudflare Workflow name.");
566
+ const endpoint = `${apiBaseUrl()}/accounts/${encodeURIComponent(accountId())}/workflows/${encodeURIComponent(workflow)}`;
567
+ const headers = await apiHeaders();
568
+ const current = await fetchCloudflareResource(endpoint, headers);
569
+ const body = object(await current.json());
570
+ if (current.status === 404 && Array.isArray(body.errors) && body.errors.some((error) => object(error).code === 10200)) return result(0, "", "", false);
571
+ if (!current.ok || body.success !== true) throw new Error(`Could not inspect Cloudflare Workflow ${workflow} (HTTP ${current.status}).`);
572
+ const active = object(body.result);
573
+ if (active.name !== workflow || typeof active.script_name !== "string" || typeof active.class_name !== "string") throw new Error(`Cloudflare returned an invalid owner for Workflow ${workflow}.`);
574
+ if (active.script_name !== worker || active.class_name !== className || active.schedules === void 0) return result(0, "", "", false);
575
+ if (!Array.isArray(active.schedules)) throw new Error(`Cloudflare returned invalid schedules for Workflow ${workflow}.`);
576
+ if (request.inspectOnly || !active.schedules.length) return result(0, "", "", active.schedules.length > 0);
577
+ const cleared = await fetchCloudflareResource(endpoint, headers, {
578
+ script_name: worker,
579
+ class_name: className,
580
+ schedules: [],
581
+ limits: request.limits,
582
+ concurrency: request.concurrency,
583
+ default_retention: request.default_retention
584
+ });
585
+ if (!cleared.ok || object(await cleared.json()).success !== true) throw new Error(`Could not clear schedules for Cloudflare Workflow ${workflow} (HTTP ${cleared.status}).`);
586
+ return result(0);
587
+ }
555
588
  async function clearWorkerCustomDomains(worker) {
556
- const endpoint = `${apiBaseUrl()}/accounts/${encodeURIComponent(accountId())}/workers/scripts/${encodeURIComponent(worker)}/domains/records`;
557
- const response = await fetch(endpoint, {
558
- method: "PUT",
559
- headers: {
560
- ...await apiHeaders(),
561
- "Content-Type": "application/json"
562
- },
563
- body: JSON.stringify({
564
- override_scope: true,
565
- override_existing_origin: false,
566
- override_existing_dns_record: false,
567
- origins: []
568
- }),
569
- redirect: "error",
570
- signal: AbortSignal.timeout(3e4)
589
+ const response = await fetchCloudflareResource(`${apiBaseUrl()}/accounts/${encodeURIComponent(accountId())}/workers/scripts/${encodeURIComponent(worker)}/domains/records`, await apiHeaders(), {
590
+ override_scope: true,
591
+ override_existing_origin: false,
592
+ override_existing_dns_record: false,
593
+ origins: []
571
594
  });
572
595
  if (!response.ok) throw new Error(`Cloudflare rejected the empty custom-domain set (HTTP ${response.status}).`);
573
596
  let body;
@@ -758,8 +781,32 @@ async function readAllQueues() {
758
781
  }
759
782
  throw new Error("Cloudflare Queue list exceeded the supported page limit.");
760
783
  }
784
+ async function checkWorkflowEntitlement(request) {
785
+ const body = await cloudflareApiGet(`/accounts/${encodeURIComponent(accountId())}/entitlements`, "Could not read account entitlements for Workflows.");
786
+ if (!Array.isArray(body.result)) throw new Error("Cloudflare returned an invalid account entitlement list.");
787
+ const active = body.result.map(object).filter((entry) => !entry.deleted_date);
788
+ function allocation(id) {
789
+ const entry = active.find((item) => item.id === id);
790
+ return entry && object(entry.allocation);
791
+ }
792
+ function count(id) {
793
+ const limit = allocation(id);
794
+ if (!limit) return;
795
+ if (limit.type !== "max_count" || typeof limit.value !== "number" || !Number.isSafeInteger(limit.value) || limit.value < 0) throw new Error(`Cloudflare returned an invalid allocation for ${id}.`);
796
+ return limit.value;
797
+ }
798
+ const concurrency = count("workflows.max_concurrent_instances");
799
+ const plan = allocation("workers.enabled");
800
+ const paid = concurrency !== void 0 ? concurrency >= 1e4 : request.fedramp || plan?.type === "bool" && plan.value === true;
801
+ return result(0, "", "", workflowSettingsFit(request, {
802
+ paid,
803
+ concurrency,
804
+ steps: count("workflows.max_step_count")
805
+ }));
806
+ }
761
807
  async function resources() {
762
808
  switch (operation.type) {
809
+ case "workflows.entitlement": return checkWorkflowEntitlement(operation);
763
810
  case "d1.import": {
764
811
  const database = d1Database(operation.database);
765
812
  await importD1SqlFile({
@@ -1222,11 +1269,16 @@ async function workerHistory() {
1222
1269
  } : void 0);
1223
1270
  if (called.status !== 0) return called;
1224
1271
  const version = object(parsedJson(called.stdout));
1225
- if (version.id !== versionId || !Array.isArray(version.bindings)) throw new Error("Worker version bindings were malformed.");
1226
- if (operation.includeSource) return result(0, "", called.stderr, version);
1272
+ const bindings = version.bindings === void 0 ? [] : version.bindings;
1273
+ if (version.id !== versionId || !Array.isArray(bindings)) throw new Error("Worker version bindings were malformed.");
1274
+ if (operation.includeSource) return result(0, "", called.stderr, {
1275
+ ...version,
1276
+ bindings
1277
+ });
1227
1278
  const resources = await readVersionResources(worker, versionId);
1228
1279
  return result(0, "", called.stderr, {
1229
1280
  ...version,
1281
+ bindings,
1230
1282
  resources
1231
1283
  });
1232
1284
  }
@@ -1246,7 +1298,7 @@ async function workerHistory() {
1246
1298
  JSON.stringify({
1247
1299
  strategy: "percentage",
1248
1300
  versions,
1249
- ...operation.message ? { annotations: { "workers/message": operation.message } } : {}
1301
+ ...operation.message ? { annotations: { "workers/message": cloudflareVersionMessageReference(operation.message) ?? operation.message } } : {}
1250
1302
  }),
1251
1303
  ...operation.bypassDeploymentChecks ? ["--bypass-deployment-checks"] : []
1252
1304
  ]);
@@ -1295,8 +1347,9 @@ async function workerChanges() {
1295
1347
  const raw = config();
1296
1348
  const name = workerName();
1297
1349
  if (raw.name !== name) throw new Error("Cloudflare Worker target changed.");
1298
- if (operation.type === "triggers.clear-crons" || operation.type === "triggers.clear-domains") {
1350
+ if (operation.type === "triggers.clear-crons" || operation.type === "triggers.clear-domains" || operation.type === "triggers.clear-workflow-schedules") {
1299
1351
  if (raw.account_id !== void 0 && raw.account_id !== accountId()) throw new Error("Cloudflare trigger target changed.");
1352
+ if (operation.type === "triggers.clear-workflow-schedules") return clearWorkflowSchedules(operation);
1300
1353
  return operation.type === "triggers.clear-crons" ? clearWorkerCronSchedules(name) : clearWorkerCustomDomains(name);
1301
1354
  }
1302
1355
  if (operation.type === "triggers.deploy") {
@@ -1322,16 +1375,16 @@ async function workerChanges() {
1322
1375
  if (typeof raw.main !== "string" || !raw.main || raw.no_bundle !== true) throw new Error("Cloudflare Worker upload requires a prebuilt platform Worker.");
1323
1376
  const source = resolve(dirname(path), raw.main);
1324
1377
  const request = operation;
1325
- const called = await withBuildOutput(raw, source, (directory) => runCf([
1378
+ const called = await withBuildOutput(raw, source, (directory, annotation) => runCf([
1326
1379
  ...request.type === "worker.deploy" ? ["deploy"] : [
1327
1380
  "workers",
1328
1381
  "versions",
1329
1382
  "create"
1330
1383
  ],
1331
1384
  "--prebuilt",
1332
- ...request.message ? [`--message=${request.message}`] : [],
1385
+ ...annotation ? [`--message=${annotation}`] : [],
1333
1386
  ...request.secretsFilePath ? ["--secrets-file", request.secretsFilePath] : []
1334
- ], directory, void 0, request.interactive === true));
1387
+ ], directory, void 0, request.interactive === true), request);
1335
1388
  if (called.status !== 0 || request.interactive === true) return called;
1336
1389
  let uploaded = {};
1337
1390
  try {
@@ -1448,6 +1501,17 @@ async function main() {
1448
1501
  if (operation.type.startsWith("secret.")) return secrets();
1449
1502
  if (operation.type === "tail") return tail();
1450
1503
  if (operation.type.startsWith("email.")) return email();
1504
+ if (operation.type === "previews.delete") {
1505
+ if (!safePositional(operation.previewName)) throw new Error("Cloudflare Preview name is invalid.");
1506
+ return runCf([
1507
+ "previews",
1508
+ "delete",
1509
+ operation.previewName,
1510
+ `--worker=${workerName()}`,
1511
+ "--force"
1512
+ ]);
1513
+ }
1514
+ if (operation.type === "previews.deploy") throw new Error("Cloudflare Previews deploy only from the prepared Build Output.");
1451
1515
  if (operation.type.startsWith("deployments.") || operation.type.startsWith("versions.") && operation.type !== "versions.upload") return workerHistory();
1452
1516
  if (operation.type.startsWith("triggers.") || operation.type === "worker.deploy" || operation.type === "versions.upload" || operation.type === "queues.consumer.remove") return workerChanges();
1453
1517
  return resources();
@@ -1,4 +1,4 @@
1
- import { t as findEnvFile } from "../env-types-D2hBodXP.mjs";
1
+ import { t as findEnvFile } from "../env-types-B33fEHRH.mjs";
2
2
  import { writeSync } from "node:fs";
3
3
  import { spawnSync } from "node:child_process";
4
4
  // src/cli/env-schema-probe.ts
@@ -108,7 +108,7 @@ function emitResult(result) {
108
108
  writeSync(RESULT_FD, JSON.stringify(result));
109
109
  }
110
110
  async function runFactsChild(root) {
111
- const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-j9pjCDfA.mjs");
111
+ const { deriveSelfHostSchemaFacts, SelfHostSchemaError } = await import("../env-validation-BnAsx6gz.mjs");
112
112
  try {
113
113
  emitResult({
114
114
  kind: "ok",
@@ -127,7 +127,7 @@ async function runFactsChild(root) {
127
127
  }
128
128
  /** The parent already found the emitted config, so a read failure here fails closed. */
129
129
  async function runValidateEmittedChild(root) {
130
- const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-j9pjCDfA.mjs");
130
+ const { computeInvalidEmittedKeys, readEmittedWorkerVars, SelfHostSchemaError } = await import("../env-validation-BnAsx6gz.mjs");
131
131
  const emitted = readEmittedWorkerVars(root);
132
132
  if (!emitted.ok) {
133
133
  emitResult({
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Run a `--json` command (`db execute` or `deploy`) in a child process whose stdout is our
3
+ * stderr, so config output, including writes to fd 1 and output from its children, never reaches
4
+ * stdout. Only the result the child writes to fd 3 is printed, and only on success.
5
+ */
6
+ export declare function runJsonCommandProcess(root: string, args: ReadonlyArray<string>): Promise<void>;
@@ -0,0 +1,91 @@
1
+ import { L as log } from "../dist-BngS28id.mjs";
2
+ import { t as formatCloudflareUserMessage } from "../cloudflare-user-output-DFbD0l4l.mjs";
3
+ import { t as Buffer } from "../node-buffer-D7kgjaDs.mjs";
4
+ import { writeFileSync } from "node:fs";
5
+ import { constants as constants$1 } from "node:os";
6
+ import { spawn } from "node:child_process";
7
+ // src/cli/json-command-process.ts
8
+ const CHILD_COMMAND = "__void-json-command__";
9
+ const RESULT_FD = 3;
10
+ /**
11
+ * Run a `--json` command (`db execute` or `deploy`) in a child process whose stdout is our
12
+ * stderr, so config output, including writes to fd 1 and output from its children, never reaches
13
+ * stdout. Only the result the child writes to fd 3 is printed, and only on success.
14
+ */
15
+ async function runJsonCommandProcess(root, args) {
16
+ const child = spawn(process.execPath, [
17
+ ...process.execArgv,
18
+ import.meta.filename,
19
+ CHILD_COMMAND,
20
+ process.argv[1],
21
+ ...args
22
+ ], {
23
+ cwd: root,
24
+ stdio: [
25
+ "inherit",
26
+ 2,
27
+ "inherit",
28
+ "pipe"
29
+ ]
30
+ });
31
+ const chunks = [];
32
+ child.stdio[RESULT_FD]?.on("data", (chunk) => chunks.push(chunk));
33
+ const interrupt = () => child.kill("SIGINT");
34
+ const terminate = () => child.kill("SIGTERM");
35
+ process.on("SIGINT", interrupt);
36
+ process.on("SIGTERM", terminate);
37
+ try {
38
+ const code = await new Promise((resolve, reject) => {
39
+ child.once("error", reject);
40
+ child.once("close", (status, signal) => {
41
+ resolve(signal ? 128 + constants$1.signals[signal] : status ?? 1);
42
+ });
43
+ });
44
+ const result = Buffer.concat(chunks).toString("utf8");
45
+ if (code !== 0) process.exitCode = code;
46
+ else if (args[0] === "deploy" && !isSingleJsonLine(result)) {
47
+ log.error("deploy: the deploy finished without a single JSON result, so none was printed.", { output: process.stderr });
48
+ process.exitCode = 1;
49
+ } else if (result) {
50
+ process.stdout.once("error", (error) => {
51
+ log.error(`Could not write the result to stdout: ${error.code ?? error.message}.`, { output: process.stderr });
52
+ process.exitCode = 1;
53
+ });
54
+ process.stdout.write(result);
55
+ }
56
+ } finally {
57
+ process.off("SIGINT", interrupt);
58
+ process.off("SIGTERM", terminate);
59
+ }
60
+ }
61
+ /** One line holding one JSON value, as `deploy --json` promises. */
62
+ function isSingleJsonLine(text) {
63
+ if (!text.endsWith("\n") || text.indexOf("\n") !== text.length - 1) return false;
64
+ try {
65
+ JSON.parse(text);
66
+ return true;
67
+ } catch {
68
+ return false;
69
+ }
70
+ }
71
+ if (process.argv[2] === CHILD_COMMAND) try {
72
+ process.argv.splice(1, 2);
73
+ const writeResult = (text) => writeFileSync(RESULT_FD, text);
74
+ if (process.argv.at(2) === "deploy") {
75
+ const { parseDeployArgs } = await import("../args-MnQnqypt.mjs");
76
+ const { runDeploy } = await import("../deploy-DZ9j7MC4.mjs");
77
+ await runDeploy(process.cwd(), {
78
+ ...parseDeployArgs(process.argv.slice(3)),
79
+ writeResult
80
+ });
81
+ } else {
82
+ const { parseDbArgs } = await import("../db-args-Cx1y4vZn.mjs");
83
+ const args = parseDbArgs(process.argv.slice(3));
84
+ const { runDbCommand } = await import("../db-B3eoVDNA.mjs");
85
+ await runDbCommand(process.cwd(), args, writeResult);
86
+ }
87
+ } catch (error) {
88
+ log.error(formatCloudflareUserMessage(error instanceof Error ? error.message : String(error)), { output: process.stderr });
89
+ process.exitCode = 1;
90
+ }
91
+ export { runJsonCommandProcess };