void 1.11.0 → 1.12.1

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-Bbr5cHjm.mjs → account-cmd-BU1Fy_Bf.mjs} +6 -6
  2. package/dist/{agents-DRo8gzni.mjs → agents-64FnLwxP.mjs} +6 -5
  3. package/dist/{application-analysis-XyUuNqYA.mjs → application-analysis-DVeN8yoi.mjs} +48 -22
  4. package/dist/{application-routing-DATqynKH.mjs → application-routing-KKw4Y84h.mjs} +1 -1
  5. package/dist/{assets-DZBd7yqh.mjs → assets-Br6_BeFJ.mjs} +34 -27
  6. package/dist/{ast-Cv0JwXqb.mjs → ast-BkPQu7A0.mjs} +5 -1
  7. package/dist/{auth-BN0NU9dz.mjs → auth-A7cZ8aXA.mjs} +1 -1
  8. package/dist/{auth-CCk9Seol.mjs → auth-CqwJwItO.mjs} +24 -12
  9. package/dist/{auth-link-CVxoyU81.mjs → auth-link-Duu2NvN5.mjs} +6 -6
  10. package/dist/{auth-router-ChXKduRM.mjs → auth-router-vgtOdb9j.mjs} +5 -5
  11. package/dist/{better-auth-shared-B8W8tZxP.d.mts → better-auth-shared-BS3pDQbT.d.mts} +6 -6
  12. package/dist/{better-auth-shared-DRHo5FoG.mjs → better-auth-shared-BcqDt-37.mjs} +7 -2
  13. package/dist/{build-cmd-C3b13rRf.mjs → build-cmd-B7OJ0U5R.mjs} +13 -12
  14. package/dist/build-id-4IV4hC1-.mjs +13 -0
  15. package/dist/{cache-B1WzZV60.mjs → cache-wSpi3aeM.mjs} +6 -6
  16. package/dist/{cancel-deploy-BggXixU_.mjs → cancel-deploy-DMWzkAlb.mjs} +5 -5
  17. package/dist/{cf-access-Dnyw8KFY.mjs → cf-access-DHklo7Rg.mjs} +41 -23
  18. package/dist/{cf-access-pejlJmuy.mjs → cf-access-DmkKPcAI.mjs} +0 -8
  19. package/dist/{cf-build-output-bBx1gDll.mjs → cf-build-output-Cso7Vh-t.mjs} +31 -27
  20. package/dist/cf-build-output-Wpk_e5CI.mjs +1 -0
  21. package/dist/{cf-command-values-Ccl-zRhl.mjs → cf-command-values-5BPBRc9Z.mjs} +1 -1
  22. package/dist/cf-config-migrate-D271BTiw.mjs +1664 -0
  23. package/dist/{cf-worker-settings-CARs4Wy9.mjs → cf-worker-settings-BBdlhm9U.mjs} +1 -1
  24. package/dist/cli/cli.mjs +1 -1
  25. package/dist/cli/cloudflare-operation-process.mjs +17 -14
  26. package/dist/cli/db-execute-process.d.mts +2 -0
  27. package/dist/cli/db-execute-process.mjs +57 -0
  28. package/dist/cli/env-schema-probe.d.mts +3 -1
  29. package/dist/cli/env-schema-probe.mjs +7 -8
  30. package/dist/{cli-main-DW09sVsT.mjs → cli-main-BrChcpE3.mjs} +152 -405
  31. package/dist/{client-DF6U7KLP.mjs → client-DE2m2ldh.mjs} +186 -17
  32. package/dist/{client-DGfZTE4V.mjs → client-eLZwqkPH.mjs} +1 -1
  33. package/dist/{cloudflare-auth-pNvmT6kL.mjs → cloudflare-auth-eWfhdZCk.mjs} +1 -1
  34. package/dist/{cloudflare-cmd-BOhToob3.mjs → cloudflare-cmd-SsFlJe2B.mjs} +7 -8
  35. package/dist/{cloudflare-config-D1dMHbvz.mjs → cloudflare-config-D9UFH_A5.mjs} +2 -2
  36. package/dist/{cloudflare-connect-DTrsIBAa.mjs → cloudflare-connect-BgpHcSg3.mjs} +3 -3
  37. package/dist/{cloudflare-operations-DmqtzoX4.mjs → cloudflare-operations-BIRQkYwL.mjs} +26 -28
  38. package/dist/cloudflare-operations-ByjFGats.mjs +1 -0
  39. package/dist/cloudflare-process-60r4Z2Zf.mjs +671 -0
  40. package/dist/cloudflare-user-output-CCR99eQY.mjs +19 -0
  41. package/dist/collect-B6nlSnsb.mjs +1 -0
  42. package/dist/{collect-C6Blu9yw.mjs → collect-rNLybAnF.mjs} +3 -3
  43. package/dist/{config-Do7gJI3T.mjs → config-BFX5ZB1J.mjs} +5 -4
  44. package/dist/{config-CeZd67L0.mjs → config-BSoW3QCB.mjs} +5 -5
  45. package/dist/{config-DYW2TBgz.d.mts → config-DA6ZbLXO.d.mts} +1 -1
  46. package/dist/{config-dMSpL-ml.mjs → config-DtjrUtPo.mjs} +1 -1
  47. package/dist/{config-BmvqLnbi.mjs → config-Dv5jri1-.mjs} +4 -4
  48. package/dist/config-entry.d.mts +1 -1
  49. package/dist/{connect-B3bKxRzX.mjs → connect-D0V0o40j.mjs} +9 -9
  50. package/dist/{create-project-DLUlxmf5.mjs → create-project-8FdN6D2i.mjs} +7 -6
  51. package/dist/{create-project-By7ymK7F.mjs → create-project-CbuDH5Hv.mjs} +1 -1
  52. package/dist/{db-3qsP21pH.mjs → db-BNPIjLkK.mjs} +1450 -154
  53. package/dist/db-args-BvMwAber.mjs +1 -0
  54. package/dist/db-args-CiQVg8SJ.mjs +321 -0
  55. package/dist/db-seed-loader-Bcz_SutQ.mjs +253 -0
  56. package/dist/{db-types-DC7KJLx2.mjs → db-types-B4Cf9dzR.mjs} +1 -1
  57. package/dist/{delete-HbFqgEFC.mjs → delete-WtLEfap2.mjs} +6 -6
  58. package/dist/{deploy-2QjsBEGw.mjs → deploy-BgSbagIP.mjs} +218 -553
  59. package/dist/deploy-Do6FWqon.mjs +2 -0
  60. package/dist/{deploy-managed-static-JoNP3cec.mjs → deploy-managed-static-BWBsxOww.mjs} +115 -194
  61. package/dist/deploy-security-notice-IRGy6Edf.mjs +192 -0
  62. package/dist/{deploy-transport-QAkhJYRI.mjs → deploy-transport-BKP_oV9q.mjs} +4 -4
  63. package/dist/deploy.mjs +9 -9
  64. package/dist/{dev-inbox-BiamQEAa.mjs → dev-inbox-ClVjKEHy.mjs} +1 -1
  65. package/dist/direct-r2-upload-DFXLWfXV.mjs +204 -0
  66. package/dist/discover-D2KGP3cR.mjs +1 -0
  67. package/dist/{discover-Vd18lHsj.mjs → discover-IcspacCg.mjs} +1 -1
  68. package/dist/{dispatch-BlOYh1Vc.mjs → dispatch-DIhDA3NI.mjs} +11 -10
  69. package/dist/{dist-Cp4b1_T9.mjs → dist-C47zy_kJ.mjs} +1 -1
  70. package/dist/{dist-STQXl8ck.mjs → dist-Cr_xGE_K.mjs} +73 -38
  71. package/dist/{domain-COkVSfII.mjs → domain-mweyYXSw.mjs} +8 -10
  72. package/dist/{dotenv-CEI8hapP.mjs → dotenv-BG6RQavH.mjs} +2 -2
  73. package/dist/{drizzle-BXVOa6Jg.mjs → drizzle-BJDMPrj7.mjs} +3 -4
  74. package/dist/{drizzle-CvSGrvdl.mjs → drizzle-CQ5jWuDL.mjs} +1 -1
  75. package/dist/{email-Dj02fLgQ.mjs → email-DcQNP40O.mjs} +33 -30
  76. package/dist/{email-cloudflare-DDknDAgp.mjs → email-cloudflare-DeYH3Ke7.mjs} +29 -38
  77. package/dist/{email-pattern-BYr-EFq5.mjs → email-pattern-bRna9MOJ.mjs} +2 -2
  78. package/dist/{entry-DMgR7XOf.mjs → entry-Bwb9ev8K.mjs} +13 -10
  79. package/dist/{env-BA7e5yzp.mjs → env-DaAoYR2-.mjs} +8 -8
  80. package/dist/{env-UqS-21xi.mjs → env-EjHqc7m9.mjs} +1 -1
  81. package/dist/{env-types-WEZw5D-r.mjs → env-types-D2hBodXP.mjs} +2 -19
  82. package/dist/{env-validation-DfJ9Fzfa.mjs → env-validation-D-v5_CWL.mjs} +13 -13
  83. package/dist/{env-validation-ly_Q9Kgd.mjs → env-validation-j9pjCDfA.mjs} +1 -1
  84. package/dist/{error-pages-QNeBXiRR.mjs → error-pages-GORL6F_e.mjs} +1 -1
  85. package/dist/{fetch-CbI6lNnk.d.mts → fetch-CczQyIed.d.mts} +1 -1
  86. package/dist/{fetch-DdK9eGin.mjs → fetch-CiEsvjpP.mjs} +1 -1
  87. package/dist/{fetch-stream-DQAavFdm.mjs → fetch-stream-BIG5lHW6.mjs} +3 -4
  88. package/dist/{fetch-stream-DoED9atq.d.mts → fetch-stream-DRX8-83b.d.mts} +2 -2
  89. package/dist/{gen-EMpnzNGz.mjs → gen-aOtHhZLD.mjs} +21 -18
  90. package/dist/gen-vhBDHs3q.mjs +1 -0
  91. package/dist/{generate-BOp1g1H_.mjs → generate-C3ZAqCy-.mjs} +1 -1
  92. package/dist/{generate-CWb8aOsm.mjs → generate-Dq2Bgw75.mjs} +6 -6
  93. package/dist/{git-metadata-Cukp5kV5.mjs → git-metadata-BEokJ6US.mjs} +1 -1
  94. package/dist/{github-cmd-8bXgJNAQ.mjs → github-cmd-BR19Ffdz.mjs} +14 -9
  95. package/dist/{handler-w_FAiIRu.mjs → handler-DCrDLzw2.mjs} +3 -3
  96. package/dist/has-own-key-D9QEnAkF.mjs +5 -0
  97. package/dist/{head-0o0QoREY.mjs → head-BwQ5kgqt.mjs} +5 -4
  98. package/dist/{head-CVO92KEx.d.mts → head-fUp8n_QJ.d.mts} +9 -4
  99. package/dist/{headers-BjgvlY29.mjs → headers-DqBsjDxg.mjs} +7 -7
  100. package/dist/{help-DCQKp3Kp.mjs → help-DvClCzqL.mjs} +138 -60
  101. package/dist/help-fKPzcTJv.mjs +1 -0
  102. package/dist/{inbound-BHt4dIlL.d.mts → inbound-CwgZSqFI.d.mts} +9 -3
  103. package/dist/{inbound--OF7zkwX.mjs → inbound-feMn1Rxx.mjs} +7 -7
  104. package/dist/{index-CmqHYj2R.d.mts → index-8cAgNdb6.d.mts} +1 -1
  105. package/dist/{index-BTmhCDbw.d.mts → index-BQ5qYiAw.d.mts} +2 -2
  106. package/dist/{index-BESZTC1z.d.mts → index-BYcWajVp.d.mts} +2 -1
  107. package/dist/{index-BXdP39qx.d.mts → index-Dn2mkPr2.d.mts} +24 -23
  108. package/dist/index.d.mts +2 -2
  109. package/dist/index.mjs +344 -637
  110. package/dist/{info--jdAIsJN.mjs → info-P6MBiVJi.mjs} +4 -4
  111. package/dist/{init-BLZvktk_.mjs → init-C8YpkGIP.mjs} +124 -345
  112. package/dist/installed-packages-tfmYd-cC.mjs +198 -0
  113. package/dist/{isr-config-Czzb4mIq.mjs → isr-config-DiTnL9Tb.mjs} +5 -5
  114. package/dist/{link-DPJ4jN7y.mjs → link-Dyz9IGcM.mjs} +7 -7
  115. package/dist/{list-B-au6xJt.mjs → list-VGYBMjmx.mjs} +11 -7
  116. package/dist/{live-DvtxTUhW.mjs → live-dvGThbwy.mjs} +14 -17
  117. package/dist/{load-user-env-BltIJLtl.mjs → load-user-env-B8qC0Q2Y.mjs} +1 -1
  118. package/dist/{local-d1-C6xn26Nl.mjs → local-d1-CYOYkVwO.mjs} +3 -3
  119. package/dist/{login-p1_BMgXg.mjs → login-CWFr-G2I.mjs} +8 -6
  120. package/dist/login-DECm3e9b.mjs +1 -0
  121. package/dist/{logs-UNH3vQeX.mjs → logs-kS1wuR4b.mjs} +9 -9
  122. package/dist/{migrate-9dlt6Mxu.mjs → migrate-BNZL1hee.mjs} +9 -10
  123. package/dist/migrate-C9aoWLvY.mjs +1 -0
  124. package/dist/{migrations-Cbns2RAm.mjs → migrations-CUHhX65Y.mjs} +5 -5
  125. package/dist/{mime-BGoZ8ZLL.mjs → mime-Btw9R3CC.mjs} +26 -12
  126. package/dist/module-references-DWQmO6TW.mjs +27 -0
  127. package/dist/mysql-lock-D8xtnI-D.mjs +145 -0
  128. package/dist/mysql-sql-BIE7bc4Z.mjs +124 -0
  129. package/dist/nitro.d.mts +3 -0
  130. package/dist/nitro.mjs +14 -5
  131. package/dist/{node-DqkiQujF.mjs → node-DVJWfV6s.mjs} +6 -6
  132. package/dist/{operator-ai-logging-BQ6mOgQs.mjs → operator-ai-logging-DD0n6zc2.mjs} +11 -10
  133. package/dist/operator-args-nvetCWuz.mjs +1499 -0
  134. package/dist/{operator-auth-CD3pap65.mjs → operator-auth-DMvn-y9X.mjs} +2 -2
  135. package/dist/{operator-client-XvXTkea6.mjs → operator-client-dFNnXfyB.mjs} +6 -5
  136. package/dist/operator-cmd-CVfK5U0B.mjs +1 -0
  137. package/dist/{operator-cmd-CKbZbNKn.mjs → operator-cmd-a7yOf2tH.mjs} +33 -13
  138. package/dist/operator-security-D5MToU0p.mjs +263 -0
  139. package/dist/{output-Bc8ixgPF.mjs → output-BZLnu0z8.mjs} +13 -3
  140. package/dist/output-D7K9TWIA.mjs +1 -0
  141. package/dist/{package-json-DvS6IFRv.mjs → package-json-4xUI3xLz.mjs} +1 -1
  142. package/dist/pages/client.d.mts +53 -30
  143. package/dist/pages/client.mjs +168 -38
  144. package/dist/pages/head.d.mts +1 -1
  145. package/dist/pages/head.mjs +1 -1
  146. package/dist/pages/index.d.mts +8 -2
  147. package/dist/pages/index.mjs +283 -13
  148. package/dist/pages/islands-plugin.d.mts +26 -8
  149. package/dist/pages/islands-plugin.mjs +61 -22
  150. package/dist/pages/protocol.d.mts +2 -2
  151. package/dist/pages/protocol.mjs +1 -1
  152. package/dist/pages/serialize.mjs +1 -1
  153. package/dist/{pgpass-CEtnBOZO.mjs → pgpass-BLPoYN9_.mjs} +3 -2
  154. package/dist/platform-args-CMwMoiLp.mjs +1 -0
  155. package/dist/{platform-args-DQSMW4EP.mjs → platform-args-CvZSuhYS.mjs} +37 -9
  156. package/dist/{platform-auth-config-D80AKe72.mjs → platform-auth-config-CpszX-Ne.mjs} +26 -23
  157. package/dist/{platform-auth-protection-k1Ox-u9T.mjs → platform-auth-protection-DA6Tw8Og.mjs} +10 -10
  158. package/dist/{platform-auth-recovery-D-hKehPy.mjs → platform-auth-recovery-Cztrb1JC.mjs} +11 -9
  159. package/dist/{platform-cmd-DQ0Wi61H.mjs → platform-cmd-m6Asj6nO.mjs} +11 -11
  160. package/dist/{platform-cmd-Dtz5lw7R.mjs → platform-cmd-u1j88ggF.mjs} +1 -1
  161. package/dist/{platform-discovery-B0eZjZ3B.mjs → platform-discovery-CLxtixHJ.mjs} +1 -1
  162. package/dist/{platform-domain-BMGS4l74.mjs → platform-domain-DJSznNTA.mjs} +14 -10
  163. package/dist/{platform-lifecycle-y4AfmC7M.mjs → platform-lifecycle-BC-9p58d.mjs} +1 -1
  164. package/dist/{platform-lifecycle-BCkNQNsQ.mjs → platform-lifecycle-GFeXv3NC.mjs} +802 -207
  165. package/dist/platform-management-BwHkz46V.mjs +1 -0
  166. package/dist/{platform-management-Cj2aXFqD.mjs → platform-management-DX1zINou.mjs} +227 -58
  167. package/dist/{platform-plans-config-CrUUzEl9.mjs → platform-plans-config-DiydtNKY.mjs} +112 -35
  168. package/dist/{platform-recovery-DKZnALHI.mjs → platform-recovery-CnzBbudV.mjs} +5 -5
  169. package/dist/{platform-registry-DZ_2Xuqd.mjs → platform-registry-DHH6fivm.mjs} +6 -5
  170. package/dist/{platform-setup-CKmSEb1J.mjs → platform-setup-Lph9i-rh.mjs} +26 -12
  171. package/dist/{plugin-inference-B_urWd5Z.mjs → plugin-inference-COlq96WJ.mjs} +28 -53
  172. package/dist/prepare-DcwigRUS.mjs +1 -0
  173. package/dist/{prepare-CU7SZieQ.mjs → prepare-WvijE289.mjs} +3 -3
  174. package/dist/{prepare-vCdm5moJ.mjs → prepare-co1o1FFd.mjs} +12 -12
  175. package/dist/{project-cmd-B4cgPSi4.mjs → project-cmd-BWJTplpc.mjs} +30 -24
  176. package/dist/{project-CLwxcEdq.mjs → project-dh9431bN.mjs} +2 -2
  177. package/dist/{project-paths-CUhCPMpK.mjs → project-paths-2ENfCCih.mjs} +4 -3
  178. package/dist/project-security-BV1xfj1K.mjs +1 -0
  179. package/dist/project-security-CY_aahvW.mjs +1340 -0
  180. package/dist/{project-team-BdX6anO3.mjs → project-team-BlIFXlmT.mjs} +8 -8
  181. package/dist/{project-token-C1rcq8Xb.mjs → project-token-CMsB7I1-.mjs} +6 -6
  182. package/dist/{project-tsconfig-MyRJgufB.mjs → project-tsconfig-BOA4ym99.mjs} +25 -5
  183. package/dist/{project-DVsTAWFh.mjs → project-uXKua1it.mjs} +1 -1
  184. package/dist/project-zero-trust-BI6pdpx4.mjs +210 -0
  185. package/dist/{protocol-W5EQcIzN.mjs → protocol-4rEnumif.mjs} +15 -8
  186. package/dist/{protocol-BlAiF-hc.d.mts → protocol-ERy-n3jf.d.mts} +7 -4
  187. package/dist/{provision-DWnnKdT-.mjs → provision-Bh44omGA.mjs} +30 -22
  188. package/dist/{provision-CGI-T0mq.mjs → provision-DFv7SJDn.mjs} +1 -1
  189. package/dist/{public-B80SwOFp.d.mts → public-DB9C2Cy_.d.mts} +5 -2
  190. package/dist/{raw-7pQirZpQ.mjs → raw-5rak34QN.mjs} +2 -1
  191. package/dist/{redirect-Dqb4fEc5.mjs → redirect-Dyvuil0Q.mjs} +6 -3
  192. package/dist/{requests-D6MaLS_Y.mjs → requests-CfmJxNYg.mjs} +6 -6
  193. package/dist/{resolve-project-Da3OgCU1.mjs → resolve-project-8WZ3iVmr.mjs} +3 -3
  194. package/dist/resolve-project-YsTH-U9I.mjs +1 -0
  195. package/dist/{rollback-Bs8I8PF8.mjs → rollback-DL5HuAsM.mjs} +16 -7
  196. package/dist/route-types-CSed9-Dp.mjs +435 -0
  197. package/dist/{route-url-BBdkU7rb.mjs → route-url-B41eQ8QI.mjs} +1 -1
  198. package/dist/{route-url-Di1kB8D_.d.mts → route-url-Bd6IX-JZ.d.mts} +2 -1
  199. package/dist/routes-stub.d.mts +1 -1
  200. package/dist/routes-stub.mjs +1 -1
  201. package/dist/{runner-CTk21HrO.mjs → runner-Bf94YVJK.mjs} +1 -1
  202. package/dist/{runner-CMZb7jNU.mjs → runner-CeguHWJx.mjs} +3 -2
  203. package/dist/{runner-mysql-CJ-HyqxV.mjs → runner-mysql-D549vGGm.mjs} +14 -9
  204. package/dist/{runner-mysql-C_PrAUTm.mjs → runner-mysql-DOjbj-N1.mjs} +1 -1
  205. package/dist/{runner-pg-mYc75KfH.mjs → runner-pg-Buzw17hl.mjs} +1 -1
  206. package/dist/{runner-pg-2pjltt0t.mjs → runner-pg-DMJquR3d.mjs} +1 -1
  207. package/dist/runtime/ai/index.mjs +2 -2
  208. package/dist/runtime/auth/better-auth-d1.d.mts +1 -1
  209. package/dist/runtime/auth/better-auth-d1.mjs +2 -2
  210. package/dist/runtime/auth/better-auth-mysql.d.mts +1 -1
  211. package/dist/runtime/auth/better-auth-mysql.mjs +2 -2
  212. package/dist/runtime/auth/better-auth-postgres.d.mts +1 -1
  213. package/dist/runtime/auth/better-auth-postgres.mjs +3 -3
  214. package/dist/runtime/client/fetch-server.d.mts +1 -1
  215. package/dist/runtime/client/fetch-server.mjs +2 -2
  216. package/dist/runtime/client/fetch-stream.d.mts +2 -2
  217. package/dist/runtime/client/fetch-stream.mjs +1 -1
  218. package/dist/runtime/client/fetch.d.mts +1 -1
  219. package/dist/runtime/client/fetch.mjs +1 -1
  220. package/dist/runtime/client/index.d.mts +2 -2
  221. package/dist/runtime/client/index.mjs +2 -2
  222. package/dist/runtime/client/react.d.mts +2 -2
  223. package/dist/runtime/client/react.mjs +2 -2
  224. package/dist/runtime/client/solid.d.mts +2 -2
  225. package/dist/runtime/client/solid.mjs +2 -2
  226. package/dist/runtime/client/svelte.d.mts +2 -2
  227. package/dist/runtime/client/svelte.mjs +2 -2
  228. package/dist/runtime/client/vue.d.mts +2 -2
  229. package/dist/runtime/client/vue.mjs +2 -2
  230. package/dist/runtime/db/index.d.mts +1 -1
  231. package/dist/runtime/db/index.mjs +3 -3
  232. package/dist/runtime/db/migrations/mysql-handler.mjs +2 -1
  233. package/dist/runtime/db/migrations/postgres-handler.mjs +1 -1
  234. package/dist/runtime/db/session.d.mts +1 -1
  235. package/dist/runtime/db/session.mjs +1 -1
  236. package/dist/runtime/durable/index.mjs +7 -5
  237. package/dist/runtime/email/index.d.mts +1 -1
  238. package/dist/runtime/email/index.mjs +14 -11
  239. package/dist/runtime/email/testing.d.mts +1 -1
  240. package/dist/runtime/email/testing.mjs +4 -4
  241. package/dist/runtime/env/public-client.d.mts +4 -1
  242. package/dist/runtime/env/public.d.mts +1 -1
  243. package/dist/runtime/env/public.mjs +2 -2
  244. package/dist/runtime/env/runtime.mjs +1 -1
  245. package/dist/runtime/handler/index.d.mts +1 -1
  246. package/dist/runtime/handler/index.mjs +1 -1
  247. package/dist/runtime/handler/validator.d.mts +1 -1
  248. package/dist/runtime/handler/validator.mjs +1 -1
  249. package/dist/runtime/isr/index.mjs +1 -1
  250. package/dist/runtime/kv/index.mjs +1 -1
  251. package/dist/runtime/live/client.d.mts +2 -2
  252. package/dist/runtime/live/client.mjs +7 -7
  253. package/dist/runtime/live/index.d.mts +1 -1
  254. package/dist/runtime/live/index.mjs +1 -1
  255. package/dist/runtime/live/server.mjs +3 -3
  256. package/dist/runtime/queues/index.mjs +2 -2
  257. package/dist/runtime/remote/index.d.mts +5 -1
  258. package/dist/runtime/remote/index.mjs +10 -9
  259. package/dist/runtime/routing/index.d.mts +11 -12
  260. package/dist/runtime/routing/index.mjs +69 -65
  261. package/dist/runtime/routing/route-url.d.mts +1 -1
  262. package/dist/runtime/routing/route-url.mjs +1 -1
  263. package/dist/runtime/sandbox/index.d.mts +1 -1
  264. package/dist/runtime/sandbox/index.mjs +2 -2
  265. package/dist/runtime/sse/client.d.mts +1 -1
  266. package/dist/runtime/sse/index.mjs +1 -1
  267. package/dist/runtime/storage/index.mjs +1 -1
  268. package/dist/runtime/ws/index.d.mts +1 -1
  269. package/dist/runtime/ws/index.mjs +3 -2
  270. package/dist/runtime/ws/room.d.mts +1 -1
  271. package/dist/runtime/ws/room.mjs +2 -2
  272. package/dist/runtime/ws/server.d.mts +2 -2
  273. package/dist/runtime/ws/server.mjs +1 -1
  274. package/dist/{runtime-zDDinDI5.mjs → runtime-C_VPIJBF.mjs} +1 -1
  275. package/dist/{scan-LjuG3vfA.mjs → scan-Ct_SEzH4.mjs} +36 -29
  276. package/dist/{secret-DdUs8AuR.mjs → secret-C-WBaUSS.mjs} +11 -10
  277. package/dist/security-api-types-CU7zQtr_.mjs +9 -0
  278. package/dist/security-sarif-ClyYwtAW.mjs +123 -0
  279. package/dist/{serialize-Pf-CIQK_.mjs → serialize-BmB4BfKu.mjs} +1 -1
  280. package/dist/{server-CfUbeOjx.mjs → server-T-4mn8zy.mjs} +5 -4
  281. package/dist/{session-Cw8-b8Um.mjs → session-BT8XDkvL.mjs} +1 -1
  282. package/dist/{session-DgNrdNh_.d.mts → session-ouZYD7zb.d.mts} +1 -1
  283. package/dist/{skills-B40svMBE.mjs → skills-C-csz78e.mjs} +3 -3
  284. package/dist/{sse-BXnTfcf3.mjs → sse-D3ab0YQT.mjs} +16 -13
  285. package/dist/{static-exports-DFkzL-NX.mjs → static-exports-s7P86Ngp.mjs} +3 -3
  286. package/dist/{subcommand-prompt-D-m3Umap.mjs → subcommand-prompt-B4LOLosl.mjs} +31 -21
  287. package/dist/sveltekit.mjs +1 -1
  288. package/dist/{terminal-log-text-DNsWJREL.mjs → terminal-log-text-CfS2JKM6.mjs} +1 -1
  289. package/dist/{url-DaehRGKR.mjs → url-DBQluotE.mjs} +4 -1
  290. package/dist/validate-CZYUIfR-.mjs +1 -0
  291. package/dist/{validate-Ddzl-IwT.mjs → validate-CtBWCzez.mjs} +7 -4
  292. package/dist/{validator-Duafcnh7.mjs → validator-Dfh9kCDm.mjs} +5 -5
  293. package/dist/{version-metadata-k6KFiyWt.mjs → version-metadata-DqgLa6gc.mjs} +1 -1
  294. package/dist/{wrangler-v2BmVchV.mjs → wrangler-DVe5KV5G.mjs} +49 -46
  295. package/dist/wrangler-Dq269bjx.mjs +1 -0
  296. package/dist/{wrapper-eh6MpBZA.mjs → wrapper-CcMYpOS8.mjs} +45 -171
  297. package/docs/guide/app-types.md +1 -1
  298. package/docs/guide/auth.md +2 -16
  299. package/docs/guide/database.md +2 -0
  300. package/docs/guide/email/domains.md +1 -1
  301. package/docs/guide/email/sending.md +18 -1
  302. package/docs/guide/jobs.md +1 -1
  303. package/docs/guide/pages-routing/actions-and-forms.md +40 -19
  304. package/docs/guide/pages-routing/errors.md +3 -1
  305. package/docs/guide/pages-routing/head.md +20 -2
  306. package/docs/guide/pages-routing/overview.md +20 -0
  307. package/docs/guide/platform/administration/plans.md +13 -0
  308. package/docs/guide/platform/administration/security-audits.md +213 -0
  309. package/docs/guide/platform/administration/zero-trust.md +7 -1
  310. package/docs/guide/platform/installation/ci.md +1 -1
  311. package/docs/guide/platform/installation/credentials.md +23 -20
  312. package/docs/guide/platform/installation/maintenance.md +11 -5
  313. package/docs/guide/platform/installation/prerequisites.md +1 -1
  314. package/docs/guide/platform/installation/uninstall.md +2 -0
  315. package/docs/guide/platform-administration.md +1 -0
  316. package/docs/guide/queues.md +1 -1
  317. package/docs/guide/self-hosted-platform.md +14 -13
  318. package/docs/guide/type-safety.md +1 -1
  319. package/docs/integrations/cloudflare.md +3 -1
  320. package/docs/integrations/frameworks/sveltekit.md +1 -1
  321. package/docs/reference/api/handlers.md +3 -3
  322. package/docs/reference/api/pages.md +4 -0
  323. package/docs/reference/api/types.md +11 -1
  324. package/docs/reference/cli/database.md +42 -6
  325. package/docs/reference/cli/deploy.md +5 -1
  326. package/docs/reference/cli/domains.md +1 -1
  327. package/docs/reference/cli/platform-config.md +5 -3
  328. package/docs/reference/cli/platform-installation.md +29 -28
  329. package/docs/reference/cli/platform-security.md +98 -0
  330. package/docs/reference/cli/platform-zero-trust.md +6 -3
  331. package/docs/reference/cli/platform.md +1 -0
  332. package/docs/reference/cli/project.md +57 -0
  333. package/docs/reference/cli/setup.md +4 -0
  334. package/docs/reference/cli.md +3 -1
  335. package/docs/reference/config.md +2 -2
  336. package/package.json +30 -27
  337. package/skills/void/SKILL.md +7 -0
  338. package/dist/cf-build-output-D3_x71H6.mjs +0 -1
  339. package/dist/cf-config-migrate-CHtnM3_C.mjs +0 -348
  340. package/dist/cloudflare-operations-BditDbcd.mjs +0 -1
  341. package/dist/cloudflare-process-wcnaQ5JG.mjs +0 -392
  342. package/dist/cloudflare-user-output-zEwuGrEJ.mjs +0 -19
  343. package/dist/collect-8i0wU63d.mjs +0 -1
  344. package/dist/deploy-DiFfBu8g.mjs +0 -2
  345. package/dist/discover-Diq0l6TZ.mjs +0 -1
  346. package/dist/gen-CuANrEzy.mjs +0 -1
  347. package/dist/help-7EzLA1qP.mjs +0 -1
  348. package/dist/login-apwve7WD.mjs +0 -1
  349. package/dist/migrate-BzRplq7m.mjs +0 -1
  350. package/dist/mysql-sql-SlpS6OMg.mjs +0 -239
  351. package/dist/operator-args-BCCohcz3.mjs +0 -722
  352. package/dist/operator-cmd-D42knxMz.mjs +0 -1
  353. package/dist/output-D4UOUifX.mjs +0 -1
  354. package/dist/platform-args-Rgp86xa7.mjs +0 -1
  355. package/dist/platform-management-CRzeC70H.mjs +0 -1
  356. package/dist/prepare-C2MTqfFv.mjs +0 -1
  357. package/dist/project-zero-trust-CS02LrlK.mjs +0 -64
  358. package/dist/resolve-project-C5wC-Hoi.mjs +0 -1
  359. package/dist/route-types-CrODgORq.mjs +0 -655
  360. package/dist/validate-DY1U9rET.mjs +0 -1
  361. package/dist/wrangler-BPIAJdxA.mjs +0 -1
