void 1.6.2 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/dist/{account-cmd-D903EEWQ.mjs → account-cmd-CZKntRH2.mjs} +6 -6
  2. package/dist/action-key-ByZ6DDld.mjs +64 -0
  3. package/dist/{application-analysis-DlUG-XNT.mjs → application-analysis-CyTagJQM.mjs} +31 -10
  4. package/dist/{application-routing-GCBSwXA9.mjs → application-routing-BLrMVpqi.mjs} +2 -1
  5. package/dist/{auth-CL-p_rqV.mjs → auth-BN0NU9dz.mjs} +1 -1
  6. package/dist/{auth-CH4PLAX1.d.mts → auth-Bk9VGtQW.d.mts} +9 -2
  7. package/dist/{auth-Dy8svcqQ.mjs → auth-CCk9Seol.mjs} +2 -2
  8. package/dist/{auth-YVjBX5NY.mjs → auth-DyWp-fSo.mjs} +7 -1
  9. package/dist/{auth-link-g9J7MSmP.mjs → auth-link-BOaQWMKw.mjs} +6 -6
  10. package/dist/{auth-router-DMZbG9Qn.mjs → auth-router-D0-VcmDs.mjs} +3 -3
  11. package/dist/{better-auth-shared-BJyG2mH0.d.mts → better-auth-shared-CQFdtguU.d.mts} +2 -2
  12. package/dist/{better-auth-shared-C958aM7W.mjs → better-auth-shared-CdVyCUou.mjs} +1 -1
  13. package/dist/boundary-plans-CRmWH68v.d.mts +25 -0
  14. package/dist/{build-cmd-DmjbuT6d.mjs → build-cmd-JTsXXf2F.mjs} +5 -5
  15. package/dist/{cache-2khBO1MR.mjs → cache-D0m3Z_Xf.mjs} +5 -5
  16. package/dist/{cancel-deploy-_itbbvY3.mjs → cancel-deploy-Ce6Os4fa.mjs} +4 -4
  17. package/dist/{cf-build-output-B1C8U83u.mjs → cf-build-output-CWNOH-KA.mjs} +2 -1
  18. package/dist/cf-build-output-DUZnAeZ1.mjs +1 -0
  19. package/dist/{cf-config-migrate-Dy8MrKgF.mjs → cf-config-migrate-Bb-EdAQq.mjs} +5 -1
  20. package/dist/cli/cli.mjs +68 -1868
  21. package/dist/cli/cloudflare-operation-process.mjs +101 -26
  22. package/dist/cli/env-schema-probe.d.mts +1 -1
  23. package/dist/cli/env-schema-probe.mjs +3 -3
  24. package/dist/cli-main-rkrJy2Ge.mjs +1889 -0
  25. package/dist/client-D1Vz1Zep.mjs +1 -0
  26. package/dist/{client-CoxPEhJq.mjs → client-SZPyj4X_.mjs} +10 -4
  27. package/dist/{cloudflare-auth-CuS42-9A.mjs → cloudflare-auth-7jTqy9Bx.mjs} +1 -1
  28. package/dist/{cloudflare-cmd-DTF19-j-.mjs → cloudflare-cmd-ChPLQcTP.mjs} +5 -5
  29. package/dist/{cloudflare-config-Ce8j5S7V.mjs → cloudflare-config-DtOGAbeB.mjs} +2 -2
  30. package/dist/{cloudflare-connect-BN4dHp8i.mjs → cloudflare-connect-Co93VYTo.mjs} +3 -3
  31. package/dist/{cloudflare-operations-DrZGzQap.mjs → cloudflare-operations-CXaDKYj2.mjs} +6 -6
  32. package/dist/{cloudflare-operations-laxRA8HN.mjs → cloudflare-operations-DATekLwI.mjs} +1 -1
  33. package/dist/{cloudflare-process-D9aC-jXr.mjs → cloudflare-process-DmTxZR-N.mjs} +2 -2
  34. package/dist/{config-hL-S-Y9D.mjs → config-5oSQhZNj.mjs} +3 -1
  35. package/dist/{config-CPxJmt4M.d.mts → config-CTlUaXWZ.d.mts} +3 -1
  36. package/dist/{config-CNDjO-15.mjs → config-DcqUBGCb.mjs} +1 -1
  37. package/dist/config-entry.d.mts +1 -1
  38. package/dist/{config-DMR0i3Z2.mjs → config-wo2EaH0X.mjs} +1 -1
  39. package/dist/{connect-DHepM7Xs.mjs → connect-DlvXt1JR.mjs} +7 -7
  40. package/dist/{create-project-Bq0M8MtO.mjs → create-project-CC_7hmYJ.mjs} +5 -5
  41. package/dist/{create-project-BiMmR5wA.mjs → create-project-DzY05xqC.mjs} +1 -1
  42. package/dist/{db-CqfT6lhV.mjs → db-FhyYGcJJ.mjs} +39 -39
  43. package/dist/{db-types-DRmxBJ2K.mjs → db-types-sVwEpyPR.mjs} +4 -2
  44. package/dist/{delete-CY4L8fi2.mjs → delete-CModjyOC.mjs} +5 -5
  45. package/dist/{deploy-La_Ly8g_.mjs → deploy-Cz9TEzZy.mjs} +502 -110
  46. package/dist/deploy-DMieisRu.mjs +2 -0
  47. package/dist/{deploy-managed-static-CESLfKHN.mjs → deploy-managed-static-DlxxXkAM.mjs} +16 -16
  48. package/dist/{deploy-transport-DcI6LXhY.mjs → deploy-transport-DUvm6-CR.mjs} +3 -3
  49. package/dist/deploy.mjs +8 -8
  50. package/dist/{dispatch-DM4Xdd2l.mjs → dispatch-CCiaAnSK.mjs} +7 -7
  51. package/dist/{dist-eV_Ep60B.mjs → dist-Cp4b1_T9.mjs} +1 -1
  52. package/dist/{dist-D23AAMxT.mjs → dist-STQXl8ck.mjs} +86 -138
  53. package/dist/{domain-BD1KOQL3.mjs → domain-DvdZPA50.mjs} +6 -6
  54. package/dist/{drizzle-C8MPqt5m.mjs → drizzle-D4V_06-B.mjs} +1 -1
  55. package/dist/{drizzle-lFdzSEa9.mjs → drizzle-DBSpPpU1.mjs} +34 -8
  56. package/dist/{email-XAspopcj.mjs → email-ASpNrfLd.mjs} +10 -10
  57. package/dist/{email-cloudflare-RxIQoPc9.mjs → email-cloudflare-kqoN9jst.mjs} +25 -16
  58. package/dist/{entry-DFBca6aS.mjs → entry-BweGTCgj.mjs} +1 -1
  59. package/dist/{env-DrYUh55t.mjs → env-Bpkg3G5i.mjs} +7 -7
  60. package/dist/{env-CuzZZyjB.mjs → env-UqS-21xi.mjs} +8 -1
  61. package/dist/env-mask-D31Qztl9.mjs +46 -0
  62. package/dist/{env-public-CeNeO_AT.d.mts → env-public-DtJL_hZq.d.mts} +8 -7
  63. package/dist/{env-validation-Del3C8AY.mjs → env-validation-BpCCQE_6.mjs} +6 -6
  64. package/dist/{env-validation-Bosj7EVg.mjs → env-validation-CN386Utu.mjs} +1 -1
  65. package/dist/{fetch-C8yhLoF3.mjs → fetch-CAIVkLvW.mjs} +1 -1
  66. package/dist/{fetch-B-gLGYVl.d.mts → fetch-CbI6lNnk.d.mts} +6 -4
  67. package/dist/{fetch-stream-DafNtVJC.mjs → fetch-stream-6Op0qlLd.mjs} +1 -1
  68. package/dist/{fetch-stream-DuwxWmBM.d.mts → fetch-stream-DoED9atq.d.mts} +1 -1
  69. package/dist/gen-M5fNQKfH.mjs +1 -0
  70. package/dist/{gen-DSkScMIz.mjs → gen-upKJChvd.mjs} +7 -7
  71. package/dist/{github-cmd-CA-lBdkn.mjs → github-cmd-BvMOlb8Z.mjs} +6 -6
  72. package/dist/{handler-BR6Tvjkp.d.mts → handler-BO7Od-z9.d.mts} +22 -8
  73. package/dist/{handler-DnI_au0K.mjs → handler-C9SnmeW1.mjs} +5 -4
  74. package/dist/{headers--cbz6iZ8.mjs → headers-COGEDoMN.mjs} +11 -2
  75. package/dist/help-CItQVDL4.mjs +1 -0
  76. package/dist/{help-1OCFDsRr.mjs → help-TPCjTu6e.mjs} +7 -3
  77. package/dist/index.d.mts +5 -5
  78. package/dist/index.mjs +379 -265
  79. package/dist/{info-BpxpsX0B.mjs → info-EsDyihwf.mjs} +4 -4
  80. package/dist/{init-DpVXO5S-.mjs → init-a4lVagrb.mjs} +33 -32
  81. package/dist/{link-DAXOT-G_.mjs → link-CE55DDzS.mjs} +6 -6
  82. package/dist/{list-BFQ0gcML.mjs → list-CxRthQks.mjs} +7 -7
  83. package/dist/{live-DF4HUl2m.mjs → live-CYJ4KGoR.mjs} +2 -2
  84. package/dist/{live-0xrcVpyq.d.mts → live-Kc55iuOQ.d.mts} +2 -2
  85. package/dist/{local-d1-CLVPP6v7.mjs → local-d1-CFcH9Bx3.mjs} +2 -2
  86. package/dist/{login-RIw7ffPe.mjs → login-AfcSGSmE.mjs} +5 -5
  87. package/dist/login-ZHsAm-I6.mjs +1 -0
  88. package/dist/{logs-B2OeLS4X.mjs → logs-BgRJuvb1.mjs} +6 -6
  89. package/dist/{migrate-DiI50Chz.mjs → migrate-BNAh6m_C.mjs} +5 -5
  90. package/dist/migrate-BflbbZQK.mjs +1 -0
  91. package/dist/nitro.d.mts +5 -0
  92. package/dist/nitro.mjs +27 -8
  93. package/dist/{node-Bc-dBAGL.mjs → node-CXFUw0Uz.mjs} +5 -5
  94. package/dist/{operator-args-D79WQP70.mjs → operator-args-DGTuCdSE.mjs} +9 -1
  95. package/dist/{operator-auth-CfDcmzpo.mjs → operator-auth-CD3pap65.mjs} +1 -1
  96. package/dist/{operator-client-BIY4-N_6.mjs → operator-client-XvXTkea6.mjs} +2 -2
  97. package/dist/{operator-cmd-CEI5Aaza.mjs → operator-cmd-C-viB7Si.mjs} +7 -7
  98. package/dist/operator-cmd-D6qNuJ_z.mjs +1 -0
  99. package/dist/output-BsdnNpxa.mjs +1 -0
  100. package/dist/{output-BCdLioKP.mjs → output-DNVILSz2.mjs} +1 -1
  101. package/dist/pages/client.d.mts +43 -15
  102. package/dist/pages/client.mjs +165 -80
  103. package/dist/pages/index.d.mts +6 -4
  104. package/dist/pages/index.mjs +6 -6
  105. package/dist/pages/islands-plugin.d.mts +1 -1
  106. package/dist/pages/islands-plugin.mjs +13 -2
  107. package/dist/pages/protocol.d.mts +2 -2
  108. package/dist/pages/protocol.mjs +1 -1
  109. package/dist/pages/serialize.d.mts +2 -2
  110. package/dist/pages/serialize.mjs +1 -1
  111. package/dist/{platform-args-Cx1M-7bq.mjs → platform-args-CiYeZmc5.mjs} +1 -1
  112. package/dist/platform-args-DJvF1-kl.mjs +1 -0
  113. package/dist/{platform-auth-config-ZrYm8KVs.mjs → platform-auth-config-Dt2qEc2w.mjs} +10 -10
  114. package/dist/{platform-auth-protection-t6mdY4nn.mjs → platform-auth-protection-B7TaF-PZ.mjs} +8 -8
  115. package/dist/{platform-auth-recovery-XeBmPTXx.mjs → platform-auth-recovery-suXSteJ6.mjs} +7 -7
  116. package/dist/{platform-cmd-EXehmSYA.mjs → platform-cmd-9rvYBBtr.mjs} +9 -9
  117. package/dist/{platform-cmd-C7BevP9b.mjs → platform-cmd-DuAsIxbU.mjs} +1 -1
  118. package/dist/{platform-domain-DR263ObA.mjs → platform-domain-DhH_vDr6.mjs} +5 -5
  119. package/dist/{platform-lifecycle-CN4aXldN.mjs → platform-lifecycle-3uI-E2bF.mjs} +1 -1
  120. package/dist/{platform-lifecycle-BvU_TNji.mjs → platform-lifecycle-CXmXe2xt.mjs} +17 -17
  121. package/dist/{platform-management-_UE1_GM8.mjs → platform-management-BBCHfwji.mjs} +4 -4
  122. package/dist/{platform-management-yS2sve3V.mjs → platform-management-PdrgDQTe.mjs} +1 -1
  123. package/dist/{platform-plans-config-Dx1agneU.mjs → platform-plans-config-BGwkXYDM.mjs} +5 -5
  124. package/dist/{platform-recovery-CPVk9-Q4.mjs → platform-recovery-C8NxXGRR.mjs} +3 -3
  125. package/dist/{platform-setup-Vw1AaUN8.mjs → platform-setup-Casiffqj.mjs} +3 -3
  126. package/dist/{plugin-inference-bQ1Be840.mjs → plugin-inference-CErfTgEx.mjs} +4 -4
  127. package/dist/{prepare-D8L9AQbw.mjs → prepare-BDKWZgfL.mjs} +12 -9
  128. package/dist/{prepare-BkRhDnxw.mjs → prepare-BLrzXjIl.mjs} +3 -3
  129. package/dist/prepare-a1_5usAn.mjs +1 -0
  130. package/dist/{prerender-render-RlAj6hh8.mjs → prerender-render-BAdYhivW.mjs} +44 -15
  131. package/dist/prerender-render.d.mts +12 -2
  132. package/dist/prerender-render.mjs +1 -1
  133. package/dist/{project-cmd-DH3CuFC6.mjs → project-cmd-DzGvxXKH.mjs} +18 -18
  134. package/dist/{project-team-MjT5K4rQ.mjs → project-team-C5XtHbZk.mjs} +5 -5
  135. package/dist/{project-token-BKHGwY3k.mjs → project-token-B4D5yhHQ.mjs} +5 -5
  136. package/dist/{project-tsconfig-BMveFb4b.mjs → project-tsconfig-nhnTWO_Y.mjs} +3 -1
  137. package/dist/{project-zero-trust-Bzdd05-h.mjs → project-zero-trust--0LvktDg.mjs} +5 -5
  138. package/dist/{protocol-COyySMki.mjs → protocol-B1Tvc9-x.mjs} +232 -74
  139. package/dist/{protocol-CkwjASep.d.mts → protocol-Cg2I81NA.d.mts} +13 -4
  140. package/dist/{provision-B0HqoRuI.mjs → provision-C3yiHdld.mjs} +2 -2
  141. package/dist/{provision-CYhZR_Mn.mjs → provision-CAcrauvr.mjs} +1 -1
  142. package/dist/{requests-daJmVpjk.mjs → requests-CrRiTgQA.mjs} +4 -4
  143. package/dist/resolve-project-C5wC-Hoi.mjs +1 -0
  144. package/dist/{resolve-project-D0YNnJfm.mjs → resolve-project-Da3OgCU1.mjs} +1 -1
  145. package/dist/{rollback-AVwiMAkk.mjs → rollback-BsmQyj-Q.mjs} +7 -7
  146. package/dist/{route-types-e69EqY88.mjs → route-types-CgtlFCDz.mjs} +268 -14
  147. package/dist/{route-url-C_YIH_zO.d.mts → route-url-C3JwYrER.d.mts} +8 -3
  148. package/dist/{route-url-CRDF-I0I.mjs → route-url-CfCR4oMj.mjs} +4 -3
  149. package/dist/routes-stub.d.mts +14 -4
  150. package/dist/routes-stub.mjs +1 -1
  151. package/dist/{runner-QMeOpScZ.mjs → runner-CTk21HrO.mjs} +1 -1
  152. package/dist/{runner-mysql-0zVmB1JW.mjs → runner-mysql-CHvEg_sy.mjs} +1 -1
  153. package/dist/runtime/ai.mjs +1 -1
  154. package/dist/runtime/auth.d.mts +2 -2
  155. package/dist/runtime/auth.mjs +1 -1
  156. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  157. package/dist/runtime/better-auth-mysql.mjs +1 -1
  158. package/dist/runtime/better-auth-pg.d.mts +1 -1
  159. package/dist/runtime/better-auth-pg.mjs +1 -1
  160. package/dist/runtime/better-auth.d.mts +1 -1
  161. package/dist/runtime/better-auth.mjs +1 -1
  162. package/dist/runtime/client-react.d.mts +3 -3
  163. package/dist/runtime/client-react.mjs +2 -2
  164. package/dist/runtime/client-solid.d.mts +3 -3
  165. package/dist/runtime/client-solid.mjs +2 -2
  166. package/dist/runtime/client-svelte.d.mts +3 -3
  167. package/dist/runtime/client-svelte.mjs +2 -2
  168. package/dist/runtime/client-vue.d.mts +3 -3
  169. package/dist/runtime/client-vue.mjs +2 -2
  170. package/dist/runtime/client.d.mts +3 -3
  171. package/dist/runtime/client.mjs +2 -2
  172. package/dist/runtime/db.d.mts +6 -3
  173. package/dist/runtime/db.mjs +2 -2
  174. package/dist/runtime/email/testing.mjs +2 -2
  175. package/dist/runtime/email.mjs +3 -3
  176. package/dist/runtime/env-public.d.mts +1 -1
  177. package/dist/runtime/env-public.mjs +55 -85
  178. package/dist/runtime/fetch-server.d.mts +1 -1
  179. package/dist/runtime/fetch-server.mjs +1 -1
  180. package/dist/runtime/fetch-stream.d.mts +2 -2
  181. package/dist/runtime/fetch-stream.mjs +1 -1
  182. package/dist/runtime/fetch.d.mts +1 -1
  183. package/dist/runtime/fetch.mjs +1 -1
  184. package/dist/runtime/handler.d.mts +1 -1
  185. package/dist/runtime/handler.mjs +1 -1
  186. package/dist/runtime/isr.d.mts +3 -1
  187. package/dist/runtime/live-client.d.mts +11 -2
  188. package/dist/runtime/live-client.mjs +8 -0
  189. package/dist/runtime/live-server.mjs +1 -1
  190. package/dist/runtime/live.d.mts +1 -1
  191. package/dist/runtime/live.mjs +1 -1
  192. package/dist/runtime/log.mjs +1 -1
  193. package/dist/runtime/remote/index.mjs +1 -1
  194. package/dist/runtime/route-url.d.mts +2 -2
  195. package/dist/runtime/route-url.mjs +1 -1
  196. package/dist/runtime/routing.d.mts +21 -5
  197. package/dist/runtime/routing.mjs +251 -29
  198. package/dist/runtime/sandbox.mjs +1 -1
  199. package/dist/runtime/sse-client.d.mts +9 -1
  200. package/dist/runtime/sse-client.mjs +7 -0
  201. package/dist/runtime/validator.d.mts +1 -1
  202. package/dist/runtime/validator.mjs +1 -1
  203. package/dist/runtime/ws-server.d.mts +3 -3
  204. package/dist/runtime/ws-server.mjs +1 -1
  205. package/dist/runtime/ws.d.mts +1 -1
  206. package/dist/runtime/ws.mjs +1 -1
  207. package/dist/{scan-F0psanp7.mjs → scan-BJ3bj6aP.mjs} +236 -32
  208. package/dist/{secret-szNdoeKa.mjs → secret-D0g5oBsP.mjs} +7 -7
  209. package/dist/serialize-DN-envGQ.d.mts +18 -0
  210. package/dist/serialize-Pf-CIQK_.mjs +39 -0
  211. package/dist/{skills-D393E4lB.mjs → skills-CoBB9_Ao.mjs} +1 -1
  212. package/dist/{ast-bindings-BkivMJIo.mjs → static-exports-DFkzL-NX.mjs} +96 -33
  213. package/dist/{subcommand-prompt-CxJXporl.mjs → subcommand-prompt-0yIARXf2.mjs} +2 -2
  214. package/dist/{types-agfx0alu.d.mts → types-IPut3_Yx.d.mts} +15 -1
  215. package/dist/url-CuoEn0o3.mjs +43 -0
  216. package/dist/validator-8-NZs2Xr.mjs +168 -0
  217. package/dist/{version-metadata-BC3LK7Y-.mjs → version-metadata-eUd6Ar_U.mjs} +1 -1
  218. package/dist/wrangler-R3kMdJfw.mjs +1 -0
  219. package/dist/{wrangler-Gn4EoY4-.mjs → wrangler-k40T7XTQ.mjs} +2 -2
  220. package/dist/{wrapper-B9W9RE8z.mjs → wrapper-CVMZarxf.mjs} +11 -8
  221. package/dist/{ws-Dmjg5NH2.d.mts → ws--U7QicYy.d.mts} +2 -2
  222. package/docs/guide/ai.md +3 -0
  223. package/docs/guide/app-types.md +1 -0
  224. package/docs/guide/auth.md +63 -0
  225. package/docs/guide/database/d1.md +16 -1
  226. package/docs/guide/database/mysql.md +1 -0
  227. package/docs/guide/database/postgresql.md +1 -0
  228. package/docs/guide/database.md +34 -0
  229. package/docs/guide/deployment.md +9 -0
  230. package/docs/guide/durable-state.md +1 -0
  231. package/docs/guide/edge/headers.md +1 -0
  232. package/docs/guide/edge/prerendering.md +10 -4
  233. package/docs/guide/edge/redirects.md +1 -0
  234. package/docs/guide/edge/revalidation.md +6 -0
  235. package/docs/guide/edge/rewrites.md +1 -0
  236. package/docs/guide/edge/static-assets.md +1 -0
  237. package/docs/guide/email/domains.md +1 -0
  238. package/docs/guide/email/receiving.md +3 -2
  239. package/docs/guide/email/sending.md +3 -2
  240. package/docs/guide/email.md +1 -0
  241. package/docs/guide/env-vars.md +4 -0
  242. package/docs/guide/index.md +1 -0
  243. package/docs/guide/jobs.md +1 -0
  244. package/docs/guide/kv.md +1 -0
  245. package/docs/guide/live.md +3 -0
  246. package/docs/guide/pages-routing/actions-and-forms.md +51 -28
  247. package/docs/guide/pages-routing/errors.md +101 -0
  248. package/docs/guide/pages-routing/head.md +4 -1
  249. package/docs/guide/pages-routing/islands.md +2 -1
  250. package/docs/guide/pages-routing/layouts.md +3 -0
  251. package/docs/guide/pages-routing/loaders.md +3 -0
  252. package/docs/guide/pages-routing/markdown.md +3 -3
  253. package/docs/guide/pages-routing/overview.md +142 -10
  254. package/docs/guide/pages-routing/view-transitions.md +1 -0
  255. package/docs/guide/platform/administration/access.md +1 -0
  256. package/docs/guide/platform/administration/connected-apps.md +4 -0
  257. package/docs/guide/platform/administration/email.md +1 -0
  258. package/docs/guide/platform/administration/operations.md +1 -0
  259. package/docs/guide/platform/administration/plans.md +1 -0
  260. package/docs/guide/platform/administration/projects.md +11 -0
  261. package/docs/guide/platform/administration/zero-trust.md +1 -0
  262. package/docs/guide/platform/development/local.md +1 -0
  263. package/docs/guide/platform/development/runtime.md +1 -0
  264. package/docs/guide/platform/development/schema-ci.md +1 -0
  265. package/docs/guide/platform/installation/ci.md +1 -0
  266. package/docs/guide/platform/installation/credentials.md +1 -0
  267. package/docs/guide/platform/installation/domains.md +1 -0
  268. package/docs/guide/platform/installation/first-deployment.md +1 -0
  269. package/docs/guide/platform/installation/maintenance.md +1 -0
  270. package/docs/guide/platform/installation/prerequisites.md +1 -0
  271. package/docs/guide/platform/installation/setup.md +1 -0
  272. package/docs/guide/platform/installation/uninstall.md +1 -0
  273. package/docs/guide/platform-administration.md +1 -0
  274. package/docs/guide/platform-development.md +1 -0
  275. package/docs/guide/project-collaboration.md +1 -0
  276. package/docs/guide/queues.md +3 -0
  277. package/docs/guide/quickstart.md +4 -2
  278. package/docs/guide/remote-dev.md +1 -0
  279. package/docs/guide/sandboxes.md +1 -0
  280. package/docs/guide/self-hosted-platform.md +1 -0
  281. package/docs/guide/server-routing.md +1 -0
  282. package/docs/guide/sse.md +3 -0
  283. package/docs/guide/ssg.md +24 -2
  284. package/docs/guide/ssr.md +1 -0
  285. package/docs/guide/storage.md +7 -2
  286. package/docs/guide/testing.md +62 -0
  287. package/docs/guide/type-safety.md +308 -26
  288. package/docs/guide/typed-fetch.md +8 -3
  289. package/docs/guide/websockets.md +6 -5
  290. package/docs/index.md +1 -0
  291. package/docs/integrations/agents.md +1 -0
  292. package/docs/integrations/cloudflare.md +11 -10
  293. package/docs/integrations/frameworks/analog.md +1 -0
  294. package/docs/integrations/frameworks/astro.md +1 -0
  295. package/docs/integrations/frameworks/nuxt.md +3 -0
  296. package/docs/integrations/frameworks/overview.md +3 -0
  297. package/docs/integrations/frameworks/react-router.md +1 -0
  298. package/docs/integrations/frameworks/sveltekit.md +1 -0
  299. package/docs/integrations/frameworks/tanstack-start.md +1 -0
  300. package/docs/integrations/hono.md +1 -0
  301. package/docs/integrations/nodejs-bun-deno.md +66 -0
  302. package/docs/reference/api/auth.md +20 -0
  303. package/docs/reference/api/client.md +7 -4
  304. package/docs/reference/api/database.md +24 -1
  305. package/docs/reference/api/deploy.md +4 -0
  306. package/docs/reference/api/durable.md +1 -0
  307. package/docs/reference/api/env.md +1 -0
  308. package/docs/reference/api/handlers.md +4 -1
  309. package/docs/reference/api/pages.md +30 -12
  310. package/docs/reference/api/plugin.md +1 -0
  311. package/docs/reference/api/resources.md +4 -1
  312. package/docs/reference/api/rewrites.md +18 -5
  313. package/docs/reference/api/types.md +10 -2
  314. package/docs/reference/api.md +1 -0
  315. package/docs/reference/cli/auth.md +1 -0
  316. package/docs/reference/cli/database.md +3 -0
  317. package/docs/reference/cli/deploy.md +18 -11
  318. package/docs/reference/cli/domains.md +1 -0
  319. package/docs/reference/cli/email.md +1 -0
  320. package/docs/reference/cli/generate.md +1 -0
  321. package/docs/reference/cli/github.md +1 -0
  322. package/docs/reference/cli/platform-config.md +1 -0
  323. package/docs/reference/cli/platform-email.md +1 -0
  324. package/docs/reference/cli/platform-installation.md +1 -0
  325. package/docs/reference/cli/platform-operations.md +1 -0
  326. package/docs/reference/cli/platform-users.md +23 -0
  327. package/docs/reference/cli/platform-zero-trust.md +1 -0
  328. package/docs/reference/cli/platform.md +1 -0
  329. package/docs/reference/cli/project.md +1 -0
  330. package/docs/reference/cli/secrets.md +1 -0
  331. package/docs/reference/cli/setup.md +1 -0
  332. package/docs/reference/cli.md +6 -0
  333. package/docs/reference/config.md +25 -2
  334. package/docs/reference/resource-inference.md +1 -0
  335. package/docs/reference/structure.md +1 -0
  336. package/package.json +27 -25
  337. package/schema.json +4 -0
  338. package/skills/void/SKILL.md +7 -0
  339. package/dist/action-key-XtKKbbsi.mjs +0 -25
  340. package/dist/cf-build-output-CmDOcA7K.mjs +0 -1
  341. package/dist/client-CEtr5UOR.mjs +0 -1
  342. package/dist/deploy-DMhOyebt.mjs +0 -2
  343. package/dist/gen-BbT1Ku1P.mjs +0 -1
  344. package/dist/help-Ba8Dq5-r.mjs +0 -1
  345. package/dist/login-BX2gzHUt.mjs +0 -1
  346. package/dist/migrate-CUGMGaIM.mjs +0 -1
  347. package/dist/operator-cmd-oTT2MA9G.mjs +0 -1
  348. package/dist/output-E6gecbbV.mjs +0 -1
  349. package/dist/platform-args-C7XUw9mw.mjs +0 -1
  350. package/dist/prepare-CZRVGNld.mjs +0 -1
  351. package/dist/resolve-project-CgfjtOwz.mjs +0 -1
  352. package/dist/serialize-DUuYuaY3.mjs +0 -29
  353. package/dist/serialize-I4EmS-Wf.d.mts +0 -16
  354. package/dist/validator-CTfmzZYb.mjs +0 -69
  355. package/dist/wrangler-CQ5c-MtJ.mjs +0 -1
  356. package/dist/{cf-access-BmBT2h8_.mjs → cf-access-Dnyw8KFY.mjs} +1 -1
  357. package/dist/{config-s6TkpSat.mjs → config-eeDzKBS9.mjs} +1 -1
  358. package/dist/{env-types-Bd8DkQhl.mjs → env-types-Dz9qkiOn.mjs} +1 -1
  359. package/dist/{inbound-CdO-qY0w.mjs → inbound-C2H6Dzz1.mjs} +2 -2
  360. package/dist/{runner-5MCSimKx.mjs → runner-CMZb7jNU.mjs} +1 -1
  361. package/dist/{runner-mysql-Bdmsp_x4.mjs → runner-mysql-BXfcQQj3.mjs} +1 -1
