cf 1.0.0-beta.25 → 1.0.0-beta.27

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 (262) hide show
  1. package/dist/_meta/commands.json +2015 -3426
  2. package/dist/_meta/hand-written-commands.json +16 -1
  3. package/dist/_meta/schemas.json +9249 -2339
  4. package/dist/abuse-reports-RxXqfDEW.mjs +24 -0
  5. package/dist/{access-__sFDSFL.mjs → access-BxEprr2f.mjs} +1 -1
  6. package/dist/{accounts-CmggwRjh.mjs → accounts-DU2ZNYqP.mjs} +17 -11
  7. package/dist/{acm-AAhRZUAU.mjs → acm-CBCIKBJ4.mjs} +1 -1
  8. package/dist/{addressing-DVeJNPZc.mjs → addressing-BKxiLRHk.mjs} +1 -1
  9. package/dist/{agent-memory-DQhWO6sc.mjs → agent-memory-DkBpQYUL.mjs} +1 -1
  10. package/dist/{ai-CULO9sno.mjs → ai-DqEN_hhg.mjs} +2 -2
  11. package/dist/{ai-audit-udn4HF34.mjs → ai-audit-BmzOgt6x.mjs} +1 -1
  12. package/dist/{ai-gateway-Bm2MMdec.mjs → ai-gateway-B0uiYVHq.mjs} +3 -3
  13. package/dist/ai-search-DbZIxdio.mjs +74 -0
  14. package/dist/{ai-security-DXy9ht-9.mjs → ai-security-CvZfP2JC.mjs} +1 -1
  15. package/dist/{alerting-CssnaN2i.mjs → alerting-BjGwBxZT.mjs} +1 -1
  16. package/dist/{analytics-BVo7Ax0w.mjs → analytics-C7kT_H-W.mjs} +4 -4
  17. package/dist/{analytics-engine-BBd0Bydx.mjs → analytics-engine-BHpcNSdD.mjs} +1 -1
  18. package/dist/{api-security-C-D9OKtH.mjs → api-security-BbcvDtff.mjs} +2 -2
  19. package/dist/{argo-DSziwzvA.mjs → argo-D1VONzu-.mjs} +1 -1
  20. package/dist/{artifacts-nVMgn4dn.mjs → artifacts-2R2sxIKO.mjs} +3 -3
  21. package/dist/{audit-logs-DIZ5oA_y.mjs → audit-logs-LoBB1OO_.mjs} +1 -1
  22. package/dist/auth-CspwoBlp.mjs +2 -0
  23. package/dist/{auth-JsvLULHA.mjs → auth-D499YE2n.mjs} +3 -3
  24. package/dist/{auth-CB9wjyad.mjs → auth-FK2eLQ02.mjs} +1 -1
  25. package/dist/{auth-token-BAgw7kYP.mjs → auth-token-BwpERbnG.mjs} +1 -1
  26. package/dist/{autoconfig-CajkMb3B.mjs → autoconfig-B2w-woU0.mjs} +85 -83
  27. package/dist/{basin-catalog-BRvGeKm3.mjs → basin-catalog-AgOHGiPI.mjs} +2 -2
  28. package/dist/billing-DRNww0iC.mjs +24 -0
  29. package/dist/{blocks-D2tE8dp2.mjs → blocks-C8vyXIAT.mjs} +1 -1
  30. package/dist/body-unions-CjpNjwSW.mjs +2 -0
  31. package/dist/bot-management-fwxKIbaB.mjs +9 -0
  32. package/dist/{botnet-feed-VOL5P4s3.mjs → botnet-feed-DCYB5kYZ.mjs} +1 -1
  33. package/dist/{brand-protection-CSVHQ9Pt.mjs → brand-protection-BVICLzBc.mjs} +1 -1
  34. package/dist/browser-run-CEk-NIgP.mjs +40 -0
  35. package/dist/build-CRm2TQq8.mjs +2 -0
  36. package/dist/{build-BfkzV5_c.mjs → build-DO_GNhRl.mjs} +1 -1
  37. package/dist/{builds-y5BQCJ81.mjs → builds-CoazxuN-.mjs} +26 -26
  38. package/dist/{cache-Bvr988Hj.mjs → cache-jlLJLSu7.mjs} +1 -1
  39. package/dist/{cf-DgLg6Hop.mjs → cf-hP0SOgC6.mjs} +2 -2
  40. package/dist/{chunk-2HLTAS5V-B92NbX1j.mjs → chunk-AAQI36FL-e6E5HW1g.mjs} +1 -1
  41. package/dist/{chunk-DSGVRFIS-Dq2PrGsi.mjs → chunk-DSGVRFIS-DQwKND2c.mjs} +1 -1
  42. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +363 -0
  43. package/dist/{cli-BTxJfFus.mjs → cli-Nqf58-1c.mjs} +3 -3
  44. package/dist/{client-side-security-CFmO0uz9.mjs → client-side-security-VmZzMy-m.mjs} +1 -1
  45. package/dist/{cloud-connector-CtwPdFBa.mjs → cloud-connector-bMlFnqP0.mjs} +1 -1
  46. package/dist/{cloudflared-DPkNN1Qv.mjs → cloudflared-Ba4KWdTO.mjs} +1 -1
  47. package/dist/{cloudforce-one-DHrMaxnU.mjs → cloudforce-one-CCaIBOAo.mjs} +121 -119
  48. package/dist/{command-CDYTsmxe.mjs → command-BASaTmJc.mjs} +1 -1
  49. package/dist/{command-BWyx7dNO.mjs → command-BiIVclNA.mjs} +1 -1
  50. package/dist/{command-CXwKBbj9.mjs → command-Bih1HLr3.mjs} +1 -1
  51. package/dist/{command-Ct3tf-P5.mjs → command-BxZBNPxG.mjs} +1 -1
  52. package/dist/{command-DPOjEs1B.mjs → command-ByYf12-8.mjs} +1 -1
  53. package/dist/{command-CmK8-DJ9.mjs → command-C0qCuw03.mjs} +1 -1
  54. package/dist/{command-DqWBPiew.mjs → command-C2FVMd1b.mjs} +1 -1
  55. package/dist/{command-ckixJeTm.mjs → command-C4OgtX_x.mjs} +1 -1
  56. package/dist/{command-CCDzJjIB.mjs → command-C5Kqc5Km.mjs} +1 -1
  57. package/dist/{command-lJJ7sEZe.mjs → command-CFxyp8Uo.mjs} +1 -1
  58. package/dist/{command-ClneauMx.mjs → command-CZAR85ba.mjs} +1 -1
  59. package/dist/{command-BXCk1OsI.mjs → command-CelQVrZL.mjs} +1 -1
  60. package/dist/{command-YFWLEK8W.mjs → command-CrAlzysj.mjs} +1 -1
  61. package/dist/{command-6_Ms3TZv.mjs → command-pMoNdd22.mjs} +1 -1
  62. package/dist/{completions-B1rYgw_a.mjs → completions-DRzBiqpv.mjs} +1 -1
  63. package/dist/{connector-interrupts-DecTdK6X.mjs → connector-interrupts-CrTeSyaM.mjs} +1 -1
  64. package/dist/{connector-telemetry-events-wePxPACj.mjs → connector-telemetry-events-BbAOUt9h.mjs} +1 -1
  65. package/dist/{connector-telemetry-snapshots-D8sXR1qx.mjs → connector-telemetry-snapshots-DcpBx7Qx.mjs} +1 -1
  66. package/dist/{connectors-C-6RQ_Q1.mjs → connectors-D1WFLJoE.mjs} +1 -1
  67. package/dist/{containers-D65Gpj9Q.mjs → containers-BOBEs1Gk.mjs} +4 -4
  68. package/dist/containers-DINLx5_i.mjs +380 -0
  69. package/dist/{content-scan-DbIDQ-Yu.mjs → content-scan-D1GfPSL0.mjs} +1 -1
  70. package/dist/{context-DCon1tRZ.mjs → context-Dp4CXG22.mjs} +1 -1
  71. package/dist/{cps-DGLmzCzp.mjs → cps-D4uhzg3k.mjs} +1 -1
  72. package/dist/{csam-scanner-R7Ih-Dnw.mjs → csam-scanner-DOOUBeBM.mjs} +1 -3
  73. package/dist/custom-csrs-DtdFo5YZ.mjs +18 -0
  74. package/dist/{custom-hostnames-BFWR-tR_.mjs → custom-hostnames-ccdlELaD.mjs} +1 -1
  75. package/dist/custom-nameservers-p3gDjfva.mjs +12 -0
  76. package/dist/custom-pages-DAkKVzgR.mjs +38 -0
  77. package/dist/d1-CDIyRdh4.mjs +52 -0
  78. package/dist/{delegate-CTj0dYET.mjs → delegate-B4bKqF7i.mjs} +1 -1
  79. package/dist/delegate.mjs +1 -1
  80. package/dist/{deploy-BVTA83rN.mjs → deploy-BaC5Ty7F.mjs} +1 -1
  81. package/dist/{deploy-context-CO8ZSRwx.mjs → deploy-context-DTTgNGro.mjs} +1 -1
  82. package/dist/{deploy-input-PhKRxa_2.mjs → deploy-input-mAy06fAI.mjs} +1 -1
  83. package/dist/{dev-CM5GLHNn.mjs → dev-De-HszNT.mjs} +1 -1
  84. package/dist/{diagnostics-DPjl0aCm.mjs → diagnostics-D1CUs2o9.mjs} +1 -1
  85. package/dist/{dist-ataVE8ob.mjs → dist-D5qkmHhC.mjs} +2 -2
  86. package/dist/{dls-BLTIVlbh.mjs → dls-DWBiYzY1.mjs} +1 -1
  87. package/dist/{dns-firewall-D1bb1byu.mjs → dns-firewall-DH9xIT5H.mjs} +8 -8
  88. package/dist/{dns-DkqVq-nB.mjs → dns-wMjf1t6-.mjs} +14 -8
  89. package/dist/{docs-tOv_OllI.mjs → docs-BA7qslb2.mjs} +1 -1
  90. package/dist/{dotenv-qsoPELMm.mjs → dotenv-DKRemNCH.mjs} +1 -1
  91. package/dist/{durable-objects-OJhns_to.mjs → durable-objects-DF0MYpnV.mjs} +1 -1
  92. package/dist/{email-auth-BbsIBNlu.mjs → email-auth-BShMFXn4.mjs} +1 -1
  93. package/dist/email-domains-CDSbVclP.mjs +14 -0
  94. package/dist/{email-routing-DnitWE1A.mjs → email-routing-CBCkbg_F.mjs} +4 -2
  95. package/dist/{email-security-DiWtb7cx.mjs → email-security-CnNa1YON.mjs} +4 -4
  96. package/dist/{email-sending-DuDjXykw.mjs → email-sending-CpDSw-Eb.mjs} +16 -16
  97. package/dist/error-sanitization-B025CygB.mjs +2 -0
  98. package/dist/{error-sanitization-ahuAGEjT.mjs → error-sanitization-DG8WSzHe.mjs} +1 -1
  99. package/dist/{errors-CCFmptqJ.mjs → errors-DatLr-iR.mjs} +1 -1
  100. package/dist/{field-extractors-DNNnkBZH.mjs → field-extractors-BwGdMnTr.mjs} +1 -1
  101. package/dist/{firewall-C7eZRNVF.mjs → firewall-CY_oem-d.mjs} +25 -9
  102. package/dist/{flagship-BczjsrJ5.mjs → flagship-Bat5EZCk.mjs} +1 -1
  103. package/dist/{fraud-wE0UM2SM.mjs → fraud-CSUKLh8X.mjs} +2 -2
  104. package/dist/global-options-DiKj2cQy.mjs +2 -0
  105. package/dist/{google-tag-gateway-6mvtxcJK.mjs → google-tag-gateway-C2skt6t-.mjs} +1 -1
  106. package/dist/{healthchecks-aIB3DebS.mjs → healthchecks-uC43QKQd.mjs} +1 -1
  107. package/dist/{hyperdrive-DHRP8SJS.mjs → hyperdrive-FcBbpew4.mjs} +3 -3
  108. package/dist/iam-8T74DNhH.mjs +62 -0
  109. package/dist/{images-CLgvxd0t.mjs → images-C3JUaf6b.mjs} +1 -1
  110. package/dist/index.mjs +1 -1
  111. package/dist/{init-B_DBTMXU.mjs → init-BEVVz4_P.mjs} +1 -1
  112. package/dist/{intel-jnoIVlYG.mjs → intel-DRy4rHrt.mjs} +6 -7
  113. package/dist/{interactive-1g0dnrA8.mjs → interactive-CKHdGvkh.mjs} +1 -1
  114. package/dist/{internal-Ba3b-Z8J.mjs → internal-CamuESs0.mjs} +1 -1
  115. package/dist/{ips-CQ4gFfex.mjs → ips-DinCNnWj.mjs} +1 -1
  116. package/dist/k2-wsanPL3y.mjs +10 -0
  117. package/dist/{kv-DQfnNE-w.mjs → kv-BLSPcEnH.mjs} +1 -1
  118. package/dist/{lazy-command-DjGzxiUT.mjs → lazy-command-WB1FOuew.mjs} +1 -1
  119. package/dist/{leaked-credential-checks-CaqjG3Oz.mjs → leaked-credential-checks-CSZd9hBQ.mjs} +1 -1
  120. package/dist/{live-BfobGv8W.mjs → live-B6AsI_E5.mjs} +1 -1
  121. package/dist/{load-balancers-BzSCp2Uh.mjs → load-balancers-gap5u4b1.mjs} +19 -7
  122. package/dist/local-CFsO9Tkg.mjs +2 -0
  123. package/dist/{local-BNmz58v4.mjs → local-CgBhtmON.mjs} +1 -1
  124. package/dist/{local-runtime-DvH92pV8.mjs → local-runtime-CmlJ20uJ.mjs} +1 -1
  125. package/dist/{login-B9wYab6S.mjs → login-BJHaTERg.mjs} +1 -1
  126. package/dist/login-BfuOf-Yi.mjs +2 -0
  127. package/dist/logpush-qhlxsioM.mjs +68 -0
  128. package/dist/{logs-Dan7xU-k.mjs → logs-bI54CJ0w.mjs} +23 -7
  129. package/dist/{magic-network-monitoring-TAjt04vN.mjs → magic-network-monitoring-CX3TaMTu.mjs} +1 -1
  130. package/dist/{magic-transit-BSuLHnQ5.mjs → magic-transit-BwDyySHJ.mjs} +20 -20
  131. package/dist/{managed-defense-CTnIZLg4.mjs → managed-defense-CsBBkfeQ.mjs} +2 -2
  132. package/dist/{managed-transforms-BETvesjp.mjs → managed-transforms-CUC-uAbW.mjs} +1 -1
  133. package/dist/{mcp-DhjMGaKc.mjs → mcp-CyI0sDmL.mjs} +3 -3
  134. package/dist/{mesh-jxLLG3t4.mjs → mesh-Czr0UCP4.mjs} +2 -2
  135. package/dist/{migrate-Bkhk38nJ.mjs → migrate-DKDWYrz2.mjs} +1 -1
  136. package/dist/{monetization-BqDgHlPv.mjs → monetization-NUgfDtSy.mjs} +7 -3
  137. package/dist/{network-D6BRpgOv.mjs → network-B42zrBic.mjs} +1 -1
  138. package/dist/{network-interconnects-tP41GbnL.mjs → network-interconnects-DuIBe8fK.mjs} +4 -4
  139. package/dist/{o11y-h4cIC_1T.mjs → o11y-oEUpMC3O.mjs} +6 -6
  140. package/dist/{oauth-CuM12iNb.mjs → oauth-BLQ1-y3R.mjs} +1 -1
  141. package/dist/{oauth-nDH3nTCa.mjs → oauth-BmSFLp_s.mjs} +1 -1
  142. package/dist/observability-BxhJQCgZ.mjs +4 -0
  143. package/dist/organization-CEnlXwrl.mjs +70 -0
  144. package/dist/{organizations-7Q3d9vcW.mjs → organizations-Dt86ToxE.mjs} +1 -1
  145. package/dist/{origin-post-quantum-encryption-XBMPCdSL.mjs → origin-post-quantum-encryption-lX-uaJSL.mjs} +1 -1
  146. package/dist/package-CiRJBRHO.mjs +2 -0
  147. package/dist/{page-rules-BlT5xlhH.mjs → page-rules-J6LhwR-s.mjs} +1 -1
  148. package/dist/{pages-CIbL62L2.mjs → pages-BksdnChs.mjs} +4 -4
  149. package/dist/{pay-per-crawl-BzsBqo_m.mjs → pay-per-crawl-BLcbHRoR.mjs} +1 -1
  150. package/dist/{pay-per-use-DtejLYJ8.mjs → pay-per-use-VatiU-Nt.mjs} +4 -2
  151. package/dist/{pipelines-LjLb8jq6.mjs → pipelines-B5AoB3f3.mjs} +5 -5
  152. package/dist/precursor-D3VH2MXT.mjs +4 -0
  153. package/dist/{previews-zRYO9uO9.mjs → previews-DzJ85fsr.mjs} +1 -1
  154. package/dist/{progress-_Jux05O5.mjs → progress-DLri-rA7.mjs} +1 -1
  155. package/dist/{prompt-SNVLBS1b.mjs → prompt-D0dXwuME.mjs} +1 -1
  156. package/dist/{queues-Ci4rGGC4.mjs → queues-BsAck4To.mjs} +5 -5
  157. package/dist/{r2-qm2hgS43.mjs → r2-BYjdHDEZ.mjs} +38 -38
  158. package/dist/{radar-C_ydbJe_.mjs → radar-CvLtu-Vr.mjs} +1 -1
  159. package/dist/{raw-fetch-D3ydyJYW.mjs → raw-fetch-DQeDx1wT.mjs} +1 -1
  160. package/dist/{ready-hk-_B8z3.mjs → ready-gsGEaWLL.mjs} +1 -1
  161. package/dist/{realtime-BAvjYmYw.mjs → realtime-DiCEgFTC.mjs} +81 -79
  162. package/dist/{registrar-DD7WZaP2.mjs → registrar-D4wdgWpo.mjs} +8 -8
  163. package/dist/{registrar-sandbox-DbxloH5s.mjs → registrar-sandbox-B6yopzdG.mjs} +2 -2
  164. package/dist/{reporting-CRVg3J1C.mjs → reporting-BiHgnT8L.mjs} +1 -1
  165. package/dist/{request-headers-Cn01EsbI.mjs → request-headers-CoxHUNcB.mjs} +1 -1
  166. package/dist/{request-tracers-BWs0rdFS.mjs → request-tracers-817HTytF.mjs} +1 -1
  167. package/dist/{resource-sharing-yipIkdbd.mjs → resource-sharing-CW9xxtq5.mjs} +12 -12
  168. package/dist/{rules-CCtaBLiN.mjs → rules-CRhe_ca9.mjs} +1 -1
  169. package/dist/rulesets-CKyc-Xlx.mjs +42 -0
  170. package/dist/{rum-gDOKylu_.mjs → rum-BfnWHW_d.mjs} +1 -1
  171. package/dist/{run-Br8sYjNF.mjs → run-Ciw_GIrC.mjs} +1 -1
  172. package/dist/run-DD45EQTm.mjs +2 -0
  173. package/dist/{schema-cache-Cb64Nqbt.mjs → schema-cache-BIo0Gi2H.mjs} +1 -1
  174. package/dist/schema-flags-DrqvwQNw.mjs +4 -0
  175. package/dist/{scim-CM8Xah56.mjs → scim-C4iRWNYB.mjs} +1 -1
  176. package/dist/{secrets-store-BEnXiYCC.mjs → secrets-store-DgtzZRze.mjs} +1 -1
  177. package/dist/security-insights-SlUGW3F_.mjs +62 -0
  178. package/dist/{security-txt-BF0PWAEW.mjs → security-txt-C3YS0REz.mjs} +1 -1
  179. package/dist/{session-B7vOqdZU.mjs → session-D2yuwO4i.mjs} +1 -1
  180. package/dist/{shared-CBMFY1VY.mjs → shared--uVkAAd7.mjs} +1 -1
  181. package/dist/{signed-url-VDDQlllt.mjs → signed-url-ClLk45_J.mjs} +1 -1
  182. package/dist/{smart-shield-DQku_wYi.mjs → smart-shield-Dn95hqUH.mjs} +1 -1
  183. package/dist/{snippets-B3FCEMuh.mjs → snippets-BNUKOajz.mjs} +1 -1
  184. package/dist/{spawn-9sE67p7c.mjs → spawn-DuT4snxu.mjs} +1 -1
  185. package/dist/{spectrum-nLirlVue.mjs → spectrum-Cj0BMtg2.mjs} +3 -3
  186. package/dist/{speed-C1hCyMPy.mjs → speed-BrVeZRyX.mjs} +1 -1
  187. package/dist/{sql-DVQOKThL.mjs → sql-BX1pBqj3.mjs} +2 -2
  188. package/dist/src-DPnUfK4c.mjs +131 -0
  189. package/dist/{ssl-CYDRgr24.mjs → ssl-Bx4LCutF.mjs} +3 -3
  190. package/dist/{startup-profile-BLvw_Wmc.mjs → startup-profile-DqaYNT0b.mjs} +1 -1
  191. package/dist/startup-profile-tZNb2HGz.mjs +2 -0
  192. package/dist/{state-B8n0QU04.mjs → state-BmzOLELo.mjs} +1 -1
  193. package/dist/state-Uwfrmw5I.mjs +2 -0
  194. package/dist/{stream-DHyejrI6.mjs → stream-BRzr6yh0.mjs} +1 -1
  195. package/dist/{tags-DOL6dKQE.mjs → tags-xVzjZxdt.mjs} +11 -5
  196. package/dist/{telemetry-DJ8-Q2pU.mjs → telemetry-CJ9URio3.mjs} +1 -1
  197. package/dist/telemetry-Pt5GpCKD.mjs +2 -0
  198. package/dist/tenant-custom-nameservers-M7Fxqh2W.mjs +8 -0
  199. package/dist/{tunnels-CMAmH4Vh.mjs → tunnels-DQVXKUKA.mjs} +3 -3
  200. package/dist/{turnstile-DTJjDMFp.mjs → turnstile-B_Ugzgom.mjs} +1 -1
  201. package/dist/ui-FYultowZ.mjs +2 -0
  202. package/dist/{update-check-DDGKWkmi.mjs → update-check-DHUo4FOJ.mjs} +1 -1
  203. package/dist/{update-check-BkCdHK-3.mjs → update-check-DRr0eRhB.mjs} +1 -1
  204. package/dist/update-check-worker.mjs +1 -1
  205. package/dist/{url-normalization-BbWOra1u.mjs → url-normalization-CZRQH_pJ.mjs} +1 -1
  206. package/dist/{url-scanner-Bj-eS_3C.mjs → url-scanner-BH4PLy16.mjs} +1 -1
  207. package/dist/{user-CMzTHHVX.mjs → user-Bn82Qw0Y.mjs} +10 -12
  208. package/dist/{vectorize-D4H7_KPs.mjs → vectorize-DoVVz_sh.mjs} +1 -1
  209. package/dist/version-Zr2oF8mY.mjs +2 -0
  210. package/dist/{waiting-rooms-CqMbVu9s.mjs → waiting-rooms-QUW131o3.mjs} +5 -3
  211. package/dist/{web-assets-BgfzyF8t.mjs → web-assets-CgQXsp8m.mjs} +2 -2
  212. package/dist/{web3-ByCe47FI.mjs → web3-TY9s6Swn.mjs} +3 -3
  213. package/dist/workers-B3uJqJKc.mjs +39 -0
  214. package/dist/{workers-builds-2N71_8MZ.mjs → workers-builds-BgGY0IGk.mjs} +2 -2
  215. package/dist/{workers-for-platforms-BMN4QXgT.mjs → workers-for-platforms-5RkV9MVp.mjs} +2 -2
  216. package/dist/workers-vpc-Bt4OQbwM.mjs +12 -0
  217. package/dist/{workflows-COiyqt-B.mjs → workflows-6m85DdqF.mjs} +7 -7
  218. package/dist/{wrangler-migration-CqSg8IDj.mjs → wrangler-migration-BbmGOu8l.mjs} +3 -3
  219. package/dist/{zaraz-DjwhCH8A.mjs → zaraz-8WSJ7l0L.mjs} +2 -2
  220. package/dist/{zero-trust-BmpuDOmH.mjs → zero-trust-DK0cqDZv.mjs} +483 -405
  221. package/dist/{zones-XYQiz5kF.mjs → zones-DTAcguf6.mjs} +3 -3
  222. package/package.json +14 -14
  223. package/dist/abuse-reports-BIS9MZn7.mjs +0 -24
  224. package/dist/ai-search-GRN_gXgU.mjs +0 -74
  225. package/dist/auth-Bls_1yRW.mjs +0 -2
  226. package/dist/billing-BhPoqyKC.mjs +0 -22
  227. package/dist/bot-management-BfjX5DuH.mjs +0 -9
  228. package/dist/browser-run-cxOd2cZE.mjs +0 -40
  229. package/dist/build-DCdLWwOg.mjs +0 -2
  230. package/dist/chunk-3PJ54H4K-CbRAWQWI.mjs +0 -363
  231. package/dist/containers-C_byVTZF.mjs +0 -380
  232. package/dist/custom-csrs-D0RnVoJ7.mjs +0 -10
  233. package/dist/custom-nameservers-Dn_9Ssti.mjs +0 -8
  234. package/dist/custom-pages-HqIQcb77.mjs +0 -20
  235. package/dist/d1-CopIY9RT.mjs +0 -89
  236. package/dist/email-domains-pWZi1M4q.mjs +0 -12
  237. package/dist/error-sanitization-rodO1WCL.mjs +0 -2
  238. package/dist/iam-6t7-ScrS.mjs +0 -48
  239. package/dist/k2-Bsm6rzNX.mjs +0 -10
  240. package/dist/local-ChR3YIMU.mjs +0 -2
  241. package/dist/login-ierSCYE6.mjs +0 -2
  242. package/dist/logpush-DgfiSd1b.mjs +0 -44
  243. package/dist/magic-cloud-networking-DP8fWC4a.mjs +0 -68
  244. package/dist/oauth-clients-B0voUiXM.mjs +0 -14
  245. package/dist/oauth-scopes-Bhns1ZHW.mjs +0 -4
  246. package/dist/organization-Cy55HoRR.mjs +0 -73
  247. package/dist/package-DK3JX4I3.mjs +0 -2
  248. package/dist/precursor-BKp5_Ag4.mjs +0 -4
  249. package/dist/rulesets-DBEvCNDS.mjs +0 -34
  250. package/dist/run-LOgTLpob.mjs +0 -2
  251. package/dist/schema-flags-BcbbCWR5.mjs +0 -4
  252. package/dist/security-insights-Be5GvdBA.mjs +0 -40
  253. package/dist/src-Bh2gHpI7.mjs +0 -131
  254. package/dist/startup-profile-ByxSdhEl.mjs +0 -2
  255. package/dist/state-BTOzaT5L.mjs +0 -2
  256. package/dist/telemetry-kjElc1zT.mjs +0 -2
  257. package/dist/tenant-2EdATz2Y.mjs +0 -10
  258. package/dist/tenant-custom-nameservers-DhEpJNST.mjs +0 -8
  259. package/dist/ui-7zujR-O7.mjs +0 -2
  260. package/dist/version-DIIJ2ixL.mjs +0 -2
  261. package/dist/workers-BiLsPkYD.mjs +0 -39
  262. package/dist/workers-vpc-3o7dMg7-.mjs +0 -12
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{i as n}from"./context-DCon1tRZ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-_Jux05O5.mjs";import{t as o}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-SNVLBS1b.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads`,body:`json`};function m(e){return e.usage(`$0 content-scan expressions create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-D0dXwuME.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads`,body:`json`};function m(e){return e.usage(`$0 content-scan expressions create
3
3
 