@@ -1,11 +1,18 @@
1
- import { $ as wrapTextWithPrefix, G as promptTitle, M as getGuide, V as optionText, b as S_RADIO_ACTIVE, d as S_CHECKBOX_SELECTED, i as S_BAR_END, it as wrapAnsi, j as formatInstructionFooter, n as SELECT_INSTRUCTIONS, r as S_BAR, t as MULTISELECT_INSTRUCTIONS, u as S_CHECKBOX_INACTIVE, w as S_STEP_SUBMIT } from "./dist-STQXl8ck.mjs";
2
- import { p as import_picocolors } from "./output-Bc8ixgPF.mjs";
1
+ import { $ as wrapTextWithPrefix, G as promptTitle, M as getGuide, V as optionText, b as S_RADIO_ACTIVE, d as S_CHECKBOX_SELECTED, i as S_BAR_END, it as wrapAnsi, j as formatInstructionFooter, n as SELECT_INSTRUCTIONS, r as S_BAR, t as MULTISELECT_INSTRUCTIONS, u as S_CHECKBOX_INACTIVE, w as S_STEP_SUBMIT } from "./dist-Cr_xGE_K.mjs";
2
+ import { h as import_picocolors } from "./output-BZLnu0z8.mjs";
3
3
  // src/cli/subcommand-prompt.ts