@@ -1,57 +1,58 @@
1
1
  import { n as __toESM, t as __commonJSMin } from "./rolldown-runtime-uD8oG6U2.mjs";
2
+ import { A as confirm, K as select, L as log, tt as isCancel } from "./dist-STQXl8ck.mjs";
2
3
  import { a as join, c as resolve, n as dirname, o as normalize, r as extname, s as relative, t as basename } from "./dist-DMYe8CZJ.mjs";
3
- import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
4
- import { r as detectFramework } from "./plugin-inference-bQ1Be840.mjs";
5
- import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-G0yut6Zz.mjs";
6
- import { m as resolveBindingNames, p as readConfig, r as convertHeadersConfig, u as isNodeTarget } from "./config-hL-S-Y9D.mjs";
7
- import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, o as requiresSandboxPlatformImage, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync } from "./application-analysis-DlUG-XNT.mjs";
8
- import { t as collectMigrations } from "./collect-C6Blu9yw.mjs";
9
- import { o as validateSsrEntry } from "./entry-DFBca6aS.mjs";
10
- import { r as hasEmailHandlers } from "./email-BHY72ixO.mjs";
11
- import { c as VOID_INTERNAL_WORKER_FIRST, d as hasDocumentRoutes, f as resolveAssetConfig, i as readGeneratedAssetHeadersFile, l as edgeRulesNeedWorker, u as hasApiRoutes } from "./headers--cbz6iZ8.mjs";
4
+ import { a as persistCloudflareConfig, c as stashCloudflareDeployPointer, i as materializeCloudflareConfig } from "./cloudflare-config-DtOGAbeB.mjs";
5
+ import { m as resolveBindingNames, p as readConfig, r as convertHeadersConfig, u as isNodeTarget } from "./config-5oSQhZNj.mjs";
6
+ import { r as detectFramework } from "./plugin-inference-CErfTgEx.mjs";
7
+ import { a as buildEnv, i as WRANGLER_AUTH_CREDENTIAL_ENV_VARS, n as readVersionMetadataBinding, r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-eUd6Ar_U.mjs";
8
+ import { a as getApiUrl, c as getToken, l as getTokenSource } from "./auth-CCk9Seol.mjs";
9
+ import { a as isExpiredTokenError, r as PlatformClient } from "./client-SZPyj4X_.mjs";
12
10
  import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
13
- import { s as listPlatformConnections } from "./platform-registry-DZ_2Xuqd.mjs";
11
+ import { r as discoverFrameworkWranglerFiles, t as migrateLegacyVoidConfig } from "./migrate-BNAh6m_C.mjs";
14
12
  import { c as writeDeploymentPlatform, n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
13
+ import { a as FRAMEWORK_PRESETS, c as hasBackendFiles, i as isCleanCloudflareExit, l as resolveCloudflareOperationArgv, o as detectPreset, s as formatProjectCommand, t as createCloudflareProcessRunner, u as resolveProjectCommand } from "./cloudflare-process-DmTxZR-N.mjs";
14
+ import { n as redactMessage } from "./env-mask-D31Qztl9.mjs";
15
+ import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, o as requiresSandboxPlatformImage, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync } from "./application-analysis-CyTagJQM.mjs";
16
+ import { A as syncWranglerWebSockets, C as readWranglerManagedQueueCleanupCandidates, D as sameMigrationsDir, E as resolveLiveBindingConfig, L as writeVoidProjectConfig, M as writeProvisionedWranglerConfig, N as writeWranglerPublishedTrafficSnapshot, a as LIVE_MIGRATION_TAG, c as bindingEntriesForField, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, o as acknowledgeWranglerManagedQueueRemovals, r as FRIENDLY_BINDING_NAMES, v as readExistingLiveBindingConfig, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-k40T7XTQ.mjs";
17
+ import { A as promptDeployProjectConfig, C as ensureManagedHyperdrive, D as hasNonPageBackend, E as getGitCommit, F as resolveStaticBuildCommand, I as resolveStaticDeployPreset, L as toManifestSchedulesAndQueues, M as resolveDeployWorkerMain, N as resolveDeployWranglerCompat, O as hasPrerenderSources, P as resolveFullDeployBuildCommand, R as validateDeployMigrations, S as createProjectFromSlug, T as getExitCode, _ as getDeploySchemaDriftMessage, a as collectAndHashAssets, b as assertProjectDeployAccess, c as readWranglerHtmlHandling, d as printDeploySuccess, f as mergeAndLintRoutingRules, g as assertDeploySchemaDriftFree, h as warnUnpublishedRouting, i as buildStaticManifest, j as resolveDeployLiveBindingConfig, k as log$1, l as formatDeploySummary, m as warnIgnoredNotFoundForFramework, n as runStaticDeploy, o as collectWorkerFiles, p as streamDirectR2Deploy, r as buildFrameworkManifest, s as detectNonSpaFallbackWarning, t as assembleVoidManifest, u as printDeployContext, v as hasDeploySchemaDrift, w as generateDeployWrapperIfNeeded, x as assertWorkerMainUploaded, y as assertEnvSchemaValid } from "./deploy-managed-static-DlxxXkAM.mjs";
18
+ import { n as completeApplicationAnalysis, t as analyzeApplication } from "./application-routing-BLrMVpqi.mjs";
19
+ import { a as resolveDistDir, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate } from "./isr-config-Czzb4mIq.mjs";
20
+ import { i as otherQueueConsumers, n as chooseCloudflareQueueName, o as scopedCloudflareQueueName, r as cloudflareQueueName } from "./dispatch-CCiaAnSK.mjs";
21
+ import { r as hasEmailHandlers } from "./email-BHY72ixO.mjs";
22
+ import { a as checkCloudflareProvisionDrift, b as resolveWorkersDevComplianceRegion, d as isQueueConfirmedAbsent, f as isRealD1Id, g as provisionCloudflareResources, i as assertValidResourceName, m as isRealKvId, s as deleteEnvVarCaseAware } from "./provision-C3yiHdld.mjs";
23
+ import { c as scrubWranglerAuthCredentials, n as buildSchemaProbeEnv, o as resolveDeployTransport, r as deployChildEnv, s as scrubManagedDeployBuildMarkers, t as MANAGED_DEPLOY_BUILD_ENV } from "./deploy-transport-DUvm6-CR.mjs";
24
+ import { f as listSelfHostSecretNames, h as selfHostSchemaFailureMessage, i as SelfHostSecretListError, l as dischargeSelfHostEnvContext, n as SelfHostFirstDeployError, p as readEmittedWorkerVars, r as SelfHostSchemaError, s as deriveSelfHostEnvContextFromVars, t as SelfHostEnvValidationError } from "./env-validation-BpCCQE_6.mjs";
15
25
  import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
16
- import { a as persistCloudflareConfig, c as stashCloudflareDeployPointer, i as materializeCloudflareConfig } from "./cloudflare-config-Ce8j5S7V.mjs";
17
- import { A as syncWranglerWebSockets, C as readWranglerManagedQueueCleanupCandidates, D as sameMigrationsDir, E as resolveLiveBindingConfig, L as writeVoidProjectConfig, M as writeProvisionedWranglerConfig, N as writeWranglerPublishedTrafficSnapshot, a as LIVE_MIGRATION_TAG, c as bindingEntriesForField, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, o as acknowledgeWranglerManagedQueueRemovals, r as FRIENDLY_BINDING_NAMES, v as readExistingLiveBindingConfig, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-Gn4EoY4-.mjs";
26
+ import { o as formatCount, p as note, r as createSpinner, u as getErrorMessage } from "./output-DNVILSz2.mjs";
27
+ import { t as collectMigrations } from "./collect-C6Blu9yw.mjs";
28
+ import { n as openMigrationValidationDatabase, t as SqliteMigrationError } from "./sqlite-validation-CLJXXN93.mjs";
29
+ import { n as CLOUDFLARE_QUEUE_NAMES_BUILD_ENV, t as CLOUDFLARE_DEPLOY_BUILD_ENV, u as resolveRemoteMode } from "./env-UqS-21xi.mjs";
30
+ import { n as prepareCfFrameworkBuildOutput, r as prepareCfStaticBuildOutput, t as prepareCfBuildOutput } from "./cf-build-output-CWNOH-KA.mjs";
31
+ import { c as VOID_INTERNAL_WORKER_FIRST, d as hasDocumentRoutes, f as resolveAssetConfig, i as readGeneratedAssetHeadersFile, l as edgeRulesNeedWorker, u as hasApiRoutes } from "./headers-COGEDoMN.mjs";
32
+ import { o as validateSsrEntry } from "./entry-BweGTCgj.mjs";
33
+ import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, t as CloudflareAuthenticationError } from "./cloudflare-auth-7jTqy9Bx.mjs";
18
34
  import { r as trustedCloudflareWorkerAccessHeaders, t as cfAccessHeaders } from "./cf-access-pejlJmuy.mjs";
19
- import { t as ensurePlatformAccessToken } from "./cf-access-BmBT2h8_.mjs";
20
- import { a as getApiUrl, c as getToken, l as getTokenSource } from "./auth-Dy8svcqQ.mjs";
21
- import { n as record, t as migrateBuiltWranglerConfig } from "./cf-config-migrate-Dy8MrKgF.mjs";
22
- import { l as resolveRemoteMode, n as CLOUDFLARE_QUEUE_NAMES_BUILD_ENV, t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-CuzZZyjB.mjs";
23
- import { i as otherQueueConsumers, n as chooseCloudflareQueueName, o as scopedCloudflareQueueName, r as cloudflareQueueName } from "./dispatch-DM4Xdd2l.mjs";
24
- import { a as resolveDistDir, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate } from "./isr-config-Czzb4mIq.mjs";
25
- import { t as assertNoPrerenderFailures } from "./prerender-render-RlAj6hh8.mjs";
26
- import { a as buildEnv, n as readVersionMetadataBinding, r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-BC3LK7Y-.mjs";
27
- import { a as emailConfigInputs, c as renderAddressMap, d as collectPrerenderPathsNode, f as prerenderPages, i as createNodeEmailDns, l as renderEmailChecklist, n as SEND_EMAIL_BINDING, o as preflightEmail, p as prerenderPagesNode, r as applyEmailSetup, t as EMAIL_FROM_VAR, u as collectPrerenderPaths } from "./email-cloudflare-RxIQoPc9.mjs";
28
- import { n as completeApplicationAnalysis, t as analyzeApplication } from "./application-routing-GCBSwXA9.mjs";
29
- import { n as prepareCfFrameworkBuildOutput, r as prepareCfStaticBuildOutput, t as prepareCfBuildOutput } from "./cf-build-output-B1C8U83u.mjs";
30
- import { i as validateMigrations, t as assertJournalCoherence } from "./validate-Ddzl-IwT.mjs";
31
- import { A as confirm, K as select, L as log, tt as isCancel } from "./dist-D23AAMxT.mjs";
32
- import { r as getPackageDir } from "./agents-DRo8gzni.mjs";
33
- import { a as isExpiredTokenError, r as PlatformClient } from "./client-CoxPEhJq.mjs";
34
- import { o as formatCount, p as note, r as createSpinner, u as getErrorMessage } from "./output-BCdLioKP.mjs";
35
- import { t as getRequestedProjectSlug } from "./resolve-project-D0YNnJfm.mjs";
36
35
  import { i as safePositional, r as readCfUploadOutput, t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "./cf-command-values-Ccl-zRhl.mjs";
37
- import { a as FRAMEWORK_PRESETS, c as hasBackendFiles, i as isCleanCloudflareExit, l as resolveCloudflareOperationArgv, o as detectPreset, s as formatProjectCommand, t as createCloudflareProcessRunner, u as resolveProjectCommand } from "./cloudflare-process-D9aC-jXr.mjs";
38
- import { f as listSelfHostSecretNames, h as selfHostSchemaFailureMessage, i as SelfHostSecretListError, l as dischargeSelfHostEnvContext, n as SelfHostFirstDeployError, p as readEmittedWorkerVars, r as SelfHostSchemaError, s as deriveSelfHostEnvContextFromVars, t as SelfHostEnvValidationError } from "./env-validation-Del3C8AY.mjs";
39
- import { a as needsWrapper, r as cleanupWrapper, t as bundleEntry } from "./wrapper-B9W9RE8z.mjs";
40
- import { A as promptDeployProjectConfig, C as ensureManagedHyperdrive, D as hasNonPageBackend, E as getGitCommit, F as resolveStaticBuildCommand, I as resolveStaticDeployPreset, L as toManifestSchedulesAndQueues, M as resolveDeployWorkerMain, N as resolveDeployWranglerCompat, O as hasPrerenderSources, P as resolveFullDeployBuildCommand, R as validateDeployMigrations, S as createProjectFromSlug, T as getExitCode, _ as getDeploySchemaDriftMessage, a as collectAndHashAssets, b as assertProjectDeployAccess, c as readWranglerHtmlHandling, d as printDeploySuccess, f as mergeAndLintRoutingRules, g as assertDeploySchemaDriftFree, h as warnUnpublishedRouting, i as buildStaticManifest, j as resolveDeployLiveBindingConfig, k as log$1, l as formatDeploySummary, m as warnIgnoredNotFoundForFramework, n as runStaticDeploy, o as collectWorkerFiles, p as streamDirectR2Deploy, r as buildFrameworkManifest, s as detectNonSpaFallbackWarning, t as assembleVoidManifest, u as printDeployContext, v as hasDeploySchemaDrift, w as generateDeployWrapperIfNeeded, x as assertWorkerMainUploaded, y as assertEnvSchemaValid } from "./deploy-managed-static-CESLfKHN.mjs";
41
- import { a as checkCloudflareProvisionDrift, b as resolveWorkersDevComplianceRegion, d as isQueueConfirmedAbsent, f as isRealD1Id, g as provisionCloudflareResources, i as assertValidResourceName, m as isRealKvId, s as deleteEnvVarCaseAware } from "./provision-B0HqoRuI.mjs";
42
- import { c as scrubWranglerAuthCredentials, n as buildSchemaProbeEnv, o as resolveDeployTransport, r as deployChildEnv, s as scrubManagedDeployBuildMarkers, t as MANAGED_DEPLOY_BUILD_ENV } from "./deploy-transport-DcI6LXhY.mjs";
36
+ import { n as record, t as migrateBuiltWranglerConfig } from "./cf-config-migrate-Bb-EdAQq.mjs";
43
37
  import { n as getCfCliVersion, r as getVoidUserAgent, t as publishCloudflareWorkerSettings } from "./cf-worker-settings-CARs4Wy9.mjs";
38
+ import { a as createCloudflareEmptyDomainPublisher, i as createCloudflareEmptyCronPublisher } from "./cloudflare-operations-CXaDKYj2.mjs";
39
+ import { i as validateMigrations, t as assertJournalCoherence } from "./validate-Ddzl-IwT.mjs";
40
+ import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-G0yut6Zz.mjs";
44
41
  import { t as sanitizeTerminalLogText } from "./terminal-log-text-DNsWJREL.mjs";
45
- import { t as promptForLoginToken } from "./login-RIw7ffPe.mjs";
46
- import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, t as CloudflareAuthenticationError } from "./cloudflare-auth-CuS42-9A.mjs";
47
- import { a as createCloudflareEmptyDomainPublisher, i as createCloudflareEmptyCronPublisher } from "./cloudflare-operations-DrZGzQap.mjs";
48
- import { n as openMigrationValidationDatabase, t as SqliteMigrationError } from "./sqlite-validation-CLJXXN93.mjs";
49
- import { r as discoverFrameworkWranglerFiles, t as migrateLegacyVoidConfig } from "./migrate-DiI50Chz.mjs";
50
- import { a as runMySqlMigrations } from "./runner-mysql-Bdmsp_x4.mjs";
42
+ import { a as runMySqlMigrations } from "./runner-mysql-BXfcQQj3.mjs";
51
43
  import { i as runPgMigrations } from "./runner-pg-mYc75KfH.mjs";
44
+ import { a as emailConfigInputs, c as renderAddressMap, d as collectPrerenderPathsNode, f as prerenderPages, i as createNodeEmailDns, l as renderEmailChecklist, n as SEND_EMAIL_BINDING, o as preflightEmail, p as prerenderPagesNode, r as applyEmailSetup, t as EMAIL_FROM_VAR, u as collectPrerenderPaths } from "./email-cloudflare-kqoN9jst.mjs";
45
+ import { a as needsWrapper, r as cleanupWrapper, t as bundleEntry } from "./wrapper-CVMZarxf.mjs";
46
+ import { t as assertNoPrerenderFailures } from "./prerender-render-BAdYhivW.mjs";
52
47
  import { t as collectGitDeployMetadata } from "./git-metadata-Cukp5kV5.mjs";
48
+ import { t as ensurePlatformAccessToken } from "./cf-access-Dnyw8KFY.mjs";
49
+ import { r as getPackageDir } from "./agents-DRo8gzni.mjs";
50
+ import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
51
+ import { t as promptForLoginToken } from "./login-AfcSGSmE.mjs";
52
+ import { s as listPlatformConnections } from "./platform-registry-DZ_2Xuqd.mjs";
53
+ import { t as getRequestedProjectSlug } from "./resolve-project-Da3OgCU1.mjs";
53
54
  import { createRequire } from "node:module";
54
- import { cpSync, createWriteStream, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
55
+ import { closeSync, cpSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
55
56
  import { fileURLToPath } from "node:url";
56
57
  import { isRecord } from "@void/deploy-core";
57
58
  import { createHash, randomBytes } from "node:crypto";
@@ -61,10 +62,10 @@ import { applyEdits, modify, parse } from "jsonc-parser";
61
62
  import { execFile, execSync, spawn } from "node:child_process";
62
63
  import { getWorkerAssetsDir, getWorkerBundleDir, getWorkerConfigPath, readBuildOutput } from "@cloudflare/build-output-utils";
63
64
  import { convertToWranglerConfig } from "@cloudflare/config";
65
+ import mime from "mime";
64
66
  import ignore from "ignore";
65
- import { CloudflareWorkerInspectionError, activateCloudflareVersion, assertCloudflareBindingsPreserved, assertCloudflareDurableObjectLifecycleSupported, assertExistingCloudflareConfig, cloudflareCommandDiagnostic, encodeCloudflareVersionMessage, extractWorkersDevSubdomain, normalizeReadinessAccessOrigin, normalizeWorkersDevSubdomain, parseRootWranglerConfig, parseRootWranglerConfig as parseRootWranglerConfig$1, readBindingFieldPresence, readCloudflareTriggerConfig, readConfigEntryString, readExistingCloudflareWorker, readStoredResourceName, readWranglerTopLevelString, renderCloudflareStaticEntry, resolveD1MigrateTarget, stageCloudflareStaticAssets, writeCloudflareFrameworkDeployConfig, writeCloudflareStaticDeployConfig } from "@void/deploy-cloudflare";
67
+ import { CloudflareWorkerInspectionError, activateCloudflareVersion, assertCloudflareBindingsPreserved, assertCloudflareDurableObjectLifecycleSupported, assertExistingCloudflareConfig, cloudflareCommandDiagnostic, encodeCloudflareVersionMessage, extractWorkersDevSubdomain, normalizeReadinessAccessOrigin, normalizeWorkersDevSubdomain, parseCloudflareVersionMessage, parseRootWranglerConfig, parseRootWranglerConfig as parseRootWranglerConfig$1, readBindingFieldPresence, readCloudflareTriggerConfig, readConfigEntryString, readExistingCloudflareWorker, readStoredResourceName, readWranglerTopLevelString, renderCloudflareStaticEntry, resolveD1MigrateTarget, stageCloudflareStaticAssets, writeCloudflareFrameworkDeployConfig, writeCloudflareStaticDeployConfig } from "@void/deploy-cloudflare";
66
68
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
67
- import mime from "mime";
68
69
  import { Buffer as Buffer$1 } from "node:buffer";
69
70
  import { Minimatch } from "minimatch";
70
71
  // src/cli/cloudflare-candidate.ts
@@ -324,6 +325,164 @@ function readCloudflareLocalState(root) {
324
325
  return {};
325
326
  }
326
327
  }
328
+ // src/cli/cloudflare-child-report.ts
329
+ const NOT_SECRET = /* @__PURE__ */ new Set([
330
+ "CLOUDFLARE_EMAIL",
331
+ "CF_EMAIL",
332
+ "CLOUDFLARE_ACCESS_CLIENT_ID"
333
+ ]);
334
+ const CREDENTIAL_ENV_VARS = [...WRANGLER_AUTH_CREDENTIAL_ENV_VARS.filter((name) => !NOT_SECRET.has(name)), "CF_ACCESS_CLIENT_SECRET"];
335
+ const MIN_SECRET_LENGTH = 8;
336
+ function createCredentialRedactor(env = process.env) {
337
+ const values = /* @__PURE__ */ new Set();
338
+ let ordered = [];
339
+ const add = (value) => {
340
+ if (typeof value !== "string") return;
341
+ for (const candidate of [value, value.trim()]) if (candidate.length >= MIN_SECRET_LENGTH && !values.has(candidate)) {
342
+ values.add(candidate);
343
+ ordered = [...values].sort((a, b) => b.length - a.length);
344
+ }
345
+ };
346
+ for (const name of CREDENTIAL_ENV_VARS) add(env[name]);
347
+ return {
348
+ add,
349
+ redact(text) {
350
+ let out = text;
351
+ for (const value of ordered) out = redactMessage(value, out);
352
+ return out;
353
+ }
354
+ };
355
+ }
356
+ function createCloudflareChildReporter(cliLog, env = process.env) {
357
+ return {
358
+ cliLog,
359
+ redactor: createCredentialRedactor(env)
360
+ };
361
+ }
362
+ /**
363
+ * Scrub exact credential values from a child result. This must run before any formatter
364
+ * truncates the text, or a token that crosses the cut would leak its prefix. A clean
365
+ * stdout and `data` are left alone: callers parse them, and they carry results, not errors.
366
+ */
367
+ function scrubCloudflareResult(result, redactor) {
368
+ return {
369
+ ...result,
370
+ stderr: redactor.redact(result.stderr),
371
+ ...isCleanCloudflareExit(result) ? {} : { stdout: redactor.redact(result.stdout) },
372
+ ...result.error ? { error: redactor.redact(result.error) } : {},
373
+ ...result.errors ? { errors: result.errors.map((error) => ({
374
+ ...error,
375
+ message: redactor.redact(error.message)
376
+ })) } : {}
377
+ };
378
+ }
379
+ /** Scrub a runner rejection in place, so fields callers check on the Error survive. */
380
+ function scrubCloudflareError(error, redactor) {
381
+ if (!(error instanceof Error)) return new Error(redactor.redact(String(error)));
382
+ error.message = redactor.redact(error.message);
383
+ if (typeof error.stack === "string") error.stack = redactor.redact(error.stack);
384
+ return error;
385
+ }
386
+ /** Why a child failed: its spawn error, the signal that stopped it, or its exit code. */
387
+ function describeCloudflareChildFailure(result, subject = "the Void CLI helper process") {
388
+ if (result.error) return `${subject} could not run: ${result.error}`;
389
+ if (result.signal) return `${subject} was stopped by ${result.signal}`;
390
+ return `${subject} exited with code ${String(result.status)}`;
391
+ }
392
+ /**
393
+ * The cause sentence, then the child's bounded diagnostic. stdout is never shown: for
394
+ * auth.token it is the credential envelope. The spawn error is already in the cause.
395
+ */
396
+ function formatCloudflareChildFailure(result, subject) {
397
+ const diagnostic = cloudflareCommandDiagnostic({
398
+ status: result.status,
399
+ stdout: "",
400
+ stderr: result.stderr
401
+ });
402
+ const cause = `${describeCloudflareChildFailure(result, subject)}.`;
403
+ return diagnostic ? `${cause}\n${diagnostic}` : cause;
404
+ }
405
+ /** `cf` plus up to three leading subcommand words, so values and flags stay out of the log. */
406
+ function cfOperationName(args) {
407
+ const words = [];
408
+ for (const arg of args) {
409
+ if (words.length === 3 || arg.startsWith("-")) break;
410
+ words.push(arg);
411
+ }
412
+ return ["cf", ...words].join(" ");
413
+ }
414
+ function logCloudflareOp(reporter, op, startedAt, outcome) {
415
+ const ms = Date.now() - startedAt;
416
+ if ("thrown" in outcome) {
417
+ reporter.cliLog.debug("cloudflare_op", {
418
+ op,
419
+ ok: false,
420
+ ms,
421
+ diagnostic: cloudflareCommandDiagnostic({
422
+ status: 1,
423
+ stdout: "",
424
+ stderr: outcome.thrown.message
425
+ })
426
+ });
427
+ return;
428
+ }
429
+ const { result } = outcome;
430
+ const ok = isCleanCloudflareExit(result);
431
+ reporter.cliLog.debug("cloudflare_op", {
432
+ op,
433
+ ok,
434
+ status: result.status,
435
+ ...result.signal ? { signal: result.signal } : {},
436
+ ms,
437
+ ...ok ? {} : { diagnostic: cloudflareCommandDiagnostic({
438
+ ...result,
439
+ stdout: op === "auth.token" ? "" : result.stdout
440
+ }) }
441
+ });
442
+ }
443
+ /**
444
+ * Observe the deploy's operation-child runner: scrub every result, learn the session
445
+ * bearer from a clean auth.token, and write one debug `cloudflare_op` record per child.
446
+ * Inputs (`opts.input` carries secret values) and result data are never logged.
447
+ */
448
+ function observeCloudflareRunner(run, reporter) {
449
+ return async (operation, opts) => {
450
+ const startedAt = Date.now();
451
+ let result;
452
+ try {
453
+ result = await run(operation, opts);
454
+ } catch (error) {
455
+ const thrown = scrubCloudflareError(error, reporter.redactor);
456
+ logCloudflareOp(reporter, operation.type, startedAt, { thrown });
457
+ throw thrown;
458
+ }
459
+ if (operation.type === "auth.token" && isCleanCloudflareExit(result)) {
460
+ const data = result.data;
461
+ reporter.redactor.add(data?.token);
462
+ }
463
+ const scrubbed = scrubCloudflareResult(result, reporter.redactor);
464
+ logCloudflareOp(reporter, operation.type, startedAt, { result: scrubbed });
465
+ return scrubbed;
466
+ };
467
+ }
468
+ /** Observe the pinned cf CLI the same way. */
469
+ function observeCfCommand(run, reporter) {
470
+ return async (args, opts) => {
471
+ const op = cfOperationName(args);
472
+ const startedAt = Date.now();
473
+ let result;
474
+ try {
475
+ result = await run(args, opts);
476
+ } catch (error) {
477
+ const thrown = scrubCloudflareError(error, reporter.redactor);
478
+ logCloudflareOp(reporter, op, startedAt, { thrown });
479
+ throw thrown;
480
+ }
481
+ const scrubbed = scrubCloudflareResult(result, reporter.redactor);
482
+ logCloudflareOp(reporter, op, startedAt, { result: scrubbed });
483
+ return scrubbed;
484
+ };
485
+ }
327
486
  // src/cli/deploy-binding-snapshot.ts
328
487
  /** The id-bearing binding fields whose identity must survive the build unchanged. */
329
488
  const DEPLOY_BINDING_IDENTITY_FIELDS = {
@@ -1354,7 +1513,7 @@ async function validateCloudflarePostBuildEnv(options) {
1354
1513
  }
1355
1514
  return true;
1356
1515
  }
1357
- // ../../node_modules/.pnpm/ci-info@4.4.0/node_modules/ci-info/vendors.json
1516
+ // ../../node_modules/.pnpm/ci-info@4.5.0/node_modules/ci-info/vendors.json
1358
1517
  var require_vendors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1359
1518
  module.exports = [
1360
1519
  {
@@ -1434,6 +1593,11 @@ var require_vendors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1434
1593
  "ne": "false"
1435
1594
  }
1436
1595
  },
1596
+ {
1597
+ "name": "Capawesome Cloud",
1598
+ "constant": "CAPAWESOME_CLOUD",
1599
+ "env": "CAPAWESOME_CLOUD"
1600
+ },
1437
1601
  {
1438
1602
  "name": "CircleCI",
1439
1603
  "constant": "CIRCLE",
@@ -1595,6 +1759,11 @@ var require_vendors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1595
1759
  "env": "RENDER",
1596
1760
  "pr": { "IS_PULL_REQUEST": "true" }
1597
1761
  },
1762
+ {
1763
+ "name": "RWX",
1764
+ "constant": "RWX",
1765
+ "env": "RWX"
1766
+ },
1598
1767
  {
1599
1768
  "name": "Sail CI",
1600
1769
  "constant": "SAIL",
@@ -1799,25 +1968,51 @@ async function chooseCloudflareDeployAccount(options) {
1799
1968
  function isWranglerNonInteractiveOrCI() {
1800
1969
  return import_ci_info.isCI || !(process.stdin.isTTY && process.stdout.isTTY);
1801
1970
  }
1971
+ const GLOBAL_API_KEY_SESSION = "the session uses a Global API Key (CLOUDFLARE_API_KEY), which this step cannot use. Set CLOUDFLARE_API_TOKEN, or unset CLOUDFLARE_API_KEY and run `void cloudflare login`, then retry.";
1802
1972
  /**
1803
1973
  * Read the current Cloudflare session bearer through the pinned deploy runner, for API calls
1804
- * Void makes itself. The token goes only to the caller; every failure resolves `null`.
1974
+ * Void makes itself. The token goes only to the caller. A failure is built fresh from the
1975
+ * child's status, signal and stderr: it never carries the child's errorCode, failure, errors
1976
+ * or data, so an auth failure can never be read as a Cloudflare upload error.
1805
1977
  */
1806
- async function runWranglerAuthToken(runWrangler, configPath) {
1978
+ async function readWranglerAuthToken(runWrangler, configPath) {
1979
+ const fail = (status, signal, stderr) => ({
1980
+ ok: false,
1981
+ failure: {
1982
+ status: status === 0 ? 1 : status,
1983
+ ...signal ? { signal } : {},
1984
+ stdout: "",
1985
+ stderr
1986
+ }
1987
+ });
1807
1988
  let result;
1808
1989
  try {
1809
1990
  result = await Promise.resolve(runWrangler({
1810
1991
  type: "auth.token",
1811
1992
  configPath
1812
1993
  }, { capture: true }));
1813
- } catch {
1814
- return null;
1994
+ } catch (error) {
1995
+ return fail(1, null, `${describeCloudflareChildFailure({
1996
+ status: 1,
1997
+ error: getErrorMessage(error)
1998
+ })}.`);
1815
1999
  }
1816
- if (!isCleanCloudflareExit(result)) return null;
1817
2000
  const parsed = result.data;
2001
+ if (!isCleanCloudflareExit(result)) {
2002
+ if (parsed?.type === "api_key" && !result.error && !result.signal) return fail(result.status, null, GLOBAL_API_KEY_SESSION);
2003
+ return fail(result.status, result.signal, formatCloudflareChildFailure(result));
2004
+ }
1818
2005
  const type = parsed?.type;
1819
2006
  const token = parsed?.token;
1820
- return (type === "oauth" || type === "api_token") && typeof token === "string" && token.length > 0 ? token : null;
2007
+ return (type === "oauth" || type === "api_token") && typeof token === "string" && token.length > 0 ? {
2008
+ ok: true,
2009
+ token
2010
+ } : fail(1, null, "the Void CLI helper process returned no session credential.");
2011
+ }
2012
+ /** {@link readWranglerAuthToken} for callers that only need the token; every failure is `null`. */
2013
+ async function runWranglerAuthToken(runWrangler, configPath) {
2014
+ const read = await readWranglerAuthToken(runWrangler, configPath);
2015
+ return read.ok ? read.token : null;
1821
2016
  }
1822
2017
  /**
1823
2018
  * Ensure an auth-enabled worker has one persistent Better Auth secret.
@@ -2121,6 +2316,12 @@ function bindingsFromOutput(env, workerName, activeSecrets, explicitSecrets) {
2121
2316
  type: "version_metadata"
2122
2317
  });
2123
2318
  break;
2319
+ case "worker-loader":
2320
+ bindings.push({
2321
+ name,
2322
+ type: "worker_loader"
2323
+ });
2324
+ break;
2124
2325
  default: throw new Error(`Cloudflare binding ${name} cannot be uploaded with pinned secrets.`);
2125
2326
  }
2126
2327
  }
@@ -2712,6 +2913,25 @@ function failed(message) {
2712
2913
  stderr: message
2713
2914
  };
2714
2915
  }
2916
+ /** Keep the credential child's real status, signal and diagnostic under one header. */
2917
+ function credentialFailed(header, failure) {
2918
+ return {
2919
+ status: failure.status,
2920
+ ...failure.signal ? { signal: failure.signal } : {},
2921
+ stdout: "",
2922
+ stderr: `${header}: ${failure.stderr}`
2923
+ };
2924
+ }
2925
+ /**
2926
+ * Whether activating a version with this message publishes Worker settings (observability or
2927
+ * logpush) after traffic moves. The schema-2 snapshot is what trigger sync replays; a preserved
2928
+ * snapshot publishes nothing.
2929
+ */
2930
+ function publishesWorkerSettings(message) {
2931
+ const metadata = parseCloudflareVersionMessage(message);
2932
+ if (metadata?.schema !== 2 || metadata.triggerConfig.preserve === true) return false;
2933
+ return metadata.triggerConfig.observability !== void 0 || metadata.triggerConfig.logpush !== void 0;
2934
+ }
2715
2935
  function parseJson(value) {
2716
2936
  try {
2717
2937
  return JSON.parse(value);
@@ -2965,6 +3185,47 @@ function createCfVersionRunner(options) {
2965
3185
  } : void 0
2966
3186
  };
2967
3187
  };
3188
+ let sessionToken;
3189
+ const readSessionToken = async (credentials) => {
3190
+ if (sessionToken !== void 0) return {
3191
+ ok: true,
3192
+ token: sessionToken
3193
+ };
3194
+ const credential = await credentials.getToken();
3195
+ if (credential.ok) sessionToken = credential.token;
3196
+ return credential;
3197
+ };
3198
+ const readFreshSessionToken = async (credentials) => {
3199
+ let credential;
3200
+ try {
3201
+ credential = await credentials.getToken();
3202
+ } catch (cause) {
3203
+ if (sessionToken === void 0) throw cause;
3204
+ return {
3205
+ ok: true,
3206
+ token: sessionToken
3207
+ };
3208
+ }
3209
+ if (credential.ok) {
3210
+ sessionToken = credential.token;
3211
+ return credential;
3212
+ }
3213
+ return sessionToken === void 0 ? credential : {
3214
+ ok: true,
3215
+ token: sessionToken
3216
+ };
3217
+ };
3218
+ /**
3219
+ * Read the settings publisher's credential before upload, so a deploy that cannot publish its
3220
+ * observability or logpush settings stops while production traffic is unchanged.
3221
+ */
3222
+ const prepareSettingsCredential = async (message) => {
3223
+ if (!publishesWorkerSettings(message)) return null;
3224
+ const credentials = options.pinnedUpload;
3225
+ if (!credentials || !credentials.verifyUploader()) return failed("The Cloudflare settings publisher is unavailable; no version was uploaded.");
3226
+ const credential = await readSessionToken(credentials);
3227
+ return credential.ok ? null : credentialFailed("Could not get the Cloudflare session credential for publishing Worker settings (observability, logpush), so no version was uploaded", credential.failure);
3228
+ };
2968
3229
  const verifyResources = async (directory) => {
2969
3230
  try {
2970
3231
  return await options.verifyResources(directory);
@@ -2980,8 +3241,9 @@ function createCfVersionRunner(options) {
2980
3241
  };
2981
3242
  const uploadPinnedVersion = async (operation, atomic) => {
2982
3243
  if (!options.pinnedUpload || !options.pinnedUpload.verifyUploader()) return failed("The version-aware Cloudflare uploader is unavailable.");
2983
- const token = await options.pinnedUpload.getToken();
2984
- if (!token) return failed("Cloudflare session has no bearer for version-aware upload.");
3244
+ const credential = await readSessionToken(options.pinnedUpload);
3245
+ if (!credential.ok) return credentialFailed("Could not get the Cloudflare session credential for the upload", credential.failure);
3246
+ const { token } = credential;
2985
3247
  try {
2986
3248
  const version = await uploadPinnedCloudflareVersion({
2987
3249
  output,
@@ -3122,6 +3384,8 @@ function createCfVersionRunner(options) {
3122
3384
  if (operation.type === "versions.upload") {
3123
3385
  const blocked = await checkUploadTarget(operation, "The Cloudflare version upload target changed.");
3124
3386
  if (blocked) return blocked;
3387
+ const settings = await prepareSettingsCredential(operation.message);
3388
+ if (settings) return settings;
3125
3389
  if (output.activeSecrets) return uploadPinnedVersion(operation, false);
3126
3390
  return uploadedResult(await run([
3127
3391
  "workers",
@@ -3162,6 +3426,8 @@ function createCfVersionRunner(options) {
3162
3426
  if (operation.type === "worker.deploy") {
3163
3427
  const blocked = await checkUploadTarget(operation, "The Cloudflare bootstrap target changed.");
3164
3428
  if (blocked) return blocked;
3429
+ const settings = await prepareSettingsCredential(operation.message);
3430
+ if (settings) return settings;
3165
3431
  if (output.activeSecrets) return uploadPinnedVersion(operation, true);
3166
3432
  return uploadedResult(await run([
3167
3433
  "deploy",
@@ -3219,8 +3485,10 @@ function createCfVersionRunner(options) {
3219
3485
  const credentials = options.pinnedUpload;
3220
3486
  if (!credentials || !credentials.verifyUploader()) return failed("The Cloudflare settings publisher is unavailable.");
3221
3487
  try {
3222
- const token = await credentials.getToken();
3223
- if (!token || !credentials.verifyUploader()) return failed("Cloudflare session is unavailable for publishing Worker settings.");
3488
+ const credential = await readFreshSessionToken(credentials);
3489
+ if (!credential.ok) return credentialFailed("Could not get the Cloudflare session credential for publishing Worker settings", credential.failure);
3490
+ if (!credentials.verifyUploader()) return failed("Cloudflare session is unavailable for publishing Worker settings.");
3491
+ const { token } = credential;
3224
3492
  await publishCloudflareWorkerSettings({
3225
3493
  apiBaseUrl: credentials.apiBaseUrl,
3226
3494
  accountId: credentials.accountId,
@@ -3329,7 +3597,7 @@ function logCloudflareAuthFailure(error) {
3329
3597
  * deploy without an account signs in and chooses one. Logs and returns null on failure.
3330
3598
  */
3331
3599
  async function connectCloudflareDeployAccount(options) {
3332
- const { root, configPath, deps } = options;
3600
+ const { root, configPath, deps, reporter } = options;
3333
3601
  let { rootConfig } = options;
3334
3602
  let apiBaseUrl;
3335
3603
  try {
@@ -3342,7 +3610,7 @@ async function connectCloudflareDeployAccount(options) {
3342
3610
  const pins = createCloudflareUploaderPins(root, deps);
3343
3611
  let accountId = readWranglerTopLevelString(rootConfig, "account_id") ?? (process.env.CLOUDFLARE_ACCOUNT_ID?.trim() || void 0);
3344
3612
  if (!accountId) {
3345
- const accountRunner = deps.runWrangler ?? createDeployWranglerRunner(root, void 0, apiBaseUrl);
3613
+ const accountRunner = observeCloudflareRunner(deps.runWrangler ?? createDeployWranglerRunner(root, void 0, apiBaseUrl), reporter);
3346
3614
  try {
3347
3615
  accountId = await chooseCloudflareDeployAccount({
3348
3616
  persist: options.persistAccount,
@@ -3373,7 +3641,7 @@ async function connectCloudflareDeployAccount(options) {
3373
3641
  accountId,
3374
3642
  workersDevSubdomain,
3375
3643
  readinessAccessOrigin,
3376
- runWrangler: deps.runWrangler ?? createDeployWranglerRunner(root, accountId, apiBaseUrl),
3644
+ runWrangler: observeCloudflareRunner(deps.runWrangler ?? createDeployWranglerRunner(root, accountId, apiBaseUrl), reporter),
3377
3645
  rootConfig
3378
3646
  };
3379
3647
  }
@@ -3404,12 +3672,12 @@ function assertCloudflareDeployTargetUnchanged(options) {
3404
3672
  function createCfActivationRunner(options) {
3405
3673
  const { cfOutput, accountId, apiBaseUrl, configPath, runWrangler } = options;
3406
3674
  if (!cfOutput) return runWrangler;
3407
- const runCf = createCfCommand({
3675
+ const runCf = observeCfCommand(createCfCommand({
3408
3676
  accountId,
3409
3677
  apiBaseUrl,
3410
3678
  env: deployChildEnv,
3411
3679
  verifyUploader: options.cfUploaderIsPinned
3412
- });
3680
+ }), options.reporter);
3413
3681
  return createCfVersionRunner({
3414
3682
  output: cfOutput,
3415
3683
  workerName: options.workerName,
@@ -3417,7 +3685,7 @@ function createCfActivationRunner(options) {
3417
3685
  pinnedUpload: {
3418
3686
  accountId,
3419
3687
  apiBaseUrl,
3420
- getToken: () => runWranglerAuthToken(runWrangler, configPath),
3688
+ getToken: () => readWranglerAuthToken(runWrangler, configPath),
3421
3689
  verifyUploader: options.cfUploaderIsPinned
3422
3690
  },
3423
3691
  verifyResources: createCfResourceVerifier({
@@ -3498,7 +3766,7 @@ function recordCloudflareActivation(options) {
3498
3766
  clearCloudflareCandidate(root);
3499
3767
  if (options.existingWorker) completeCloudflareLink(root);
3500
3768
  acknowledgeWranglerManagedQueueRemovals(configPath, options.queueConsumerCleanup);
3501
- rememberCloudflareWorkersDevSubdomain(root, options.accountId, execution.previewUrl);
3769
+ if (execution.previewUrl) rememberCloudflareWorkersDevSubdomain(root, options.accountId, execution.previewUrl);
3502
3770
  if (execution.trafficConfig) writeWranglerPublishedTrafficSnapshot(configPath, {
3503
3771
  workers_dev: execution.trafficConfig.workers_dev,
3504
3772
  preview_urls: execution.trafficConfig.preview_urls,
@@ -3510,10 +3778,33 @@ function recordCloudflareActivation(options) {
3510
3778
  versionId: execution.versionId
3511
3779
  });
3512
3780
  }
3513
- async function reportCloudflareActivationFailure(cliLog, message) {
3514
- cliLog.error("cloudflare_deploy_failed", new Error(message));
3781
+ /**
3782
+ * Record the failed activation, then the end of the deploy, and release the log before the
3783
+ * caller exits. The fields are picked from a fixed list, never spread from the result, and avoid
3784
+ * key names that the log summary masks.
3785
+ */
3786
+ async function reportCloudflareActivationFailure(reporter, message, execution) {
3787
+ const { cliLog } = reporter;
3788
+ const safeMessage = reporter.redactor.redact(message);
3789
+ cliLog.error("cloudflare_deploy_failed", new Error(safeMessage), {
3790
+ reason: execution.reason,
3791
+ status: execution.status,
3792
+ cloudflareErrorCode: execution.cloudflareErrorCode,
3793
+ versionId: execution.versionId,
3794
+ previousVersionId: execution.previousVersionId,
3795
+ activeVersionId: execution.activeVersionId,
3796
+ rollback: execution.rollback,
3797
+ triggersRestored: execution.triggersRestored,
3798
+ restoreSkipped: execution.restoreSkipped,
3799
+ triggerRepair: execution.triggerRepair,
3800
+ containersUnavailable: execution.containersUnavailable
3801
+ });
3802
+ cliLog.error("deploy_end", void 0, {
3803
+ ok: false,
3804
+ exitCode: 1
3805
+ });
3515
3806
  await cliLog.close().catch(() => {});
3516
- log$1.error(`${message}${cliLog.path ? `\n\nDetailed log: ${cliLog.path}` : ""}`);
3807
+ log$1.error(`${safeMessage}${cliLog.path ? `\n\nDetailed log: ${cliLog.path}` : ""}`);
3517
3808
  }
3518
3809
  async function activateCloudflareVersionWithProgress(activate, options) {
3519
3810
  const progress = createSpinner();
@@ -3566,6 +3857,11 @@ function formatCloudflareActivationFailure(result) {
3566
3857
  case "upload-output-invalid": return "deploy: Wrangler uploaded a version but did not report its version id; production traffic is unchanged.";
3567
3858
  case "preview-unavailable":
3568
3859
  if (result.diagnostic) return `deploy: candidate readiness cannot be verified.\n\n${result.diagnostic}`;
3860
+ if (result.workersDev === false) return [
3861
+ "deploy: the uploaded Worker Version has no URL Void can use to verify readiness.",
3862
+ "workers.dev is off for this Worker, so an account subdomain does not create one.",
3863
+ "Production traffic is unchanged."
3864
+ ].join("\n");
3569
3865
  return [
3570
3866
  "deploy: the uploaded Worker Version has no preview URL, so Void cannot verify readiness.",
3571
3867
  "Set CLOUDFLARE_WORKERS_SUBDOMAIN to your account subdomain (for example \"my-team\")",
@@ -3574,7 +3870,7 @@ function formatCloudflareActivationFailure(result) {
3574
3870
  case "readiness-staging-failed": return `deploy: Cloudflare could not stage the uploaded Worker Version at zero-percent traffic${status}; production traffic is unchanged.${cloudflareCode}${diagnostic}${result.cloudflareErrorCode === 10210 && (result.diagnostic ?? "").toLowerCase().includes("durable object migration") ? "\n\nReview the Durable Object migration, then run `void deploy --platform cloudflare --atomic`. For future deploys, set deploy.cloudflare.mode to \"atomic\" in void.config.ts." : result.cloudflareErrorCode === 100405 ? "\n\nThe new version declares different exports from the live version (for example a Durable Object or Workflow class), so Cloudflare cannot split traffic between them. Run `void deploy --platform cloudflare --atomic` once to publish it at 100% directly; it receives traffic before readiness is checked." : ""}`;
3575
3871
  case "atomic-failed": return `deploy: Cloudflare could not publish the Worker atomically${status}; inspect production status before retrying.${cloudflareCode}${diagnostic}`;
3576
3872
  case "atomic-output-invalid":
3577
- if (result.versionId) return formatCloudflarePublishWithoutUrl(`Cloudflare published Worker version ${result.versionId} atomically`, `If the app uses workers.dev, set CLOUDFLARE_WORKERS_SUBDOMAIN to your account subdomain ${WORKERS_SUBDOMAIN_EXAMPLE}.`);
3873
+ if (result.versionId) return formatCloudflarePublishWithoutUrl(`Cloudflare published Worker version ${result.versionId} atomically`, workersDevReadinessRecovery(result.workersDev, "atomic"));
3578
3874
  return "deploy: Cloudflare published atomically but did not report its version id. Inspect `void project status` immediately.";
3579
3875
  case "atomic-readiness-failed":
3580
3876
  case "atomic-readiness-access-denied": return `deploy: the atomic Worker deployment is live, but /__void/ready could not be verified. Inspect \`void project status\` and Worker logs immediately.${diagnostic}${result.customRouteReadinessOrigin ? `\n\n${customRouteAccessHint(result.customRouteReadinessOrigin).join("\n")}` : ""}`;
@@ -3595,7 +3891,7 @@ function formatCloudflareActivationFailure(result) {
3595
3891
  ].join("\n");
3596
3892
  case "bootstrap-failed": return `deploy: Cloudflare could not bootstrap the first Worker deployment${status}.${cloudflareCode}${diagnostic}`;
3597
3893
  case "bootstrap-output-invalid":
3598
- if (result.versionId) return formatCloudflarePublishWithoutUrl(`Cloudflare published the first Worker deployment as version ${result.versionId}`, `If the app uses workers.dev, enable workers.dev for this Worker in the Cloudflare dashboard. Then set CLOUDFLARE_WORKERS_SUBDOMAIN to your account subdomain ${WORKERS_SUBDOMAIN_EXAMPLE}.`);
3894
+ if (result.versionId) return formatCloudflarePublishWithoutUrl(`Cloudflare published the first Worker deployment as version ${result.versionId}`, workersDevReadinessRecovery(result.workersDev, "bootstrap"));
3599
3895
  return ["deploy: Cloudflare bootstrapped the first Worker deployment, but Wrangler", "did not report its version id. Inspect `void project status` before retrying."].join("\n");
3600
3896
  case "bootstrap-readiness-failed": return [
3601
3897
  "deploy: the first Worker deployment did not pass /__void/ready.",
@@ -3619,7 +3915,56 @@ function formatCloudflareActivationFailure(result) {
3619
3915
  "Worker is already active behind Access."
3620
3916
  ].join("\n");
3621
3917
  case "activation-failed": return `deploy: the ready Worker Version could not be activated${status}; production traffic is unchanged.`;
3622
- case "triggers-failed": return `deploy: the Worker activated, but Cloudflare trigger synchronization failed${status}. ${result.rollback === "succeeded" ? "Traffic was restored to the previous version." : result.rollback === "unavailable" ? result.previousVersionId === null ? "This was the first deployment, so no previous version was available to restore." : "Traffic or trigger restoration could not be completed. Inspect its routes, schedules, queues, and workflows in Cloudflare before retrying." : "Automatic traffic restoration failed; inspect `void project status` immediately."}`;
3918
+ case "triggers-failed": return [`deploy: the Worker activated, but Cloudflare trigger synchronization failed${status}.${cloudflareCode}`, ...formatCloudflareTriggerRecovery(result)].join("\n");
3919
+ }
3920
+ }
3921
+ const TRIGGER_KINDS = "routes, schedules, queues, and workflows";
3922
+ const RETRY_DEPLOY = "Fix the cause and run `void deploy --platform cloudflare` again.";
3923
+ const INSPECT_STATUS = "Run `void project status` and check them in Cloudflare before retrying.";
3924
+ /**
3925
+ * Say which version serves production after a trigger synchronization failure. Built only from
3926
+ * the final owner and trigger state: `rollback` cannot tell "kept this deploy" from "switched
3927
+ * back", so reading it once printed a restore that never happened.
3928
+ */
3929
+ function formatCloudflareTriggerRecovery(result) {
3930
+ const live = result.activeVersionId ?? null;
3931
+ const previous = result.previousVersionId ?? null;
3932
+ const diagnostic = result.diagnostic ? ["", result.diagnostic] : [];
3933
+ if (live === null) return [
3934
+ "Live now: unknown. Void could not read which version serves production.",
3935
+ ...result.triggersRestored === "unknown" && previous ? [`Void tried to switch back to the previous version ${previous} and restore its ${TRIGGER_KINDS}, but could not confirm the result.`] : [],
3936
+ `Its ${TRIGGER_KINDS} may be partly updated. ${INSPECT_STATUS}`,
3937
+ ...diagnostic
3938
+ ];
3939
+ if (live === result.versionId) {
3940
+ const rollbackHint = previous && (result.restoreSkipped === "no-trigger-snapshot" || result.restoreSkipped === "atomic") ? [`To serve the previous version instead, run \`void project rollback ${previous} --platform cloudflare\`.`] : [];
3941
+ return [
3942
+ `Live now: ${live} (this deploy). Its ${TRIGGER_KINDS} may be partly updated.`,
3943
+ keptDeployReason(result.restoreSkipped, previous),
3944
+ RETRY_DEPLOY,
3945
+ ...rollbackHint,
3946
+ ...diagnostic
3947
+ ];
3948
+ }
3949
+ if (live === previous) return [
3950
+ result.triggersRestored === "yes" ? `Live now: ${live} (the previous version). Void switched traffic back to it and restored its ${TRIGGER_KINDS}.` : `Live now: ${live} (the previous version). Void did not restore its ${TRIGGER_KINDS}, so they may be partly updated.`,
3951
+ result.triggersRestored === "yes" ? RETRY_DEPLOY : INSPECT_STATUS,
3952
+ ...diagnostic
3953
+ ];
3954
+ return [
3955
+ `Live now: ${live}. Another Cloudflare operation changed production while Void was switching back.`,
3956
+ `Its ${TRIGGER_KINDS} may not match it. ${INSPECT_STATUS}`,
3957
+ ...diagnostic
3958
+ ];
3959
+ }
3960
+ /** Explain why this deploy's version still serves production. */
3961
+ function keptDeployReason(restoreSkipped, previous) {
3962
+ if (!previous) return "This was the first deployment, so there is no previous version to switch back to.";
3963
+ switch (restoreSkipped) {
3964
+ case "placeholder": return `Void did not switch back to the previous version ${previous} because it is an empty placeholder or secret-only draft.`;
3965
+ case "no-trigger-snapshot": return `Void did not switch back to the previous version ${previous} because it has no Void trigger snapshot to restore.`;
3966
+ case "atomic": return `This deploy published at 100% directly, so Void did not switch back to the previous version ${previous}.`;
3967
+ default: return `Void could not switch back to the previous version ${previous}.`;
3623
3968
  }
3624
3969
  }
3625
3970
  /** Explain why a custom-route readiness probe carried no Access credentials. */
@@ -3641,6 +3986,18 @@ function formatCloudflareReadinessRestoration(result) {
3641
3986
  }
3642
3987
  }
3643
3988
  const WORKERS_SUBDOMAIN_EXAMPLE = "(for example \"my-team\", or \"my-team.fed\" for FedRAMP High)";
3989
+ /**
3990
+ * Tell the operator how to recover a publish whose URL Void could not determine.
3991
+ * An account subdomain only becomes a readiness URL when workers.dev is on.
3992
+ */
3993
+ function workersDevReadinessRecovery(workersDev, kind) {
3994
+ if (workersDev === false) return "workers.dev is off for this Worker, so an account subdomain does not create a readiness URL.";
3995
+ switch (kind) {
3996
+ case "bootstrap": return `If the app uses workers.dev, enable workers.dev for this Worker in the Cloudflare dashboard. Then set CLOUDFLARE_WORKERS_SUBDOMAIN to your account subdomain ${WORKERS_SUBDOMAIN_EXAMPLE}.`;
3997
+ case "atomic": return `If the app uses workers.dev, set CLOUDFLARE_WORKERS_SUBDOMAIN to your account subdomain ${WORKERS_SUBDOMAIN_EXAMPLE}.`;
3998
+ default: return kind;
3999
+ }
4000
+ }
3644
4001
  /** Explain a live version whose readiness URL Void could not determine. */
3645
4002
  function formatCloudflarePublishWithoutUrl(published, recovery) {
3646
4003
  return [
@@ -3716,6 +4073,7 @@ async function prepareCloudflareFrameworkArtifact(options) {
3716
4073
  "_routes.json",
3717
4074
  "__original.js",
3718
4075
  "__original.mjs",
4076
+ "__void_handlers.js",
3719
4077
  "__void_handlers.mjs",
3720
4078
  "__void_isr*.mjs",
3721
4079
  "__void_migration_handler*.mjs"
@@ -3819,7 +4177,7 @@ function planStaticEdgeRouting(options) {
3819
4177
  assetHeaders: generatedHeaders
3820
4178
  };
3821
4179
  }
3822
- async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliLog, deps, initialCloudflareLink, initialCloudflareCandidate) {
4180
+ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliLog, deps, initialCloudflareLink, initialCloudflareCandidate, reporter) {
3823
4181
  const exit = deps.exit ?? ((code) => process.exit(code));
3824
4182
  const configPath = discoverRootWranglerConfig(root);
3825
4183
  const connection = await connectCloudflareDeployAccount({
@@ -3828,7 +4186,8 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
3828
4186
  rootConfig: parseRootWranglerConfig(configPath),
3829
4187
  deps,
3830
4188
  persistAccount: !(options.reuseExistingWorker || initialCloudflareLink),
3831
- readinessAccessOrigin: options.readinessAccessOrigin
4189
+ readinessAccessOrigin: options.readinessAccessOrigin,
4190
+ reporter
3832
4191
  });
3833
4192
  if (!connection || !await confirmCloudflareDeployAuthentication(connection, configPath)) return exit(1);
3834
4193
  const { apiBaseUrl, complianceRegion, usesCf, cfUploaderIsPinned, assertUploaderStillPinned, accountId, workersDevSubdomain, readinessAccessOrigin, runWrangler } = connection;
@@ -3945,7 +4304,8 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
3945
4304
  configPath: staticConfigPath,
3946
4305
  runWrangler,
3947
4306
  cfUploaderIsPinned,
3948
- verifyCompatibilityRunner: assertUploaderStillPinned
4307
+ verifyCompatibilityRunner: assertUploaderStillPinned,
4308
+ reporter
3949
4309
  });
3950
4310
  const execution = await activateCloudflareVersionWithProgress(deps.activateVersion ?? activateCloudflareVersion, {
3951
4311
  ...cloudflareCandidateActivationOptions({
@@ -3979,7 +4339,7 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
3979
4339
  assetsDirectoryOverride: stagedAssetsDirectory
3980
4340
  }).finally(() => cfOutput?.dispose());
3981
4341
  if (!execution.ok) {
3982
- await reportCloudflareActivationFailure(cliLog, formatCloudflareActivationError(execution));
4342
+ await reportCloudflareActivationFailure(reporter, formatCloudflareActivationError(execution), execution);
3983
4343
  return exit(1);
3984
4344
  }
3985
4345
  recordCloudflareActivation({
@@ -4436,7 +4796,7 @@ async function buildCloudflareWorker(input) {
4436
4796
  if (!assertUploaderStillPinned()) return exit(1);
4437
4797
  const migrations = collectMigrations(migrationsDir);
4438
4798
  if (existingWorker && migrations.length) throw new Error("The build added database migrations. Link the existing site before making schema changes.");
4439
- if (dialect !== "sqlite" && migrations.length > 0 && !process.env.DATABASE_URL) {
4799
+ if (!input.skipMigrations && dialect !== "sqlite" && migrations.length > 0 && !process.env.DATABASE_URL) {
4440
4800
  log$1.error(`deploy: the build added ${dialect === "mysql" ? "MySQL" : "PostgreSQL"} migrations, but DATABASE_URL is not set. Refusing to upload a Worker against an unmigrated database.`);
4441
4801
  return exit(1);
4442
4802
  }
@@ -4610,7 +4970,11 @@ async function migrateCloudflareWorker(input) {
4610
4970
  }
4611
4971
  }
4612
4972
  let appliedMigrations = 0;
4613
- if (dialect !== "sqlite" && migrations.length > 0) {
4973
+ if (input.skipMigrations) {
4974
+ log$1.info("Skipping database migrations.");
4975
+ cliLog.info("cloudflare_migrations_skipped");
4976
+ }
4977
+ if (!input.skipMigrations && dialect !== "sqlite" && migrations.length > 0) {
4614
4978
  const mysql = dialect === "mysql";
4615
4979
  const label = mysql ? "MySQL" : "PostgreSQL";
4616
4980
  const databaseUrl = process.env.DATABASE_URL;
@@ -4628,7 +4992,7 @@ async function migrateCloudflareWorker(input) {
4628
4992
  return exit(1);
4629
4993
  }
4630
4994
  }
4631
- const d1 = await applyAndVerifyRemoteD1Migrations(d1MigrateToken, configPath, runWrangler, assertUploaderStillPinned, readDeploymentPlatform(root) !== "cloudflare");
4995
+ const d1 = input.skipMigrations ? { restoreCommand: void 0 } : await applyAndVerifyRemoteD1Migrations(d1MigrateToken, configPath, runWrangler, assertUploaderStillPinned, readDeploymentPlatform(root) !== "cloudflare");
4632
4996
  if (!d1) return exit(1);
4633
4997
  const d1RestoreCommand = d1.restoreCommand;
4634
4998
  if (!verifyCloudflareDeployArtifact(root, deps, {
@@ -4639,6 +5003,7 @@ async function migrateCloudflareWorker(input) {
4639
5003
  return exit(1);
4640
5004
  }
4641
5005
  return {
5006
+ migrationHistory: input.skipMigrations ? null : migrations.map((migration) => migration.name),
4642
5007
  workerWasMissingBeforeSecretProvisioning,
4643
5008
  initialAuthSecret,
4644
5009
  appliedMigrations,
@@ -5015,7 +5380,7 @@ async function prepareCloudflareDeploySource(root, options, voidConfig) {
5015
5380
  const configPath = discoverRootWranglerConfig(root);
5016
5381
  const facts = await computeDesiredCloudflareResources(root, voidConfig, configPath, application);
5017
5382
  const { desired, dialect, migrations: preBuildMigrations, migrationsDir } = facts;
5018
- if (dialect !== "sqlite" && preBuildMigrations.length > 0 && !process.env.DATABASE_URL) {
5383
+ if (!options.skipMigrations && dialect !== "sqlite" && preBuildMigrations.length > 0 && !process.env.DATABASE_URL) {
5019
5384
  log$1.error([
5020
5385
  `deploy: ${dialect === "mysql" ? "MySQL" : "PostgreSQL"} migrations require DATABASE_URL for --platform cloudflare.`,
5021
5386
  "Set the production connection string in the deploy environment. Void uses it only to",
@@ -5046,7 +5411,7 @@ async function prepareCloudflareDeploySource(root, options, voidConfig) {
5046
5411
  }
5047
5412
  /** Pin the account and uploader, set up email, provision resources and snapshot the pins. */
5048
5413
  async function preflightCloudflareWorker(input) {
5049
- const { root, voidConfig, options, deps, exit, cliLog, initialCloudflareLink, detectedFramework, source } = input;
5414
+ const { root, voidConfig, options, deps, exit, cliLog, reporter, initialCloudflareLink, detectedFramework, source } = input;
5050
5415
  const { configPath, needsSandbox, needsEmail, emailHandlers, authEnabled, needsAI, expectedCrons, desired, migrations: preBuildMigrations, reasons, needsLive } = source;
5051
5416
  let rootConfig = parseRootWranglerConfig(configPath);
5052
5417
  if (needsSandbox) try {
@@ -5061,7 +5426,8 @@ async function preflightCloudflareWorker(input) {
5061
5426
  rootConfig,
5062
5427
  deps,
5063
5428
  persistAccount: !(options.reuseExistingWorker || initialCloudflareLink),
5064
- readinessAccessOrigin: options.readinessAccessOrigin
5429
+ readinessAccessOrigin: options.readinessAccessOrigin,
5430
+ reporter
5065
5431
  });
5066
5432
  if (!connection) return exit(1);
5067
5433
  const { apiBaseUrl, complianceRegion, usesCf, cfUploaderIsPinned, assertUploaderStillPinned, accountId, workersDevSubdomain, readinessAccessOrigin, runWrangler } = connection;
@@ -5316,10 +5682,11 @@ async function preflightCloudflareWorker(input) {
5316
5682
  // src/cli/deploy-cloudflare-publish.ts
5317
5683
  /** Upload the verified Worker as a candidate version, probe it, and activate it. */
5318
5684
  async function publishCloudflareWorker(input) {
5319
- const { root, deps, exit, cliLog, atomic, detectedFramework, initialCloudflareCandidate } = input;
5685
+ const { root, deps, exit, cliLog, reporter, atomic, detectedFramework } = input;
5686
+ const { initialCloudflareCandidate } = input;
5320
5687
  const { configPath, needsSandbox, desired, analysis } = input.source;
5321
5688
  const { usesCf, existingWorker, pinnedHandoffLink, accountId, workerName, cfUploaderIsPinned, apiBaseUrl, complianceRegion, runWrangler, assertUploaderStillPinned, schemaFacts, approvedHandoffKv, workersDevSubdomain, readinessAccessOrigin } = input.preflight;
5322
- const { migrations, d1MigrateToken, generatedConfigPath, prepareBuildOutput } = input.build;
5689
+ const { d1MigrateToken, generatedConfigPath, prepareBuildOutput } = input.build;
5323
5690
  const { workerWasMissingBeforeSecretProvisioning, initialAuthSecret, appliedMigrations } = input.migration;
5324
5691
  const queueConsumerCleanup = readWranglerManagedQueueCleanupCandidates(configPath);
5325
5692
  assertCloudflareDeployTargetUnchanged({
@@ -5344,7 +5711,8 @@ async function publishCloudflareWorker(input) {
5344
5711
  configPath: generatedConfigPath,
5345
5712
  runWrangler,
5346
5713
  cfUploaderIsPinned,
5347
- verifyCompatibilityRunner: assertUploaderStillPinned
5714
+ verifyCompatibilityRunner: assertUploaderStillPinned,
5715
+ reporter
5348
5716
  });
5349
5717
  const pinActiveSecrets = createActiveSecretPinner({
5350
5718
  output: cfOutput,
@@ -5377,7 +5745,7 @@ async function publishCloudflareWorker(input) {
5377
5745
  verifyUploader: cfOutput ? cfUploaderIsPinned : assertUploaderStillPinned,
5378
5746
  requireVersionMetadata: existingWorker === null || hasVersionMetadata,
5379
5747
  requirePreviewForReadiness: existingWorker !== null && !hasVersionMetadata,
5380
- message: encodeCloudflareVersionMessage(migrations.map((migration) => migration.name), {
5748
+ message: encodeCloudflareVersionMessage(input.migration.migrationHistory, {
5381
5749
  ...readCloudflareTriggerConfig(generatedConfigPath, configPath),
5382
5750
  ...existingWorker ? { preserve: true } : {}
5383
5751
  }),
@@ -5388,7 +5756,7 @@ async function publishCloudflareWorker(input) {
5388
5756
  }).finally(() => cfOutput?.dispose());
5389
5757
  if (!execution.ok) {
5390
5758
  if (execution.reason === "atomic-readiness-failed" || execution.reason === "atomic-readiness-access-denied") clearCloudflareCandidate(root);
5391
- await reportCloudflareActivationFailure(cliLog, needsSandbox && execution.containersUnavailable ? formatCloudflareSandboxUnavailable() : formatCloudflareActivationError(execution));
5759
+ await reportCloudflareActivationFailure(reporter, needsSandbox && execution.containersUnavailable ? formatCloudflareSandboxUnavailable() : formatCloudflareActivationError(execution), execution);
5392
5760
  return exit(1);
5393
5761
  }
5394
5762
  recordCloudflareActivation({
@@ -5404,7 +5772,7 @@ async function publishCloudflareWorker(input) {
5404
5772
  note(formatDeploySummary({
5405
5773
  workerName,
5406
5774
  migrations: appliedMigrations,
5407
- d1MigrationsCurrent: d1MigrateToken !== void 0,
5775
+ d1MigrationsCurrent: input.migration.migrationHistory !== null && d1MigrateToken !== void 0,
5408
5776
  cronJobs: existingWorker ? void 0 : analysis.jobs.length,
5409
5777
  queues: existingWorker ? void 0 : desired.queues.length,
5410
5778
  framework: detectedFramework?.name
@@ -5416,7 +5784,23 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
5416
5784
  options = withRecordedReadinessAccessOrigin(options);
5417
5785
  const initialCloudflareLink = readCloudflareLink(root);
5418
5786
  const initialCloudflareCandidate = readCloudflareCandidate(root);
5419
- const exit = deps.exit ?? ((code) => process.exit(code));
5787
+ const exitProcess = deps.exit ?? ((code) => process.exit(code));
5788
+ const exit = (code) => {
5789
+ if (code === 0) cliLog.info("deploy_end", {
5790
+ ok: true,
5791
+ exitCode: code
5792
+ });
5793
+ else cliLog.error("deploy_end", void 0, {
5794
+ ok: false,
5795
+ exitCode: code
5796
+ });
5797
+ return exitProcess(code);
5798
+ };
5799
+ deps = {
5800
+ ...deps,
5801
+ exit
5802
+ };
5803
+ const reporter = createCloudflareChildReporter(cliLog);
5420
5804
  const voidConfig = readConfig(root);
5421
5805
  const atomic = options.atomic === true || voidConfig.deploy?.cloudflare?.mode === "atomic";
5422
5806
  if (atomic && (options.reuseExistingWorker || initialCloudflareLink)) {
@@ -5448,7 +5832,7 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
5448
5832
  log$1.error("deploy: atomic deployment is only for Workers with Durable Objects.");
5449
5833
  return exit(1);
5450
5834
  }
5451
- return runCloudflareStaticDeploy(root, options, voidConfig, staticPreset, cliLog, deps, initialCloudflareLink, initialCloudflareCandidate);
5835
+ return runCloudflareStaticDeploy(root, options, voidConfig, staticPreset, cliLog, deps, initialCloudflareLink, initialCloudflareCandidate, reporter);
5452
5836
  }
5453
5837
  if (detectedFramework && voidConfig.routing?.alwaysUseHttps === true) {
5454
5838
  log$1.error([
@@ -5467,6 +5851,7 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
5467
5851
  deps,
5468
5852
  exit,
5469
5853
  cliLog,
5854
+ reporter,
5470
5855
  initialCloudflareLink,
5471
5856
  detectedFramework,
5472
5857
  source
@@ -5478,6 +5863,7 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
5478
5863
  deps,
5479
5864
  exit,
5480
5865
  atomic,
5866
+ skipMigrations: options.skipMigrations,
5481
5867
  frameworkPreset,
5482
5868
  detectedFramework,
5483
5869
  source,
@@ -5490,7 +5876,8 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
5490
5876
  cliLog,
5491
5877
  source,
5492
5878
  preflight,
5493
- build
5879
+ build,
5880
+ skipMigrations: options.skipMigrations
5494
5881
  });
5495
5882
  let restoreReported = false;
5496
5883
  const reportRestore = () => {
@@ -5509,6 +5896,7 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
5509
5896
  deps,
5510
5897
  exit: exitAfterMigrations,
5511
5898
  cliLog,
5899
+ reporter,
5512
5900
  atomic,
5513
5901
  detectedFramework,
5514
5902
  initialCloudflareCandidate,
@@ -5528,7 +5916,7 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
5528
5916
  /**
5529
5917
  * Class B/C framework deploy: build with framework CLI, package with preset output paths.
5530
5918
  */
5531
- async function runFrameworkDeploy(root, config, client, detected, fwPreset, voidConfig, skipBuild, gitMetadata, cliLog) {
5919
+ async function runFrameworkDeploy(root, config, client, detected, fwPreset, voidConfig, skipBuild, gitMetadata, cliLog, skipMigrations) {
5532
5920
  log$1.info(`${detected.name} framework deploy`);
5533
5921
  cliLog?.info("deploy_mode", {
5534
5922
  mode: "framework",
@@ -5644,6 +6032,7 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void
5644
6032
  fallbackRules,
5645
6033
  dialect
5646
6034
  });
6035
+ if (skipMigrations) manifest.migrationMode = "skip";
5647
6036
  const workerFiles = collectWorkerFiles(actualWorkerDir);
5648
6037
  cliLog?.info("package_end", {
5649
6038
  mode: "framework",
@@ -5678,7 +6067,7 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void
5678
6067
  printDeploySuccess(result.published !== false);
5679
6068
  }
5680
6069
  // src/cli/deploy-managed-full.ts
5681
- async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBuild, gitMetadata, detected, cliLog) {
6070
+ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBuild, gitMetadata, detected, cliLog, skipMigrations) {
5682
6071
  cliLog?.info("deploy_mode", {
5683
6072
  mode: "full",
5684
6073
  framework: detected?.name
@@ -5902,6 +6291,7 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui
5902
6291
  webSockets,
5903
6292
  durableObjects: analysis.durableObjects
5904
6293
  }, voidConfig.routing?.revalidate, voidConfig.routing?.isr !== false);
6294
+ if (skipMigrations) manifest.migrationMode = "skip";
5905
6295
  const workerDir = join(distDir, workerDirName);
5906
6296
  if (isFrameworkMode) {
5907
6297
  const wrapperFeatures = {
@@ -6146,33 +6536,32 @@ function openDeployLog(opts) {
6146
6536
  const mirror = opts?.mirrorToStderr === true;
6147
6537
  const startedAt = Date.now();
6148
6538
  let path = null;
6149
- let stream = null;
6539
+ let fd = null;
6150
6540
  let broken = false;
6151
6541
  let closed = false;
6542
+ let ended = false;
6152
6543
  try {
6153
6544
  const dir = join(homedir(), ".void", "logs");
6154
6545
  mkdirSync(dir, { recursive: true });
6155
6546
  const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
6156
6547
  const suffix = randomBytes(3).toString("hex");
6157
6548
  const filePath = join(dir, `deploy-${ts}-${process.pid}-${suffix}.jsonl`);
6158
- stream = createWriteStream(filePath, {
6159
- flags: "wx",
6160
- autoClose: true
6161
- });
6162
- stream.on("error", () => {
6163
- broken = true;
6164
- });
6549
+ fd = openSync(filePath, "wx", 384);
6165
6550
  path = filePath;
6166
6551
  } catch {
6167
6552
  broken = true;
6168
6553
  path = null;
6169
- stream = null;
6554
+ fd = null;
6170
6555
  }
6171
6556
  function write(level, msg, err, fields) {
6557
+ if (msg === "deploy_end") {
6558
+ if (ended) return;
6559
+ ended = true;
6560
+ }
6172
6561
  if (mirror) try {
6173
6562
  process.stderr.write(`${formatStderrLine(level, msg, err, fields)}\n`);
6174
6563
  } catch {}
6175
- if (broken || !stream || closed) return;
6564
+ if (broken || fd === null || closed) return;
6176
6565
  const now = Date.now();
6177
6566
  const record = {
6178
6567
  ts: now,
@@ -6197,7 +6586,9 @@ function openDeployLog(opts) {
6197
6586
  })}\n`;
6198
6587
  }
6199
6588
  try {
6200
- stream.write(line);
6589
+ const bytes = Buffer.from(line);
6590
+ let offset = 0;
6591
+ while (offset < bytes.length) offset += writeSync(fd, bytes, offset);
6201
6592
  } catch {
6202
6593
  broken = true;
6203
6594
  }
@@ -6221,14 +6612,13 @@ function openDeployLog(opts) {
6221
6612
  close() {
6222
6613
  if (closed) return Promise.resolve();
6223
6614
  closed = true;
6224
- if (!stream) return Promise.resolve();
6225
- return new Promise((resolveClose) => {
6615
+ if (fd !== null) {
6226
6616
  try {
6227
- stream.end(() => resolveClose());
6228
- } catch {
6229
- resolveClose();
6230
- }
6231
- });
6617
+ closeSync(fd);
6618
+ } catch {}
6619
+ fd = null;
6620
+ }
6621
+ return Promise.resolve();
6232
6622
  }
6233
6623
  };
6234
6624
  }
@@ -6389,6 +6779,7 @@ async function runDeploy(root, options) {
6389
6779
  dir: options?.dir,
6390
6780
  spa: options?.spa === true ? true : void 0,
6391
6781
  skipBuild: options?.skipBuild === true ? true : void 0,
6782
+ skipMigrations: options?.skipMigrations === true ? true : void 0,
6392
6783
  nodeVersion: process.version,
6393
6784
  platform: process.platform,
6394
6785
  arch: process.arch
@@ -6528,6 +6919,7 @@ async function runManagedDeploy(root, options, cliLog) {
6528
6919
  root,
6529
6920
  cliLog
6530
6921
  });
6922
+ if (options.skipMigrations) await client.requireMigrationSkipSupport();
6531
6923
  let config = null;
6532
6924
  if (requestedProjectSlug) {
6533
6925
  const linked = linkedProject?.slug === requestedProjectSlug ? await client.getProject(linkedProject.projectId) : null;
@@ -6595,8 +6987,8 @@ async function runManagedDeploy(root, options, cliLog) {
6595
6987
  log$1.error(`No deploy preset found for framework "${detected.name}".`);
6596
6988
  process.exit(1);
6597
6989
  }
6598
- await runFrameworkDeploy(root, config, client, detected, fwPreset, voidConfig, options?.skipBuild, gitMetadata, cliLog);
6599
- } else await runFullDeploy(root, config, client, voidConfig, fwPreset, options?.skipBuild, gitMetadata, detected, cliLog);
6990
+ await runFrameworkDeploy(root, config, client, detected, fwPreset, voidConfig, options?.skipBuild, gitMetadata, cliLog, options.skipMigrations);
6991
+ } else await runFullDeploy(root, config, client, voidConfig, fwPreset, options?.skipBuild, gitMetadata, detected, cliLog, options.skipMigrations);
6600
6992
  return;
6601
6993
  }
6602
6994
  if (!preset && !voidConfig.inference?.appType) preset = detectPreset(root, {
@@ -6609,7 +7001,7 @@ async function runManagedDeploy(root, options, cliLog) {
6609
7001
  buildCommand: resolveStaticBuildCommand(preset, voidConfig.inference?.build, Boolean(options?.dir))
6610
7002
  };
6611
7003
  await runStaticDeploy(root, config, client, preset, options?.skipBuild, gitMetadata, void 0, void 0, void 0, void 0, voidConfig.routing, cliLog);
6612
- } else await runFullDeploy(root, config, client, voidConfig, void 0, options?.skipBuild, gitMetadata, void 0, cliLog);
7004
+ } else await runFullDeploy(root, config, client, voidConfig, void 0, options?.skipBuild, gitMetadata, void 0, cliLog, options.skipMigrations);
6613
7005
  return;
6614
7006
  } catch (error) {
6615
7007
  if (isExpiredTokenError(error)) {