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
@@ -0,0 +1,112 @@
1
+ import { L as log } from "./dist-BngS28id.mjs";
2
+ import { t as basename } from "./dist-DMYe8CZJ.mjs";
3
+ import { h as log$1, t as formatDeploySummary } from "./deploy-summary-Dkl0zvQy.mjs";
4
+ import { f as formatUrl, g as note, y as printSuccess } from "./output-DhJgS6Ve.mjs";
5
+ import { CLOUDFLARE_HOST_LABEL_MAX, cloudflarePreviewNameProblem, deleteCloudflarePreview, deployCloudflarePreview, readWranglerTopLevelString } from "@void/deploy-cloudflare";
6
+ // src/cli/cloudflare-preview.ts
7
+ /** Where the user sets a top-level Cloudflare config key, for messages. */
8
+ function cloudflareConfigKey(configPath, key) {
9
+ const file = basename(configPath);
10
+ return file === "wrangler.jsonc" || file === "wrangler.json" ? `${key} in ${file}` : `cloudflare.${key} in void.config.ts`;
11
+ }
12
+ /**
13
+ * Check a `deploy --preview` request before connecting to Cloudflare. A Worker name and a pinned
14
+ * account make the deploy and `void project preview delete` reach the same Worker.
15
+ */
16
+ function checkCloudflarePreviewRequest(options) {
17
+ const { previewName, rootConfig, configPath } = options;
18
+ const problem = cloudflarePreviewNameProblem(previewName);
19
+ if (problem) return `deploy: "${previewName}" is not a valid preview name: ${problem}. For example: pr-64.`;
20
+ const workerName = readWranglerTopLevelString(rootConfig, "name");
21
+ if (!workerName) return `deploy: --preview needs the Worker name (${cloudflareConfigKey(configPath, "name")}), so the preview and its cleanup reach the same Worker.`;
22
+ if (!readWranglerTopLevelString(rootConfig, "account_id") && !process.env.CLOUDFLARE_ACCOUNT_ID?.trim()) return `deploy: --preview needs a pinned Cloudflare account. Set ${cloudflareConfigKey(configPath, "account_id")} or CLOUDFLARE_ACCOUNT_ID.`;
23
+ const room = CLOUDFLARE_HOST_LABEL_MAX - 1 - workerName.length;
24
+ if (room < 1) return `deploy: Worker name "${workerName}" is too long for a preview. On workers.dev, "<name>-${workerName}" must be at most ${CLOUDFLARE_HOST_LABEL_MAX} characters, so the Worker name can have at most ${CLOUDFLARE_HOST_LABEL_MAX - 2}.`;
25
+ if (previewName.length > room) return `deploy: preview name "${previewName}" is too long for Worker "${workerName}". On workers.dev, "${previewName}-${workerName}" must be at most ${CLOUDFLARE_HOST_LABEL_MAX} characters, so use at most ${room}.`;
26
+ }
27
+ /** Deploy a static Preview from the prepared output and report it. Production is unchanged. */
28
+ async function runCloudflareStaticPreview(options) {
29
+ const { previewName, workerName, cliLog } = options;
30
+ log$1.step(`Deploying Preview ${previewName}...`);
31
+ let result;
32
+ try {
33
+ result = await deployCloudflarePreview({
34
+ runWrangler: options.runWrangler,
35
+ workerName,
36
+ previewName,
37
+ verifyUploader: options.verifyUploader,
38
+ configPath: options.staticConfigPath
39
+ });
40
+ } finally {
41
+ await options.cfOutput?.dispose();
42
+ }
43
+ if (!result.ok) {
44
+ const message = options.reporter.redactor.redact(formatCloudflarePreviewError(result, options));
45
+ cliLog.error("cloudflare_preview_failed", new Error(message), { reason: result.reason });
46
+ log$1.error(message);
47
+ return options.exit(1);
48
+ }
49
+ cliLog.info("cloudflare_preview_deployed", {
50
+ previewName,
51
+ previewId: result.previewId,
52
+ deploymentId: result.deploymentId
53
+ });
54
+ const record = {
55
+ type: "preview",
56
+ workerName,
57
+ previewName,
58
+ previewUrl: result.previewUrl,
59
+ deploymentId: result.deploymentId,
60
+ deploymentUrl: result.deploymentUrl
61
+ };
62
+ options.writeResult?.(`${JSON.stringify(record)}\n`);
63
+ note([
64
+ formatDeploySummary({
65
+ workerName,
66
+ typeLabel: options.typeLabel
67
+ }),
68
+ `Preview: ${previewName}`,
69
+ ...result.deploymentUrl ? [`This deployment: ${formatUrl(result.deploymentUrl)}`] : []
70
+ ].join("\n"), result.previewUrl);
71
+ printSuccess(`Preview ${previewName} deployed. Production is unchanged.`);
72
+ }
73
+ function formatCloudflarePreviewError(result, options) {
74
+ const { previewName, workerName } = options;
75
+ switch (result.reason) {
76
+ case "worker-not-found": return [`deploy: Worker "${workerName}" has no production deployment in Cloudflare account ${options.accountId}. Nothing was uploaded.`, "Deploy production first: void deploy --platform cloudflare"].join("\n");
77
+ case "worker-check-failed": return [`deploy: could not check Worker "${workerName}" on Cloudflare. Nothing was uploaded.`, ...result.diagnostic ? [result.diagnostic] : []].join("\n");
78
+ case "uploader-changed": return "deploy: the Cloudflare uploader changed during the preview deploy. Nothing was deployed.";
79
+ case "output-invalid": return "deploy: Cloudflare accepted the preview but did not return a readable Preview record. Check the Worker in the Cloudflare dashboard before retrying.";
80
+ case "preview-urls-disabled": return [
81
+ `deploy: Cloudflare created deployment ${result.deploymentId} for preview "${previewName}", but Preview URLs are off for Worker "${workerName}", so it has no URL.`,
82
+ `Set preview_urls: true (${cloudflareConfigKey(options.configPath, "preview_urls")}), run void deploy --platform cloudflare once, then deploy the preview again. This also turns on version URLs for production versions.`,
83
+ `The preview stays on the Worker until you remove it: void project preview delete ${previewName} --platform cloudflare`
84
+ ].join("\n");
85
+ case "deploy-failed": return ["deploy: Cloudflare could not deploy the preview. Production is unchanged.", ...result.diagnostic ? [result.diagnostic] : []].join("\n");
86
+ }
87
+ }
88
+ /**
89
+ * `void project preview delete <name>`: delete a Preview of this project's Worker. Production is
90
+ * not read or changed. A Preview that does not exist is not an error, so a cleanup job can rerun.
91
+ */
92
+ async function runCloudflarePreviewDelete(root, { name }, runner) {
93
+ const problem = cloudflarePreviewNameProblem(name);
94
+ if (problem) throw new Error(`project: "${name}" is not a valid preview name: ${problem}.`);
95
+ const { resolveCloudflareOperationContext } = await import("./cloudflare-operations-BmICrRnm.mjs");
96
+ const context = resolveCloudflareOperationContext(root, runner);
97
+ const { workerName } = context;
98
+ const result = await deleteCloudflarePreview({
99
+ runWrangler: context.runWrangler,
100
+ workerName,
101
+ previewName: name,
102
+ configPath: context.configPath
103
+ });
104
+ if (result.ok) {
105
+ if (result.deleted) printSuccess(`Deleted preview ${name} of Worker ${workerName}. Production is unchanged.`);
106
+ else log.info(`Preview ${name} does not exist on Worker ${workerName}. Nothing to delete.`);
107
+ return;
108
+ }
109
+ if (result.reason === "worker-not-found") throw new Error(`project: Worker "${workerName}" was not found in Cloudflare account ${context.accountId}. Nothing was deleted. Check ${cloudflareConfigKey(context.configPath, "name")} and the pinned account.`);
110
+ throw new Error([`project: Cloudflare could not delete preview "${name}" of Worker "${workerName}".`, ...result.diagnostic ? [result.diagnostic] : []].join("\n"));
111
+ }
112
+ export { runCloudflareStaticPreview as i, cloudflareConfigKey as n, runCloudflarePreviewDelete as r, checkCloudflarePreviewRequest as t };
@@ -1,11 +1,12 @@
1
- import { t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "./cf-command-values-5BPBRc9Z.mjs";
2
1
  import { a as join, c as resolve, n as dirname, s as relative } from "./dist-DMYe8CZJ.mjs";
3
- import { n as readProjectPaths } from "./project-paths-2ENfCCih.mjs";
2
+ import { t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "./cf-command-values-cUnJwCyG.mjs";
3
+ import { n as readProjectPaths } from "./project-paths-BeAxxqGh.mjs";
4
4
  import { i as readPackageJson, n as hasPackageDependency, t as getPackageDependencies } from "./package-json-4xUI3xLz.mjs";
5
- import { i as hasSsrEntry, r as getSsrServerEntryPath } from "./entry-Bwb9ev8K.mjs";
5
+ import { o as getSsrServerEntryPath, r as scanWorkflowModules } from "./scan-D2ISAobj.mjs";
6
6
  import { t as MagicString } from "./dist-B6eN80gc.mjs";
7
- import { existsSync, readFileSync } from "node:fs";
7
+ import { existsSync, mkdtempDisposableSync, readFileSync, writeFileSync } from "node:fs";
8
8
  import { parseSync } from "vite";
9
+ import { tmpdir } from "node:os";
9
10
  import { spawnSync } from "node:child_process";
10
11
  import { minimatch } from "minimatch";
11
12
  // src/cli/vite-config-patch.ts
@@ -106,7 +107,13 @@ function patchViteConfigWithVoidPlugin(filePath, code) {
106
107
  // src/cli/workspace.ts
107
108
  function parsePackageManagerField(pkg) {
108
109
  if (!pkg || typeof pkg !== "object") return;
109
- const raw = pkg.packageManager;
110
+ const packageJson = pkg;
111
+ const packageManager = parsePackageManagerName(packageJson.packageManager);
112
+ if (packageManager) return packageManager;
113
+ const devEnginesPackageManager = packageJson.devEngines?.packageManager;
114
+ if (devEnginesPackageManager && typeof devEnginesPackageManager === "object" && !Array.isArray(devEnginesPackageManager)) return parsePackageManagerName(devEnginesPackageManager.name);
115
+ }
116
+ function parsePackageManagerName(raw) {
110
117
  if (typeof raw !== "string") return;
111
118
  const name = raw.split("@", 1)[0]?.trim();
112
119
  if (name === "npm" || name === "pnpm" || name === "yarn" || name === "bun") return name;
@@ -391,6 +398,9 @@ function formatProjectCommand(root, command) {
391
398
  const formattedBin = bin === "vite" && findVitePlusRoot(root) !== void 0 ? "vp" : bin;
392
399
  return args.length > 0 ? `${formattedBin} ${args.join(" ")}` : formattedBin;
393
400
  }
401
+ function isStaticAppType(appType) {
402
+ return appType === "static" || appType === "spa";
403
+ }
394
404
  /**
395
405
  * Detect a static deploy preset based on the project root.
396
406
  * Returns null when the project requires a full worker deploy.
@@ -428,20 +438,25 @@ function detectPreset(root, options) {
428
438
  };
429
439
  }
430
440
  }
431
- if (hasBackendFiles(root)) return null;
441
+ if (!options?.explicitStatic && hasBackendFiles(root)) return null;
432
442
  if (pkg) {
433
443
  const vitePlusRoot = findVitePlusRoot(root, pkg);
434
444
  const hasLocalVite = vitePlusRoot === root || hasViteDependency(pkg);
435
445
  if (hasLocalVite || vitePlusRoot !== void 0) {
436
446
  const buildCommand = resolveProjectScriptCommand(root, "build");
437
- const viteConfig = VITE_CONFIG_FILES.map((name) => join(root, name)).find((path) => existsSync(path));
447
+ const viteConfig = findViteConfig(root);
438
448
  if (hasLocalVite || buildCommand || viteConfig || existsSync(join(root, "index.html"))) return {
439
449
  buildCommand: buildCommand ?? resolveProjectCommand(root, "vite build"),
440
- outputDir: resolve(root, viteSpaOutputDir(viteConfig)),
450
+ outputDir: defaultViteClientDir(root, viteConfig),
441
451
  appType: "spa"
442
452
  };
443
453
  }
444
454
  }
455
+ if (options?.explicitStatic && (options.explicitStatic.outputDir || !canServeStaticProjectRoot(root))) return {
456
+ appType: "static",
457
+ buildCommand: resolveProjectScriptCommand(root, "build"),
458
+ outputDir: defaultViteClientDir(root)
459
+ };
445
460
  if (existsSync(join(root, "dist/index.html"))) return {
446
461
  buildCommand: null,
447
462
  outputDir: resolve(root, "dist"),
@@ -454,6 +469,13 @@ function detectPreset(root, options) {
454
469
  };
455
470
  return null;
456
471
  }
472
+ function canServeStaticProjectRoot(root) {
473
+ try {
474
+ return !hasBackendFiles(root);
475
+ } catch {
476
+ return false;
477
+ }
478
+ }
457
479
  /**
458
480
  * The refusal shown when an SSG project also carries backend sources and no
459
481
  * `inference.appType` says which one to deploy. Names the exact directories
@@ -514,15 +536,19 @@ const VITE_CONFIG_FILES = [
514
536
  "vite.config.cjs"
515
537
  ];
516
538
  /**
517
- * Where a Vite SPA build puts its browser files. A Vite config that uses
539
+ * Where a Vite build puts its browser files. A Vite config that uses
518
540
  * `voidPlugin()` (`void init` adds it) splits the output into `dist/client`
519
541
  * (browser files) and `dist/ssr` (the server bundle, its source map and
520
542
  * `wrangler.json`). Only `dist/client` may be uploaded: uploading `dist`
521
543
  * publishes the server files and leaves `/` without an `index.html`. A
522
544
  * project that installs `void` only for its CLI keeps Vite's plain `dist`.
523
545
  */
524
- function viteSpaOutputDir(config) {
525
- return config && viteConfigImportsVoidPlugin(config, readFileSync(config, "utf8")) ? "dist/client" : "dist";
546
+ function defaultViteClientDir(root, config = findViteConfig(root)) {
547
+ const usesVoid = config && viteConfigImportsVoidPlugin(config, readFileSync(config, "utf8"));
548
+ return resolve(root, usesVoid ? "dist/client" : "dist");
549
+ }
550
+ function findViteConfig(root) {
551
+ return VITE_CONFIG_FILES.map((name) => join(root, name)).find((path) => existsSync(path));
526
552
  }
527
553
  function hasViteDependency(pkg) {
528
554
  return hasPackageDependency(pkg, "vite", [
@@ -549,34 +575,35 @@ function findVitePlusRoot(root, pkg = readPackageJson(root)) {
549
575
  * static deploy can tell the user exactly what would have been dropped.
550
576
  */
551
577
  function findBackendSources(root) {
552
- const paths = readProjectPaths(root);
553
- const found = [];
554
- for (const dir of backendDirs(paths)) if (existsSync(dir)) found.push(`${relative(root, dir)}/`);
555
- const ssrEntry = getSsrServerEntryPath(root, paths);
556
- if (ssrEntry) found.push(relative(root, ssrEntry));
557
- return found;
578
+ return [...backendSources(root)];
558
579
  }
559
- /**
560
- * Check whether the project has backend files that require a full worker deploy.
561
- */
580
+ /** Stop at the first backend, before reading Workflow sources if an earlier convention matched. */
562
581
  function hasBackendFiles(root) {
563
- const paths = readProjectPaths(root);
564
- return backendDirs(paths).some((dir) => existsSync(dir)) || hasSsrEntry(root, paths);
582
+ return !backendSources(root).next().done;
565
583
  }
566
- function backendDirs(paths) {
567
- return [
584
+ function* backendSources(root) {
585
+ const paths = readProjectPaths(root);
586
+ for (const dir of [
568
587
  paths.routesDir,
569
588
  paths.pagesDir,
570
589
  paths.middlewareDir,
571
590
  paths.cronsDir,
572
591
  paths.queuesDir,
573
592
  paths.emailDir
574
- ];
593
+ ]) if (existsSync(dir)) yield relative(root, dir) + "/";
594
+ const ssrEntry = getSsrServerEntryPath(root, paths);
595
+ if (ssrEntry) yield relative(root, ssrEntry);
596
+ if (scanWorkflowModules(root).length) yield "workflows/";
575
597
  }
576
598
  // src/cli/cloudflare-process.ts
577
599
  /** Operations contain public targets only. Secret values travel through stdin. */
578
- function encodeCloudflareOperation(operation) {
579
- return [JSON.stringify(operation)];
600
+ function encodeCloudflareOperation(operation, files) {
601
+ const json = JSON.stringify(operation);
602
+ if (!files || json.length < 8192) return [json];
603
+ const directory = files.use(mkdtempDisposableSync(join(tmpdir(), "void-cf-operation-")));
604
+ const path = join(directory.path, "operation.json");
605
+ writeFileSync(path, json, { mode: 384 });
606
+ return ["--operation-file=" + path];
580
607
  }
581
608
  /** Keyed by the runner's failure union, so a new failure cannot be left off the whitelist. */
582
609
  const CLOUDFLARE_COMMAND_FAILURES = {
@@ -632,7 +659,8 @@ function createCloudflareProcessRunner(options) {
632
659
  return (operation, run) => {
633
660
  const streaming = !run.capture && (operation.type === "auth.login" || operation.type === "tail");
634
661
  const env = typeof options.env === "function" ? options.env() : options.env ?? process.env;
635
- const result = spawnSync(command, [...prefix, ...encodeCloudflareOperation(operation)], {
662
+ using files = new DisposableStack();
663
+ const result = spawnSync(command, [...prefix, ...encodeCloudflareOperation(operation, files)], {
636
664
  cwd: run.cwd ?? options.root,
637
665
  env: {
638
666
  ...env,
@@ -668,4 +696,4 @@ function createCloudflareProcessRunner(options) {
668
696
  return decoded;
669
697
  };
670
698
  }
671
- export { FRAMEWORK_PRESETS as a, hasBackendFiles as c, findWorkspaceMemberRoot as d, findWorkspaceRoot as f, patchViteConfigWithVoidPlugin as h, isCleanCloudflareExit as i, resolveCloudflareOperationArgv as l, stripYamlLineComment as m, decodeCloudflareOperationResult as n, detectPreset as o, parsePackageManagerField as p, encodeCloudflareOperation as r, formatProjectCommand as s, createCloudflareProcessRunner as t, resolveProjectCommand as u };
699
+ export { patchViteConfigWithVoidPlugin as _, FRAMEWORK_PRESETS as a, formatProjectCommand as c, resolveCloudflareOperationArgv as d, resolveProjectCommand as f, stripYamlLineComment as g, parsePackageManagerField as h, isCleanCloudflareExit as i, hasBackendFiles as l, findWorkspaceRoot as m, decodeCloudflareOperationResult as n, defaultViteClientDir as o, findWorkspaceMemberRoot as p, encodeCloudflareOperation as r, detectPreset as s, createCloudflareProcessRunner as t, isStaticAppType as u };
@@ -0,0 +1,36 @@
1
+ import { L as log } from "./dist-BngS28id.mjs";
2
+ import { f as formatUrl, v as printNextStep } from "./output-DhJgS6Ve.mjs";
3
+ // src/cli/cloudflare-user-output.ts
4
+ const ROLLBACK_GUIDE = "https://developers.cloudflare.com/workers/versions-and-deployments/rollbacks/#rolling-back-from-a-split-deployment";
5
+ /**
6
+ * Keep Void's public CLI vocabulary at the product level while preserving real
7
+ * Cloudflare config filenames and environment variables that users may need to
8
+ * inspect. The underlying implementation remains available in source and deploy
9
+ * diagnostics, but normal remediation always points back to Void commands.
10
+ */
11
+ function formatCloudflareUserMessage(message) {
12
+ const preserved = [];
13
+ const protect = (value) => {
14
+ return `\uE000VOID_CF_TERM_${preserved.push(value) - 1}\uE001`;
15
+ };
16
+ let result = message.replaceAll(/Cloudflare Worker "[^"\r\n]*(?:"|\.{3}$)/gm, protect).replaceAll(/(?:[A-Za-z]:)?[^\s`"']*wrangler\.jsonc?/gi, protect).replaceAll(/\bWRANGLER_[A-Z0-9_]+\b/g, protect).replaceAll(/\.wrangler\b/gi, protect).replaceAll(/`wrangler deploy`/gi, "`void deploy --platform cloudflare`").replaceAll(/`wrangler secret list[^`]*`/gi, "`void secret list`").replaceAll(/`wrangler secret put\s+([^`]*)`/gi, "`void secret put $1`").replaceAll(/`wrangler d1 migrations apply[^`]*`/gi, "`void db migrate --remote`").replaceAll(/`wrangler d1 migrations list[^`]*`/gi, "`void db status`").replaceAll(/`wrangler[^`]*`/gi, "the underlying Cloudflare operation").replaceAll(/"wrangler[^"\n]*"/gi, "\"Cloudflare operation\"").replaceAll(/\bwrangler uploader\b/gi, "Cloudflare deployment tool").replaceAll(/\bwrangler (?:CLI|binary|process|child)\b/gi, "Cloudflare deployment tool").replaceAll(/\bwrangler config\b/gi, "Cloudflare config").replaceAll(/\bwrangler\b/gi, "Cloudflare tooling");
17
+ result = result.replaceAll(/\uE000VOID_CF_TERM_(\d+)\uE001/g, (_match, index) => {
18
+ return preserved[Number(index)] ?? "";
19
+ });
20
+ return result;
21
+ }
22
+ function logCloudflareUserError(message) {
23
+ const lines = formatCloudflareUserMessage(message).split("\n");
24
+ const linkIndex = lines.indexOf(ROLLBACK_GUIDE);
25
+ if (linkIndex >= 0) {
26
+ const output = {
27
+ columns: Infinity,
28
+ write: process.stdout.write.bind(process.stdout)
29
+ };
30
+ log.error(lines.slice(0, linkIndex).join("\n"), { output });
31
+ printNextStep(formatUrl(ROLLBACK_GUIDE), { wrap: false });
32
+ }
33
+ const details = lines.slice(linkIndex + 1).join("\n");
34
+ if (linkIndex < 0 || details.trim()) log.error(linkIndex < 0 ? details : details.trimStart());
35
+ }
36
+ export { logCloudflareUserError as n, formatCloudflareUserMessage as t };
@@ -0,0 +1 @@
1
+ export { n as collectMigrations } from "./collect-KC4cizWM.mjs";
@@ -1,6 +1,11 @@
1
1
  import { a as join, n as dirname } from "./dist-DMYe8CZJ.mjs";
2
2
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
3
3
  // src/migrations/collect.ts
4
+ function assertFlatMigrationLayout(migrationsDir) {
5
+ if (!existsSync(migrationsDir)) return;
6
+ const nested = readdirSync(migrationsDir, { withFileTypes: true }).find((entry) => (entry.isDirectory() || entry.isSymbolicLink()) && existsSync(join(migrationsDir, entry.name, "migration.sql")));
7
+ if (nested) throw new Error(`db: Unsupported nested migration folder '${join(migrationsDir, nested.name)}'. Void migrations use flat .sql files from drizzle-kit 0.x.`);
8
+ }
4
9
  /**
5
10
  * Collect all .sql migration files from the migrations directory,
6
11
  * sorted by filename (lexicographic order).
@@ -45,4 +50,4 @@ function writeJournal(migrationsDir, journal) {
45
50
  function stripSqlExt(name) {
46
51
  return name.endsWith(".sql") ? name.slice(0, -4) : name;
47
52
  }
48
- export { writeJournal as i, readJournal as n, stripSqlExt as r, collectMigrations as t };
53
+ export { writeJournal as a, stripSqlExt as i, collectMigrations as n, readJournal as r, assertFlatMigrationLayout as t };
@@ -1,8 +1,11 @@
1
- import { t as VoidAuthProvider } from "./providers-D5P8j_8D.mjs";
2
1
  import "./types-CKWnYgfy.mjs";
3
2
  import { t as HeadConfig } from "./head-fUp8n_QJ.mjs";
4
3
  import { AssetConfig, StorageConfig } from "@void/deploy-core";
5
4
  import { RewriteDestination } from "void/routes";
5
+ declare const VOID_SOCIAL_AUTH_PROVIDERS: readonly ["apple", "atlassian", "cognito", "discord", "dropbox", "facebook", "figma", "github", "gitlab", "google", "huggingface", "kakao", "kick", "line", "linear", "linkedin", "microsoft", "naver", "notion", "paybin", "paypal", "polar", "railway", "reddit", "roblox", "salesforce", "slack", "spotify", "tiktok", "twitch", "twitter", "vercel", "vk", "zoom"];
6
+ declare const VOID_EMAIL_AUTH_PROVIDER = "email";
7
+ declare const VOID_AUTH_PROVIDERS: readonly [typeof VOID_EMAIL_AUTH_PROVIDER, ...typeof VOID_SOCIAL_AUTH_PROVIDERS];
8
+ type VoidAuthProvider = (typeof VOID_AUTH_PROVIDERS)[number];
6
9
  type SandboxInstanceType = "lite" | "basic" | "standard-1" | "standard-2" | "standard-3" | "standard-4";
7
10
  type SandboxConfig = {
8
11
  binding?: string;
@@ -20,6 +23,7 @@ type RedirectDestination = string | {
20
23
  };
21
24
  /** Drizzle's `casing`: how a column declared without a name is named in the database. */
22
25
  type DatabaseCasing = "snake_case" | "camelCase";
26
+ type MySqlAuthDateType = "timestamp" | "datetime";
23
27
  /** Object form of `database`, for options next to the dialect. */
24
28
  type DatabaseConfig = {
25
29
  /** Database backend. Defaults to `"sqlite"` (D1). */
@@ -28,6 +32,8 @@ type DatabaseConfig = {
28
32
  casing?: DatabaseCasing;
29
33
  /** Enable or disable D1 read replication during deployment. Omit to preserve existing settings. */
30
34
  readReplication?: boolean;
35
+ /** MySQL column type for generated auth dates. Defaults to "timestamp" for existing projects. */
36
+ authDateType?: MySqlAuthDateType;
31
37
  };
32
38
  /** Curated Worker fields accepted by the `worker` config field. */
33
39
  type WranglerConfig = {
@@ -83,6 +89,8 @@ type InferenceConfig = {
83
89
  storage?: boolean | string;
84
90
  ai?: boolean | string;
85
91
  email?: boolean;
92
+ /** `false` to force disable Browser Run even when the app renders `void/image`. */
93
+ browser?: boolean | string;
86
94
  };
87
95
  scanDirs?: ReadonlyArray<string>;
88
96
  build?: string;
@@ -191,6 +199,8 @@ type VoidConfig = {
191
199
  sourceDir?: string;
192
200
  target?: "cloudflare" | "node" | "bun" | "deno";
193
201
  output?: "server" | "static";
202
+ /** Write Brotli and gzip copies of built client assets and serve them. Applies to Node.js and Bun targets. Omitted means on; `false` turns it off. */
203
+ precompress?: boolean;
194
204
  auth?: AuthConfig;
195
205
  head?: HeadConfig;
196
206
  routing?: RoutingConfig;
@@ -204,4 +214,4 @@ type VoidConfig = {
204
214
  ai?: AiConfig;
205
215
  email?: EmailConfig;
206
216
  };
207
- export { VoidConfig as t };
217
+ export { VoidConfig as n, VoidAuthProvider as r, MySqlAuthDateType as t };
@@ -1,5 +1,5 @@
1
- import { t as discoverSchema } from "./discover-IcspacCg.mjs";
2
- import { n as readProjectPaths } from "./project-paths-2ENfCCih.mjs";
1
+ import { t as discoverSchema } from "./discover-BeFs7OPS.mjs";
2
+ import { n as readProjectPaths } from "./project-paths-BeAxxqGh.mjs";
3
3
  import { t as asAstProgram } from "./ast-BkPQu7A0.mjs";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
  import { isRunnableDevEnvironment, parseSync, runnerImport } from "vite";
@@ -1,7 +1,7 @@
1
1
  import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
2
- import { c as getDatabaseCasing, p as readConfig } from "./config-Dv5jri1-.mjs";
3
- import { i as resolveProjectPaths } from "./project-paths-2ENfCCih.mjs";
4
- import { n as schemaSpecifier, t as discoverSchema } from "./discover-IcspacCg.mjs";
2
+ import { h as readConfig, l as getDatabaseCasing } from "./config-KZAiI3gG.mjs";
3
+ import { i as resolveProjectPaths } from "./project-paths-BeAxxqGh.mjs";
4
+ import { n as schemaSpecifier, t as discoverSchema } from "./discover-BeFs7OPS.mjs";
5
5
  import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
6
6
  import { tmpdir } from "node:os";
7
7
  // src/drizzle/config.ts
@@ -1 +1 @@
1
- export { t as PLACEHOLDER_DB_URL, n as withPrivateDrizzleConfig, r as writeDrizzleConfig } from "./config-BSoW3QCB.mjs";
1
+ export { t as PLACEHOLDER_DB_URL, n as withPrivateDrizzleConfig, r as writeDrizzleConfig } from "./config-C_UjzkVS.mjs";
@@ -1,5 +1,5 @@
1
1
  import { a as isVoidAuthProvider, t as VOID_AUTH_PROVIDERS } from "./providers-ZARwX2cL.mjs";
2
- import { a as validateSourceDir, c as loadVoidConfig } from "./project-paths-2ENfCCih.mjs";
2
+ import { a as validateSourceDir, l as loadVoidConfig } from "./project-paths-BeAxxqGh.mjs";
3
3
  import { n as MimeError, o as parseAddress } from "./mime-Btw9R3CC.mjs";
4
4
  import { R2_LOCATION_HINTS, isR2LocationHint, isRecord } from "@void/deploy-core";
5
5
  // src/config.ts
@@ -199,6 +199,10 @@ function validateConfigObject(obj) {
199
199
  if (obj.output !== void 0) {
200
200
  if (typeof obj.output !== "string" || !VALID_OUTPUTS.has(obj.output)) throw new Error(`config: "output" in ${CONFIG_FILE} must be one of: server, static.`);
201
201
  }
202
+ if (obj.precompress !== void 0) {
203
+ if (typeof obj.precompress !== "boolean") throw new Error(`config: "precompress" in ${CONFIG_FILE} must be a boolean.`);
204
+ if (obj.precompress && obj.target !== "node" && obj.target !== "bun") throw new Error(`config: "precompress" in ${CONFIG_FILE} requires target: "node" or "bun".`);
205
+ }
202
206
  if (obj.storage !== void 0) {
203
207
  if (!isRecord(obj.storage) || Object.keys(obj.storage).some((key) => key !== "locationHint") || obj.storage.locationHint !== void 0 && !isR2LocationHint(obj.storage.locationHint)) throw new Error(`config: "storage.locationHint" in ${CONFIG_FILE} must be one of: ${R2_LOCATION_HINTS.join(", ")}.`);
204
208
  if (obj.storage.locationHint !== void 0 && isNodeTarget(obj.target)) throw new Error(`config: "storage.locationHint" in ${CONFIG_FILE} requires target: "cloudflare".`);
@@ -314,8 +318,9 @@ function validateConfigObject(obj) {
314
318
  "kv",
315
319
  "storage",
316
320
  "ai",
317
- "email"
318
- ].includes(key)) throw new Error(`config: Unknown binding '${key}' in ${CONFIG_FILE}. Valid: db, kv, storage, ai, email.`);
321
+ "email",
322
+ "browser"
323
+ ].includes(key)) throw new Error(`config: Unknown binding '${key}' in ${CONFIG_FILE}. Valid: db, kv, storage, ai, email, browser.`);
319
324
  if (key === "email") {
320
325
  if (typeof b[key] !== "boolean") throw new Error(`config: "inference.bindings.${key}" in ${CONFIG_FILE} must be a boolean.`);
321
326
  } else if (typeof b[key] !== "boolean" && typeof b[key] !== "string") throw new Error(`config: "inference.bindings.${key}" in ${CONFIG_FILE} must be a boolean or a string custom binding name.`);
@@ -379,14 +384,18 @@ function validateConfigObject(obj) {
379
384
  if (obj.database !== void 0) {
380
385
  if (isRecord(obj.database)) {
381
386
  const databaseCfg = obj.database;
382
- for (const key of Object.keys(databaseCfg)) if (key !== "dialect" && key !== "casing" && key !== "readReplication") throw new Error(`config: Unknown key 'database.${key}' in ${CONFIG_FILE}. Valid: dialect, casing, readReplication.`);
387
+ for (const key of Object.keys(databaseCfg)) if (key !== "dialect" && key !== "casing" && key !== "readReplication" && key !== "authDateType") throw new Error(`config: Unknown key 'database.${key}' in ${CONFIG_FILE}. Valid: dialect, casing, readReplication, authDateType.`);
383
388
  if (databaseCfg.dialect !== void 0 && (typeof databaseCfg.dialect !== "string" || !VALID_DATABASE_DIALECTS.has(databaseCfg.dialect))) throw new Error(`config: "database.dialect" in ${CONFIG_FILE} must be "sqlite", "pg" or "mysql".`);
384
389
  if (databaseCfg.casing !== void 0 && (typeof databaseCfg.casing !== "string" || !VALID_DATABASE_CASINGS.has(databaseCfg.casing))) throw new Error(`config: "database.casing" in ${CONFIG_FILE} must be "snake_case" or "camelCase".`);
385
390
  if (databaseCfg.readReplication !== void 0) {
386
391
  if (typeof databaseCfg.readReplication !== "boolean") throw new Error(`config: "database.readReplication" in ${CONFIG_FILE} must be a boolean.`);
387
392
  if (databaseCfg.dialect !== void 0 && databaseCfg.dialect !== "sqlite") throw new Error(`config: "database.readReplication" in ${CONFIG_FILE} is only supported for D1 (sqlite).`);
388
393
  }
389
- } else if (typeof obj.database !== "string" || !VALID_DATABASE_VALUES.has(obj.database)) throw new Error(`config: "database" in ${CONFIG_FILE} must be "pg", "mysql" or an object with "dialect", "casing" and "readReplication".`);
394
+ if (databaseCfg.authDateType !== void 0) {
395
+ if (databaseCfg.authDateType !== "timestamp" && databaseCfg.authDateType !== "datetime") throw new Error(`config: "database.authDateType" in ${CONFIG_FILE} must be "timestamp" or "datetime".`);
396
+ if (databaseCfg.dialect !== "mysql") throw new Error(`config: "database.authDateType" in ${CONFIG_FILE} is only supported for MySQL.`);
397
+ }
398
+ } else if (typeof obj.database !== "string" || !VALID_DATABASE_VALUES.has(obj.database)) throw new Error(`config: "database" in ${CONFIG_FILE} must be "pg", "mysql" or an object with "dialect", "casing", "readReplication" or "authDateType".`);
390
399
  }
391
400
  if (obj.ai !== void 0) {
392
401
  if (!isRecord(obj.ai)) throw new Error(`config: "ai" in ${CONFIG_FILE} must be an object.`);
@@ -422,6 +431,15 @@ function parseEmailFrom(value) {
422
431
  throw new Error(`config: "email.from" in ${CONFIG_FILE} must be a single email address, optionally with a display name (e.g. "Acme <noreply@mail.acme.com>").${detail}`, { cause: error });
423
432
  }
424
433
  }
434
+ /**
435
+ * Whether the build writes and the app serves precompressed client assets.
436
+ * Deno is left out: Hono's Deno `serveStatic` (`hono/deno` 4.13.23, `@hono/deno` 1.0.3)
437
+ * leaves the uncompressed file open each time it sends a precompressed copy instead,
438
+ * so file descriptors run out.
439
+ */
440
+ function precompressesAssets(config) {
441
+ return (config.target === "node" || config.target === "bun") && config.precompress !== false;
442
+ }
425
443
  /** Returns true if the target is a non-Cloudflare runtime (Node.js, Bun, Deno). */
426
444
  function isNodeTarget(target) {
427
445
  return target === "node" || target === "bun" || target === "deno";
@@ -450,6 +468,10 @@ function resolveBindingNames(bindings) {
450
468
  names.ai = bindings.ai;
451
469
  hasCustom = true;
452
470
  }
471
+ if (typeof bindings.browser === "string") {
472
+ names.browser = bindings.browser;
473
+ hasCustom = true;
474
+ }
453
475
  return hasCustom ? names : void 0;
454
476
  }
455
477
  /**
@@ -470,6 +492,10 @@ function getDatabaseCasing(config) {
470
492
  const database = config.database;
471
493
  return typeof database === "object" && database !== null ? database.casing : void 0;
472
494
  }
495
+ function getDatabaseAuthDateType(config) {
496
+ const database = config.database;
497
+ return typeof database === "object" && database !== null ? database.authDateType : void 0;
498
+ }
473
499
  /**
474
500
  * The `database` value for a dialect that keeps the configured casing. Without casing it is
475
501
  * the string shorthand, or undefined for the default D1 (SQLite).
@@ -583,4 +609,4 @@ function convertRewriteRules(caller, entries, field, force) {
583
609
  }
584
610
  return rules.length > 0 ? rules : void 0;
585
611
  }
586
- export { convertRewritesConfig as a, getDatabaseCasing as c, isProtocolRelative as d, parseHostPrefixedSource as f, validateConfig as h, convertRedirectsConfig as i, getDatabaseDialect as l, resolveBindingNames as m, convertFallbacksConfig as n, countSplats as o, readConfig as p, convertHeadersConfig as r, databaseConfigValue as s, VALID_REDIRECT_STATUSES as t, isNodeTarget as u };
612
+ export { validateConfig as _, convertRewritesConfig as a, getDatabaseAuthDateType as c, isNodeTarget as d, isProtocolRelative as f, resolveBindingNames as g, readConfig as h, convertRedirectsConfig as i, getDatabaseCasing as l, precompressesAssets as m, convertFallbacksConfig as n, countSplats as o, parseHostPrefixedSource as p, convertHeadersConfig as r, databaseConfigValue as s, VALID_REDIRECT_STATUSES as t, getDatabaseDialect as u };
@@ -1,4 +1,4 @@
1
- import { t as VoidConfig } from "./config-DA6ZbLXO.mjs";
1
+ import { n as VoidConfig } from "./config-BdmM5ZzP.mjs";
2
2
  /** Define a typed Void project configuration without loading the Vite plugin. */
3
3
  export declare function defineConfig<const T extends VoidConfig>(config: T): T;
4
4
  export type { VoidConfig };
@@ -0,0 +1,80 @@
1
+ import { a as join } from "./dist-DMYe8CZJ.mjs";
2
+ import { c as loadTypedVoidConfigFile, s as TYPED_CONFIG_FILE } from "./project-paths-BeAxxqGh.mjs";
3
+ import { _ as validateConfig } from "./config-KZAiI3gG.mjs";
4
+ import { existsSync, readFileSync, writeFileSync } from "node:fs";
5
+ import { parseSync } from "vite";
6
+ import { createHash } from "node:crypto";
7
+ // src/config-write.ts
8
+ const DEPLOY_CONFIG_MARKER = "// Generated by void deploy. ";
9
+ const GENERATED_MARKERS = [
10
+ "// Generated by void migrate.",
11
+ "// Generated from void.json by void migrate.",
12
+ "// Generated by void init."
13
+ ];
14
+ function renderVoidConfig(config, marker = GENERATED_MARKERS[0]) {
15
+ return `${marker}\n${renderConfigBody(config)}`;
16
+ }
17
+ function renderConfigBody(config) {
18
+ return `import { defineConfig } from 'void/config';\n\nexport default defineConfig(${JSON.stringify(config, null, 2)});\n`;
19
+ }
20
+ function deployConfigMarker(body) {
21
+ return DEPLOY_CONFIG_MARKER + createHash("sha256").update(body).digest("hex");
22
+ }
23
+ function renderDeploySeedConfig(config) {
24
+ const body = renderConfigBody(config);
25
+ return `${deployConfigMarker(body)}\n${body}`;
26
+ }
27
+ function isUnchangedDeploySeed(source) {
28
+ if (!source.startsWith(DEPLOY_CONFIG_MARKER)) return false;
29
+ const newline = source.indexOf("\n");
30
+ const body = source.slice(newline + 1).replaceAll("\r\n", "\n");
31
+ return source.slice(0, newline).trimEnd() === deployConfigMarker(body);
32
+ }
33
+ function isStaticValue(node) {
34
+ if (!node) return false;
35
+ if (node.type === "Literal") return node.value === null || [
36
+ "string",
37
+ "number",
38
+ "boolean"
39
+ ].includes(typeof node.value);
40
+ if (node.type === "UnaryExpression") return node.operator === "-" && node.argument?.type === "Literal" && typeof node.argument.value === "number";
41
+ if (node.type === "ArrayExpression") return node.elements?.every(isStaticValue) ?? false;
42
+ if (node.type !== "ObjectExpression") return false;
43
+ return node.properties?.every((property) => property.type === "Property" && property.kind === "init" && !property.computed && !property.method && (property.key?.type === "Identifier" || property.key?.type === "Literal") && isStaticValue(property.value)) ?? false;
44
+ }
45
+ function isGeneratedStaticConfig(source) {
46
+ const [line] = source.split("\n", 1);
47
+ const marker = line.trimEnd();
48
+ if (!(marker.startsWith(DEPLOY_CONFIG_MARKER) && /^[a-f0-9]{64}$/.test(marker.slice(29))) && !GENERATED_MARKERS.includes(marker)) return false;
49
+ let program;
50
+ try {
51
+ const parsed = parseSync(TYPED_CONFIG_FILE, source, {
52
+ lang: "js",
53
+ sourceType: "module",
54
+ preserveParens: false,
55
+ showSemanticErrors: true
56
+ });
57
+ if (parsed.errors.length > 0 || parsed.comments.length !== 1 || `// ${parsed.comments[0]?.value.trim()}` !== marker) return false;
58
+ program = parsed.program;
59
+ } catch {
60
+ return false;
61
+ }
62
+ const [importDeclaration, exportDeclaration] = program.body ?? [];
63
+ const call = exportDeclaration?.declaration;
64
+ return program.body?.length === 2 && importDeclaration?.type === "ImportDeclaration" && importDeclaration.source?.value === "void/config" && importDeclaration.specifiers?.length === 1 && importDeclaration.specifiers[0]?.imported?.name === "defineConfig" && importDeclaration.specifiers[0]?.local?.name === "defineConfig" && exportDeclaration?.type === "ExportDefaultDeclaration" && call?.type === "CallExpression" && call.callee?.name === "defineConfig" && call.arguments?.length === 1 && isStaticValue(call.arguments[0]);
65
+ }
66
+ function canRewriteVoidProjectConfig(root) {
67
+ const path = join(root, TYPED_CONFIG_FILE);
68
+ return !existsSync(path) || isGeneratedStaticConfig(readFileSync(path, "utf8"));
69
+ }
70
+ /** Update CLI-owned static config without silently rewriting authored TypeScript. */
71
+ function writeVoidProjectConfig(root, config) {
72
+ validateConfig(config, TYPED_CONFIG_FILE);
73
+ const path = join(root, TYPED_CONFIG_FILE);
74
+ if (existsSync(path)) {
75
+ if (!isGeneratedStaticConfig(readFileSync(path, "utf8"))) throw new Error(`config: ${TYPED_CONFIG_FILE} contains authored TypeScript or comments. Update it directly and rerun the command.`);
76
+ validateConfig(loadTypedVoidConfigFile(path), TYPED_CONFIG_FILE);
77
+ }
78
+ writeFileSync(path, renderVoidConfig(config, "// Generated by void init."));
79
+ }
80
+ export { renderVoidConfig as a, renderDeploySeedConfig as i, canRewriteVoidProjectConfig as n, writeVoidProjectConfig as o, isUnchangedDeploySeed as r, GENERATED_MARKERS as t };
@@ -1,12 +1,13 @@
1
- import { K as select, L as log, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
2
- import { d as readPlatformToken } from "./auth-CqwJwItO.mjs";
3
- import { a as isExpiredTokenError, r as PlatformClient } from "./client-DE2m2ldh.mjs";
4
- import { t as connectCloudflare } from "./cloudflare-connect-BgpHcSg3.mjs";
5
- import { t as promptForLoginToken } from "./login-CWFr-G2I.mjs";
6
- import { y as printSuccess } from "./output-BZLnu0z8.mjs";
7
- import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-m6Asj6nO.mjs";
8
- import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./platform-registry-DHH6fivm.mjs";
9
- import { c as writeDeploymentPlatform, l as writePlatformSelection, n as readDeploymentPlatform } from "./project-dh9431bN.mjs";
1
+ import { d as readPlatformToken } from "./auth-CeBmolb-.mjs";
2
+ import { a as isExpiredTokenError, r as PlatformClient } from "./client-BEHI4UWn.mjs";
3
+ import { t as connectCloudflare } from "./cloudflare-connect-bEtneBjT.mjs";
4
+ import { L as log, tt as isCancel } from "./dist-BngS28id.mjs";
5
+ import { a as select } from "./interactive-prompts-EK0dilFu.mjs";
6
+ import { t as promptForLoginToken } from "./login-DaugBfBG.mjs";
7
+ import { y as printSuccess } from "./output-DhJgS6Ve.mjs";
8
+ import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-CLRU3BRb.mjs";
9
+ import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./platform-registry-zHH3RiIm.mjs";
10
+ import { c as writeDeploymentPlatform, l as writePlatformSelection, n as readDeploymentPlatform } from "./project-DC-BqHef.mjs";
10
11
  // src/cli/connect.ts
11
12
  async function selectVoidPlatform(interactive) {
12
13
  if (!interactive) throw new Error("connect: Supply a Void platform URL in non-interactive mode.");