4
4
  const isUpKey = (key) => key === "\x1B[A" || key === "\x1BOA";
5
5
  const isDownKey = (key) => key === "\x1B[B" || key === "\x1BOB";
6
6
  const isEnterKey = (key) => key === "\r" || key === "\n";
7
7
  const isBackspaceKey = (key) => key === "" || key === "\b";
8
8
  const isPrintableKey = (key) => key.length === 1 && key >= " ";
9
+ function checkboxMarker(selected, focused) {
10
+ const checkbox = selected ? import_picocolors.default.blue(S_CHECKBOX_SELECTED) : focused ? import_picocolors.default.blue(S_CHECKBOX_INACTIVE) : import_picocolors.default.dim(S_CHECKBOX_INACTIVE);
11
+ return (focused ? import_picocolors.default.blue(S_RADIO_ACTIVE) : " ") + " " + checkbox;
12
+ }
13
+ function guidePrefix() {
14
+ return getGuide() ? import_picocolors.default.gray(S_BAR) + " " : " ";
15
+ }
9
16
  function promptSubcommand(command, subcommands) {
10
17
  return new Promise((resolve) => {
11
18
  const { stdin, stdout } = process;
@@ -31,7 +38,7 @@ function promptSubcommand(command, subcommands) {
31
38
  hard: true,
32
39
  trim: false
33
40
  }).split("\n").length;
34
- stdout.write(`\x1B[${rows}A\r\x1B[0J`);
41
+ stdout.write(`\u001B[${rows}A\r\u001B[0J`);
35
42
  previousFrame = "";
36
43
  }
37
44
  }