4
4
  Create one or more Content Scanning custom expressions, appending them to the existing list of the zone, and return the updated list. Each expression reaches content objects the scanner cannot find automatically, for example \`lookup_json_string(http.request.body.raw, "file")\`.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of Content Scanning custom expressions to create.`})}const h={command:`create`,describe:`Create Content Scanning custom expressions for a zone.`,builder:m,handler:async e=>o({command:`content-scan expressions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf content-scan expressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/content-upload-scan/payloads`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:c}));r(n,{successLabel:`Created`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/content-upload-scan/payloads/${t.expression_id}`};function _(e){return e.usage(`$0 content-scan expressions delete <expression-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,r as t}from"./project-settings-nBMEx1f-.mjs";import{n}from"./resolve-C3FmNlSO.mjs";function r(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function i(n={}){let r=process.env.CLOUDFLARE_ACCOUNT_ID;if(r)return{value:r,source:`env`};if(n.skipProjectSettings)return;let i=t(void 0,n),a=i===void 0?await e(void 0,n):i;if(a?.settings?.accountId)return{value:a.settings.accountId,source:`settings`,path:a.path}}async function a(){let{getActiveAccountId:e,isTemporaryAccountRequested:t}=await import(`./oauth-CuM12iNb.mjs`);if(t())return;let n=await i();if(n)return n.value;try{return e()}catch{return}}async function o(e){let{getOrSelectAccountId:t,isTemporaryAccountRequested:n,requireTemporaryAccount:r}=await import(`./oauth-CuM12iNb.mjs`);if(n())return(await r(e)).accountId;let a=await i(e);return a&&s(a.value,h(a,`accountId`)),t(a?.value,e)}function s(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function c(e,t,n){if(e?.zoneId)return l(e.zoneId,t);let i=r(`CLOUDFLARE_ZONE_ID`,e?.zone);if(i){if(!n?.quiet&&i.source!==`flag`){let e=h(i);console.error(`Using zone: ${i.value} (from ${e})`)}return l(i.value,t)}throw Error(`No zone specified.
2
+ import{i as e,r as t}from"./project-settings-nBMEx1f-.mjs";import{n}from"./resolve-C3FmNlSO.mjs";function r(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function i(n={}){let r=process.env.CLOUDFLARE_ACCOUNT_ID;if(r)return{value:r,source:`env`};if(n.skipProjectSettings)return;let i=t(void 0,n),a=i===void 0?await e(void 0,n):i;if(a?.settings?.accountId)return{value:a.settings.accountId,source:`settings`,path:a.path}}async function a(){let{getActiveAccountId:e,isTemporaryAccountRequested:t}=await import(`./oauth-BLQ1-y3R.mjs`);if(t())return;let n=await i();if(n)return n.value;try{return e()}catch{return}}async function o(e){let{getOrSelectAccountId:t,isTemporaryAccountRequested:n,requireTemporaryAccount:r}=await import(`./oauth-BLQ1-y3R.mjs`);if(n())return(await r(e)).accountId;let a=await i(e);return a&&s(a.value,h(a,`accountId`)),t(a?.value,e)}function s(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function c(e,t,n){if(e?.zoneId)return l(e.zoneId,t);let i=r(`CLOUDFLARE_ZONE_ID`,e?.zone);if(i){if(!n?.quiet&&i.source!==`flag`){let e=h(i);console.error(`Using zone: ${i.value} (from ${e})`)}return l(i.value,t)}throw Error(`No zone specified.
3
3
 
4
4
  Please provide one of the following:
5
5
  1. Zone as a positional argument: cf dns records list <zone>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-CB9wjyad.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-_Jux05O5.mjs";import{t as i}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as a,r as o,t as s}from"./body-parser-BKcZS9iJ.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";var l={method:`GET`,path:()=>`/user/communication_preferences`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function u(e){return e.usage(`$0 cps get
2
+ import{n as e}from"./auth-FK2eLQ02.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./dry-run-gy0Hl9xo.mjs";import{t as r}from"./progress-DLri-rA7.mjs";import{t as i}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as a,r as o,t as s}from"./body-parser-BKcZS9iJ.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";var l={method:`GET`,path:()=>`/user/communication_preferences`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function u(e){return e.usage(`$0 cps get
3
3
 
4
4
  Retrieve the communication preferences for the authenticated user, including email verification status, marketing subscription opt-in/opt-out state, and language locale. Callers authenticate with standard Cloudflare API tokens or keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get communication preferences`,builder:u,handler:async a=>i({command:`cps get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf cps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/communication_preferences`,pathParams:{},bodyKind:`none`});return}let i=await e(a),o=await r(`Loading`,async()=>i.send(l));t(o,{successLabel:`Loaded`})})};var f={method:`PUT`,path:()=>`/user/communication_preferences`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function p(e){return e.usage(`$0 cps update
5
5
 
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{i as n}from"./context-DCon1tRZ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-_Jux05O5.mjs";import{t as o}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as s,r as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";var d={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/settings/csam_scanner_third_party`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function f(e){return e.usage(`$0 csam-scanner edit
3
-
4
- Update the CSAM Scanner configuration for a zone. Allows enabling or disabling CSAM scanning, updating the notification email, and configuring scanning sources. When a new email is provided, email verification is triggered automatically. The \`enabled\` field is a toggle; the server may adjust it based on whether the notification email is verified. Returns 403 if the zone or account is locked by Trust & Safety.`).option(`id`,{type:`string`,description:`The feature identifier.`,choices:[`csam_scanner`]}).coerce(`id`,e=>u(e,`id`,`text`)).option(`value-email`,{type:`string`,description:`Notification email address for CSAM scan results. When changed,
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as s,r as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";var d={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/settings/csam_scanner_third_party`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function f(e){return e.usage("$0 csam-scanner edit\n\nUpdate the CSAM Scanner configuration for a zone. Allows enabling or disabling CSAM scanning, updating the notification email, and configuring scanning sources. This is a partial update: fields omitted from `value` keep their current setting, and `sources` is merged per source (`null` clears all sources). Send an empty `email` to clear the notification address. When a new email is provided, email verification is triggered automatically. The `enabled` field is a toggle; the server may adjust it based on whether the notification email is verified. Returns 403 if the zone or account is locked by Trust & Safety.").option(`id`,{type:`string`,description:`The feature identifier.`,choices:[`csam_scanner`]}).coerce(`id`,e=>u(e,`id`,`text`)).option(`value-email`,{type:`string`,description:`Notification email address for CSAM scan results. When changed,
5
3
  email verification is triggered automatically.
6
4
  `}).option(`value-enabled`,{type:`boolean`,description:`Whether CSAM scanning is enabled for this zone.`}).option(`value-resend-email`,{type:`boolean`,description:`Set to true to trigger re-sending the email verification.
7
5
  Write-only; never appears in responses (omitted when false).
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-D0dXwuME.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs`,body:`json`};function g(e){return e.usage(`$0 custom-csrs create
3
+
4
+ Generate a new custom Certificate Signing Request (CSR) for an account or zone. Cloudflare generates and securely stores the private key associated with the CSR.
5
+
6
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`common-name`,{type:`string`,description:`The common name (domain) for the CSR. Must be at most 64 characters.`}).option(`country`,{type:`string`,description:`Two-letter ISO 3166-1 alpha-2 country code.`}).option(`description`,{type:`string`,description:`Optional description for the CSR.`}).option(`key-type`,{type:`string`,description:`Key algorithm to use for the CSR. Defaults to rsa2048 if not specified.`,choices:[`rsa2048`,`p256v1`],default:`rsa2048`}).coerce(`key-type`,e=>f(e,`key-type`,`text`)).option(`locality`,{type:`string`,description:`City or locality name.`}).option(`name`,{type:`string`,description:`Human-readable name for the CSR.`}).option(`organization`,{type:`string`,description:`Organization name.`}).option(`organizational-unit`,{type:`string`,description:`Organizational unit name.`}).option(`sans`,{type:`string`,array:!0,description:`Subject Alternative Names for the CSR. At least one SAN is required.`}).option(`state`,{type:`string`,description:`State or province name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating a custom CSR.`})}const _={command:`create`,describe:`Create Custom CSR`,builder:g,handler:async e=>l({command:`custom-csrs create`,classification:{safeFlags:[`key-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({common_name:f(e[`common-name`],`common-name`,`text`),country:f(e.country,`country`,`text`),description:f(e.description,`description`,`text`),key_type:e[`key-type`],locality:f(e.locality,`locality`,`text`),name:f(e.name,`name`,`text`),organization:f(e.organization,`organization`,`text`),organizational_unit:f(e[`organizational-unit`],`organizational-unit`,`text`),sans:e.sans,state:f(e.state,`state`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,g=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:m,account_or_zone_id:g}));o(n,{successLabel:`Created`});return}if(e[`common-name`]===void 0&&(e[`common-name`]=await p(`common-name`,`The common name (domain) for the CSR. Must be at most 64 characters.`)),e.country===void 0&&(e.country=await p(`country`,`Two-letter ISO 3166-1 alpha-2 country code.`)),e.locality===void 0&&(e.locality=await p(`locality`,`City or locality name.`)),e.organization===void 0&&(e.organization=await p(`organization`,`Organization name.`)),e.sans===void 0)throw Error(`--sans is required (or pass --body with this field set).`);e.state===void 0&&(e.state=await p(`state`,`State or province name.`));let _=d({common_name:f(e[`common-name`],`common-name`,`text`),country:f(e.country,`country`,`text`),description:f(e.description,`description`,`text`),key_type:e[`key-type`],locality:f(e.locality,`locality`,`text`),name:f(e.name,`name`,`text`),organization:f(e.organization,`organization`,`text`),organizational_unit:f(e[`organizational-unit`],`organizational-unit`,`text`),sans:e.sans,state:f(e.state,`state`,`text`)}),v=await c(`Creating`,async()=>l.send(h,{body:_,account_or_zone:m,account_or_zone_id:g}));o(v,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs/${t.custom_csr_id}`};function y(e){return e.usage(`$0 custom-csrs delete <custom-csr-id>
7
+
8
+ Delete a custom Certificate Signing Request (CSR) and its associated private key.
9
+
10
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`custom-csr-id`,{type:`string`,description:`Custom CSR identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <custom-csr-id>`,describe:`Delete Custom CSR`,builder:y,handler:async e=>l({command:`custom-csrs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs/${e[`custom-csr-id`]==null?`<custom-csr-id>`:encodeURIComponent(String(e[`custom-csr-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"custom-csr-id":String(e[`custom-csr-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await m({force:!!e.force}))return;let f=await c(`Deleting`,async()=>l.send(v,{account_or_zone:u,account_or_zone_id:d,custom_csr_id:e[`custom-csr-id`]}));o(f,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs/${t.custom_csr_id}`};function S(e){return e.usage(`$0 custom-csrs get <custom-csr-id>
11
+
12
+ Retrieve details for a specific custom Certificate Signing Request (CSR).
13
+
14
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`custom-csr-id`,{type:`string`,description:`Custom CSR identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <custom-csr-id>`,describe:`Custom CSR Details`,builder:S,handler:async e=>l({command:`custom-csrs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs/${e[`custom-csr-id`]==null?`<custom-csr-id>`:encodeURIComponent(String(e[`custom-csr-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"custom-csr-id":String(e[`custom-csr-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(x,{account_or_zone:u,account_or_zone_id:d,custom_csr_id:e[`custom-csr-id`]}));o(f,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_csrs`,query:[`page`,`per_page`,`order`,`direction`]};function T(e){return e.usage(`$0 custom-csrs list
15
+
16
+ List all custom Certificate Signing Requests (CSRs) for an account or zone.
17
+
18
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of custom CSRs per page.`}).option(`order`,{type:`string`,description:`The field to sort the returned custom CSRs by.`,choices:[`name`,`account_tag`,`created_at`]}).option(`direction`,{type:`string`,description:`The direction to sort by.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Custom CSRs`,builder:T,handler:async e=>l({command:`custom-csrs list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-csrs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_csrs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(w,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})},D={command:`custom-csrs`,describe:`custom-csrs`,builder:e=>e.command(_).command(b).command(C).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{D as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{i as n}from"./context-DCon1tRZ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-_Jux05O5.mjs";import{t as o}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as s,n as c,r as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-SNVLBS1b.mjs";var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}/certificate_pack/${t.certificate_pack_id}/certificates/${t.certificate_id}`};function h(e){return e.usage(`$0 custom-hostnames certificate-pack certificates delete <certificate-id>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as s,n as c,r as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-D0dXwuME.mjs";var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}/certificate_pack/${t.certificate_pack_id}/certificates/${t.certificate_id}`};function h(e){return e.usage(`$0 custom-hostnames certificate-pack certificates delete <certificate-id>
3
3
 
4
4
  Delete a single custom certificate from a certificate pack that contains two bundled certificates. Deletion is subject to the following constraints. You cannot delete a certificate if it is the only remaining certificate in the pack. At least one certificate must remain in the pack.`).positional(`certificate-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`custom-hostname-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`certificate-pack-id`,{type:`string`,description:`Custom hostname identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <certificate-id>`,describe:`Delete Single Certificate And Key For Custom Hostname`,builder:h,handler:async e=>o({command:`custom-hostnames certificate-pack certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf custom-hostnames certificate-pack certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/custom_hostnames/${e[`custom-hostname-id`]==null?`<custom-hostname-id>`:encodeURIComponent(String(e[`custom-hostname-id`]))}/certificate_pack/${e[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(e[`certificate-pack-id`]))}/certificates/${e[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(e[`certificate-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"custom-hostname-id":String(e[`custom-hostname-id`]??``),"certificate-pack-id":String(e[`certificate-pack-id`]??``),"certificate-id":String(e[`certificate-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(m,{zone_id:s,custom_hostname_id:e[`custom-hostname-id`],certificate_pack_id:e[`certificate-pack-id`],certificate_id:e[`certificate-id`]}));r(c,{successLabel:`Deleted`})})};var _={method:`PUT`,path:t=>e`/zones/${t.zone_id}/custom_hostnames/${t.custom_hostname_id}/certificate_pack/${t.certificate_pack_id}/certificates/${t.certificate_id}`,body:`json`};function v(e){return e.usage(`$0 custom-hostnames certificate-pack certificates update <certificate-id>
5
5
 
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-D0dXwuME.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_ns`,body:`json`};function g(e){return e.usage(`$0 custom-nameservers create
3
+
4
+ Adds a custom nameserver to the account or zone for use as a vanity nameserver on zones.
5
+
6
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`ns-name`,{type:`string`,description:`The FQDN of the name server.`}).option(`ns-set`,{type:`number`,description:`The number of the set that this name server belongs to.`,default:1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Add account or zone Custom Nameserver`,builder:g,handler:async e=>l({command:`custom-nameservers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-nameservers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_ns`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({ns_name:f(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,g=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:m,account_or_zone_id:g}));o(n,{successLabel:`Created`});return}e[`ns-name`]===void 0&&(e[`ns-name`]=await p(`ns-name`,`The FQDN of the name server.`));let _=d({ns_name:f(e[`ns-name`],`ns-name`,`text`),ns_set:e[`ns-set`]}),v=await c(`Creating`,async()=>l.send(h,{body:_,account_or_zone:m,account_or_zone_id:g}));o(v,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/custom_ns/${t.custom_ns_id}`};function y(e){return e.usage(`$0 custom-nameservers delete <custom-ns-id>
7
+
8
+ Removes a custom nameserver from the account.`).positional(`custom-ns-id`,{type:`string`,description:`The FQDN of the name server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <custom-ns-id>`,describe:`Delete Account Custom Nameserver`,builder:y,handler:async e=>l({command:`custom-nameservers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf custom-nameservers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/custom_ns/${e[`custom-ns-id`]==null?`<custom-ns-id>`:encodeURIComponent(String(e[`custom-ns-id`]))}`,pathParams:{"custom-ns-id":String(e[`custom-ns-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await m({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(v,{account_id:l,custom_ns_id:e[`custom-ns-id`]}));o(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_ns`};function S(e){return e.usage(`$0 custom-nameservers get
9
+
10
+ List an account or zone's custom nameservers.
11
+
12
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`List account or zone Custom Nameservers`,builder:S,handler:async e=>l({command:`custom-nameservers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-nameservers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_ns`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(x,{account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})},w={command:`custom-nameservers`,describe:`custom-nameservers`,builder:e=>e.command(_).command(b).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-D0dXwuME.mjs";var g={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets`,body:`json`};function _(e){return e.usage(`$0 custom-pages account-assets create
3
+
4
+ Creates a custom asset for an account or zone.
5
+
6
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`description`,{type:`string`,description:`A short description of the custom asset.`}).option(`name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`}).option(`url`,{type:`string`,description:`The URL where the asset content is fetched from.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create a custom asset`,builder:_,handler:async e=>l({command:`custom-pages account-assets create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({description:f(e.description,`description`,`text`),name:f(e.name,`name`,`text`),url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(g,{body:t,account_or_zone:m,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e.description===void 0&&(e.description=await p(`description`,`A short description of the custom asset.`)),e.name===void 0&&(e.name=await p(`name`,`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`)),e.url===void 0&&(e.url=await p(`url`,`The URL where the asset content is fetched from.`));let _=d({description:f(e.description,`description`,`text`),name:f(e.name,`name`,`text`),url:f(e.url,`url`,`text`)}),v=await c(`Creating`,async()=>l.send(g,{body:_,account_or_zone:m,account_or_zone_id:h}));o(v,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets/${t.asset_name}`,response:!1};function b(e){return e.usage(`$0 custom-pages account-assets delete <asset-name>
7
+
8
+ Deletes a custom asset from an account or zone.
9
+
10
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete <asset-name>`,describe:`Delete a custom asset`,builder:b,handler:async e=>l({command:`custom-pages account-assets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets/${e[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(e[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"asset-name":String(e[`asset-name`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await h({force:!!e.force}))return;let f=await c(`Deleting`,async()=>l.send(y,{account_or_zone:u,account_or_zone_id:d,asset_name:e[`asset-name`]}));o(f,{successLabel:`Deleted`})})};var S={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets/${t.asset_name}`};function C(e){return e.usage(`$0 custom-pages account-assets get <asset-name>
11
+
12
+ Returns a custom asset for an account or zone.
13
+
14
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <asset-name>`,describe:`Get a custom asset`,builder:C,handler:async e=>l({command:`custom-pages account-assets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets/${e[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(e[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"asset-name":String(e[`asset-name`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(S,{account_or_zone:u,account_or_zone_id:d,asset_name:e[`asset-name`]}));o(f,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets`,query:[`page`,`per_page`]};function E(e){return e.usage(`$0 custom-pages account-assets list
15
+
16
+ Lists custom assets for an account or zone.
17
+
18
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of custom assets per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List custom assets`,builder:E,handler:async e=>l({command:`custom-pages account-assets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(T,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var O={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/assets/${t.asset_name}`,body:`json`};function k(e){return e.usage(`$0 custom-pages account-assets update <asset-name>
19
+
20
+ Updates a custom asset for an account or zone.
21
+
22
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`asset-name`,{type:`string`,description:`The unique name of the custom asset. Can only contain letters (A-Z, a-z), numbers (0-9), and underscores (_).`,demandOption:!0}).option(`description`,{type:`string`,description:`A short description of the custom asset.`}).option(`url`,{type:`string`,description:`The URL where the asset content is fetched from.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`update <asset-name>`,describe:`Update a custom asset`,builder:k,handler:async e=>l({command:`custom-pages account-assets update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-assets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/assets/${e[`asset-name`]==null?`<asset-name>`:encodeURIComponent(String(e[`asset-name`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"asset-name":String(e[`asset-name`]??``)},bodyKind:`json`,body:e.body===void 0?d({description:f(e.description,`description`,`text`),url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Updating`,async()=>l.send(O,{body:t,account_or_zone:m,account_or_zone_id:h,asset_name:e[`asset-name`]}));o(n,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await p(`description`,`A short description of the custom asset.`)),e.url===void 0&&(e.url=await p(`url`,`The URL where the asset content is fetched from.`));let g=d({description:f(e.description,`description`,`text`),url:f(e.url,`url`,`text`)}),_=await c(`Updating`,async()=>l.send(O,{body:g,account_or_zone:m,account_or_zone_id:h,asset_name:e[`asset-name`]}));o(_,{successLabel:`Updated`})})},j={command:`account-assets`,describe:`Manage account-level custom assets`,builder:e=>e.command(v).command(x).command(w).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/${t.identifier}`};function N(e){return e.usage(`$0 custom-pages account-custom-pages get <identifier>
23
+
24
+ Returns the configuration for a custom page type.
25
+
26
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`identifier`,{type:`string`,description:`Custom page type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <identifier>`,describe:`Get a custom page`,builder:N,handler:async e=>l({command:`custom-pages account-custom-pages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),identifier:String(e.identifier??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(M,{account_or_zone:u,account_or_zone_id:d,identifier:e.identifier}));o(f,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages`};function I(e){return e.usage(`$0 custom-pages account-custom-pages list
27
+
28
+ Lists all custom page configurations for an account or zone.
29
+
30
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List custom pages`,builder:I,handler:async e=>l({command:`custom-pages account-custom-pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(F,{account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})};var R={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/preview_tokens`,body:`json`};function z(e){return e.usage(`$0 custom-pages account-custom-pages preview-tokens create
31
+
32
+ Creates a signed JWT for previewing an account or zone-level custom page before it is published.
33
+
34
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`act`,{type:`string`,description:`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`}).option(`target`,{type:`string`,description:`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`}).option(`url`,{type:`string`,description:`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`create`,describe:`Create a preview token`,builder:z,handler:async e=>l({command:`custom-pages account-custom-pages preview-tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages preview-tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/preview_tokens`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?d({act:f(e.act,`act`,`text`),target:f(e.target,`target`,`text`),url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),m=e.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=u(e.body),n=await c(`Creating`,async()=>l.send(R,{body:t,account_or_zone:m,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e.act===void 0&&(e.act=await p(`act`,`The preview action type. Required for request parsing but not used in token generation. Typically set to "preview".`)),e.target===void 0&&(e.target=await p(`target`,`The target custom page type to preview (e.g. "block:waf"). Encoded as the "endpoint" claim in the resulting JWT.`)),e.url===void 0&&(e.url=await p(`url`,`The URL of the custom page content to preview. Encoded as the "zone" claim in the resulting JWT.`));let g=d({act:f(e.act,`act`,`text`),target:f(e.target,`target`,`text`),url:f(e.url,`url`,`text`)}),_=await c(`Creating`,async()=>l.send(R,{body:g,account_or_zone:m,account_or_zone_id:h}));o(_,{successLabel:`Created`})})},V={command:`preview-tokens`,describe:`Preview tokens for account-level custom pages`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var H={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/custom_pages/${t.identifier}`,body:`json`};function U(e){return e.usage(`$0 custom-pages account-custom-pages update <identifier>
35
+
36
+ Updates the configuration for a custom page type.
37
+
38
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`identifier`,{type:`string`,description:`Custom page type.`,demandOption:!0}).option(`state`,{type:`string`,description:`The custom page state.`,choices:[`default`,`customized`]}).coerce(`state`,e=>f(e,`state`,`text`)).option(`url`,{type:`string`,description:`The URL associated with the custom page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const W={command:`update <identifier>`,describe:`Update a custom page`,builder:U,handler:async e=>l({command:`custom-pages account-custom-pages update`,classification:{safeFlags:[`state`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf custom-pages account-custom-pages update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/custom_pages/${e.identifier==null?`<identifier>`:encodeURIComponent(String(e.identifier))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),identifier:String(e.identifier??``)},bodyKind:`json`,body:e.body===void 0?d({state:e.state,url:f(e.url,`url`,`text`)}):u(e.body)});return}let l=await n(e),h=e.zone===void 0?`accounts`:`zones`,g=h===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(h===`zones`?e.zoneId=g:e.accountId=g,e.body){let t=u(e.body),n=await c(`Updating`,async()=>l.send(H,{body:t,account_or_zone:h,account_or_zone_id:g,identifier:e.identifier}));o(n,{successLabel:`Updated`});return}e.state===void 0&&(e.state=await m(`state`,`The custom page state.`,[`default`,`customized`])),e.url===void 0&&(e.url=await p(`url`,`The URL associated with the custom page.`));let _=d({state:e.state,url:f(e.url,`url`,`text`)}),v=await c(`Updating`,async()=>l.send(H,{body:_,account_or_zone:h,account_or_zone_id:g,identifier:e.identifier}));o(v,{successLabel:`Updated`})})},G={command:`account-custom-pages`,describe:`Manage account-level custom pages`,builder:e=>e.command(P).command(L).command(W).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},K={command:`custom-pages`,describe:`Manage custom error and challenge pages and their assets for accounts and zones`,builder:e=>e.command(j).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env node
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as n}from"./local-CgBhtmON.mjs";import{n as r}from"./auth-FK2eLQ02.mjs";import{n as i}from"./resolve-C3FmNlSO.mjs";import{a,t as o}from"./context-Dp4CXG22.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-DLri-rA7.mjs";import{n as u,t as d}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as f,n as p,t as m}from"./body-parser-BKcZS9iJ.mjs";import{n as h}from"./input-validation-D7z60HJH.mjs";import{a as g,i as _,n as v,t as ee}from"./prompt-D0dXwuME.mjs";import y from"node:fs";import b from"node:path";var te={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database`,body:`json`};function ne(e){return e.usage(`$0 d1 create
3
+
4
+ Create a new D1 database in your account.`).option(`jurisdiction`,{type:`string`,description:`Specify the location to restrict the D1 database to run and store data. If this option is present, the location hint is ignored.`,choices:[`eu`,`fedramp`,`us`]}).coerce(`jurisdiction`,e=>h(e,`jurisdiction`,`text`)).option(`name`,{type:`string`,description:`D1 database name.`}).option(`primary-location-hint`,{type:`string`,description:`Specify the region to create the D1 primary, if available. If this option is omitted, the D1 will be created as close as possible to the current user.`,choices:[`wnam`,`enam`,`weur`,`eeur`,`apac`,`oc`]}).coerce(`primary-location-hint`,e=>h(e,`primary-location-hint`,`text`)).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>h(e,`read-replication-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`create`,describe:`Create D1 Database`,builder:ne,handler:async e=>d({command:`d1 create`,classification:{safeFlags:[`jurisdiction`,`primary-location-hint`,`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database`,pathParams:{},bodyKind:`json`,body:e.body===void 0?m({jurisdiction:e.jurisdiction,name:h(e.name,`name`,`text`),primary_location_hint:e[`primary-location-hint`],read_replication:{mode:e[`read-replication-mode`]}}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=p(e.body),r=await l(`Creating`,async()=>t.send(te,{body:n,account_id:i}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await g(`name`,`D1 database name.`));let u=m({jurisdiction:e.jurisdiction,name:h(e.name,`name`,`text`),primary_location_hint:e[`primary-location-hint`],read_replication:{mode:e[`read-replication-mode`]}}),d=await l(`Creating`,async()=>t.send(te,{body:u,account_id:i}));s(d,{successLabel:`Created`})})};var ie={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`};function ae(e){return e.usage(`$0 d1 delete <database-id>
5
+
6
+ Delete a D1 database.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const oe={command:`delete <database-id>`,describe:`Delete D1 Database`,builder:ae,handler:async e=>d({command:`d1 delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`none`});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,!await v({force:!!e.force,message:`This permanently deletes the D1 database and all of its data.`}))return;let u=await l(`Deleting`,async()=>t.send(ie,{account_id:i,database_id:e[`database-id`]}));s(u,{successLabel:`Deleted`})})};var se={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`,body:`json`};function ce(e){return e.usage(`$0 d1 edit <database-id>
7
+
8
+ Partially update a D1 database's configuration.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>h(e,`read-replication-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const le={command:`edit <database-id>`,describe:`Update D1 Database partially`,builder:ce,handler:async e=>d({command:`d1 edit`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({read_replication:{mode:e[`read-replication-mode`]}}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=p(e.body),r=await l(`Updating`,async()=>t.send(se,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Updated`});return}let u=m({read_replication:{mode:e[`read-replication-mode`]}}),d=await l(`Updating`,async()=>t.send(se,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Updated`})})};var ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`,query:[`fields`],joined:[`fields`]};function de(e){return e.usage(`$0 d1 get <database-id>
9
+
10
+ Get details for a specific D1 database.`).positional(`database-id`,{type:`string`,description:`Database ID`,demandOption:!0}).option(`fields`,{type:`string`,array:!0,description:`Comma-separated list of fields to include in the response. When omitted,
11
+ all fields are returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`get <database-id>`,describe:`Get D1 Database`,builder:de,handler:async e=>d({command:`d1 get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={fields:e.fields};if(e.dryRun){let n=await a();c({command:`cf d1 get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),u=e.local?n:await o();e.accountId=u;let d=await l(`Loading`,async()=>i.send(ue,{account_id:u,database_id:e[`database-id`],...t}));s(d,{successLabel:`Loaded`})})};var pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database`,query:[`name`,`page`,`per_page`]};function me(e){return e.usage(`$0 d1 list
12
+
13
+ List D1 databases in your account.`).option(`name`,{type:`string`,description:`a database name to search for.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`list`,describe:`List D1 Databases`,builder:me,handler:async e=>d({command:`d1 list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await a();c({command:`cf d1 list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/d1/database`,pathParams:{},query:t,bodyKind:`none`});return}let i=await r(e),u=e.local?n:await o();e.accountId=u;let d=await l(`Loading`,async()=>i.send(pe,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/query`,body:`json`};function ge(e){return e.usage(`$0 d1 query <database-id>
14
+
15
+ Execute a SQL query against a D1 database and return results as objects.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`params`,{type:`string`,array:!0,description:`The params field`}).option(`sql`,{type:`string`,description:`Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.`}).option(`batch`,{type:`string`,description:`The batch field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A single query object or a batch query object`}).conflicts(`params`,[`batch`]).implies(`params`,[`sql`]).conflicts(`sql`,[`batch`]).conflicts(`batch`,[`params`,`sql`])}const _e={command:`query <database-id>`,describe:`Query D1 Database`,builder:ge,handler:async e=>d({command:`d1 query`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/query`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:f(e.batch,`batch`)}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=p(e.body),r=await l(`Loading`,async()=>t.send(x,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Loaded`});return}let u=m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:f(e.batch,`batch`)}),d=await l(`Loading`,async()=>t.send(x,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Loaded`})})};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/raw`,body:`json`};function ve(e){return e.usage(`$0 d1 raw <database-id>
16
+
17
+ Execute a SQL query against a D1 database and return result rows as arrays rather than objects. This is a performance-optimized version of the /query endpoint.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`params`,{type:`string`,array:!0,description:`The params field`}).option(`sql`,{type:`string`,description:`Your SQL query. Supports multiple statements, joined by semicolons, which will be executed as a batch.`}).option(`batch`,{type:`string`,description:`The batch field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A single query object or a batch query object`}).conflicts(`params`,[`batch`]).implies(`params`,[`sql`]).conflicts(`sql`,[`batch`]).conflicts(`batch`,[`params`,`sql`])}const ye={command:`raw <database-id>`,describe:`Raw D1 Database query`,builder:ve,handler:async e=>d({command:`d1 raw`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 raw`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/raw`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:f(e.batch,`batch`)}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=p(e.body),r=await l(`Loading`,async()=>t.send(S,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Loaded`});return}let u=m({params:e.params,sql:h(e.sql,`sql`,`text`),batch:f(e.batch,`batch`)}),d=await l(`Loading`,async()=>t.send(S,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Loaded`})})};var be={method:`GET`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/time_travel/bookmark`,query:[`timestamp`]};function xe(e){return e.usage(`$0 d1 time-travel get-bookmark <database-id>
18
+
19
+ Retrieve the current bookmark, or the nearest bookmark at or before a provided timestamp. Bookmarks can be used with the restore endpoint to revert the database to a previous point in time.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`timestamp`,{type:`string`,description:`An optional ISO 8601 timestamp. If provided, returns the nearest available bookmark at or before this timestamp. If omitted, returns the current bookmark.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get-bookmark <database-id>`,describe:`Get D1 database bookmark`,builder:xe,handler:async e=>d({command:`d1 time-travel get-bookmark`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={timestamp:e.timestamp};if(e.dryRun){let n=await a();c({command:`cf d1 time-travel get-bookmark`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/time_travel/bookmark`,pathParams:{"database-id":String(e[`database-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),u=e.local?n:await o();e.accountId=u;let d=await l(`Loading`,async()=>i.send(be,{account_id:u,database_id:e[`database-id`],...t}));s(d,{successLabel:`Loaded`})})};var Ce={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/time_travel/restore`,query:[`bookmark`,`timestamp`]};function we(e){return e.usage(`$0 d1 time-travel restore <database-id>
20
+
21
+ Restore a D1 database to a previous point in time either via a bookmark or a timestamp.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`bookmark`,{type:`string`,description:"A bookmark to restore the database to. Required if `timestamp` is not provided."}).option(`timestamp`,{type:`string`,description:"An ISO 8601 timestamp to restore the database to. Required if `bookmark` is not provided."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Te={command:`restore <database-id>`,describe:`Restore D1 Database to a bookmark or point in time`,builder:we,handler:async e=>d({command:`d1 time-travel restore`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={bookmark:e.bookmark,timestamp:e.timestamp};if(e.dryRun){let n=await a();c({command:`cf d1 time-travel restore`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/time_travel/restore`,pathParams:{"database-id":String(e[`database-id`]??``)},query:t,bodyKind:`none`});return}let i=await r(e),u=e.local?n:await o();if(e.accountId=u,!await v({force:!!e.force,message:`This reverts the D1 database to a previous point in time. Data written after the bookmark will be lost.`}))return;let d=await l(`Deleting`,async()=>i.send(Ce,{account_id:u,database_id:e[`database-id`],...t}));s(d,{successLabel:`Deleted`})})},Ee={command:`time-travel`,describe:`use specific point-in-time backups of your D1 database`,builder:e=>e.command(Se).command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var De={method:`POST`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}/undelete`,body:`json`};function Oe(e){return e.usage("$0 d1 undelete <database-id>\n\nRestore a deleted D1 database. The database is restored with the name it had when it was deleted, unless `new_name` is provided. The restored database counts against the account's limits. Undeleting a database that is not deleted succeeds without changes, unless `new_name` differs from its current name which errors. A database can only be undeleted within 7 days (7 * 24 hours) of its deletion. Once a database is undeleted, Time Travel (point-in-time recovery) cannot restore it to a bookmark or timestamp at or before the undeletion. Only states after the undeletion can be restored.").positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`new-name`,{type:`string`,description:`Restore the database with this name instead of the name it had when it was deleted. Required if another database in the account already uses that name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ke={command:`undelete <database-id>`,describe:`Undelete D1 Database`,builder:Oe,handler:async e=>d({command:`d1 undelete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 undelete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}/undelete`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({new_name:h(e[`new-name`],`new-name`,`text`)}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,!await v({force:!!e.force,message:`After undeleting, Time Travel cannot restore the D1 database to a point in time at or before the undeletion.`}))return;if(e.body){let n=p(e.body),r=await l(`Deleting`,async()=>t.send(De,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Deleted`});return}let u=m({new_name:h(e[`new-name`],`new-name`,`text`)}),d=await l(`Deleting`,async()=>t.send(De,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Deleted`})})};var Ae={method:`PUT`,path:t=>e`/accounts/${t.account_id}/d1/database/${t.database_id}`,body:`json`};function je(e){return e.usage(`$0 d1 update <database-id>
22
+
23
+ Update a D1 database's configuration.`).positional(`database-id`,{type:`string`,description:`D1 database identifier (UUID).`,demandOption:!0}).option(`read-replication-mode`,{type:`string`,description:`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,choices:[`auto`,`disabled`]}).coerce(`read-replication-mode`,e=>h(e,`read-replication-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Me={command:`update <database-id>`,describe:`Update D1 Database`,builder:je,handler:async e=>d({command:`d1 update`,classification:{safeFlags:[`read-replication-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf d1 update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/d1/database/${e[`database-id`]==null?`<database-id>`:encodeURIComponent(String(e[`database-id`]))}`,pathParams:{"database-id":String(e[`database-id`]??``)},bodyKind:`json`,body:e.body===void 0?m({read_replication:{mode:e[`read-replication-mode`]}}):p(e.body)});return}let t=await r(e),i=e.local?n:await o();if(e.accountId=i,e.body){let n=p(e.body),r=await l(`Updating`,async()=>t.send(Ae,{body:n,account_id:i,database_id:e[`database-id`]}));s(r,{successLabel:`Updated`});return}e[`read-replication-mode`]===void 0&&(e[`read-replication-mode`]=await _(`read-replication-mode`,`The read replication mode for the database. Use 'auto' to create replicas and allow D1 automatically place them around the world, or 'disabled' to not use any database replicas (it can take a few hours for all replicas to be deleted).`,[`auto`,`disabled`]));let u=m({read_replication:{mode:e[`read-replication-mode`]}}),d=await l(`Updating`,async()=>t.send(Ae,{body:u,account_id:i,database_id:e[`database-id`]}));s(d,{successLabel:`Updated`})})},Ne=(e,t,n)=>{let r=e instanceof RegExp?Pe(e,n):e,i=t instanceof RegExp?Pe(t,n):t,a=r!==null&&i!=null&&Fe(r,i,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+r.length,a[1]),post:n.slice(a[1]+i.length)}},Pe=(e,t)=>{let n=t.match(e);return n?n[0]:null},Fe=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},Ie=`\0SLASH`+Math.random()+`\0`,Le=`\0OPEN`+Math.random()+`\0`,C=`\0CLOSE`+Math.random()+`\0`,Re=`\0COMMA`+Math.random()+`\0`,ze=`\0PERIOD`+Math.random()+`\0`,Be=new RegExp(Ie,`g`),Ve=new RegExp(Le,`g`),He=new RegExp(C,`g`),Ue=new RegExp(Re,`g`),We=new RegExp(ze,`g`),Ge=/\\\\/g,Ke=/\\{/g,qe=/\\}/g,Je=/\\,/g,Ye=/\\\./g;function w(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Xe(e){return e.replace(Ge,Ie).replace(Ke,Le).replace(qe,C).replace(Je,Re).replace(Ye,ze)}function Ze(e){return e.replace(Be,`\\`).replace(Ve,`{`).replace(He,`}`).replace(Ue,`,`).replace(We,`.`)}function T(e,t){for(let n=0;n<t.length;n++)e.push(t[n])}function Qe(e){let t=[],n=``;for(;;){let r=Ne(`{`,`}`,e);if(!r){let r=e.split(`,`);return r[0]=n+r[0],T(t,r),t}let{pre:i,body:a,post:o}=r,s=i.split(`,`);if(s[0]=n+s[0],s[s.length-1]+=`{`+a+`}`,!o.length)return T(t,s),t;n=s.pop(),T(t,s),e=o}}function $e(e,t={}){if(!e)return[];let{max:n=1e5,maxLength:r=4e6,maxDepth:i=1e3,maxRewrites:a=1e3}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),D(Xe(e),n,r,i,0,a,!0).map(Ze)}function et(e){return`{`+e+`}`}function tt(e){return/^-?0\d/.test(e)}function nt(e,t){return e<=t}function rt(e,t){return e>=t}function E(e,t,n,r,i,a){let o=[],s=0;for(let c=0;c<e.length;c++)for(let l=0;l<n.length;l++){if(o.length>=r)return o;let u=e[c]+t+n[l];if(!a||u){if(s+u.length>i)return o;o.push(u),s+=u.length}}return o}function it(e,t,n,r){let i=e.split(/\.\./),a=[];
24
+ /* c8 ignore start */
25
+ if(i[0]===void 0||i[1]===void 0)return a;
26
+ /* c8 ignore stop */
27
+ let o=w(i[0]),s=w(i[1]),c=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]!==void 0?Math.max(Math.abs(w(i[2])),1):1,u=nt;s<o&&(l*=-1,u=rt);let d=i.some(tt),f=0;for(let e=o;u(e,s)&&a.length<n;e+=l){let n;if(t)n=String.fromCharCode(e),n===`\\`&&(n=``);else if(n=String(e),d){let t=c-n.length;if(t>0){let r=Array(t+1).join(`0`);n=e<0?`-`+r+n.slice(1):r+n}}if(f+n.length>r)break;a.push(n),f+=n.length}return a}function D(e,t,n,r,i,a,o){if(i>r)return[e];let s=[``],c=0,l=!1,u=!0;for(;;){let d=Ne(`{`,`}`,e);if(!d)return E(s,e,[``],t,n,l);let f=d.pre;if(/\$$/.test(f)){if(s=E(s,f+`{`+d.body+`}`,[``],t,n,l&&!d.post.length),u=!1,!d.post.length)break;e=d.post;continue}let p=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(d.body),m=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(d.body),h=p||m,g=d.body.indexOf(`,`)>=0;if(!h&&!g){if(c<a&&d.post.match(/,(?!,).*\}/)){c++,e=d.pre+`{`+d.body+C+d.post,o=!0;continue}return E(s,f+`{`+d.body+`}`+d.post,[``],t,n,l)}u&&=(l=o&&!h,!1);let _;if(h)_=it(d.body,m,t,n);else{let o=Qe(d.body);if(o.length===1&&o[0]!==void 0&&(o=D(o[0],t,n,r,i+1,a,!1).map(et),o.length===1)){if(s=E(s,f+o[0],[``],t,n,l&&!d.post.length),!d.post.length)break;e=d.post;continue}let c=l&&!d.post.length&&!f;for(let e=0;c&&e<s.length;e++)s[e]&&(c=!1);_=[];let u=0;outer:for(let e=0;e<o.length;e++){let s=D(o[e],t,n,r,i+1,a,!1);for(let e=0;e<s.length;e++){let r=s[e];if(!c||r){if(_.length>=t||u+r.length>n)break outer;_.push(r),u+=r.length}}}}if(s=E(s,f,_,t,n,l&&!d.post.length),!d.post.length)break;e=d.post}return s}const at={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`],"[:alpha:]":[`\\p{L}\\p{Nl}`],"[:ascii:]":[`\\x00-\\x7f`],"[:blank:]":[`\\p{Zs}\\t`],"[:cntrl:]":[`\\p{Cc}`],"[:digit:]":[`\\p{Nd}`],"[:graph:]":[`\\p{Z}\\p{C}`,!0],"[:lower:]":[`\\p{Ll}`],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}\\p{S}`],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`],"[:upper:]":[`\\p{Lu}`],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`],"[:xdigit:]":[`A-Fa-f0-9`]},O=e=>e.replace(/[[\]\\-]/g,`\\$&`),k=/$./,ot=(e,t,n=!1,r)=>{let i=e=>{let t=r?e.normalize(r):e;return[...t].length===1?t:e},a=t;
28
+ /* c8 ignore start */
29
+ if(e.charAt(a)!==`[`)throw Error(`not in a brace expression`);
30
+ /* c8 ignore stop */
31
+ let o=[],s=[],c=a+1,l=!1,u=!1,d=!1,f=a,p=``;WHILE:for(;c<e.length;){let t=String.fromCodePoint(e.codePointAt(c));if((t===`!`||t===`^`)&&c===a+1){d=!0,c++;continue}if(t===`]`&&l&&!u){f=c+1;break}if(l=!0,t===`\\`&&!u){u=!0,c++;continue}if(t===`[`&&!u){for(let[t,[n,r]]of Object.entries(at))if(e.startsWith(t,c)){if(p)return[k,e.length-a];c+=t.length,r?s.push(n):o.push(n);continue WHILE}}u=!1;let n=i(t);p?(n.codePointAt(0)>p.codePointAt(0)?o.push(O(p)+`-`+O(n)):n===p&&o.push(O(n)),p=``,c+=t.length):e.startsWith(`-]`,c+t.length)?(o.push(O(n+`-`)),c+=t.length+1):e.startsWith(`-`,c+t.length)?(p=n,c+=t.length+1):(o.push(O(n)),c+=t.length)}if(f<c)return[k,0];if(!o.length&&!s.length)return[k,e.length-a];let m=`[`+(d?`^`:``)+o.join(``)+`]`,h=`[`+(d?``:`^`)+s.join(``)+`]`,g=`^`+(o.length&&s.length?`(`+m+`|`+h+`)`:o.length?m:h);return[new RegExp(g,n?`iu`:`u`),f-a]},A={t:`match`,id:0},j=e=>({t:`lit`,ch:e}),st=e=>e.replace(/[\\^$.*+?()[\]{}|/]/g,`\\$&`),ct=e=>RegExp(`^${st(e)}$`,`iu`),M=/* @__PURE__ */ new Map,lt=e=>{let t=M.get(e);return t||(t=ct(e),M.size>=1e3&&M.clear(),M.set(e,t)),t},N=(e,t)=>{if(t===e.ch)return!0;if(!e.re)return!1;let n=t.charCodeAt(0);if(n>=128)return e.re.test(t);let r=e.ascii??=/* @__PURE__ */ new Uint8Array(128);return r[n]||=e.re.test(t)?1:2,r[n]===1},ut=(e,t,n,r)=>{let i=[];for(let a=0;a<e.length;){let o=String.fromCodePoint(e.codePointAt(a));if(o===`\\`){let t=e.codePointAt(a+1),n=t===void 0?o:String.fromCodePoint(t);i.push(j(n)),a+=1+n.length}else{if(o===`[`){let[n,o]=ot(e,a,t,r);if(o){i.push({t:`class`,re:n}),a+=o;continue}}!n&&`!?+*@`.includes(o)&&e[a+1]===`(`?(i.push({t:`open`,type:o}),a+=2):(i.push(!n&&o===`|`?{t:`bar`}:!n&&o===`)`?{t:`close`}:o===`*`?{t:`star`}:o===`?`?{t:`any`}:j(o)),a+=o.length)}}return i},dt=e=>{let t=/* @__PURE__ */ new Map,n=[];return e.forEach((e,r)=>{e.t===`open`?n.push(r):e.t===`close`&&n.length&&t.set(n.pop(),r)}),t},ft=(e,t,n,r,i)=>{let a=[],o=[a];for(let s=n;s<r;s++){let n=e[s],r=t.get(s);if(n.t===`open`&&r!==void 0){let i=ft(e,t,s+1,r,!1);a.push({t:`ext`,type:n.type,alts:i}),s=r}else n.t===`bar`&&!i?o.push(a=[]):n.t===`open`?a.push(j(n.type),j(`(`)):n.t===`bar`?a.push(j(`|`)):n.t===`close`?a.push(j(`)`)):a.push(n)}return o},pt=(e,t)=>{let n=[],r=``,i=()=>{for(let e of r.normalize(t))n.push(j(e));r=``};for(let a of e)a.t===`lit`?r+=a.ch:(i(),n.push(a.t===`ext`?{...a,alts:a.alts.map(e=>pt(e,t))}:a));return i(),n},mt=(e,t)=>{let n=1,r=e=>({t:`split`,id:n++,out:e}),i=(e,t)=>e.reduceRight((e,t)=>a(t,e),t),a=(e,a)=>{switch(e.t){case`lit`:let r=t?lt(e.ch):void 0;return{t:`lit`,id:n++,ch:e.ch,re:r,next:a};case`any`:case`star`:return{t:e.t,id:n++,next:a};case`class`:return{t:`class`,id:n++,re:e.re,next:a}}let o=t=>e.alts.map(e=>i(e,t));switch(e.type){case`@`:return r(o(a));case`?`:return r([a,...o(a)]);case`!`:return{t:`neg`,id:n++,sub:r(o(A)),next:a}}let s=r([]),c=r(o(s));return s.out.push(a,c),e.type===`*`?s:c};return[i(e,A),n]},ht=e=>{let t=[],n=/* @__PURE__ */ new Set,r=e=>e.t===`match`?`match`:String(e.id),i=(e,a)=>{if(e.t===`match`||n.has(e))return;n.add(e);let o=n=>t.push(`${a}${e.id}: ${n}`);switch(e.t){case`split`:o(`split -> ${e.out.map(r).join(`, `)}`);for(let t of e.out)i(t,a);return;case`neg`:return o(`!(${r(e.sub)}) -> ${r(e.next)}`),i(e.sub,a+` `),i(e.next,a);case`lit`:o(`${JSON.stringify(e.ch)} -> ${r(e.next)}`);break;case`class`:o(`${e.re} -> ${r(e.next)}`);break;default:o(`${e.t===`any`?`?`:`*`} -> ${r(e.next)}`)}i(e.next,a)};return i(e,``),[`start -> ${r(e)}`,...t].join(`
32
+ `)};var gt=class{gen;threads=[];match=!1;runs=[];ids=[];constructor(e){this.gen=e}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}};const _t=(e,t)=>e.ids.length!==t.ids.length||e.runs.length!==t.runs.length||e.ids.some((e,n)=>e!==t.ids[n])?!1:e.runs.every(e=>t.runs.some(t=>t.neg===e.neg&&_t(t.state,e.state))),vt=e=>({has:new Float64Array(e),seen:new Float64Array(e),gen:0});var P=class{dots;dotStart;#e;constructor(e,t,n){this.dots=e,this.dotStart=t,this.#e=n}state(){return new gt(++this.#e.gen)}done(e){return e.ids=e.threads.map(e=>e.id).sort((e,t)=>e-t),e.match&&e.ids.unshift(A.id),e}#t(e,t){let{seen:n}=this.#e;return n[t.id]!==e.gen&&(n[t.id]=e.gen,!0)}#n(e,t){let{has:n}=this.#e;return n[t.id]!==e.gen&&(n[t.id]=e.gen,e.threads.push(t),!0)}restricted(e,t){return t&&(this.dots||this.dotStart&&e===0)}add(e,t,n,r){switch(t.t){case`split`:if(!this.#t(e,t))return;for(let i of t.out)this.add(e,i,n,r);return;case`neg`:if(!this.#t(e,t))return;let i=this.state();return this.add(i,t.sub,n,!1),this.done(i),this.addRun(e,{t:`run`,neg:t,state:i},n,r);case`star`:if(this.restricted(n,r))return;this.#n(e,t)&&this.add(e,t.next,n,r);return;case`match`:e.match=!0;return;default:this.#n(e,t)}}addRun(e,t,n,r){for(let n of e.runs)if(n.neg===t.neg&&_t(n.state,t.state))return;e.runs.push(t),t.state.match||this.add(e,t.neg.next,n,r)}step(e,t,n,r){let i=this.state();for(let a of e.threads)switch(a.t){case`lit`:N(a,t)&&this.add(i,a.next,n+1,r);break;case`any`:this.restricted(n,r)||this.add(i,a.next,n+1,r);break;case`class`:!this.restricted(n,r)&&a.re.test(t)&&this.add(i,a.next,n+1,r);break;case`star`:this.restricted(n,r)||this.add(i,a,n+1,r)}if(!this.restricted(n,r))for(let a of e.runs){if(a.state.dead){this.addRun(i,a,n+1,r);continue}let e=this.step(a.state,t,n,!1);this.addRun(i,{t:`run`,neg:a.neg,state:e},n+1,r)}return this.done(i)}};const yt=e=>{let t=e.ids.join();return e.runs.length?`${t}|${e.runs.map(e=>`${e.neg.id}(${yt(e.state)})`).sort().join(`|`)}`:t};var bt=class{#e;#t=/* @__PURE__ */ new Map;#n=0;#r;#i;#a;#o;constructor(e,t){this.#e=e,this.#a=new P(!1,!1,t),this.#o=new P(!1,!0,t)}#s(e){return{state:e,match:e.match,dead:e.dead,next:/* @__PURE__ */ new Map}}#c(e){let t=yt(e),n=this.#t.get(t);if(n)return n;this.#n>262144&&this.#l();let r=this.#s(e);return this.#t.set(t,r),this.#n+=t.length+1,r}#l(){this.#t.clear(),this.#n=0,this.#r=void 0,this.#i=void 0}start(e){if(e){if(this.#i)return this.#i;let e=this.#o.state();return this.#o.add(e,this.#e,0,!0),this.#i=this.#s(this.#o.done(e))}if(this.#r)return this.#r;let t=this.#a.state();return this.#a.add(t,this.#e,0,!0),this.#r=this.#c(this.#a.done(t))}next(e,t){let n=t.charCodeAt(0),r=n<128?void 0:e.next.get(t);if(r)return r;let i=e===this.#i?this.#c(this.#o.step(e.state,t,0,!0)):this.#c(this.#a.step(e.state,t,1,!0));return n<128?(e.ascii||(e.ascii=Array(128),this.#n+=128),e.ascii[n]=i):e.next.set(t,i),this.#n++,i}};const xt=e=>{let t=[];for(let n=e;n.t!==`match`;n=n.next){if(n.t===`split`||n.t===`neg`)return;t.push(n)}return t},St=(e,t,n,r)=>{let i=0,a=n,o=-1,s=0;for(;a<r;){let n=e[i];if(n?.t===`star`){o=i++,s=a;continue}let r=t[a];if(n&&(n.t===`any`||n.t===`lit`&&N(n,r)||n.t===`class`&&n.re.test(r)))i++,a++;else{if(o===-1)return!1;i=o+1,a=++s}}for(;e[i]?.t===`star`;)i++;return i===e.length},Ct=e=>{let t=0,n=0;for(let r of e){let[e,i]=wt(r);t+=e,n+=i}return[t,n]},wt=e=>{if(e.t===`star`)return[0,1/0];if(e.t!==`ext`)return[1,1];if(e.type===`!`)return[0,1/0];let t=e.alts.map(Ct),n=Math.min(...t.map(e=>e[0])),r=Math.max(...t.map(e=>e[1])),i=r===0?0:1/0;return e.type===`@`?[n,r]:e.type===`?`?[0,r]:e.type===`*`?[0,i]:[n,i]},Tt=(e,t,n)=>{for(let r=0;r<e.length;r++)if(!N(e[r],t[n+r]))return!1;return!0},Et=/[/\ud800-\udfff]/,Dt=/[\ud800-\udfff]/,F=e=>Dt.test(e)?[...e]:e,Ot=e=>{if(e.includes(`/`))throw Error(`can only match a single path portion, got: `+e)};var kt=class{pattern;options;#e;#t;#n;#r;#i;#a=!1;#o;#s;#c=!1;#l=0;#u=1/0;#d=[];#f=[];#p;#m;#h=!1;#g;#_;constructor(e,t={}){if(e.includes(`/`))throw Error(`can only match a single path portion, got pattern: `+e);this.pattern=e,this.options=t;let{nocase:n=!1,noext:r=!1,normalize:i}=t;this.#_=i===!0?`NFC`:i||void 0;let a=/^[?*+@]\(\)$/.test(e),o=ut(e,n,r||a,this.#_),[s]=ft(o,dt(o),0,o.length,!0);this.#_&&(s=pt(s,this.#_));let[c,l]=mt(s,n);if(this.#e=c,this.#t=l,s.every(e=>e.t===`lit`))this.#i=s.map(e=>e.ch).join(``),this.#a=n;else{let e=e=>e.t===`lit`?n?{ch:e.ch,re:lt(e.ch)}:{ch:e.ch}:void 0;for(let t of s){let n=e(t);if(!n)break;this.#d.push(n)}for(let t=s.length-1;t>=0;t--){let n=e(s[t]);if(!n)break;this.#f.unshift(n)}this.#h=!!(this.#d.length||this.#f.length),n||(this.#p=this.#d.map(e=>e.ch).join(``),this.#m=this.#f.map(e=>e.ch).join(``)),this.#s=xt(this.#e)?.slice(this.#d.length,-this.#f.length||void 0),this.#c=!!this.#s?.every(e=>e.t===`star`||e.t===`any`);let[t,r]=Ct(s);this.#l=t,this.#u=r}}test(e){return this.#_?(Ot(e),this.#v(e.normalize(this.#_))):Et.test(e)?(Ot(e),this.#v(e,[...e])):this.#v(e,e)}testUnchecked(e){return this.#v(this.#_?e.normalize(this.#_):e)}#v(e,t){if(this.#i!==void 0)return this.#a?(this.#o??=ct(this.#i)).test(e):e===this.#i;let n=this.#l,r=this.#u;if(t===void 0){let i=e.length,a=i+1>>1;if(i<n||a>r)return!1;(a<n||i>r)&&(t=F(e))}if(t!==void 0&&(t.length<n||t.length>r))return!1;let i=this.#d.length;if(this.#h){if(this.#p!==void 0&&this.#m!==void 0){if(!e.startsWith(this.#p)||!e.endsWith(this.#m))return!1}else{t??=F(e);let n=t.length-this.#f.length;if(!Tt(this.#d,t,0)||!Tt(this.#f,t,n))return!1}}let a=!this.options.dot&&e.startsWith(`.`);if(this.#s){if(e===`.`||e===`..`||a&&!i)return!1;if(this.#c)return!0;t??=F(e);let n=t.length-this.#f.length;return St(this.#s,t,i,n)}if(t??=F(e),e===`.`||e===`..`){this.#n??=vt(this.#t);let e=this.#r??=new P(!0,!1,this.#n),n=e.state();e.add(n,this.#e,0,!0);let r=e.done(n);for(let n=0;n<t.length;n++)r=e.step(r,t[n],n,!0);return r.match}this.#n??=vt(this.#t);let o=this.#g??=new bt(this.#e,this.#n),s=o.start(a),c=t===e;for(let n=0;n<t.length;n++){if(s.dead)return!1;let r=c?e.charCodeAt(n):t[n].charCodeAt(0);s=s.ascii?.[r]??o.next(s,t[n])}return s.match}toString(){return ht(this.#e)}};const I=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},At=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),jt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`),L=(e,t,n={})=>(I(t),!n.nocomment&&t.charAt(0)===`#`?!1:Mt(t,n).match(e)),R=/* @__PURE__ */ new Map,Mt=(e,t)=>{let n=e+`\0`+JSON.stringify(t),r=R.get(n);return r?R.delete(n):(r=new Q(e,{...t}),R.size>=256&&R.delete(R.keys().next().value)),R.set(n,r),r},Nt=typeof process==`object`&&process?process.env?.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,Pt={win32:{sep:`\\`},posix:{sep:`/`}};L.sep=Nt===`win32`?Pt.win32.sep:Pt.posix.sep;const z=Symbol(`globstar **`);L.GLOBSTAR=z,L.filter=(e,t={})=>n=>L(n,e,t);const B=(e,t={})=>Object.assign({},e,t);L.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return L;let t=L;return Object.assign((n,r,i={})=>t(n,r,B(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,B(e,n))}static defaults(n){return t.defaults(B(e,n)).Minimatch}},unescape:(n,r={})=>t.unescape(n,B(e,r)),escape:(n,r={})=>t.escape(n,B(e,r)),filter:(n,r={})=>t.filter(n,B(e,r)),defaults:n=>t.defaults(B(e,n)),braceExpand:(n,r={})=>t.braceExpand(n,B(e,r)),match:(n,r,i={})=>t.match(n,r,B(e,i)),sep:t.sep,GLOBSTAR:z})};const Ft=(e,t={})=>(I(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:$e(e,{max:t.braceExpandMax}));L.braceExpand=Ft,L.match=(e,t,n={})=>{let r=new Q(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};const It=/[?*]|[+@!]\(.*?\)|\[|\]/,Lt=(e,t)=>{let n=t+1;(e.charAt(n)===`!`||e.charAt(n)===`^`)&&n++;let r=!1;for(;n<e.length;n++){let t=e.charAt(n);if(t===`]`&&r)return n;r=!0,t===`\\`&&n++}return-1},Rt=(e,t)=>{if(!t&&(e===`+()`||e===`@()`))return e;let n=``;for(let r=0;r<e.length;r++){let i=e.charAt(r);if(i===`\\`)n+=e.charAt(++r)||i;else if(i===`*`||i===`?`)return;else if(i===`[`){let t=Lt(e,r);if(t===-1){n+=i;continue}let a=e.slice(r+1,t);if(a.startsWith(`\\`)&&(a=a.slice(1)),[...a].length!==1||`!^`.includes(e.charAt(r+1)))return;n+=a,r=t}else if(!t&&`+@!`.includes(i)&&e.charAt(r+1)===`(`&&e.includes(`)`,r+2))return;else n+=i}return n},zt=e=>{if(/^[?*+@]\(\)$/.test(e)||e.includes(`[:`))return!1;let t=0;for(let n=0;n<e.length;n++){let r=e.charAt(n);if(r===`\\`){if(++n===e.length)return!1}else if(r===`[`){let t=Lt(e,n);t!==-1&&(n=t)}else if(`+@!?*`.includes(r)&&e.charAt(n+1)===`(`)t++,n++;else if(r===`)`){if(!t--)return!1}else if(r===`|`&&!t)return!1}return!t};let V,Bt;const H=(e,t)=>typeof e==`string`?t===e:t!==``&&e.testUnchecked(t),Vt=(e,t,n,r,i)=>H(e,t)?n:r!==void 0&&H(e,r)?i:-1,U=e=>e===`.`||e===`..`,W=e=>typeof e==`string`&&/^[a-z]:$/i.test(e),G=e=>typeof e==`string`&&/^unc$/i.test(e),K=e=>{if(e[0]!==``||e[1]!==``)return-1;let t=e[2]===`?`?G(e[3])?4:-1:2,n=e[t],r=e[t+1];return t!==-1&&n!==void 0&&n!==``&&n!==z&&r!==void 0&&r!==``&&r!==z?t:-1},q=(e,t)=>!U(e)&&(t||!e.startsWith(`.`)),J=(e,t,n,r,i)=>{for(let a=t;a<n;){if(e.charCodeAt(a)===46){if(!r)return!0;let t=e.charCodeAt(a+1)===46?a+2:a+1;if(t>=n||Y(e.charCodeAt(t),i))return!0}let t=X(e,a,i);if(t===-1)return!1;for(a=t+1;a<n&&Y(e.charCodeAt(a),i);)a++}return!1},Y=(e,t)=>t===`/`?e===47:t===`\\`?e===92:e===47||e===92,X=(e,t,n)=>{if(n!==`both`)return e.indexOf(n,t);let r=e.indexOf(`/`,t),i=e.indexOf(`\\`,t);return r===-1?i:i===-1?r:Math.min(r,i)},Ht=(e,t,n)=>n===`both`?Math.max(e.lastIndexOf(`/`,t),e.lastIndexOf(`\\`,t)):e.lastIndexOf(n,t),Z={};var Q=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;#e;#t;#n;#r;#i=[];#a=[];#o=[];#s=/* @__PURE__ */ new Map;#c=!1;#l=/* @__PURE__ */ new WeakMap;constructor(e,t={}){I(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||Nt,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.#e=!this.preserveMultipleSlashes,this.#n=(t.optimizationLevel??1)>=2;let n=t.normalize;this.#r=n===!0?`NFC`:n||void 0,this.make();let r=this.set.map(e=>this.#d(e));this.#o=this.set.map((e,t)=>this.#e&&e.length-1>r[t]),this.#i=this.set.map((e,t)=>{let n=this.#o[t]?e.length-1:e.length,i=e.slice(r[t]+1,n).filter(e=>typeof e==`string`&&!!e);return[...new Set(i)]}),this.#t=this.#i.some(e=>e.length),this.#a=this.set.map((e,n)=>{let[i,a,o]=e;if(this.#o[n]&&e.length===2&&i===z&&a!==z)return`tail`;if(this.#o[n]&&t.matchBase&&e.length===1&&i!==z&&i!==``)return`base`;if(this.#e&&r[n]===-1){if(e.length===3&&i===z&&o===z&&a!==z&&a!==``&&this.maxGlobstarRecursion>0)return`mid`;if(e.length===2&&a===z&&i!==z&&i!==``)return`head`}})}#u(e){return this.#r?e.normalize(this.#r):e}#d(e){if(!this.isWindows)return-1;if(W(e[0]))return 0;if(e[0]===``&&e[1]===``&&e[2]===`?`&&W(e[3]))return 3;let t=K(e);return t===-1?-1:t+1}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())];let n=this.globSet.map(e=>this.#C(e));this.globParts=this.preprocess(n),this.#c=!0;let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[2]===`?`&&G(e[3])?6:4,n=e[0]===``&&e[1]===``&&(e[2]===`?`||!It.test(e[2]))&&e.slice(3,t).every(e=>!It.test(e)),r=/^[a-z]:/i.test(e[0]);if(n)return[...e.slice(0,t).map(e=>this.#u(e)),...e.slice(t).map(e=>this.parse(e))];if(r)return[this.#u(e[0]),...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&(W(t[3])||G(this.globParts[e][3]))&&(G(this.globParts[e][3])&&(t[3]=`UNC`),t[2]=`?`)}t.noext||this.mergeRows(),this.#c=!1,this.set.forEach((e,t)=>{for(let n=0;n<e.length;n++)e[n]===Z&&(e[n]=this.parse(this.globParts[t][n]))})}mergeRows(){let e=!0;for(;e;){e=!1;let t=Math.max(0,...this.set.map(e=>e.length));for(let n=0;n<t;n++){let t=/* @__PURE__ */ new Map;this.set.forEach((e,r)=>{if(!(e[n]instanceof kt||e[n]===Z)||!zt(this.globParts[r][n]))return;let i=[...this.globParts[r]];i[n]=``;let a=`${e.length}/${i.join(`/`)}`,o=t.get(a);o?o.push(r):t.set(a,[r])});let r=/* @__PURE__ */ new Set;for(let e of t.values()){if(e.length<2)continue;let[t,...i]=e,a=`@(${e.map(e=>this.globParts[e][n]).join(`|`)})`;this.globParts[t][n]=a,this.set[t][n]=this.parse(a);for(let e of i)r.add(e)}r.size&&(e=!0,this.set=this.set.filter((e,t)=>!r.has(t)),this.globParts=this.globParts.filter((e,t)=>!r.has(t)))}}}preprocess(e){if(this.options.noglobstar)for(let t of e)for(let e=0;e<t.length;e++)t[e]===`**`&&(t[e]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>{let t=this.#d(e)+1;return e=e.reduce((e,n)=>{let r=e[e.length-1];return n===`**`&&r===`**`?e:n===`..`&&e.length>t&&r&&r!==`..`&&r!==`.`&&r!==`**`?(e.pop(),e):(e.push(n),e)},[]),e.length===0?[``]:e})}#f(e){let t=!this.isWindows||!e.includes(`\\`)?`/`:e.includes(`/`)?`both`:`\\`,n=this.#e?0:-1,r=``,i=0,a,o=0,s=!!this.options.dot;ROWS:for(let c=0;c<this.set.length;c++){let l=this.set[c],u=l[l.length-1],d=n!==-1&&this.#o[c]&&u!==z;if(d&&n===0){let s=Ht(e,e.length,t);if(i=s+1,r=e.slice(i),r===``&&s>=0){let n=s;for(;n>0&&Y(e.charCodeAt(n-1),t);)n--;o=n===0?0:Ht(e,n-1,t)+1,a=e.slice(o,n)}let c=this.#n&&(U(r)||r===``&&a!==void 0&&U(a));n=c?-1:1,d=!c}let f=-1;if(d&&typeof u==`string`&&(f=Vt(u,r,i,a,o),f===-1))continue;if(this.#t){for(let t of this.#i[c])if(!e.includes(t))continue ROWS}if(d&&typeof u==`object`&&(f=Vt(u,r,i,a,o),f===-1))continue;let p=this.#a[c];if(p===`base`&&d)return`yes`;if(p===`tail`&&d){if(this.#n&&J(e,0,f,!0,t))return`maybe`;if(!J(e,0,f,s,t))return`yes`}else if(p===`mid`||p===`head`){let n=this.#m(e,l,p===`head`,s,t);if(n!==`no`)return n}else return`maybe`}return`no`}#p(e,t,n){let r=!!this.options.dot,i=e.length;if(n===`head`){if(i<2||!H(t[0],e[0]))return!1;for(let t=1;t<i;t++)if(!q(e[t],r))return!1;return!0}let a=t[1];if(n===`tail`){let t=i-1;if(!H(a,e[t])&&(e[t]!==``||i===1||!H(a,e[--t])))return!1;for(let n=0;n<t;n++)if(!q(e[n],r))return!1;return!0}for(let t=0;t<i;t++){if(H(a,e[t])&&t+1<i){let n=t+1;for(;n<i&&q(e[n],r);)n++;if(n===i)return!0}if(!q(e[t],r))return!1}return!1}#m(e,t,n,r,i){if(this.#n&&J(e,0,e.length,!0,i))return`maybe`;let a=t[+!n],o=0;for(let t=X(e,o,i);t!==-1;t=X(e,o,i)){let s=t+1;for(;s<e.length&&Y(e.charCodeAt(s),i);)s++;if((typeof a==`string`?t-o===a.length&&e.startsWith(a,o):t>o&&a.testUnchecked(e.slice(o,t)))&&!J(e,s,e.length,r,i))return`yes`;if(n||J(e,o,s,r,i))return`no`;o=s}return`no`}#h(e){let t=V;return t?.f===e&&t.isWindows===this.isWindows&&t.preserveMultipleSlashes===this.preserveMultipleSlashes&&t.normalize===this.#r?t:void 0}#g(e){let{isWindows:t,preserveMultipleSlashes:n}=this,r=this.#C(t?e.split(`\\`).join(`/`):e),i=this.#r;return i&&(r=r.map(e=>e.normalize(i))),V={f:e,isWindows:t,preserveMultipleSlashes:n,normalize:i,parts:r},V}#_(e){let t=[...e],n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let e=1;e<t.length-1;e++){let r=t[e];e===1&&r===``&&t[0]===``||r!==`.`&&r!==``||(n=!0,t.splice(e,1),e--)}t[0]===`.`&&t.length===2&&(t[1]===`.`||t[1]===``)&&(n=!0,t.pop())}let e=this.#d(t)+1,r=e;for(;(r=t.indexOf(`..`,r+1))!==-1;){let i=t[r-1];i&&i!==`.`&&i!==`..`&&i!==`**`&&(n=!0,t.splice(r-1,2),r=Math.max(r-2,e))}}while(n);return t.length===0?[``]:t}firstPhasePreProcess(e){let{braceExpandMax:t=1e5}=this.options,n=!1;do{n=!1;for(let r of e){let i=-1;for(;(i=r.indexOf(`**`,i+1))!==-1;){let a=i;for(;r[a+1]===`**`;)a++;a>i&&r.splice(i+1,a-i);let o=r[i+1],s=r[i+2],c=r[i+3];if(o!==`..`||!s||s===`.`||s===`..`||!c||c===`.`||c===`..`||e.length>=t)continue;n=!0,r.splice(i,1);let l=r.slice(0);l[i]=`**`,e.push(l),i--}if(!this.preserveMultipleSlashes){for(let e=1;e<r.length-1;e++){let t=r[e];e===1&&t===``&&r[0]===``||t!==`.`&&t!==``||(n=!0,r.splice(e,1),e--)}r[0]===`.`&&r.length===2&&(r[1]===`.`||r[1]===``)&&(n=!0,r.pop())}let a=this.#d(r)+1,o=a;for(;(o=r.indexOf(`..`,o+1))!==-1;){let e=r[o-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){n=!0;let e=o===1&&r[o+1]===`**`?[`.`]:[];r.splice(o-1,2,...e),r.length===0&&r.push(``),o=Math.max(o-2,a)}}}}while(n);return e}secondPhasePreProcess(e){if(e.length>1e3)return e;for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}#v(e,t,n,r){let i=0,a=0,o=this.isWindows?K(t):-1,s=o===-1?-1:K(n);if(s!==-1){let e=n[s],r=n[s+1];typeof e!=`string`||typeof r!=`string`?(i=o,a=s):t[o].toLowerCase()===e.toLowerCase()&&t[o+1].toLowerCase()===r.toLowerCase()&&(i=o+2,a=s+2)}else if(this.isWindows){let t=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),r=!t&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),o=typeof n[0]==`string`&&/^[a-z]:$/i.test(n[0]),s=!o&&n[0]===``&&n[1]===``&&n[2]===`?`&&typeof n[3]==`string`&&/^[a-z]:$/i.test(n[3]),c=r?3:t?0:void 0,l=s?3:o?0:void 0;if(typeof c==`number`&&typeof l==`number`){let[t,r]=[e[c],n[l]];t.toLowerCase()===r.toLowerCase()&&(a=l+1,i=c+1)}}return e=t,n.includes(z)?this.#y(e,n,r,i,a):this.#S(e,n,r,i,a)}#y(e,t,n,r,i){let{head:a,body:o,tail:s,segments:c}=this.#b(t,n,i);if(a.length){let t=r+a.length;if(!this.#S(e,a,n,r,0,t))return!1;r+=a.length,i+=a.length}let l=0;if(s.length){if(s.length+r>e.length)return!1;let t=e.length-s.length;if(this.#S(e,s,n,t,0))l=s.length;else{if(e[e.length-1]!==``||r+s.length===e.length||(t--,!this.#S(e,s,n,t,0)))return!1;l=s.length+1}}if(!o.length){let t=!!l;for(let n=r;n<e.length-l;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}return!!this.#x(e,c,e.length-l,r,0,n,0,!!l,/* @__PURE__ */ new Set)}#b(e,t,n){let r=this.#l.get(e);r||(r=[],this.#l.set(e,r));let i=n*2+ +!!t,a=r[i];if(a)return a;let o=e.indexOf(z,n),s=e.lastIndexOf(z),c=e.slice(n,o),l=e.slice(o+1,t?void 0:s),u=t?[]:e.slice(s+1),d=[[[],0]],f=d[0],p=0,m=[0];for(let e of l)e===z?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);d.forEach((e,t)=>{e[1]=p-m[t]});let h={head:c,body:l,tail:u,segments:d};return r[i]=h,h}#x(e,t,n,r,i,a,o,s,c){let l=t[i];if(!l){if(a)return r>=n||r===n-1&&e[r]===``;for(let t=r;t<n;t++){s=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return s}let[u,d]=l,f=a?n:n-d;for(;r<=f;){let l=i*(e.length+1)+r;if(c.has(l))return!1;if(c.add(l),this.#S(e,u,a,r,0,r+u.length)&&o<this.maxGlobstarRecursion){let l=this.#x(e,t,n,r+u.length,i+1,a,o+1,s,c);if(l!==!1)return l}if(r===f)break;let d=e[r];if(d===`.`||d===`..`||!this.options.dot&&d.startsWith(`.`))return!1;r++}return a||null}#S(e,t,n,r,i,a=e.length){let o,s,c,l;for(o=r,s=i,l=Math.min(a,e.length),c=t.length;o<l&&s<c;o++,s++){let n=t[s],r=e[o];
33
+ /* c8 ignore stop */
34
+ if(n===!1||n===z||!H(n,r))return!1}if(o===l&&s===c)return!0;if(o===l)return n;if(s===c)return o===l-1&&e[o]===``;throw Error(`wtf?`)
35
+ /* c8 ignore stop */
36
+ }braceExpand(){return Ft(this.pattern,this.options)}parse(e){I(e);let t=this.options;if(e===`**`)return z;if(e===``)return``;let{nocase:n,nocaseMagicOnly:r,noext:i=!1,dot:a,normalize:o}=t,s=Rt(e,i);if(s!==void 0&&(!n||r||e.toUpperCase()===e.toLowerCase()))return this.#u(s);if(this.#c)return Z;let c=this.#s.get(e);return c||(c=new kt(e,{nocase:n,noext:i,dot:a,normalize:o}),this.#s.set(e,c)),c}#C(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options,r=this.#h(e);if(!r){if(!t&&!this.#r&&(this.#e||this.#t)&&Bt!==e){Bt=e;let t=this.#f(e);if(t===`no`)return!n.flipNegate&&this.negate;if(t===`yes`)return n.flipNegate?!0:!this.negate}r=this.#g(e)}let i=r.parts,a=this.#n?r.resolved??=this.#_(i):i,o=this.set,s=i[i.length-1];if(!s)for(let e=i.length-2;!s&&e>=0;e--)s=i[e];for(let e=0;e<o.length;e++){let r=o[e],c=t?void 0:this.#a[e];if(c===`base`?H(r[0],s):c?this.#p(a,r,c):n.matchBase&&r.length===1?this.#v([s],[s],r,t):this.#v(i,a,r,t))return n.flipNegate?!0:!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return L.defaults(e).Minimatch}};L.Minimatch=Q,L.escape=At,L.unescape=jt;function $(e){let t=e.replace(/\\/g,`/`),n=b.posix.normalize(t);return n.endsWith(`/`)?n.slice(0,-1):n}function Ut(e,t){if(t===`.`)return e;let n=`${t}/`;if(!e.startsWith(n))throw Error(`Expected migrations pattern ${JSON.stringify(e)} to start with ${JSON.stringify(n)}`);return e.slice(n.length)}function Wt(e){return`"${e.replace(/"/g,`""`)}"`}function Gt(e){return`CREATE TABLE IF NOT EXISTS ${Wt(e)}(
37
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
38
+ name TEXT UNIQUE,
39
+ applied_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL
40
+ );`}function Kt(e){return`SELECT *
41
+ FROM ${Wt(e)}
42
+ ORDER BY id`}function qt(e){if(e.pattern!==void 0&&e.dir===void 0)throw Error(`You have set --pattern "${e.pattern}" but have not set --dir.\n\nWhen --pattern is set, --dir must also be set, and --pattern must start with "<dir>/".`);let t=$(e.dir??`./migrations`),n=$(`${t}/*.sql`),r;if(e.pattern===void 0)r=n;else{r=$(e.pattern);try{Ut(r,t)}catch{throw Error(`--pattern "${e.pattern}" must start with "${t}/" to match --dir "${t}".\nEither change --pattern so it starts with "${t}/" (for example, "${n}"), or change --dir to match the start of your pattern.`)}}return{migrationsPath:b.resolve(e.cwd??process.cwd(),t),migrationsDir:t,migrationsPattern:r,migrationsTableName:e.table??`d1_migrations`}}function Jt(e,t){let n=[],r=[{abs:e,rel:``}];for(;r.length>0;){let{abs:e,rel:i}=r.pop(),a;try{a=y.readdirSync(e,{withFileTypes:!0})}catch{continue}for(let o of a){let a=i===``?o.name:`${i}/${o.name}`;o.isDirectory()?t.match(a,!0)&&r.push({abs:b.join(e,o.name),rel:a}):o.isFile()&&t.match(a)&&n.push(a)}}return n.sort(Zt)}function Yt(e){let t=e.split(`/`)[0]??``;return parseInt(t.split(`_`)[0]??``,10)}function Xt(e,t){let n=Yt(e),r=Yt(t);if(n!==r){if(Number.isFinite(n)&&Number.isFinite(r))return n-r;if(Number.isFinite(n))return-1;if(Number.isFinite(r))return 1}return e<t?-1:+(e>t)}function Zt(e,t){let n=e.split(`/`),r=t.split(`/`),i=Math.min(n.length,r.length);for(let e=0;e<i;e++){let t=Xt(n[e]??``,r[e]??``);if(t!==0)return t}return n.length-r.length}function Qt(e){let t=Ut(e.migrationsPattern,e.migrationsDir);return Jt(e.migrationsPath,new Q(t,{dot:!1}))}function $t(e,t){let n=[];for(let r of e)t.includes(r)||n.push(r);return n}function en(e){let t=Qt(e).map(e=>Yt(e)).filter(e=>Number.isFinite(e));return Math.max(...t,0)+1}function tn(e){if(Jt(e.migrationsPath,new Q(`*/migration.sql`,{dot:!1})).length!==0)return $(`${e.migrationsDir}/*/migration.sql`)}function nn(e){let t=``,n,r=!1,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=e[a+1];n===void 0?r?o===`\r`&&s===`
43
+ `?(t+=`
44
+ `,a++,r=!1):(t+=o,r=o!==`
45
+ `):i?o===`\r`&&s===`
46
+ `?(t+=`
47
+ `,a++):(t+=o,o===`*`&&s===`/`&&(t+=s,a++,i=!1)):o===`-`&&s===`-`?(t+=`--`,a++,r=!0):o===`/`&&s===`*`?(t+=`/*`,a++,i=!0):o===`'`||o===`"`||o==="`"?(t+=o,n=o):o===`[`?(t+=o,n=`]`):o===`\r`&&s===`
48
+ `?(t+=`
49
+ `,a++):t+=o:(t+=o,o===n&&(s===n?(t+=s,a++):n=void 0))}return t}function rn({migrationsPath:e,migrationName:t,migrationsTableName:n}){return`${y.readFileSync(b.join(e,t),`utf8`)}
50
+ INSERT INTO ${Wt(n)} (name)
51
+ values ('${t.replace(/'/g,`''`)}');`}function an(e){return e.option(`dir`,{type:`string`,description:`Directory containing migration files (default: ./migrations)`}).option(`pattern`,{type:`string`,description:`Glob for discovering migration files under --dir. Defaults to "<dir>/*.sql"; Drizzle's nested layout uses "<dir>/*/migration.sql"`})}function on(e){return an(e).option(`table`,{type:`string`,description:`Table recording applied migrations`,default:`d1_migrations`})}async function sn(e,t,n,r,i,a=!1){return l(i,async()=>{let i={account_id:t,database_id:n,body:{sql:nn(r)}};return a?((await e.send(S,i))?.result??[]).map(e=>{let t=e.results?.columns??[],n=e.results?.rows??[];return{...e,results:n.map(e=>Object.fromEntries(t.map((t,n)=>[t,e[n]])))}}):(await e.send(x,i))?.result??[]})}async function cn(e){if(!i(e.database))throw Error(`Expected a D1 database ID, but received <database>=${JSON.stringify(e.database)}. Database names and binding names are not accepted.`);let t=qt({dir:e.dir,pattern:e.pattern,table:e.table});if(!y.existsSync(t.migrationsPath))throw Error(`No migrations directory at ${t.migrationsPath}.`+(e.dir===void 0?` Pass --dir to point at one.`:``));return{client:await r(e),accountId:e.local?n:await o(),databaseId:e.database,config:t,local:e.local===!0}}async function ln(e){let{client:t,accountId:n,databaseId:r,config:i}=e;await sn(t,n,r,Gt(i.migrationsTableName),`Preparing`,e.local);let a=(await sn(t,n,r,Kt(i.migrationsTableName),`Loading`,e.local))[0].results.map(e=>e.name),o=Qt(i);if(o.length===0){let e=tn(i);e!==void 0&&process.stderr.write(`No files matched --pattern "${i.migrationsPattern}", but "${e}" does match. If an ORM such as drizzle manages your migrations, pass --pattern "${e}".\n`)}return{applied:a,all:o,unapplied:$t(o,a)}}function un(e){return on(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const dn={command:`apply <database>`,describe:`Apply any unapplied D1 migrations`,builder:un,handler:async e=>{let t=await cn(e),n=(await ln(t)).unapplied.map(e=>({name:e,status:`🕒️`}));if(n.length===0)s([],{successLabel:`No migrations to apply`,quiet:e.quiet});else if(await ee(`About to apply ${n.length} migration(s)\nYour database may not be available to serve requests during the migration, continue?`)){for(let e of n){let n=rn({migrationsPath:t.config.migrationsPath,migrationName:e.name,migrationsTableName:t.config.migrationsTableName}),r=!0,i=[];try{let i=await sn(t.client,t.accountId,t.databaseId,n,`Applying ${e.name}`,t.local);for(let e of i)e.success||(r=!1)}catch(e){r=!1,i=[e instanceof Error?e.message:String(e)]}if(e.status=r?`✅`:`❌`,i.length>0)throw Error(i.join(`
52
+ `))}s(n,{quiet:e.quiet})}}};function fn(e){return an(e.positional(`message`,{type:`string`,description:`Describes what the migration does`,demandOption:!0}))}const pn={command:`create <message>`,describe:`Create a new empty D1 migration file`,builder:fn,handler:async e=>{if(e.local)throw Error("--local is not supported with `cf d1 migrations create`. This command only creates a migration file on your local filesystem, so you do not need --local.");let t=qt({dir:e.dir,pattern:e.pattern}),n=mn(en(t),4),r=e.message.replaceAll(` `,`_`);if(/[\\/]/.test(r))throw Error(`The migration name ${JSON.stringify(e.message)} contains a path separator ("/" or "\\"). Remove it and try again.`);if(/[:*?"<>|]/.test(r))throw Error(`The migration name ${JSON.stringify(e.message)} contains a character that cannot be used in a file name (: * ? " < > |). Remove it and try again.`);let i=`${n}_${r}.sql`,a=$(`${t.migrationsDir}/${i}`);if(!new Q(t.migrationsPattern,{dot:!1}).match(a))throw Error(`Would create "${a}", but --pattern "${t.migrationsPattern}" would not match it, so \`cf d1 migrations apply\` would skip it.\n\`cf d1 migrations create\` only writes top-level files inside --dir. If you are using an ORM like Drizzle, use \`drizzle-kit generate\` instead — it writes the nested layout your pattern expects.`);if(!y.existsSync(t.migrationsPath)){if(!await ee(`No migrations folder found.\nOk to create ${t.migrationsPath}?`))throw Error(`No migrations folder present at ${t.migrationsPath}.`);y.mkdirSync(t.migrationsPath,{recursive:!0})}let o=b.join(t.migrationsPath,i);y.writeFileSync(o,`-- Migration number: ${n} \t ${(/* @__PURE__ */ new Date()).toISOString()}\n`),s({name:i,path:o},{successLabel:`Created ${i}`,quiet:e.quiet})}};function mn(e,t){let n=e.toString();for(;n.length<t;)n=`0`+n;return n}function hn(e){return on(e.positional(`database`,{type:`string`,description:`D1 database ID`,demandOption:!0}))}const gn={command:`list <database>`,describe:`View a list of unapplied migration files`,builder:hn,handler:async e=>{let{unapplied:t}=await ln(await cn(e));s(t.map(e=>({Name:e})),{quiet:e.quiet})}},_n={command:`migrations`,describe:`Create, list, and apply D1 database migrations`,builder:e=>e.command(u(dn,{command:`d1 migrations apply`,classification:{safeFlags:[]}})).command(u(pn,{command:`d1 migrations create`,classification:{safeFlags:[]}})).command(u(gn,{command:`d1 migrations list`,classification:{safeFlags:[]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},vn={command:`d1`,describe:`D1 is Cloudflare's managed, serverless database with SQLite's SQL semantics, built-in disaster recovery, and Worker and HTTP API access.`,builder:e=>e.command(re).command(oe).command(le).command(fe).command(he).command(_e).command(ye).command(ke).command(Me).command(t(_n,`preview`)).command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{vn as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./package-DK3JX4I3.mjs";import{createRequire as t}from"node:module";import{existsSync as n,readFileSync as r,realpathSync as i}from"node:fs";import{dirname as a,resolve as o}from"node:path";import{fileURLToPath as s}from"node:url";import{constants as c}from"node:os";import{spawn as l}from"node:child_process";const u=`CF_DELEGATION`,d=`CF_DELEGATING_CLI_VERSION`,f=`CF_DELEGATION_PID`;function p(e){if(e.env.CF_DELEGATION||b(e.ownPackageJsonPath))return null;let i;try{i=t(o(e.cwd,`package.json`)).resolve(`cf/package.json`)}catch{return null}if(e.ownPackageJsonPath&&y(i,e.ownPackageJsonPath))return null;let s;try{s=JSON.parse(r(i,`utf-8`))}catch{return null}let c=v(s.bin);if(!c)return null;let l=o(a(i),c);return n(l)?{packageJsonPath:i,binPath:l,version:typeof s.version==`string`?s.version:`unknown`}:null}async function m(e={}){let t=e.cwd??process.cwd(),n=e.argv??process.argv.slice(2),r=e.env??process.env,i=p({cwd:t,ownPackageJsonPath:e.ownPackageJsonPath===void 0?S():e.ownPackageJsonPath,env:r});return i?{delegated:!0,exitCode:await _(i.binPath,n,r)}:{delegated:!1}}async function h(){let e=process.argv.slice(2);return g(e)?{delegated:!1}:m({argv:e})}function g(e){return e.find(e=>!e.startsWith(`-`))===`complete`}function _(t,n,r){return new Promise((i,a)=>{let o=l(process.execPath,[t,...n],{stdio:[`inherit`,`inherit`,`inherit`,`ipc`],env:{...r,[u]:`1`,[d]:e,[f]:String(process.pid)}});o.on(`message`,e=>{process.send&&process.send(e)});let s=e=>()=>{o.kill(e)},p=s(`SIGINT`),m=s(`SIGTERM`);process.on(`SIGINT`,p),process.on(`SIGTERM`,m);let h=()=>{process.off(`SIGINT`,p),process.off(`SIGTERM`,m)};o.once(`exit`,(e,t)=>{h(),i(e===null?t?128+(c.signals[t]??1):0:e)}),o.once(`error`,e=>{h(),a(e)})})}function v(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e,n=t.cf;if(typeof n==`string`)return n;for(let e of Object.values(t))if(typeof e==`string`)return e}return null}function y(e,t){try{return i(e)===i(t)}catch{return o(e)===o(t)}}function b(e){return e?e.split(/[\\/]/).some(e=>e===`_npx`||e===`dlx`||e.startsWith(`dlx-`)):!1}function x(){return b(S())}function S(){let e=a(s(import.meta.url));for(;;){let t=o(e,`package.json`);if(n(t))return t;let r=a(e);if(r===e)return null;e=r}}export{h as a,x as i,d as n,m as o,u as r,p as s,f as t};
2
+ import{t as e}from"./package-CiRJBRHO.mjs";import{createRequire as t}from"node:module";import{existsSync as n,readFileSync as r,realpathSync as i}from"node:fs";import{dirname as a,resolve as o}from"node:path";import{fileURLToPath as s}from"node:url";import{constants as c}from"node:os";import{spawn as l}from"node:child_process";const u=`CF_DELEGATION`,d=`CF_DELEGATING_CLI_VERSION`,f=`CF_DELEGATION_PID`;function p(e){if(e.env.CF_DELEGATION||b(e.ownPackageJsonPath))return null;let i;try{i=t(o(e.cwd,`package.json`)).resolve(`cf/package.json`)}catch{return null}if(e.ownPackageJsonPath&&y(i,e.ownPackageJsonPath))return null;let s;try{s=JSON.parse(r(i,`utf-8`))}catch{return null}let c=v(s.bin);if(!c)return null;let l=o(a(i),c);return n(l)?{packageJsonPath:i,binPath:l,version:typeof s.version==`string`?s.version:`unknown`}:null}async function m(e={}){let t=e.cwd??process.cwd(),n=e.argv??process.argv.slice(2),r=e.env??process.env,i=p({cwd:t,ownPackageJsonPath:e.ownPackageJsonPath===void 0?S():e.ownPackageJsonPath,env:r});return i?{delegated:!0,exitCode:await _(i.binPath,n,r)}:{delegated:!1}}async function h(){let e=process.argv.slice(2);return g(e)?{delegated:!1}:m({argv:e})}function g(e){return e.find(e=>!e.startsWith(`-`))===`complete`}function _(t,n,r){return new Promise((i,a)=>{let o=l(process.execPath,[t,...n],{stdio:[`inherit`,`inherit`,`inherit`,`ipc`],env:{...r,[u]:`1`,[d]:e,[f]:String(process.pid)}});o.on(`message`,e=>{process.send&&process.send(e)});let s=e=>()=>{o.kill(e)},p=s(`SIGINT`),m=s(`SIGTERM`);process.on(`SIGINT`,p),process.on(`SIGTERM`,m);let h=()=>{process.off(`SIGINT`,p),process.off(`SIGTERM`,m)};o.once(`exit`,(e,t)=>{h(),i(e===null?t?128+(c.signals[t]??1):0:e)}),o.once(`error`,e=>{h(),a(e)})})}function v(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e,n=t.cf;if(typeof n==`string`)return n;for(let e of Object.values(t))if(typeof e==`string`)return e}return null}function y(e,t){try{return i(e)===i(t)}catch{return o(e)===o(t)}}function b(e){return e?e.split(/[\\/]/).some(e=>e===`_npx`||e===`dlx`||e.startsWith(`dlx-`)):!1}function x(){return b(S())}function S(){let e=a(s(import.meta.url));for(;;){let t=o(e,`package.json`);if(n(t))return t;let r=a(e);if(r===e)return null;e=r}}export{h as a,x as i,d as n,m as o,u as r,p as s,f as t};
package/dist/delegate.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export{t as DELEGATING_PID_ENV,n as DELEGATING_VERSION_ENV,r as DELEGATION_SENTINEL,i as isEphemeralExecRun,a as maybeDelegateFromProcess,o as maybeDelegateToLocalInstall,s as resolveDelegateTarget}from"./delegate-CTj0dYET.mjs";
2
+ export{t as DELEGATING_PID_ENV,n as DELEGATING_VERSION_ENV,r as DELEGATION_SENTINEL,i as isEphemeralExecRun,a as maybeDelegateFromProcess,o as maybeDelegateToLocalInstall,s as resolveDelegateTarget}from"./delegate-B4bKqF7i.mjs";
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,t}from"./shared-CBMFY1VY.mjs";function n(t){return e(t).option(`provision`,{type:`boolean`,description:`Automatically provision resources for bindings that need them`,default:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of a dispatch namespace to deploy the Worker to (Workers for Platforms)`,requiresArg:!0}).option(`containers-rollout`,{description:`Rollout strategy for Container changes. Immediate rolls out to all instances in one step; none leaves deployed Containers unchanged.`,choices:[`immediate`,`gradual`,`none`]})}const r={command:`deploy`,describe:`Deploy a worker to Cloudflare`,builder:n,handler:async e=>{await t(e,{command:`Deploy`})}};export{r as default};
2
+ import{n as e,t}from"./shared--uVkAAd7.mjs";function n(t){return e(t).option(`provision`,{type:`boolean`,description:`Automatically provision resources for bindings that need them`,default:!0}).option(`dispatch-namespace`,{type:`string`,description:`Name of a dispatch namespace to deploy the Worker to (Workers for Platforms)`,requiresArg:!0}).option(`containers-rollout`,{description:`Rollout strategy for Container changes. Immediate rolls out to all instances in one step; none leaves deployed Containers unchanged.`,choices:[`immediate`,`gradual`,`none`]})}const r={command:`deploy`,describe:`Deploy a Worker, static site, or full-stack application to Cloudflare`,builder:n,handler:async e=>{await t(e,{command:`Deploy`})}};export{r as default};