@@ -50,16 +57,9 @@ function promptSubcommand(command, subcommands) {
50
57
  }
51
58
  return `${lines[0]}…`;
52
59
  }
53
- function guidePrefix() {
54
- return getGuide() ? import_picocolors.default.gray(S_BAR) + " " : " ";
55
- }
56
60
  function renderOption(marker, label, focused, suffix = "") {
57
61
  return guidePrefix() + optionText(stdout, marker + " ", label, focused ? (value) => import_picocolors.default.blue(import_picocolors.default.bold(value)) : import_picocolors.default.dim, suffix);
58
62
  }
59
- function checkboxMarker(selected, focused) {
60
- const checkbox = selected ? import_picocolors.default.blue(S_CHECKBOX_SELECTED) : focused ? import_picocolors.default.blue(S_CHECKBOX_INACTIVE) : import_picocolors.default.dim(S_CHECKBOX_INACTIVE);
61
- return (focused ? import_picocolors.default.blue(S_RADIO_ACTIVE) : " ") + " " + checkbox;
62
- }
63
63
  function instructions(items) {
64
64
  return formatInstructionFooter(items, getGuide(), stdout);
65
65
  }
@@ -85,9 +85,13 @@ function promptSubcommand(command, subcommands) {
85
85
  else renderRepeatInput();
86
86
  }
87
87
  const title = command ? `void ${command}` : "void";
88
+ function selectedSubcommand() {
89
+ if (!selectedSub) throw new Error("No subcommand selected.");
90
+ return selectedSub;
91
+ }
88
92
  function headerLine() {
89
93
  const argPart = selectedArg ? ` ${selectedArg}` : "";
90
- return promptTitle(`${import_picocolors.default.blue(title)} ${import_picocolors.default.dim("·")} ${selectedSub.name}${argPart}`, "active", { output: stdout });
94
+ return promptTitle(`${import_picocolors.default.blue(title)} ${import_picocolors.default.dim("·")} ${selectedSubcommand().name}${argPart}`, "active", { output: stdout });
91
95
  }
92
96
  function renderSelect() {
93
97
  const lines = [];
@@ -113,7 +117,8 @@ function promptSubcommand(command, subcommands) {
113
117
  writeFrame(promptTitle(import_picocolors.default.blue(title), "active", { output: stdout }), lines, footer);
114
118
  }
115
119
  function renderFlags() {
116
- const flags = selectedSub.flags;
120
+ const { flags } = selectedSubcommand();
121
+ if (!flags?.length) throw new Error("The selected subcommand has no flags.");
117
122
  const focused = flags[cursor];
118
123
  const lines = [];
119
124
  const maxFlag = Math.max(...flags.map((f) => f.name.length));
@@ -134,7 +139,9 @@ function promptSubcommand(command, subcommands) {
134
139
  writeFrame(headerLine(), lines, [guidePrefix() + import_picocolors.default.dim(focused.description), ...instructions(MULTISELECT_INSTRUCTIONS)]);
135
140
  }
136
141
  function renderMultiSelect() {
137
- const options = selectedSub.followUp.options;
142
+ const { followUp } = selectedSubcommand();
143
+ if (followUp?.type !== "multi-select") throw new Error("The selected subcommand has no multi-select options.");
144
+ const options = followUp.options;
138
145
  const lines = [];
139
146
  const maxLabel = Math.max(...options.map((o) => o.label.length));
140
147
  for (let i = 0; i < options.length; i++) {
@@ -145,7 +152,8 @@ function promptSubcommand(command, subcommands) {
145
152
  writeFrame(headerLine(), lines, instructions(MULTISELECT_INSTRUCTIONS));
146
153
  }
147
154
  function renderRepeatInput() {
148
- const followUp = selectedSub.followUp;
155
+ const { followUp } = selectedSubcommand();
156
+ if (followUp?.type !== "repeat-input") throw new Error("The selected subcommand has no repeat input.");
149
157
  const lines = [];
150
158
  for (const entry of repeatEntries) lines.push(`${guidePrefix()}${import_picocolors.default.dim(entry)}`);
151
159
  if (repeatInput.length > 0) lines.push(`${guidePrefix()}${import_picocolors.default.blue(truncate(repeatInput, (stdout.columns || 80) - 4, true))}`);
@@ -180,7 +188,7 @@ function promptSubcommand(command, subcommands) {
180
188
  }
181
189
  function finalize() {
182
190
  const result = {
183
- subcommand: selectedSub.name,
191
+ subcommand: selectedSubcommand().name,
184
192
  arg: selectedArg
185
193
  };
186
194
  if (Object.keys(selectedFlags).length > 0) result.flags = { ...selectedFlags };
@@ -188,18 +196,18 @@ function promptSubcommand(command, subcommands) {
188
196
  submit(result);
189
197
  }
190
198
  function advancePhase() {
191
- if (phase === "select" && selectedSub.flags && selectedSub.flags.length > 0) {
199
+ const { flags, followUp } = selectedSubcommand();
200
+ if (phase === "select" && flags?.length) {
192
201
  phase = "flags";
193
202
  cursor = 0;
194
- flagStates = selectedSub.flags.map(() => ({
203
+ flagStates = flags.map(() => ({
195
204
  enabled: false,
196
205
  value: ""
197
206
  }));
198
207
  render();
199
208
  return;
200
209
  }
201
- if ((phase === "select" || phase === "flags") && selectedSub.followUp) {
202
- const followUp = selectedSub.followUp;
210
+ if ((phase === "select" || phase === "flags") && followUp) {
203
211
  if (followUp.type === "multi-select") {
204
212
  phase = "multi-select";
205
213
  cursor = 0;
@@ -255,7 +263,8 @@ function promptSubcommand(command, subcommands) {
255
263
  }
256
264
  }
257
265
  function handleFlagKey(key) {
258
- const flags = selectedSub.flags;
266
+ const { flags } = selectedSubcommand();
267
+ if (!flags?.length) throw new Error("The selected subcommand has no flags.");
259
268
  const focused = flags[cursor];
260
269
  const state = flagStates[cursor];
261
270
  if (moveCursor(key, flags.length)) {
@@ -288,7 +297,8 @@ function promptSubcommand(command, subcommands) {
288
297
  }
289
298
  }
290
299
  function handleMultiSelectKey(key) {
291
- const followUp = selectedSub.followUp;
300
+ const { followUp } = selectedSubcommand();
301
+ if (followUp?.type !== "multi-select") throw new Error("The selected subcommand has no multi-select options.");
292
302
  const options = followUp.options;
293
303
  if (moveCursor(key, options.length)) {
294
304
  render();
@@ -11,7 +11,7 @@ function mergeVoidSvelteKitTsconfig(config, options = {}) {
11
11
  const voidDir = join(root, ".void");
12
12
  const voidTsconfigPath = join(voidDir, "tsconfig.json");
13
13
  if (!existsSync(voidTsconfigPath)) return config;
14
- const voidConfig = JSON.parse(readFileSync(voidTsconfigPath, "utf-8"));
14
+ const voidConfig = JSON.parse(readFileSync(voidTsconfigPath, "utf8"));
15
15
  const voidFiles = Array.isArray(voidConfig.files) ? voidConfig.files.filter((entry) => typeof entry === "string") : [];
16
16
  if (voidFiles.length > 0) config.files = uniqueStrings([...Array.isArray(config.files) ? config.files.filter((entry) => typeof entry === "string") : [], ...voidFiles.map((entry) => resolveTsconfigEntry(voidDir, entry))]);
17
17
  const voidPaths = readPathMap(readObject(readObject(voidConfig.compilerOptions)?.paths));
@@ -21,7 +21,7 @@ const SGR = /^\u001b\[[0-9;:]*m$/;
21
21
  */
22
22
  function sanitizeTerminalLogText(value) {
23
23
  let keptStyle = false;
24
- const text = value.replace(TERMINAL_CONTROL, (match) => {
24
+ const text = value.replaceAll(TERMINAL_CONTROL, (match) => {
25
25
  if (!SGR.test(match)) return "";
26
26
  keptStyle = true;
27
27
  return match;
@@ -44,7 +44,10 @@ function withPageQuery(url, page) {
44
44
  preserved: ""
45
45
  };
46
46
  const own = new Set(new URLSearchParams(q === -1 ? "" : base.slice(q + 1)).keys());
47
- const preserved = page.search.slice(1).split("&").filter((segment) => segment !== "" && !own.has(queryKey(segment))).join("&");
47
+ const preserved = page.search.slice(1).split("&").filter((segment) => {
48
+ const key = queryKey(segment);
49
+ return segment !== "" && (key === void 0 || !own.has(key));
50
+ }).join("&");
48
51
  if (!preserved) return {
49
52
  url,
50
53
  preserved
@@ -0,0 +1 @@
1
+ export { i as validateMigrations } from "./validate-CtBWCzez.mjs";
@@ -1,5 +1,5 @@
1
1
  import { a as join } from "./dist-DMYe8CZJ.mjs";
2
- import { n as readJournal, r as stripSqlExt } from "./collect-C6Blu9yw.mjs";
2
+ import { n as readJournal, r as stripSqlExt } from "./collect-rNLybAnF.mjs";
3
3
  import { i as getExecutableSql, t as DESTRUCTIVE_PRAGMA } from "./plan-BOD70XGS.mjs";
4
4
  import { existsSync, readdirSync } from "node:fs";
5
5
  import { hasStandalonePragma } from "@void/deploy-core";
@@ -48,7 +48,7 @@ function hasUnboundedWrite(statement) {
48
48
  * Check if a SQL migration contains destructive operations.
49
49
  */
50
50
  function isDestructive(sql) {
51
- return splitExecutableStatements(getExecutableSql(sql.replace(/\r\n?/g, "\n"))).some((statement) => {
51
+ return splitExecutableStatements(getExecutableSql(sql.replaceAll(/\r\n?/g, "\n"))).some((statement) => {
52
52
  return DESTRUCTIVE_PATTERNS.some((pattern) => pattern.test(statement)) || hasUnboundedWrite(statement);
53
53
  });
54
54
  }
@@ -134,7 +134,7 @@ function assertJournalCoherence(migrationsDir, collected, sourceRelative = (path
134
134
  }
135
135
  const tagCounts = /* @__PURE__ */ new Map();
136
136
  for (const entry of journal.entries) tagCounts.set(entry.tag, (tagCounts.get(entry.tag) ?? 0) + 1);
137
- const duplicateTags = [...tagCounts.entries()].filter(([, n]) => n > 1).map(([tag]) => tag);
137
+ const duplicateTags = [...tagCounts.entries()].flatMap(([tag, count]) => count > 1 ? [tag] : []);
138
138
  if (duplicateTags.length > 0) throw new Error([
139
139
  `${dir}/meta/_journal.json has duplicate migration entries:`,
140
140
  ...duplicateTags.map((t) => ` - ${t} (appears ${tagCounts.get(t)} times)`),
@@ -143,7 +143,10 @@ function assertJournalCoherence(migrationsDir, collected, sourceRelative = (path
143
143
  ].join("\n"));
144
144
  const journalTags = new Set(journal.entries.map((e) => e.tag));
145
145
  const collectedTags = new Set(collected.map((m) => stripSqlExt(m.name)));
146
- const orphans = collected.map((m) => m.name).filter((name) => !journalTags.has(stripSqlExt(name)));
146
+ const orphans = collected.flatMap((m) => {
147
+ const name = m.name;
148
+ return !journalTags.has(stripSqlExt(name)) ? [name] : [];
149
+ });
147
150
  const missing = journal.entries.filter((e) => !collectedTags.has(e.tag)).map((e) => `${e.tag}.sql`);
148
151
  if (orphans.length === 0 && missing.length === 0) return;
149
152
  const lines = [`Migration drift detected between ${dir}/ and ${dir}/meta/_journal.json.`];
@@ -55,6 +55,10 @@ function arrayIndex(segment) {
55
55
  function isContainerRecord(value) {
56
56
  return typeof value === "object" && value !== null && !Array.isArray(value) && !(value instanceof Blob);
57
57
  }
58
+ const read = (parent, segment) => {
59
+ if (Array.isArray(parent)) return segment === "" ? void 0 : parent[Number(segment)];
60
+ return Object.hasOwn(parent, segment) ? parent[segment] : void 0;
61
+ };
58
62
  /**
59
63
  * Rebuild the object `objectToFormData` flattened. Numeric segments and `[]`
60
64
  * become arrays. Scalars are left as the client encoded them.
@@ -70,10 +74,6 @@ function formRecordToObject(record) {
70
74
  reserveNodes(1);
71
75
  return asArray ? [] : {};
72
76
  };
73
- const read = (parent, segment) => {
74
- if (Array.isArray(parent)) return segment === "" ? void 0 : parent[Number(segment)];
75
- return Object.hasOwn(parent, segment) ? parent[segment] : void 0;
76
- };
77
77
  const write = (parent, segment, value) => {
78
78
  if (Array.isArray(parent)) {
79
79
  const index = segment === "" ? parent.length : arrayIndex(segment);
@@ -101,7 +101,7 @@ function formRecordToObject(record) {
101
101
  if (!childIsContainer) write(parent, segment, container);
102
102
  parent = container;
103
103
  }
104
- write(parent, segments[segments.length - 1], value);
104
+ write(parent, segments.at(-1), value);
105
105
  };
106
106
  for (const [key, raw] of Object.entries(record)) {
107
107
  const segments = formKeySegments(key);
@@ -1,5 +1,5 @@
1
1
  import { a as join } from "./dist-DMYe8CZJ.mjs";
2
- import { l as bindingNamesForField, p as findBindingNameOwner } from "./wrangler-v2BmVchV.mjs";
2
+ import { l as bindingNamesForField, p as findBindingNameOwner } from "./wrangler-DVe5KV5G.mjs";
3
3
  // src/shared/untrusted-env.ts
4
4
  /** Authentication inputs that Wrangler may consume from the environment. */
5
5
  const WRANGLER_AUTH_CREDENTIAL_ENV_VARS = [
@@ -1,7 +1,9 @@
1
1
  import { a as join, c as resolve, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
2
- import { a as persistCloudflareConfig, i as materializeCloudflareConfig, r as ignoreMaterializedCloudflareConfig } from "./cloudflare-config-D1dMHbvz.mjs";
3
- import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-CUhCPMpK.mjs";
4
- import { h as validateConfig, p as readConfig } from "./config-BmvqLnbi.mjs";
2
+ import { a as persistCloudflareConfig, i as materializeCloudflareConfig, r as ignoreMaterializedCloudflareConfig } from "./cloudflare-config-D9UFH_A5.mjs";
3
+ import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-2ENfCCih.mjs";
4
+ import { h as validateConfig, p as readConfig } from "./config-Dv5jri1-.mjs";
5
+ import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
6
+ import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
5
7
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
6
8
  import { parseSync } from "vite";
7
9
  import { appendSqliteClassMigration, isRecord } from "@void/deploy-core";
@@ -90,7 +92,7 @@ function readOrCreateProjectWranglerConfig(root) {
90
92
  if (configPath) {
91
93
  let parsed;
92
94
  try {
93
- parsed = parseJsonc(readFileSync(configPath, "utf-8"));
95
+ parsed = parseJsonc(readFileSync(configPath, "utf8"));
94
96
  } catch {}
95
97
  if (parsed) return {
96
98
  configPath,
@@ -116,7 +118,7 @@ const LIVE_MIGRATION_TAG = "live-v1";
116
118
  function readRootWranglerConfig(root) {
117
119
  for (const configPath of projectWranglerPaths(root)) {
118
120
  if (!existsSync(configPath)) continue;
119
- const parsed = parseJsonc(readFileSync(configPath, "utf-8"));
121
+ const parsed = parseJsonc(readFileSync(configPath, "utf8"));
120
122
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) throw new SyntaxError(`Failed to parse ${configPath}: expected a JSON object.`);
121
123
  return {
122
124
  configPath,
@@ -127,7 +129,7 @@ function readRootWranglerConfig(root) {
127
129
  /** Read the last traffic attachment state Void successfully published remotely. */
128
130
  function readWranglerPublishedTrafficSnapshot(configPath) {
129
131
  if (!existsSync(configPath)) return;
130
- const encoded = PUBLISHED_TRAFFIC_MARKER.exec(readFileSync(configPath, "utf-8"))?.[1];
132
+ const encoded = PUBLISHED_TRAFFIC_MARKER.exec(readFileSync(configPath, "utf8"))?.[1];
131
133
  if (!encoded) return;
132
134
  try {
133
135
  const value = JSON.parse(Buffer.from(encoded, "base64url").toString("utf8"));
@@ -144,7 +146,7 @@ function readWranglerPublishedTrafficSnapshot(configPath) {
144
146
  /** Persist traffic attachment provenance without adding unsupported Wrangler fields. */
145
147
  function writeWranglerPublishedTrafficSnapshot(configPath, snapshot, options) {
146
148
  if (!existsSync(configPath)) return;
147
- const raw = readFileSync(configPath, "utf-8");
149
+ const raw = readFileSync(configPath, "utf8");
148
150
  const marker = `// void:published-traffic:v1:${Buffer.from(JSON.stringify(snapshot), "utf8").toString("base64url")}`;
149
151
  const existing = PUBLISHED_TRAFFIC_MARKER.exec(raw);
150
152
  if (!existing && options?.create === false) return;
@@ -163,7 +165,10 @@ function hasDurableObjectSqliteMigration(migrations, className) {
163
165
  return migrations.some((migration) => migration.new_sqlite_classes?.includes(className));
164
166
  }
165
167
  function nextDurableObjectMigrationTag(migrations, baseTag) {
166
- const existingTags = new Set(migrations.map((migration) => migration.tag).filter(Boolean));
168
+ const existingTags = new Set(migrations.flatMap((migration) => {
169
+ const value = migration.tag;
170
+ return value ? [value] : [];
171
+ }));
167
172
  if (!existingTags.has(baseTag)) return baseTag;
168
173
  let index = 2;
169
174
  while (existingTags.has(`${baseTag}-${index}`)) index++;
@@ -192,7 +197,7 @@ function readExistingLiveBindingConfig(root) {
192
197
  }
193
198
  function readWranglerDurableObjectBindings(root) {
194
199
  for (const path of projectWranglerPaths(root)) try {
195
- const bindings = parseJsonc(readFileSync(path, "utf-8")).durable_objects?.bindings;
200
+ const bindings = parseJsonc(readFileSync(path, "utf8")).durable_objects?.bindings;
196
201
  if (!Array.isArray(bindings)) return [];
197
202
  return bindings.filter((binding) => typeof binding.name === "string" && typeof binding.class_name === "string");
198
203
  } catch {}
@@ -205,7 +210,7 @@ function generatedLiveNamePattern(base) {
205
210
  return new RegExp(`^${escapeRegExp(base)}_[0-9a-f]{8}$`);
206
211
  }
207
212
  function escapeRegExp(value) {
208
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
213
+ return value.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`);
209
214
  }
210
215
  function findGeneratedLiveBinding(bindings) {
211
216
  return bindings.find((binding) => isGeneratedLiveName(binding.name, "VOID_LIVE") && isGeneratedLiveName(binding.class_name, "VoidLiveStreamDurableObject"));
@@ -240,7 +245,7 @@ function readWranglerCompatFields(root, config, buildOutputDir) {
240
245
  const voidConfig = config ?? readVoidConfigIfExists(root);
241
246
  let raw;
242
247
  for (const path of projectWranglerPaths(root)) try {
243
- raw = readFileSync(path, "utf-8");
248
+ raw = readFileSync(path, "utf8");
244
249
  break;
245
250
  } catch {}
246
251
  let wranglerDate;
@@ -256,7 +261,7 @@ function readWranglerCompatFields(root, config, buildOutputDir) {
256
261
  let buildDate;
257
262
  let buildFlags;
258
263
  if (buildOutputDir) try {
259
- const buildRaw = readFileSync(join(buildOutputDir, "wrangler.json"), "utf-8");
264
+ const buildRaw = readFileSync(join(buildOutputDir, "wrangler.json"), "utf8");
260
265
  const buildParsed = JSON.parse(buildRaw);
261
266
  if (typeof buildParsed.compatibility_date === "string") {
262
267
  validateCompatDate(buildParsed.compatibility_date, "build output wrangler.json");
@@ -302,7 +307,7 @@ function ensureVoidCompatibilityDate(root, rootWrangler) {
302
307
  }
303
308
  let nextConfig;
304
309
  try {
305
- const parsed = JSON.parse(readFileSync(filePath, "utf-8"));
310
+ const parsed = JSON.parse(readFileSync(filePath, "utf8"));
306
311
  if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) throw new Error(`config: ${VOID_CONFIG_FILE} must be a JSON object.`);
307
312
  nextConfig = parsed;
308
313
  } catch (error) {
@@ -443,10 +448,10 @@ function syncWranglerDurableObjects(root, durableObjects) {
443
448
  const conflict = existingBindings.find((binding) => binding.name === module.bindingName && binding.class_name !== module.className);
444
449
  if (conflict) throw new Error(`durable: binding '${module.bindingName}' is already configured for class '${conflict.class_name}', but durable-objects/ requires '${module.className}'.`);
445
450
  }
446
- const additions = durableObjects.filter((module) => !existingBindings.some((binding) => binding.name === module.bindingName)).map((module) => ({
451
+ const additions = durableObjects.flatMap((module) => !existingBindings.some((binding) => binding.name === module.bindingName) ? [{
447
452
  name: module.bindingName,
448
453
  class_name: module.className
449
- }));
454
+ }] : []);
450
455
  if (additions.length > 0) {
451
456
  parsed.durable_objects = { bindings: [...existingBindings, ...additions] };
452
457
  modified = true;
@@ -478,7 +483,7 @@ function syncWranglerWebSockets(root, websockets) {
478
483
  function readWranglerWebSocketTombstones(root, websockets) {
479
484
  const configPath = projectWranglerPaths(root).find((path) => existsSync(path));
480
485
  if (!configPath) return [];
481
- const parsed = parseJsonc(readFileSync(configPath, "utf-8"));
486
+ const parsed = parseJsonc(readFileSync(configPath, "utf8"));
482
487
  const migrations = Array.isArray(parsed.migrations) ? parsed.migrations : [];
483
488
  const historicalClasses = new Set(migrations.flatMap((migration) => /^void-ws-v1(?:-\d+)?$/.test(migration.tag ?? "") ? [...migration.new_classes ?? [], ...migration.new_sqlite_classes ?? []] : []));
484
489
  const currentClasses = new Set(websockets.map((route) => route.className));
@@ -502,6 +507,7 @@ function ensureWranglerNodejsAlsFlag(root) {
502
507
  writeProjectWranglerFile(configPath, JSON.stringify(parsed, null, 2) + "\n");
503
508
  return true;
504
509
  }
510
+ const strings = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
505
511
  function readManagedQueueProvenance(text) {
506
512
  const none = {
507
513
  producerBindings: [],
@@ -511,7 +517,6 @@ function readManagedQueueProvenance(text) {
511
517
  };
512
518
  const encoded = MANAGED_QUEUES_MARKER.exec(text)?.[1];
513
519
  if (!encoded) return none;
514
- const strings = (value) => Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
515
520
  try {
516
521
  const parsed = JSON.parse(Buffer.from(encoded, "base64url").toString("utf8"));
517
522
  if (!isRecord(parsed)) return none;
@@ -550,14 +555,14 @@ function writeManagedQueueProvenance(text, provenance) {
550
555
  */
551
556
  function readWranglerManagedQueueCleanupCandidates(configPath) {
552
557
  if (!existsSync(configPath)) return [];
553
- const raw = readFileSync(configPath, "utf-8");
558
+ const raw = readFileSync(configPath, "utf8");
554
559
  const provenance = readManagedQueueProvenance(raw.startsWith(UTF8_BOM) ? raw.slice(1) : raw);
555
560
  return [.../* @__PURE__ */ new Set([...provenance.consumerQueues, ...provenance.pendingConsumerRemovals])].sort();
556
561
  }
557
562
  /** Clear only cleanup tombstones confirmed by a successful trigger reconciliation. */
558
563
  function acknowledgeWranglerManagedQueueRemovals(configPath, removedQueues) {
559
564
  if (!existsSync(configPath) || removedQueues.length === 0) return;
560
- const raw = readFileSync(configPath, "utf-8");
565
+ const raw = readFileSync(configPath, "utf8");
561
566
  const hasBom = raw.startsWith(UTF8_BOM);
562
567
  const text = hasBom ? raw.slice(1) : raw;
563
568
  const provenance = readManagedQueueProvenance(text);
@@ -575,14 +580,14 @@ function acknowledgeWranglerManagedQueueRemovals(configPath, removedQueues) {
575
580
  */
576
581
  function writeProvisionedWranglerConfig(root, patch, options) {
577
582
  const configPath = options?.configPath ?? discoverWranglerConfigPath(root);
578
- const rawContent = existsSync(configPath) ? readFileSync(configPath, "utf-8") : "{}";
583
+ const rawContent = existsSync(configPath) ? readFileSync(configPath, "utf8") : "{}";
579
584
  const hasBom = rawContent.startsWith(UTF8_BOM);
580
585
  const original = hasBom ? rawContent.slice(1) : rawContent;
581
586
  let parsed;
582
587
  try {
583
588
  parsed = parseJsonc(original);
584
589
  } catch (error) {
585
- throw new Error(`deploy: cannot update "${configPath}" — it is not valid JSON/JSONC. Fix the file and retry. (${error.message})`);
590
+ throw new Error(`deploy: cannot update "${configPath}" — it is not valid JSON/JSONC. Fix the file and retry. (${error.message})`, { cause: error });
586
591
  }
587
592
  assertNoDuplicateMembers(original, configPath);
588
593
  const formattingOptions = detectFormattingOptions(original);
@@ -648,7 +653,7 @@ function writeProvisionedWranglerConfig(root, patch, options) {
648
653
  const rawMigrations = parseJsonc(text).migrations;
649
654
  const migrations = validateDurableObjectMigrations(rawMigrations, configPath);
650
655
  const planned = appendSqliteClassMigration(migrations, [...requested.values()].map((route) => route.className), "void-ws-v1", knownExistingClasses);
651
- if (planned.added) text = applyMemberEdit(text, ["migrations", migrations.length], planned.migrations[planned.migrations.length - 1], {
656
+ if (planned.added) text = applyMemberEdit(text, ["migrations", migrations.length], planned.migrations.at(-1), {
652
657
  formattingOptions,
653
658
  isArrayInsertion: true
654
659
  });
@@ -695,29 +700,30 @@ function writeProvisionedWranglerConfig(root, patch, options) {
695
700
  if (patch.hyperdrive) upsertAdoptedBinding("hyperdrive", patch.hyperdrive.binding, { id: patch.hyperdrive.id });
696
701
  if (patch.sendEmail) upsertAdoptedBinding("send_email", patch.sendEmail.name, {}, "name");
697
702
  let d1MigrationsDirSkipped = false;
698
- if (patch.d1MigrationsDir) {
703
+ const { d1MigrationsDir } = patch;
704
+ if (d1MigrationsDir) {
699
705
  const currentD1 = parseJsonc(text).d1_databases;
700
706
  const d1Entries = Array.isArray(currentD1) ? currentD1 : [];
701
707
  const matchIndices = [];
702
708
  d1Entries.forEach((entry, i) => {
703
- if (entry.binding === patch.d1MigrationsDir.binding) matchIndices.push(i);
709
+ if (entry.binding === d1MigrationsDir.binding) matchIndices.push(i);
704
710
  });
705
- if (matchIndices.length > 1) throw new Error(`deploy: cannot update "${configPath}" — binding ${JSON.stringify(patch.d1MigrationsDir.binding)} is declared ${matchIndices.length} times in "d1_databases". A binding name must be unique across the worker (wrangler rejects the config otherwise), so migrations_dir cannot be attached unambiguously. Remove the duplicate D1 entry and retry.`);
711
+ if (matchIndices.length > 1) throw new Error(`deploy: cannot update "${configPath}" — binding ${JSON.stringify(d1MigrationsDir.binding)} is declared ${matchIndices.length} times in "d1_databases". A binding name must be unique across the worker (wrangler rejects the config otherwise), so migrations_dir cannot be attached unambiguously. Remove the duplicate D1 entry and retry.`);
706
712
  const index = matchIndices.length === 1 ? matchIndices[0] : -1;
707
713
  if (index >= 0) {
708
714
  const existingPattern = d1Entries[index].migrations_pattern;
709
- if (existingPattern !== void 0 && typeof existingPattern !== "string") throw new Error(`deploy: cannot update "${configPath}" — the D1 entry for binding ${JSON.stringify(patch.d1MigrationsDir.binding)} has a non-string "migrations_pattern" value; expected a string. Wrangler rejects such a config, so filling "migrations_dir" beside it would commit an invalid file. Fix the config and retry.`);
715
+ if (existingPattern !== void 0 && typeof existingPattern !== "string") throw new Error(`deploy: cannot update "${configPath}" — the D1 entry for binding ${JSON.stringify(d1MigrationsDir.binding)} has a non-string "migrations_pattern" value; expected a string. Wrangler rejects such a config, so filling "migrations_dir" beside it would commit an invalid file. Fix the config and retry.`);
710
716
  const existingDir = d1Entries[index].migrations_dir;
711
- if (existingDir !== void 0 && typeof existingDir !== "string") throw new Error(`deploy: cannot update "${configPath}" — the D1 entry for binding ${JSON.stringify(patch.d1MigrationsDir.binding)} has a non-string "migrations_dir" value; expected a string. Fix the config and retry.`);
717
+ if (existingDir !== void 0 && typeof existingDir !== "string") throw new Error(`deploy: cannot update "${configPath}" — the D1 entry for binding ${JSON.stringify(d1MigrationsDir.binding)} has a non-string "migrations_dir" value; expected a string. Fix the config and retry.`);
712
718
  if (typeof existingDir === "string") {
713
- if (!sameMigrationsDir(configPath, existingDir, patch.d1MigrationsDir.dir)) throw new Error(`deploy: cannot update "${configPath}" — the D1 entry for binding ${JSON.stringify(patch.d1MigrationsDir.binding)} already sets "migrations_dir": ${JSON.stringify(existingDir)}, but Void keeps this database's migrations in ${JSON.stringify(patch.d1MigrationsDir.dir)}. Refusing to overwrite an explicit different migrations directory. Either remove "migrations_dir" from the entry (or set it to ${JSON.stringify(patch.d1MigrationsDir.dir)}) to let Void manage it, or move the migrations and keep your directory, then retry.`);
719
+ if (!sameMigrationsDir(configPath, existingDir, d1MigrationsDir.dir)) throw new Error(`deploy: cannot update "${configPath}" — the D1 entry for binding ${JSON.stringify(d1MigrationsDir.binding)} already sets "migrations_dir": ${JSON.stringify(existingDir)}, but Void keeps this database's migrations in ${JSON.stringify(d1MigrationsDir.dir)}. Refusing to overwrite an explicit different migrations directory. Either remove "migrations_dir" from the entry (or set it to ${JSON.stringify(d1MigrationsDir.dir)}) to let Void manage it, or move the migrations and keep your directory, then retry.`);
714
720
  } else {
715
- if (existingPattern !== void 0 && !migrationsPatternMatchesDir(existingPattern, patch.d1MigrationsDir.dir)) throw new Error(`deploy: cannot update "${configPath}" — the D1 entry for binding ${JSON.stringify(patch.d1MigrationsDir.binding)} has "migrations_pattern": ${JSON.stringify(existingPattern)}, which is not under the requested "migrations_dir": ${JSON.stringify(patch.d1MigrationsDir.dir)}. Wrangler requires the pattern to start with the migrations dir, so this change would break \`wrangler d1 migrations\`. Align "migrations_pattern" with the dir (or remove it) and retry.`);
721
+ if (existingPattern !== void 0 && !migrationsPatternMatchesDir(existingPattern, d1MigrationsDir.dir)) throw new Error(`deploy: cannot update "${configPath}" — the D1 entry for binding ${JSON.stringify(d1MigrationsDir.binding)} has "migrations_pattern": ${JSON.stringify(existingPattern)}, which is not under the requested "migrations_dir": ${JSON.stringify(d1MigrationsDir.dir)}. Wrangler requires the pattern to start with the migrations dir, so this change would break \`wrangler d1 migrations\`. Align "migrations_pattern" with the dir (or remove it) and retry.`);
716
722
  set([
717
723
  "d1_databases",
718
724
  index,
719
725
  "migrations_dir"
720
- ], patch.d1MigrationsDir.dir);
726
+ ], d1MigrationsDir.dir);
721
727
  }
722
728
  } else d1MigrationsDirSkipped = true;
723
729
  }
@@ -856,7 +862,7 @@ function writeProvisionedWranglerConfig(root, patch, options) {
856
862
  return node?.type === "object" || node?.type === "array";
857
863
  }) : void 0;
858
864
  if (compositeField) {
859
- const field = String(compositeField[compositeField.length - 1]);
865
+ const field = String(compositeField.at(-1));
860
866
  throw new Error(`deploy: cannot update "${configPath}" — "${field}" has an object/array value; expected a string. Fix the config and retry.`);
861
867
  }
862
868
  throw new Error(`deploy: cannot update "${configPath}" — this edit would drop a comment (${droppedComment}); the writer refuses to corrupt the file — simplify the surrounding structure and retry.`);
@@ -884,7 +890,7 @@ function writeProvisionedWranglerConfig(root, patch, options) {
884
890
  /** Read the custom-domain routes owned by the root Wrangler config. */
885
891
  function readWranglerCustomDomains(root) {
886
892
  const configPath = discoverWranglerConfigPath(root);
887
- const raw = existsSync(configPath) ? readFileSync(configPath, "utf-8") : "{}";
893
+ const raw = existsSync(configPath) ? readFileSync(configPath, "utf8") : "{}";
888
894
  const text = raw.startsWith(UTF8_BOM) ? raw.slice(1) : raw;
889
895
  const parsed = parseJsonc(text);
890
896
  assertNoDuplicateMembers(text, configPath);
@@ -902,7 +908,7 @@ function readWranglerCustomDomains(root) {
902
908
  function updateWranglerCustomDomain(root, hostname, action) {
903
909
  const configPath = discoverWranglerConfigPath(root);
904
910
  if (!existsSync(configPath)) throw new Error(`domain: No Wrangler config found at "${configPath}". Run \`void init\` first.`);
905
- const raw = readFileSync(configPath, "utf-8");
911
+ const raw = readFileSync(configPath, "utf8");
906
912
  const hasBom = raw.startsWith(UTF8_BOM);
907
913
  const original = hasBom ? raw.slice(1) : raw;
908
914
  const parsed = parseJsonc(original);
@@ -1016,7 +1022,7 @@ function parseJsonc(text) {
1016
1022
  const errors = [];
1017
1023
  const source = text.startsWith(UTF8_BOM) ? text.slice(1) : text;
1018
1024
  const result = parse(source, errors, { allowTrailingComma: true });
1019
- if (errors.length > 0) throw new SyntaxError("Failed to parse JSONC");
1025
+ if (errors.length > 0 || !isRecord(result)) throw new SyntaxError("Failed to parse JSONC");
1020
1026
  return result;
1021
1027
  }
1022
1028
  /**
@@ -1035,18 +1041,15 @@ function applyMemberEdit(text, path, value, options) {
1035
1041
  receivingPath = receivingPath.slice(0, -1);
1036
1042
  container = findNodeAtLocation(root, receivingPath);
1037
1043
  }
1038
- const members = container?.children;
1039
- if (!container || !members || members.length === 0) return plain();
1040
- const last = members[members.length - 1];
1044
+ const last = container?.children?.at(-1);
1045
+ if (!last) return plain();
1041
1046
  const trailing = readTrailingComment(text, last.offset + last.length);
1042
1047
  if (!trailing) return plain();
1043
1048
  const stripped = text.slice(0, last.offset + last.length) + text.slice(trailing.end);
1044
1049
  const rewritten = applyEdits(stripped, modify(stripped, path, value, options));
1045
1050
  const newRoot = parseTree(rewritten, void 0, { allowTrailingComma: true });
1046
- const newContainer = newRoot ? findNodeAtLocation(newRoot, receivingPath) : void 0;
1047
- const newMembers = newContainer?.children;
1048
- if (!newRoot || !newContainer || !newMembers || newMembers.length < 2) return plain();
1049
- const sibling = newMembers[newMembers.length - 2];
1051
+ const sibling = (newRoot ? findNodeAtLocation(newRoot, receivingPath) : void 0)?.children?.at(-2);
1052
+ if (!sibling) return plain();
1050
1053
  const commaPos = rewritten.indexOf(",", sibling.offset + sibling.length);
1051
1054
  if (commaPos === -1) return plain();
1052
1055
  const relocated = `${rewritten.slice(0, commaPos + 1)} ${trailing.text}${rewritten.slice(commaPos + 1)}`;
@@ -1060,6 +1063,7 @@ function applyMemberEdit(text, path, value, options) {
1060
1063
  if (!isDeepStrictEqual(relocatedParsed, parseJsonc(plainResult))) return plainResult;
1061
1064
  return relocated;
1062
1065
  }
1066
+ const isTrivia = (kind) => kind === SyntaxKind.Trivia || kind === SyntaxKind.LineBreakTrivia || kind === SyntaxKind.LineCommentTrivia || kind === SyntaxKind.BlockCommentTrivia;
1063
1067
  /**
1064
1068
  * Remove the object member at `path`, keeping every comment. `modify(…, undefined)` also
1065
1069
  * deletes the comments between the previous member and this one, so splice out the
@@ -1081,7 +1085,6 @@ function removeMember(text, path, options) {
1081
1085
  offset: scanner.getTokenOffset(),
1082
1086
  length: scanner.getTokenLength()
1083
1087
  });
1084
- const isTrivia = (kind) => kind === SyntaxKind.Trivia || kind === SyntaxKind.LineBreakTrivia || kind === SyntaxKind.LineCommentTrivia || kind === SyntaxKind.BlockCommentTrivia;
1085
1088
  const following = tokens.find((token) => token.offset >= end && !isTrivia(token.kind));
1086
1089
  const preceding = [...tokens].reverse().find((token) => token.offset + token.length <= start && !isTrivia(token.kind));
1087
1090
  const comma = following?.kind === SyntaxKind.CommaToken ? following : preceding?.kind === SyntaxKind.CommaToken ? preceding : void 0;
@@ -1156,7 +1159,7 @@ function assertNoDuplicateMembers(text, configPath) {
1156
1159
  for (const property of node.children) {
1157
1160
  const keyNode = property.children?.[0];
1158
1161
  const key = keyNode?.value;
1159
- if (typeof key !== "string") continue;
1162
+ if (!keyNode || typeof key !== "string") continue;
1160
1163
  if (seen.has(key)) {
1161
1164
  const { line, column } = offsetToLineColumn(text, keyNode.offset);
1162
1165
  throw new Error(`deploy: cannot update "${configPath}" — duplicate key ${JSON.stringify(key)} at line ${line}, column ${column}. Wrangler reads the last of two duplicate members, but this writer edits the first, so the update would silently not apply. Remove the duplicate and retry.`);
@@ -1384,7 +1387,7 @@ const BINDING_FIELD_SHAPES = {
1384
1387
  * shape or a missing required name, which Wrangler would drop silently.
1385
1388
  */
1386
1389
  function bindingNamesForField(field, value) {
1387
- if (BINDING_FIELD_SHAPES[field]?.kind === "key-map") return keyMapBindingNames(field, value);
1390
+ if (hasOwnKey(BINDING_FIELD_SHAPES, field) && BINDING_FIELD_SHAPES[field].kind === "key-map") return keyMapBindingNames(field, value);
1388
1391
  return bindingEntriesForField(field, value).map((entry) => entry.name);
1389
1392
  }
1390
1393
  /**
@@ -1392,7 +1395,7 @@ function bindingNamesForField(field, value) {
1392
1395
  * can also compare what the binding points at.
1393
1396
  */
1394
1397
  function bindingEntriesForField(field, value) {
1395
- const shape = BINDING_FIELD_SHAPES[field] ?? { kind: "namespace-array" };
1398
+ const shape = hasOwnKey(BINDING_FIELD_SHAPES, field) ? BINDING_FIELD_SHAPES[field] : { kind: "namespace-array" };
1396
1399
  switch (shape.kind) {
1397
1400
  case "key-map": return keyMapBindingEntries(field);
1398
1401
  case "name-keyed-array": return nameKeyedBindingEntries(field, value);
@@ -1480,7 +1483,7 @@ function migrationsPatternMatchesDir(pattern, dir) {
1480
1483
  }
1481
1484
  /** Wrangler's `normalizeRelativePath`: forward slashes, normalized, no trailing slash. */
1482
1485
  function normalizeMigrationsPath(p) {
1483
- const normalized = normalize(p.replace(/\\/g, "/"));
1486
+ const normalized = normalize(p.replaceAll("\\", "/"));
1484
1487
  return normalized.endsWith("/") ? normalized.slice(0, -1) : normalized;
1485
1488
  }
1486
1489
  export { syncWranglerWebSockets as A, readWranglerManagedQueueCleanupCandidates as C, sameMigrationsDir as D, resolveLiveBindingConfig as E, canRewriteVoidProjectConfig as F, renderVoidConfig as I, writeVoidProjectConfig as L, writeProvisionedWranglerConfig as M, writeWranglerPublishedTrafficSnapshot as N, syncWranglerBindings as O, GENERATED_MARKERS as P, readWranglerCustomDomains as S, readWranglerWebSocketTombstones as T, persistMaterializedWranglerConfig as _, LIVE_MIGRATION_TAG as a, readRootWranglerConfig as b, bindingEntriesForField as c, ensureWranglerCompatibilityDate as d, ensureWranglerNodejsAlsFlag as f, normalizeWranglerCompatibilityFlags as g, nextDurableObjectMigrationTag as h, LATEST_KNOWN_COMPAT_DATE as i, updateWranglerCustomDomain as j, syncWranglerDurableObjects as k, bindingNamesForField as l, hasDurableObjectSqliteMigration as m, DEFAULT_LIVE_CLASS as n, acknowledgeWranglerManagedQueueRemovals as o, findBindingNameOwner as p, FRIENDLY_BINDING_NAMES as r, assertNoDuplicateMembers as s, DEFAULT_LIVE_BINDING as t, ensureWranglerCompat as u, readExistingLiveBindingConfig as v, readWranglerPublishedTrafficSnapshot as w, readWranglerCompat as x, readProvisionedBindingEntry as y };
@@ -0,0 +1 @@
1
+ export { b as readRootWranglerConfig } from "./wrangler-DVe5KV5G.mjs";