cf 1.0.0-beta.26 → 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 (256) hide show
  1. package/dist/_meta/commands.json +1996 -3422
  2. package/dist/_meta/schemas.json +9249 -2339
  3. package/dist/abuse-reports-RxXqfDEW.mjs +24 -0
  4. package/dist/{access-DCOOmDC5.mjs → access-BxEprr2f.mjs} +1 -1
  5. package/dist/{accounts-HC6XuIwP.mjs → accounts-DU2ZNYqP.mjs} +17 -11
  6. package/dist/{acm-DYgr6SAR.mjs → acm-CBCIKBJ4.mjs} +1 -1
  7. package/dist/{addressing-BS66pJ_a.mjs → addressing-BKxiLRHk.mjs} +1 -1
  8. package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-DkBpQYUL.mjs} +1 -1
  9. package/dist/{ai-BiIKznNv.mjs → ai-DqEN_hhg.mjs} +2 -2
  10. package/dist/{ai-audit-DI4Rw2wl.mjs → ai-audit-BmzOgt6x.mjs} +1 -1
  11. package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-B0uiYVHq.mjs} +3 -3
  12. package/dist/ai-search-DbZIxdio.mjs +74 -0
  13. package/dist/{ai-security-BUwS6kVh.mjs → ai-security-CvZfP2JC.mjs} +1 -1
  14. package/dist/{alerting-BSzuvFk1.mjs → alerting-BjGwBxZT.mjs} +1 -1
  15. package/dist/{analytics-CQ-Yt1mm.mjs → analytics-C7kT_H-W.mjs} +4 -4
  16. package/dist/{analytics-engine-CdrY5-95.mjs → analytics-engine-BHpcNSdD.mjs} +1 -1
  17. package/dist/{api-security-BBxEJjGv.mjs → api-security-BbcvDtff.mjs} +2 -2
  18. package/dist/{argo-BiefH8wc.mjs → argo-D1VONzu-.mjs} +1 -1
  19. package/dist/{artifacts-B9g9aPrk.mjs → artifacts-2R2sxIKO.mjs} +1 -1
  20. package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-LoBB1OO_.mjs} +1 -1
  21. package/dist/auth-CspwoBlp.mjs +2 -0
  22. package/dist/{auth-C50SqX9F.mjs → auth-D499YE2n.mjs} +3 -3
  23. package/dist/{auth-D5Yj9eYU.mjs → auth-FK2eLQ02.mjs} +1 -1
  24. package/dist/{auth-token-DvNoIhRL.mjs → auth-token-BwpERbnG.mjs} +1 -1
  25. package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-B2w-woU0.mjs} +36 -36
  26. package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-AgOHGiPI.mjs} +2 -2
  27. package/dist/billing-DRNww0iC.mjs +24 -0
  28. package/dist/{blocks-DnNrvi8s.mjs → blocks-C8vyXIAT.mjs} +1 -1
  29. package/dist/body-unions-CjpNjwSW.mjs +2 -0
  30. package/dist/bot-management-fwxKIbaB.mjs +9 -0
  31. package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-DCYB5kYZ.mjs} +1 -1
  32. package/dist/{brand-protection-Byoa1hvj.mjs → brand-protection-BVICLzBc.mjs} +1 -1
  33. package/dist/browser-run-CEk-NIgP.mjs +40 -0
  34. package/dist/build-CRm2TQq8.mjs +2 -0
  35. package/dist/{build-Dwd1_7o0.mjs → build-DO_GNhRl.mjs} +1 -1
  36. package/dist/{builds-D3mAH87h.mjs → builds-CoazxuN-.mjs} +26 -26
  37. package/dist/{cache-0xCdyNg9.mjs → cache-jlLJLSu7.mjs} +1 -1
  38. package/dist/{cf-CpC4giTf.mjs → cf-hP0SOgC6.mjs} +2 -2
  39. package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-DQwKND2c.mjs} +1 -1
  40. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +363 -0
  41. package/dist/{cli-Cm4Twas4.mjs → cli-Nqf58-1c.mjs} +1 -1
  42. package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-VmZzMy-m.mjs} +1 -1
  43. package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-bMlFnqP0.mjs} +1 -1
  44. package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-Ba4KWdTO.mjs} +1 -1
  45. package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-CCaIBOAo.mjs} +121 -119
  46. package/dist/{command-BV8-laJK.mjs → command-BASaTmJc.mjs} +1 -1
  47. package/dist/{command-CfOqnqlN.mjs → command-BiIVclNA.mjs} +1 -1
  48. package/dist/{command-BKNQsGqu.mjs → command-Bih1HLr3.mjs} +1 -1
  49. package/dist/{command-BVz2aES3.mjs → command-BxZBNPxG.mjs} +1 -1
  50. package/dist/{command-B-_ba4rQ.mjs → command-ByYf12-8.mjs} +1 -1
  51. package/dist/{command-Dn39o5xQ.mjs → command-C0qCuw03.mjs} +1 -1
  52. package/dist/{command-BsCFkho-.mjs → command-C2FVMd1b.mjs} +1 -1
  53. package/dist/{command--Y_QAiU2.mjs → command-C4OgtX_x.mjs} +1 -1
  54. package/dist/{command-DlI7Z_7j.mjs → command-C5Kqc5Km.mjs} +1 -1
  55. package/dist/{command-CQMRxiDz.mjs → command-CFxyp8Uo.mjs} +1 -1
  56. package/dist/{command-CN8NFLs2.mjs → command-CZAR85ba.mjs} +1 -1
  57. package/dist/{command-QHmV62Fv.mjs → command-CelQVrZL.mjs} +1 -1
  58. package/dist/{command-yOG9VUtq.mjs → command-CrAlzysj.mjs} +1 -1
  59. package/dist/{command-DsOv6z9q.mjs → command-pMoNdd22.mjs} +1 -1
  60. package/dist/{completions-BA52jTea.mjs → completions-DRzBiqpv.mjs} +1 -1
  61. package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-CrTeSyaM.mjs} +1 -1
  62. package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-BbAOUt9h.mjs} +1 -1
  63. package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-DcpBx7Qx.mjs} +1 -1
  64. package/dist/{connectors-D8H6rQz9.mjs → connectors-D1WFLJoE.mjs} +1 -1
  65. package/dist/{containers-Db-eWudu.mjs → containers-BOBEs1Gk.mjs} +4 -4
  66. package/dist/containers-DINLx5_i.mjs +380 -0
  67. package/dist/{content-scan-DUVq09i8.mjs → content-scan-D1GfPSL0.mjs} +1 -1
  68. package/dist/{context-BvLXzoMs.mjs → context-Dp4CXG22.mjs} +1 -1
  69. package/dist/{cps-CqaRliZZ.mjs → cps-D4uhzg3k.mjs} +1 -1
  70. package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-DOOUBeBM.mjs} +1 -3
  71. package/dist/custom-csrs-DtdFo5YZ.mjs +18 -0
  72. package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-ccdlELaD.mjs} +1 -1
  73. package/dist/custom-nameservers-p3gDjfva.mjs +12 -0
  74. package/dist/custom-pages-DAkKVzgR.mjs +38 -0
  75. package/dist/d1-CDIyRdh4.mjs +52 -0
  76. package/dist/{delegate-CMfEjvHn.mjs → delegate-B4bKqF7i.mjs} +1 -1
  77. package/dist/delegate.mjs +1 -1
  78. package/dist/{deploy-DDbmxkiX.mjs → deploy-BaC5Ty7F.mjs} +1 -1
  79. package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-DTTgNGro.mjs} +1 -1
  80. package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-mAy06fAI.mjs} +1 -1
  81. package/dist/{dev-BS156bim.mjs → dev-De-HszNT.mjs} +1 -1
  82. package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-D1CUs2o9.mjs} +1 -1
  83. package/dist/{dist-DehXZozc.mjs → dist-D5qkmHhC.mjs} +1 -1
  84. package/dist/{dls-DciZC_gQ.mjs → dls-DWBiYzY1.mjs} +1 -1
  85. package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-DH9xIT5H.mjs} +8 -8
  86. package/dist/{dns-C2YPspGN.mjs → dns-wMjf1t6-.mjs} +14 -8
  87. package/dist/{docs-CYjyBA8q.mjs → docs-BA7qslb2.mjs} +1 -1
  88. package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DF0MYpnV.mjs} +1 -1
  89. package/dist/{email-auth-CMCQAu99.mjs → email-auth-BShMFXn4.mjs} +1 -1
  90. package/dist/email-domains-CDSbVclP.mjs +14 -0
  91. package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CBCkbg_F.mjs} +4 -2
  92. package/dist/{email-security-Bu0fAYh-.mjs → email-security-CnNa1YON.mjs} +4 -4
  93. package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CpDSw-Eb.mjs} +16 -16
  94. package/dist/{errors-C5RGao2J.mjs → errors-DatLr-iR.mjs} +1 -1
  95. package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-BwGdMnTr.mjs} +1 -1
  96. package/dist/{firewall-CJ-VIOk1.mjs → firewall-CY_oem-d.mjs} +25 -9
  97. package/dist/{flagship-C5PTR1ND.mjs → flagship-Bat5EZCk.mjs} +1 -1
  98. package/dist/{fraud-B7hwBheX.mjs → fraud-CSUKLh8X.mjs} +2 -2
  99. package/dist/global-options-DiKj2cQy.mjs +2 -0
  100. package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C2skt6t-.mjs} +1 -1
  101. package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-uC43QKQd.mjs} +1 -1
  102. package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-FcBbpew4.mjs} +3 -3
  103. package/dist/iam-8T74DNhH.mjs +62 -0
  104. package/dist/{images-Ttea4khD.mjs → images-C3JUaf6b.mjs} +1 -1
  105. package/dist/index.mjs +1 -1
  106. package/dist/{init-BeYrAg7Q.mjs → init-BEVVz4_P.mjs} +1 -1
  107. package/dist/{intel-CJznBf5n.mjs → intel-DRy4rHrt.mjs} +6 -7
  108. package/dist/{interactive-DsU8VDvK.mjs → interactive-CKHdGvkh.mjs} +1 -1
  109. package/dist/{internal-DOho_iA0.mjs → internal-CamuESs0.mjs} +1 -1
  110. package/dist/{ips-BgNoRwFN.mjs → ips-DinCNnWj.mjs} +1 -1
  111. package/dist/k2-wsanPL3y.mjs +10 -0
  112. package/dist/{kv-CTyuvcAz.mjs → kv-BLSPcEnH.mjs} +1 -1
  113. package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-WB1FOuew.mjs} +1 -1
  114. package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-CSZd9hBQ.mjs} +1 -1
  115. package/dist/{live-BfrWKfq8.mjs → live-B6AsI_E5.mjs} +1 -1
  116. package/dist/{load-balancers-DMTsh-9q.mjs → load-balancers-gap5u4b1.mjs} +19 -7
  117. package/dist/local-CFsO9Tkg.mjs +2 -0
  118. package/dist/{local-CvzO-cQH.mjs → local-CgBhtmON.mjs} +1 -1
  119. package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-CmlJ20uJ.mjs} +1 -1
  120. package/dist/{login-CVWkMh1L.mjs → login-BJHaTERg.mjs} +1 -1
  121. package/dist/login-BfuOf-Yi.mjs +2 -0
  122. package/dist/logpush-qhlxsioM.mjs +68 -0
  123. package/dist/{logs-BSyyNwso.mjs → logs-bI54CJ0w.mjs} +23 -7
  124. package/dist/{magic-network-monitoring-DRRvSrDP.mjs → magic-network-monitoring-CX3TaMTu.mjs} +1 -1
  125. package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BwDyySHJ.mjs} +20 -20
  126. package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-CsBBkfeQ.mjs} +2 -2
  127. package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CUC-uAbW.mjs} +1 -1
  128. package/dist/{mcp-BUOfMkBP.mjs → mcp-CyI0sDmL.mjs} +3 -3
  129. package/dist/{mesh-B1RrhAT1.mjs → mesh-Czr0UCP4.mjs} +2 -2
  130. package/dist/{migrate-BTU8AvlP.mjs → migrate-DKDWYrz2.mjs} +1 -1
  131. package/dist/{monetization-Da3ooFLC.mjs → monetization-NUgfDtSy.mjs} +7 -3
  132. package/dist/{network-CjhSzhMm.mjs → network-B42zrBic.mjs} +1 -1
  133. package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-DuIBe8fK.mjs} +4 -4
  134. package/dist/{o11y-DeNxXxcp.mjs → o11y-oEUpMC3O.mjs} +6 -6
  135. package/dist/{oauth-DdXkpU44.mjs → oauth-BLQ1-y3R.mjs} +1 -1
  136. package/dist/{oauth-Dnog5v-Q.mjs → oauth-BmSFLp_s.mjs} +1 -1
  137. package/dist/observability-BxhJQCgZ.mjs +4 -0
  138. package/dist/organization-CEnlXwrl.mjs +70 -0
  139. package/dist/{organizations-p8Mgo8A7.mjs → organizations-Dt86ToxE.mjs} +1 -1
  140. package/dist/{origin-post-quantum-encryption-Bwysyttf.mjs → origin-post-quantum-encryption-lX-uaJSL.mjs} +1 -1
  141. package/dist/package-CiRJBRHO.mjs +2 -0
  142. package/dist/{page-rules-D2eFbKWb.mjs → page-rules-J6LhwR-s.mjs} +1 -1
  143. package/dist/{pages-DYZDvWK6.mjs → pages-BksdnChs.mjs} +4 -4
  144. package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-BLcbHRoR.mjs} +1 -1
  145. package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-VatiU-Nt.mjs} +4 -2
  146. package/dist/{pipelines-D6pkhlpm.mjs → pipelines-B5AoB3f3.mjs} +5 -5
  147. package/dist/precursor-D3VH2MXT.mjs +4 -0
  148. package/dist/{previews-B1mqjXaJ.mjs → previews-DzJ85fsr.mjs} +1 -1
  149. package/dist/{progress-B-CVX0kn.mjs → progress-DLri-rA7.mjs} +1 -1
  150. package/dist/{prompt-DJF_Rs5S.mjs → prompt-D0dXwuME.mjs} +1 -1
  151. package/dist/{queues-DaqLO-UO.mjs → queues-BsAck4To.mjs} +5 -5
  152. package/dist/{r2-DDIU9JN3.mjs → r2-BYjdHDEZ.mjs} +38 -38
  153. package/dist/{radar-D59qCgld.mjs → radar-CvLtu-Vr.mjs} +1 -1
  154. package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-DQeDx1wT.mjs} +1 -1
  155. package/dist/{ready-DgE08svD.mjs → ready-gsGEaWLL.mjs} +1 -1
  156. package/dist/{realtime-DWjdrDzv.mjs → realtime-DiCEgFTC.mjs} +81 -79
  157. package/dist/{registrar-uYOU1U27.mjs → registrar-D4wdgWpo.mjs} +8 -8
  158. package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-B6yopzdG.mjs} +2 -2
  159. package/dist/{reporting-Dx2YTick.mjs → reporting-BiHgnT8L.mjs} +1 -1
  160. package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-CoxHUNcB.mjs} +1 -1
  161. package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-817HTytF.mjs} +1 -1
  162. package/dist/{resource-sharing-CIsLVAcK.mjs → resource-sharing-CW9xxtq5.mjs} +12 -12
  163. package/dist/{rules-CjgLSlUC.mjs → rules-CRhe_ca9.mjs} +1 -1
  164. package/dist/rulesets-CKyc-Xlx.mjs +42 -0
  165. package/dist/{rum-vPEpMS_h.mjs → rum-BfnWHW_d.mjs} +1 -1
  166. package/dist/{run-BZ6Fj3jQ.mjs → run-Ciw_GIrC.mjs} +1 -1
  167. package/dist/run-DD45EQTm.mjs +2 -0
  168. package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-BIo0Gi2H.mjs} +1 -1
  169. package/dist/schema-flags-DrqvwQNw.mjs +4 -0
  170. package/dist/{scim-BA7XbsSu.mjs → scim-C4iRWNYB.mjs} +1 -1
  171. package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-DgtzZRze.mjs} +1 -1
  172. package/dist/security-insights-SlUGW3F_.mjs +62 -0
  173. package/dist/{security-txt-DikhnR2L.mjs → security-txt-C3YS0REz.mjs} +1 -1
  174. package/dist/{session-BOnam-Wv.mjs → session-D2yuwO4i.mjs} +1 -1
  175. package/dist/{shared-DmmWSObC.mjs → shared--uVkAAd7.mjs} +1 -1
  176. package/dist/{signed-url-C-24KbWB.mjs → signed-url-ClLk45_J.mjs} +1 -1
  177. package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Dn95hqUH.mjs} +1 -1
  178. package/dist/{snippets-Bi3Uq1DF.mjs → snippets-BNUKOajz.mjs} +1 -1
  179. package/dist/{spawn-C3hzWVrJ.mjs → spawn-DuT4snxu.mjs} +1 -1
  180. package/dist/{spectrum-BaWKMoAl.mjs → spectrum-Cj0BMtg2.mjs} +3 -3
  181. package/dist/{speed-DShjlpAs.mjs → speed-BrVeZRyX.mjs} +1 -1
  182. package/dist/{sql-DCoFf15T.mjs → sql-BX1pBqj3.mjs} +2 -2
  183. package/dist/src-DPnUfK4c.mjs +131 -0
  184. package/dist/{ssl-C4nt4pJK.mjs → ssl-Bx4LCutF.mjs} +3 -3
  185. package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DqaYNT0b.mjs} +1 -1
  186. package/dist/startup-profile-tZNb2HGz.mjs +2 -0
  187. package/dist/{state-DmjHXZat.mjs → state-BmzOLELo.mjs} +1 -1
  188. package/dist/state-Uwfrmw5I.mjs +2 -0
  189. package/dist/{stream-CpZbnSpH.mjs → stream-BRzr6yh0.mjs} +1 -1
  190. package/dist/{tags-BIjQ3Kjh.mjs → tags-xVzjZxdt.mjs} +11 -5
  191. package/dist/{telemetry-BDhqOpUw.mjs → telemetry-CJ9URio3.mjs} +1 -1
  192. package/dist/telemetry-Pt5GpCKD.mjs +2 -0
  193. package/dist/tenant-custom-nameservers-M7Fxqh2W.mjs +8 -0
  194. package/dist/{tunnels-CXAO2CeL.mjs → tunnels-DQVXKUKA.mjs} +3 -3
  195. package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-B_Ugzgom.mjs} +1 -1
  196. package/dist/ui-FYultowZ.mjs +2 -0
  197. package/dist/{update-check-D_Wtw0_D.mjs → update-check-DHUo4FOJ.mjs} +1 -1
  198. package/dist/{update-check-Dc7cRFlx.mjs → update-check-DRr0eRhB.mjs} +1 -1
  199. package/dist/update-check-worker.mjs +1 -1
  200. package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-CZRQH_pJ.mjs} +1 -1
  201. package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BH4PLy16.mjs} +1 -1
  202. package/dist/{user-BaF0qvvO.mjs → user-Bn82Qw0Y.mjs} +10 -12
  203. package/dist/{vectorize-D5qiggZU.mjs → vectorize-DoVVz_sh.mjs} +1 -1
  204. package/dist/version-Zr2oF8mY.mjs +2 -0
  205. package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-QUW131o3.mjs} +5 -3
  206. package/dist/{web-assets-BySw_Tme.mjs → web-assets-CgQXsp8m.mjs} +2 -2
  207. package/dist/{web3-BKkKf1RF.mjs → web3-TY9s6Swn.mjs} +3 -3
  208. package/dist/workers-B3uJqJKc.mjs +39 -0
  209. package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-BgGY0IGk.mjs} +2 -2
  210. package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-5RkV9MVp.mjs} +2 -2
  211. package/dist/workers-vpc-Bt4OQbwM.mjs +12 -0
  212. package/dist/{workflows-Cr957c4U.mjs → workflows-6m85DdqF.mjs} +7 -7
  213. package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-BbmGOu8l.mjs} +3 -3
  214. package/dist/{zaraz-C8__FhOh.mjs → zaraz-8WSJ7l0L.mjs} +2 -2
  215. package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-DK0cqDZv.mjs} +483 -405
  216. package/dist/{zones-BzyjOT10.mjs → zones-DTAcguf6.mjs} +3 -3
  217. package/package.json +14 -14
  218. package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
  219. package/dist/ai-search-QOenIzDL.mjs +0 -74
  220. package/dist/auth-Czzy5Rs_.mjs +0 -2
  221. package/dist/billing-BrLJqlOf.mjs +0 -22
  222. package/dist/bot-management-BSBVuKc0.mjs +0 -9
  223. package/dist/browser-run-BSVANGzU.mjs +0 -40
  224. package/dist/build-CPKxZ3kL.mjs +0 -2
  225. package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
  226. package/dist/containers-D4sa-Eoy.mjs +0 -380
  227. package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
  228. package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
  229. package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
  230. package/dist/d1-BsWI546w.mjs +0 -89
  231. package/dist/email-domains-1Nx60ETD.mjs +0 -12
  232. package/dist/iam-DuZenYtc.mjs +0 -48
  233. package/dist/k2-Cj1ORHul.mjs +0 -10
  234. package/dist/local-CWTti4ot.mjs +0 -2
  235. package/dist/login-Djz5mvHJ.mjs +0 -2
  236. package/dist/logpush-OMhp7VgE.mjs +0 -44
  237. package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
  238. package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
  239. package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
  240. package/dist/organization-IsxVyWol.mjs +0 -73
  241. package/dist/package-BOE_De2L.mjs +0 -2
  242. package/dist/precursor-B35P8h6h.mjs +0 -4
  243. package/dist/rulesets-C7_aZA7m.mjs +0 -34
  244. package/dist/run-D4-K_cbQ.mjs +0 -2
  245. package/dist/schema-flags-Cr6kleor.mjs +0 -4
  246. package/dist/security-insights-ZKtey62s.mjs +0 -40
  247. package/dist/src-jyCTFHcS.mjs +0 -131
  248. package/dist/startup-profile-D_Qjgca1.mjs +0 -2
  249. package/dist/state-C7lNNN31.mjs +0 -2
  250. package/dist/telemetry-BZdRnr26.mjs +0 -2
  251. package/dist/tenant-CqYoylyU.mjs +0 -10
  252. package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
  253. package/dist/ui-BUCBQ3Sq.mjs +0 -2
  254. package/dist/version-DNcdABcr.mjs +0 -2
  255. package/dist/workers-TS0oQ-XH.mjs +0 -39
  256. package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CvzO-cQH.mjs";import{n}from"./auth-D5Yj9eYU.mjs";import{a as r,t as i}from"./context-BvLXzoMs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-B-CVX0kn.mjs";import{t as c}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{a as l,n as u,r as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-DJF_Rs5S.mjs";var _={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/cancel`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function v(e){return e.usage(`$0 builds cancel <build-uuid>
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,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as l,n as u,r as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-D0dXwuME.mjs";import{t as _}from"./body-unions-CjpNjwSW.mjs";var v={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/cancel`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 builds cancel <build-uuid>
3
3
 
4
- Cancel a queued or running build.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`cancel <build-uuid>`,describe:`Cancel a Workers build`,builder:v,handler:async e=>c({command:`builds cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds cancel`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/cancel`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Updating`,async()=>c.send(_,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Updated`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/builds`,body:`json`,errors:{401:`UnauthorizedError`}};function te(e){return e.usage(`$0 builds create <trigger-uuid>
4
+ Cancel a queued or running build.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`cancel <build-uuid>`,describe:`Cancel a Workers build`,builder:y,handler:async e=>c({command:`builds cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds cancel`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/cancel`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Updating`,async()=>c.send(v,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Updated`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/builds`,body:`json`,errors:{401:`UnauthorizedError`}};function te(e){return e.usage(`$0 builds create <trigger-uuid>
5
5
 
6
- Start a build for a branch or commit using the selected trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-files`,{type:`string`,description:`Files to add or replace for this build. Maximum 2. Provide as a JSON array of objects or @path/to/file.json.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>p(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).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)`}).check(e=>{if([`seed-repo-branch`,`seed-repo-files`,`seed-repo-owner`,`seed-repo-path`,`seed-repo-provider`,`seed-repo-repository`].some(t=>e[t]!==void 0)){let t=[`seed-repo-owner`,`seed-repo-provider`,`seed-repo-repository`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --seed_repo-* flag is set`)}return!0})}const ne={command:`create <trigger-uuid>`,describe:`Start a Workers build`,builder:te,handler:async e=>c({command:`builds create`,classification:{safeFlags:[`seed-repo-provider`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/builds`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):u(e.body)});return}let c=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(y,{body:t,account_id:d,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Created`});return}let m=f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}),h=await s(`Creating`,async()=>c.send(y,{body:m,account_id:d,trigger_uuid:e[`trigger-uuid`]}));a(h,{successLabel:`Created`})})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function re(e){return e.usage(`$0 builds deploy-hooks create <script-name>
6
+ Start a build for a branch or commit using the selected trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name (required if commit_hash not provided)`}).option(`commit-hash`,{type:`string`,description:`Git commit hash (required if branch not provided)`}).option(`seed-repo-branch`,{type:`string`,description:`Repository branch to seed.`}).option(`seed-repo-files`,{type:`string`,description:`Files to add or replace for this build. Maximum 2. Provide as a JSON array of objects or @path/to/file.json.`}).option(`seed-repo-owner`,{type:`string`,description:`Repository owner or namespace.`}).option(`seed-repo-path`,{type:`string`,description:`Path within the repository to seed.`}).option(`seed-repo-provider`,{type:`string`,description:`Source control provider for the seed repository.`,choices:[`github`,`gitlab`]}).coerce(`seed-repo-provider`,e=>p(e,`seed-repo-provider`,`text`)).option(`seed-repo-repository`,{type:`string`,description:`Repository name.`}).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)`}).check(e=>{let t=[`seed-repo-branch`,`seed-repo-files`,`seed-repo-owner`,`seed-repo-path`,`seed-repo-provider`,`seed-repo-repository`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`seed-repo-owner`,`seed-repo-provider`,`seed-repo-repository`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --seed-repo-* flag is set`)}return!0})}const ne={command:`create <trigger-uuid>`,describe:`Start a Workers build`,builder:te,handler:async e=>c({command:`builds create`,classification:{safeFlags:[`seed-repo-provider`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/builds`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):u(e.body)});return}let c=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(b,{body:t,account_id:d,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Created`});return}let m=f({branch:p(e.branch,`branch`,`text`),commit_hash:p(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:p(e[`seed-repo-branch`],`seed-repo-branch`,`text`),files:l(e[`seed-repo-files`],`seed-repo-files`),owner:p(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:p(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:p(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}),h=await s(`Creating`,async()=>c.send(b,{body:m,account_id:d,trigger_uuid:e[`trigger-uuid`]}));a(h,{successLabel:`Created`})})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function re(e){return e.usage(`$0 builds deploy-hooks create <script-name>
7
7
 
8
- Create an HTTP hook that starts a build for a selected Worker branch.`).positional(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`}).option(`deploy-hook-name`,{type:`string`,description:`Deploy hook name (1-58 characters).`}).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 ie={command:`create <script-name>`,describe:`Create a deploy hook`,builder:re,handler:async e=>c({command:`builds deploy-hooks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(b,{body:t,account_id:l,script_name:e[`script-name`]}));a(n,{successLabel:`Created`});return}e.branch===void 0&&(e.branch=await m(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await m(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let d=f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}),h=await s(`Creating`,async()=>c.send(b,{body:d,account_id:l,script_name:e[`script-name`]}));a(h,{successLabel:`Created`})})};var ae={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function oe(e){return e.usage(`$0 builds deploy-hooks delete <deploy-hook-uuid>
8
+ Create an HTTP hook that starts a build for a selected Worker branch.`).positional(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`}).option(`deploy-hook-name`,{type:`string`,description:`Deploy hook name (1-58 characters).`}).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 ie={command:`create <script-name>`,describe:`Create a deploy hook`,builder:re,handler:async e=>c({command:`builds deploy-hooks create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(x,{body:t,account_id:l,script_name:e[`script-name`]}));a(n,{successLabel:`Created`});return}e.branch===void 0&&(e.branch=await m(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await m(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let d=f({branch:p(e.branch,`branch`,`text`),deploy_hook_name:p(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}),h=await s(`Creating`,async()=>c.send(x,{body:d,account_id:l,script_name:e[`script-name`]}));a(h,{successLabel:`Created`})})};var ae={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function oe(e){return e.usage(`$0 builds deploy-hooks delete <deploy-hook-uuid>
9
9
 
10
- Delete a deploy hook so its UUID can no longer start builds.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,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 se={command:`delete <deploy-hook-uuid>`,describe:`Delete a deploy hook`,builder:oe,handler:async e=>c({command:`builds deploy-hooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(ae,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function S(e){return e.usage(`$0 builds deploy-hooks get <deploy-hook-uuid>
10
+ Delete a deploy hook so its UUID can no longer start builds.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,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 se={command:`delete <deploy-hook-uuid>`,describe:`Delete a deploy hook`,builder:oe,handler:async e=>c({command:`builds deploy-hooks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(ae,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Deleted`})})};var ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function S(e){return e.usage(`$0 builds deploy-hooks get <deploy-hook-uuid>
11
11
 
12
- Retrieve the name, branch, Worker identifier, and timestamps for a deploy hook.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <deploy-hook-uuid>`,describe:`Get a deploy hook`,builder:S,handler:async e=>c({command:`builds deploy-hooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(x,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks`,errors:{401:`UnauthorizedError`}};function T(e){return e.usage(`$0 builds deploy-hooks list
12
+ Retrieve the name, branch, Worker identifier, and timestamps for a deploy hook.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <deploy-hook-uuid>`,describe:`Get a deploy hook`,builder:S,handler:async e=>c({command:`builds deploy-hooks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"script-name":String(e[`script-name`]??``),"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ce,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks`,errors:{401:`UnauthorizedError`}};function T(e){return e.usage(`$0 builds deploy-hooks list
13
13
 
14
14
  List the branch-specific deploy hooks configured for a Worker.`).option(`script-name`,{type:`string`,description:`Human-readable name of the worker.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List deploy hooks`,builder:T,handler:async e=>c({command:`builds deploy-hooks list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-name`]==null?`<script-name>`:encodeURIComponent(String(e[`script-name`]))}/deploy_hooks`,pathParams:{"script-name":String(e[`script-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(w,{account_id:l,script_name:e[`script-name`]}));a(u,{successLabel:`Loaded`})})};var D={method:`POST`,path:t=>e`/workers/builds/deploy_hooks/${t.deploy_hook_uuid}`,errors:{404:`NotFoundError`,429:`TooManyRequestsError`}};function O(e){return e.usage(`$0 builds deploy-hooks trigger <deploy-hook-uuid>
15
15
 
@@ -23,42 +23,42 @@ Return whether the account's build-minute allowance is exhausted and when it ref
23
23
 
24
24
  List paginated build records associated with a Worker tag.`).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for pagination`}).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 U={command:`list`,describe:`List builds for a Worker`,builder:H,handler:async e=>c({command:`builds list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let t=await r();o({command:`cf builds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`external-script-id`]==null?`<external-script-id>`:encodeURIComponent(String(e[`external-script-id`]))}/builds`,pathParams:{"external-script-id":String(e[`external-script-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(V,{account_id:u,external_script_id:e[`external-script-id`],...c}));a(d,{successLabel:`Loaded`})})};var W={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/logs`,query:[`cursor`],errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function G(e){return e.usage(`$0 builds logs get <build-uuid>
25
25
 
26
- Retrieve cursor-paginated log lines for a build UUID.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Pagination cursor for log retrieval.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <build-uuid>`,describe:`Get Workers build logs`,builder:G,handler:async e=>c({command:`builds logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={cursor:e.cursor};if(e.dryRun){let t=await r();o({command:`cf builds logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/logs`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(W,{account_id:u,build_uuid:e[`build-uuid`],...c}));a(d,{successLabel:`Loaded`})})},ce={command:`logs`,describe:`Retrieve build logs.`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/repos/${t.provider_type}/${t.provider_account_id}/${t.repo_id}/config_autofill`,query:[`branch`,`root_directory`],errors:{401:`UnauthorizedError`}};function ue(e){return e.usage(`$0 builds repos config-autofill get <repo-id>
26
+ Retrieve cursor-paginated log lines for a build UUID.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Pagination cursor for log retrieval.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`get <build-uuid>`,describe:`Get Workers build logs`,builder:G,handler:async e=>c({command:`builds logs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={cursor:e.cursor};if(e.dryRun){let t=await r();o({command:`cf builds logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/builds/${e[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(e[`build-uuid`]))}/logs`,pathParams:{"build-uuid":String(e[`build-uuid`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(W,{account_id:u,build_uuid:e[`build-uuid`],...c}));a(d,{successLabel:`Loaded`})})},ue={command:`logs`,describe:`Retrieve build logs.`,builder:e=>e.command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/repos/${t.provider_type}/${t.provider_account_id}/${t.repo_id}/config_autofill`,query:[`branch`,`root_directory`],errors:{401:`UnauthorizedError`}};function fe(e){return e.usage(`$0 builds repos config-autofill get <repo-id>
27
27
 
28
- Analyze repository for automatic configuration detection`).positional(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`,demandOption:!0}).option(`provider-type`,{type:`string`,description:`SCM provider type`,demandOption:!0}).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`,demandOption:!0}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get <repo-id>`,describe:`Get repository configuration autofill`,builder:ue,handler:async e=>c({command:`builds repos config-autofill get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={branch:e.branch,root_directory:e[`root-directory`]};if(e.dryRun){let t=await r();o({command:`cf builds repos config-autofill get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/${e[`provider-type`]==null?`<provider-type>`:encodeURIComponent(String(e[`provider-type`]))}/${e[`provider-account-id`]==null?`<provider-account-id>`:encodeURIComponent(String(e[`provider-account-id`]))}/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/config_autofill`,pathParams:{"provider-type":String(e[`provider-type`]??``),"provider-account-id":String(e[`provider-account-id`]??``),"repo-id":String(e[`repo-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(le,{account_id:u,provider_type:e[`provider-type`],provider_account_id:e[`provider-account-id`],repo_id:e[`repo-id`],...c}));a(d,{successLabel:`Loaded`})})},fe={command:`config-autofill`,describe:`Operations for repos.config-autofill`,builder:e=>e.command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var pe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections/${t.repo_connection_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function me(e){return e.usage(`$0 builds repos connections delete <repo-connection-uuid>
28
+ Analyze repository for automatic configuration detection`).positional(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`,demandOption:!0}).option(`provider-type`,{type:`string`,description:`SCM provider type`,demandOption:!0}).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name.`,demandOption:!0}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <repo-id>`,describe:`Get repository configuration autofill`,builder:fe,handler:async e=>c({command:`builds repos config-autofill get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={branch:e.branch,root_directory:e[`root-directory`]};if(e.dryRun){let t=await r();o({command:`cf builds repos config-autofill get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/${e[`provider-type`]==null?`<provider-type>`:encodeURIComponent(String(e[`provider-type`]))}/${e[`provider-account-id`]==null?`<provider-account-id>`:encodeURIComponent(String(e[`provider-account-id`]))}/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/config_autofill`,pathParams:{"provider-type":String(e[`provider-type`]??``),"provider-account-id":String(e[`provider-account-id`]??``),"repo-id":String(e[`repo-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(de,{account_id:u,provider_type:e[`provider-type`],provider_account_id:e[`provider-account-id`],repo_id:e[`repo-id`],...c}));a(d,{successLabel:`Loaded`})})},me={command:`config-autofill`,describe:`Operations for repos.config-autofill`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections/${t.repo_connection_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ge(e){return e.usage(`$0 builds repos connections delete <repo-connection-uuid>
29
29
 
30
- Delete a saved repository connection.`).positional(`repo-connection-uuid`,{type:`string`,description:`Repository connection 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 he={command:`delete <repo-connection-uuid>`,describe:`Delete a repository connection`,builder:me,handler:async e=>c({command:`builds repos connections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds repos connections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/connections/${e[`repo-connection-uuid`]==null?`<repo-connection-uuid>`:encodeURIComponent(String(e[`repo-connection-uuid`]))}`,pathParams:{"repo-connection-uuid":String(e[`repo-connection-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(pe,{account_id:l,repo_connection_uuid:e[`repo-connection-uuid`]}));a(u,{successLabel:`Deleted`})})};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections`,body:`json`,errors:{401:`UnauthorizedError`}};function ge(e){return e.usage(`$0 builds repos connections upsert
30
+ Delete a saved repository connection.`).positional(`repo-connection-uuid`,{type:`string`,description:`Repository connection 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 _e={command:`delete <repo-connection-uuid>`,describe:`Delete a repository connection`,builder:ge,handler:async e=>c({command:`builds repos connections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds repos connections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/connections/${e[`repo-connection-uuid`]==null?`<repo-connection-uuid>`:encodeURIComponent(String(e[`repo-connection-uuid`]))}`,pathParams:{"repo-connection-uuid":String(e[`repo-connection-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(he,{account_id:l,repo_connection_uuid:e[`repo-connection-uuid`]}));a(u,{successLabel:`Deleted`})})};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections`,body:`json`,errors:{401:`UnauthorizedError`}};function ve(e){return e.usage(`$0 builds repos connections upsert
31
31
 
32
- Save the repository connection required by build triggers.`).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`provider-type`,{type:`string`,description:`Source control provider.`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`provider-type`,e=>p(e,`provider-type`,`text`)).option(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`repo-name`,{type:`string`,description:`Human-readable repository name.`}).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 _e={command:`upsert`,describe:`Create or update a repository connection`,builder:ge,handler:async e=>c({command:`builds repos connections upsert`,classification:{safeFlags:[`provider-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds repos connections upsert`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/connections`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({provider_account_id:p(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:p(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:p(e[`repo-id`],`repo-id`,`text`),repo_name:p(e[`repo-name`],`repo-name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(q,{body:t,account_id:l}));a(n,{successLabel:`Updated`});return}e[`provider-account-id`]===void 0&&(e[`provider-account-id`]=await m(`provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`provider-account-name`]===void 0&&(e[`provider-account-name`]=await m(`provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`provider-type`]===void 0&&(e[`provider-type`]=await h(`provider-type`,`Source control provider.`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`repo-id`]===void 0&&(e[`repo-id`]=await m(`repo-id`,`Provider-specific repository identifier.`)),e[`repo-name`]===void 0&&(e[`repo-name`]=await m(`repo-name`,`Human-readable repository name.`));let d=f({provider_account_id:p(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:p(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:p(e[`repo-id`],`repo-id`,`text`),repo_name:p(e[`repo-name`],`repo-name`,`text`)}),g=await s(`Updating`,async()=>c.send(q,{body:d,account_id:l}));a(g,{successLabel:`Updated`})})},ve={command:`connections`,describe:`Operations for repos.connections`,builder:e=>e.command(he).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`repos`,describe:`Manage source repository connections for Workers Builds.`,builder:e=>e.command(fe).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,body:`json`,errors:{401:`UnauthorizedError`}};function be(e){return e.usage(`$0 builds tokens create
32
+ Save the repository connection required by build triggers.`).option(`provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`provider-type`,{type:`string`,description:`Source control provider.`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`provider-type`,e=>p(e,`provider-type`,`text`)).option(`repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`repo-name`,{type:`string`,description:`Human-readable repository name.`}).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 ye={command:`upsert`,describe:`Create or update a repository connection`,builder:ve,handler:async e=>c({command:`builds repos connections upsert`,classification:{safeFlags:[`provider-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds repos connections upsert`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/repos/connections`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({provider_account_id:p(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:p(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:p(e[`repo-id`],`repo-id`,`text`),repo_name:p(e[`repo-name`],`repo-name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(K,{body:t,account_id:l}));a(n,{successLabel:`Updated`});return}e[`provider-account-id`]===void 0&&(e[`provider-account-id`]=await m(`provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`provider-account-name`]===void 0&&(e[`provider-account-name`]=await m(`provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`provider-type`]===void 0&&(e[`provider-type`]=await h(`provider-type`,`Source control provider.`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`repo-id`]===void 0&&(e[`repo-id`]=await m(`repo-id`,`Provider-specific repository identifier.`)),e[`repo-name`]===void 0&&(e[`repo-name`]=await m(`repo-name`,`Human-readable repository name.`));let d=f({provider_account_id:p(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:p(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:p(e[`repo-id`],`repo-id`,`text`),repo_name:p(e[`repo-name`],`repo-name`,`text`)}),g=await s(`Updating`,async()=>c.send(K,{body:d,account_id:l}));a(g,{successLabel:`Updated`})})},be={command:`connections`,describe:`Operations for repos.connections`,builder:e=>e.command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`repos`,describe:`Manage source repository connections for Workers Builds.`,builder:e=>e.command(me).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,body:`json`,errors:{401:`UnauthorizedError`}};function Se(e){return e.usage(`$0 builds tokens create
33
33
 
34
- Create a new build authentication token`).option(`build-token-name`,{type:`string`,description:`The build_token_name field`}).option(`build-token-secret`,{type:`string`,description:`The build_token_secret field`}).option(`cloudflare-token-id`,{type:`string`,description:`The cloudflare_token_id field`}).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 xe={command:`create`,describe:`Create build token`,builder:be,handler:async e=>c({command:`builds tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/tokens`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({build_token_name:p(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:p(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:p(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(J,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e[`build-token-name`]===void 0&&(e[`build-token-name`]=await m(`build-token-name`,`The build_token_name field`)),e[`build-token-secret`]===void 0&&(e[`build-token-secret`]=await m(`build-token-secret`,`The build_token_secret field`)),e[`cloudflare-token-id`]===void 0&&(e[`cloudflare-token-id`]=await m(`cloudflare-token-id`,`The cloudflare_token_id field`));let d=f({build_token_name:p(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:p(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:p(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}),h=await s(`Creating`,async()=>c.send(J,{body:d,account_id:l}));a(h,{successLabel:`Created`})})};var Se={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/tokens/${t.build_token_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Ce(e){return e.usage(`$0 builds tokens delete <build-token-uuid>
34
+ Create a new build authentication token`).option(`build-token-name`,{type:`string`,description:`The build_token_name field`}).option(`build-token-secret`,{type:`string`,description:`The build_token_secret field`}).option(`cloudflare-token-id`,{type:`string`,description:`The cloudflare_token_id field`}).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 Ce={command:`create`,describe:`Create build token`,builder:Se,handler:async e=>c({command:`builds tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/tokens`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({build_token_name:p(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:p(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:p(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(q,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}e[`build-token-name`]===void 0&&(e[`build-token-name`]=await m(`build-token-name`,`The build_token_name field`)),e[`build-token-secret`]===void 0&&(e[`build-token-secret`]=await m(`build-token-secret`,`The build_token_secret field`)),e[`cloudflare-token-id`]===void 0&&(e[`cloudflare-token-id`]=await m(`cloudflare-token-id`,`The cloudflare_token_id field`));let d=f({build_token_name:p(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:p(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:p(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}),h=await s(`Creating`,async()=>c.send(q,{body:d,account_id:l}));a(h,{successLabel:`Created`})})};var we={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/tokens/${t.build_token_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Te(e){return e.usage(`$0 builds tokens delete <build-token-uuid>
35
35
 
36
- Delete a stored build token owned by the current user.`).positional(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`,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 we={command:`delete <build-token-uuid>`,describe:`Delete a build token`,builder:Ce,handler:async e=>c({command:`builds tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/tokens/${e[`build-token-uuid`]==null?`<build-token-uuid>`:encodeURIComponent(String(e[`build-token-uuid`]))}`,pathParams:{"build-token-uuid":String(e[`build-token-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(Se,{account_id:l,build_token_uuid:e[`build-token-uuid`]}));a(u,{successLabel:`Deleted`})})};var Te={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function Ee(e){return e.usage(`$0 builds tokens list
36
+ Delete a stored build token owned by the current user.`).positional(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`,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 Ee={command:`delete <build-token-uuid>`,describe:`Delete a build token`,builder:Te,handler:async e=>c({command:`builds tokens delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds tokens delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/tokens/${e[`build-token-uuid`]==null?`<build-token-uuid>`:encodeURIComponent(String(e[`build-token-uuid`]))}`,pathParams:{"build-token-uuid":String(e[`build-token-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(we,{account_id:l,build_token_uuid:e[`build-token-uuid`]}));a(u,{successLabel:`Deleted`})})};var De={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function Oe(e){return e.usage(`$0 builds tokens list
37
37
 
38
- List metadata for build tokens available to the current user without returning their secrets.`).option(`page`,{type:`number`,description:`Page number for pagination`}).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 De={command:`list`,describe:`List build tokens`,builder:Ee,handler:async e=>c({command:`builds tokens list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf builds tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/tokens`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(Te,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Oe={command:`tokens`,describe:`Manage credentials used by Workers Builds to deploy Workers.`,builder:e=>e.command(xe).command(we).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ke={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/purge_build_cache`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Ae(e){return e.usage(`$0 builds triggers cache purge <trigger-uuid>
38
+ List metadata for build tokens available to the current user without returning their secrets.`).option(`page`,{type:`number`,description:`Page number for pagination`}).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 ke={command:`list`,describe:`List build tokens`,builder:Oe,handler:async e=>c({command:`builds tokens list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf builds tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/tokens`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(De,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Ae={command:`tokens`,describe:`Manage credentials used by Workers Builds to deploy Workers.`,builder:e=>e.command(Ce).command(Ee).command(ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var je={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/purge_build_cache`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Me(e){return e.usage(`$0 builds triggers cache purge <trigger-uuid>
39
39
 
40
- Delete cached dependencies and build artifacts associated with a trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger 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 je={command:`purge <trigger-uuid>`,describe:`Purge a trigger's build cache`,builder:Ae,handler:async e=>c({command:`builds triggers cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/purge_build_cache`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation purges the build cache for a Workers Builds trigger.`}))return;let u=await s(`Deleting`,async()=>c.send(ke,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Deleted`})})},Me={command:`cache`,describe:`Operations for triggers.cache`,builder:e=>e.command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers`,body:`json`,errors:{401:`UnauthorizedError`}};function Ne(e){return e.usage(`$0 builds triggers create
40
+ Delete cached dependencies and build artifacts associated with a trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger 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 Ne={command:`purge <trigger-uuid>`,describe:`Purge a trigger's build cache`,builder:Me,handler:async e=>c({command:`builds triggers cache purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers cache purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/purge_build_cache`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation purges the build cache for a Workers Builds trigger.`}))return;let u=await s(`Deleting`,async()=>c.send(je,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Deleted`})})},Pe={command:`cache`,describe:`Operations for triggers.cache`,builder:e=>e.command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers`,body:`json`,errors:{401:`UnauthorizedError`}};function Fe(e){return e.usage(`$0 builds triggers create
41
41
 
42
- Create a trigger defining the repository connection, Worker tag, commands, filters, cache setting, and build token.`).option(`branch-excludes`,{type:`string`,array:!0,description:`Branch patterns that must not start builds.`}).option(`branch-includes`,{type:`string`,array:!0,description:`Branch patterns that can start builds.`}).option(`build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!1}).option(`build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`}).option(`path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`repo-connection-uuid`,{type:`string`,description:`Repository connection UUID.`}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`trigger-name`,{type:`string`,description:`Human-readable name of the build trigger.`}).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 Pe={command:`create`,describe:`Create a build trigger`,builder:Ne,handler:async e=>c({command:`builds triggers create`,classification:{safeFlags:[`build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),external_script_id:p(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:p(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(Y,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`branch-excludes`]===void 0)throw Error(`--branch-excludes is required (or pass --body with this field set).`);if(e[`branch-includes`]===void 0)throw Error(`--branch-includes is required (or pass --body with this field set).`);if(e[`build-command`]===void 0&&(e[`build-command`]=await m(`build-command`,`Command to build the Worker.`)),e[`build-token-uuid`]===void 0&&(e[`build-token-uuid`]=await m(`build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`deploy-command`]===void 0&&(e[`deploy-command`]=await m(`deploy-command`,`Command to deploy the Worker.`)),e[`external-script-id`]===void 0&&(e[`external-script-id`]=await m(`external-script-id`,`System-generated tag of the Worker. This is not the Worker name.`)),e[`path-excludes`]===void 0)throw Error(`--path-excludes is required (or pass --body with this field set).`);if(e[`path-includes`]===void 0)throw Error(`--path-includes is required (or pass --body with this field set).`);e[`repo-connection-uuid`]===void 0&&(e[`repo-connection-uuid`]=await m(`repo-connection-uuid`,`Repository connection UUID.`)),e[`root-directory`]===void 0&&(e[`root-directory`]=await m(`root-directory`,`Repository directory in which build and deploy commands run.`)),e[`trigger-name`]===void 0&&(e[`trigger-name`]=await m(`trigger-name`,`Human-readable name of the build trigger.`));let d=f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),external_script_id:p(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:p(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}),h=await s(`Creating`,async()=>c.send(Y,{body:d,account_id:l}));a(h,{successLabel:`Created`})})};var Fe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Ie(e){return e.usage(`$0 builds triggers delete <trigger-uuid>
42
+ Create a trigger defining the repository connection, Worker tag, commands, filters, cache setting, and build token.`).option(`branch-excludes`,{type:`string`,array:!0,description:`Branch patterns that must not start builds.`}).option(`branch-includes`,{type:`string`,array:!0,description:`Branch patterns that can start builds.`}).option(`build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!1}).option(`build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`}).option(`path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`repo-connection-uuid`,{type:`string`,description:`Repository connection UUID.`}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`trigger-name`,{type:`string`,description:`Human-readable name of the build trigger.`}).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 Ie={command:`create`,describe:`Create a build trigger`,builder:Fe,handler:async e=>c({command:`builds triggers create`,classification:{safeFlags:[`build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),external_script_id:p(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:p(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(J,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`branch-excludes`]===void 0)throw Error(`--branch-excludes is required (or pass --body with this field set).`);if(e[`branch-includes`]===void 0)throw Error(`--branch-includes is required (or pass --body with this field set).`);if(e[`build-command`]===void 0&&(e[`build-command`]=await m(`build-command`,`Command to build the Worker.`)),e[`build-token-uuid`]===void 0&&(e[`build-token-uuid`]=await m(`build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`deploy-command`]===void 0&&(e[`deploy-command`]=await m(`deploy-command`,`Command to deploy the Worker.`)),e[`external-script-id`]===void 0&&(e[`external-script-id`]=await m(`external-script-id`,`System-generated tag of the Worker. This is not the Worker name.`)),e[`path-excludes`]===void 0)throw Error(`--path-excludes is required (or pass --body with this field set).`);if(e[`path-includes`]===void 0)throw Error(`--path-includes is required (or pass --body with this field set).`);e[`repo-connection-uuid`]===void 0&&(e[`repo-connection-uuid`]=await m(`repo-connection-uuid`,`Repository connection UUID.`)),e[`root-directory`]===void 0&&(e[`root-directory`]=await m(`root-directory`,`Repository directory in which build and deploy commands run.`)),e[`trigger-name`]===void 0&&(e[`trigger-name`]=await m(`trigger-name`,`Human-readable name of the build trigger.`));let d=f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),external_script_id:p(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:p(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}),h=await s(`Creating`,async()=>c.send(J,{body:d,account_id:l}));a(h,{successLabel:`Created`})})};var Le={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Re(e){return e.usage(`$0 builds triggers delete <trigger-uuid>
43
43
 
44
- Delete a trigger and cancel its unfinished builds.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger 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 Le={command:`delete <trigger-uuid>`,describe:`Delete a build trigger`,builder:Ie,handler:async e=>c({command:`builds triggers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation deletes the build trigger and cancels its unfinished builds.`}))return;let u=await s(`Deleting`,async()=>c.send(Fe,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Deleted`})})};var Re={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables/${t.environment_variable_key}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ze(e){return e.usage(`$0 builds triggers environment-variables delete <environment-variable-key>
44
+ Delete a trigger and cancel its unfinished builds.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger 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 ze={command:`delete <trigger-uuid>`,describe:`Delete a build trigger`,builder:Re,handler:async e=>c({command:`builds triggers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation deletes the build trigger and cancels its unfinished builds.`}))return;let u=await s(`Deleting`,async()=>c.send(Le,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Deleted`})})};var Be={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables/${t.environment_variable_key}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Ve(e){return e.usage(`$0 builds triggers environment-variables delete <environment-variable-key>
45
45
 
46
- Delete one build-time variable or secret by key.`).positional(`environment-variable-key`,{type:`string`,description:`Environment variable key.`,demandOption:!0}).option(`trigger-uuid`,{type:`string`,description:`Trigger 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 Be={command:`delete <environment-variable-key>`,describe:`Delete a build variable`,builder:ze,handler:async e=>c({command:`builds triggers environment-variables delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables/${e[`environment-variable-key`]==null?`<environment-variable-key>`:encodeURIComponent(String(e[`environment-variable-key`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``),"environment-variable-key":String(e[`environment-variable-key`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(Re,{account_id:l,trigger_uuid:e[`trigger-uuid`],environment_variable_key:e[`environment-variable-key`]}));a(u,{successLabel:`Deleted`})})};var Ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,errors:{401:`UnauthorizedError`}};function He(e){return e.usage(`$0 builds triggers environment-variables list
46
+ Delete one build-time variable or secret by key.`).positional(`environment-variable-key`,{type:`string`,description:`Environment variable key.`,demandOption:!0}).option(`trigger-uuid`,{type:`string`,description:`Trigger 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 He={command:`delete <environment-variable-key>`,describe:`Delete a build variable`,builder:Ve,handler:async e=>c({command:`builds triggers environment-variables delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables/${e[`environment-variable-key`]==null?`<environment-variable-key>`:encodeURIComponent(String(e[`environment-variable-key`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``),"environment-variable-key":String(e[`environment-variable-key`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(Be,{account_id:l,trigger_uuid:e[`trigger-uuid`],environment_variable_key:e[`environment-variable-key`]}));a(u,{successLabel:`Deleted`})})};var Ue={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,errors:{401:`UnauthorizedError`}};function We(e){return e.usage(`$0 builds triggers environment-variables list
47
47
 
48
- List build-time variables configured for a trigger. Secret values are not returned.`).option(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`list`,describe:`List build variables`,builder:He,handler:async e=>c({command:`builds triggers environment-variables list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ve,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Loaded`})})};var We={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Ge(e){return e.usage(`$0 builds triggers environment-variables upsert <trigger-uuid>
48
+ List build-time variables configured for a trigger. Secret values are not returned.`).option(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`list`,describe:`List build variables`,builder:We,handler:async e=>c({command:`builds triggers environment-variables list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ue,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Loaded`})})};var Ke={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function qe(e){return e.usage(`$0 builds triggers environment-variables upsert <trigger-uuid>
49
49
 
50
- Add or replace build-time variables and secrets without changing unspecified keys.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores.`})}const Ke={command:`upsert <trigger-uuid>`,describe:`Set build variables`,builder:Ge,handler:async e=>c({command:`builds triggers environment-variables upsert`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables upsert`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(We,{body:t,account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},qe={command:`environment-variables`,describe:`Operations for triggers.environment-variables`,builder:e=>e.command(Be).command(Ue).command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Je={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.external_script_id}/triggers`,errors:{401:`UnauthorizedError`}};function Ye(e){return e.usage(`$0 builds triggers list
50
+ Add or replace build-time variables and secrets without changing unspecified keys.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores.`})}const Je={command:`upsert <trigger-uuid>`,describe:`Set build variables`,builder:qe,handler:async e=>c({command:`builds triggers environment-variables upsert`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers environment-variables upsert`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}/environment_variables`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(Ke,{body:t,account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Ye={command:`environment-variables`,describe:`Operations for triggers.environment-variables`,builder:e=>e.command(He).command(Ge).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.external_script_id}/triggers`,errors:{401:`UnauthorizedError`}};function Ze(e){return e.usage(`$0 builds triggers list
51
51
 
52
- List trigger UUIDs and build settings associated with a Worker tag.`).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xe={command:`list`,describe:`List triggers for a Worker`,builder:Ye,handler:async e=>c({command:`builds triggers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`external-script-id`]==null?`<external-script-id>`:encodeURIComponent(String(e[`external-script-id`]))}/triggers`,pathParams:{"external-script-id":String(e[`external-script-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Je,{account_id:l,external_script_id:e[`external-script-id`]}));a(u,{successLabel:`Loaded`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Ze(e){return e.usage(`$0 builds triggers update <trigger-uuid>
52
+ List trigger UUIDs and build settings associated with a Worker tag.`).option(`external-script-id`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`list`,describe:`List triggers for a Worker`,builder:Ze,handler:async e=>c({command:`builds triggers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`external-script-id`]==null?`<external-script-id>`:encodeURIComponent(String(e[`external-script-id`]))}/triggers`,pathParams:{"external-script-id":String(e[`external-script-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Xe,{account_id:l,external_script_id:e[`external-script-id`]}));a(u,{successLabel:`Loaded`})})};var Y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function $e(e){return e.usage(`$0 builds triggers update <trigger-uuid>
53
53
 
54
- Update commands, cache settings, or branch and path filters for a trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`branch-excludes`,{type:`string`,array:!0,description:`Branch patterns that must not start builds.`}).option(`branch-includes`,{type:`string`,array:!0,description:`Branch patterns that can start builds.`}).option(`build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`trigger-name`,{type:`string`,description:`Human-readable name of the build trigger.`}).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 Qe={command:`update <trigger-uuid>`,describe:`Update a build trigger`,builder:Ze,handler:async e=>c({command:`builds triggers update`,classification:{safeFlags:[`build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(X,{body:t,account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`});return}let d=f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}),m=await s(`Updating`,async()=>c.send(X,{body:d,account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(m,{successLabel:`Updated`})})},$e={command:`triggers`,describe:`Configure how repository changes build and deploy Workers.`,builder:e=>e.command(Pe).command(Le).command(Xe).command(Qe).command(Me).command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var et={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds`,query:[`version_ids`],errors:{401:`UnauthorizedError`}};function tt(e){return e.usage(`$0 builds versions get
54
+ Update commands, cache settings, or branch and path filters for a trigger.`).positional(`trigger-uuid`,{type:`string`,description:`Trigger UUID.`,demandOption:!0}).option(`branch-excludes`,{type:`string`,array:!0,description:`Branch patterns that must not start builds.`}).option(`branch-includes`,{type:`string`,array:!0,description:`Branch patterns that can start builds.`}).option(`build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`trigger-name`,{type:`string`,description:`Human-readable name of the build trigger.`}).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 et={command:`update <trigger-uuid>`,describe:`Update a build trigger`,builder:$e,handler:async e=>c({command:`builds triggers update`,classification:{safeFlags:[`build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds triggers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/triggers/${e[`trigger-uuid`]==null?`<trigger-uuid>`:encodeURIComponent(String(e[`trigger-uuid`]))}`,pathParams:{"trigger-uuid":String(e[`trigger-uuid`]??``)},bodyKind:`json`,body:e.body===void 0?f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(Y,{body:t,account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`});return}let d=f({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:p(e[`build-command`],`build-command`,`text`),build_token_uuid:p(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:p(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:p(e[`root-directory`],`root-directory`,`text`),trigger_name:p(e[`trigger-name`],`trigger-name`,`text`)}),m=await s(`Updating`,async()=>c.send(Y,{body:d,account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(m,{successLabel:`Updated`})})},tt={command:`triggers`,describe:`Configure how repository changes build and deploy Workers.`,builder:e=>e.command(Ie).command(ze).command(Qe).command(et).command(Pe).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds`,query:[`version_ids`],errors:{401:`UnauthorizedError`}};function rt(e){return e.usage(`$0 builds versions get
55
55
 
56
- Retrieve builds associated with one or more Worker version IDs.`).option(`version-ids`,{type:`string`,description:`Comma-separated list of version UUIDs (max 20).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nt={command:`get`,describe:`Get builds by Worker version`,builder:tt,handler:async e=>c({command:`builds versions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={version_ids:e[`version-ids`]};if(e.dryRun){let e=await r();o({command:`cf builds versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/builds`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(et,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},rt={command:`versions`,describe:`Find builds associated with Worker versions.`,builder:e=>e.command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function it(e){return e.usage(`$0 builds workers create
56
+ Retrieve builds associated with one or more Worker version IDs.`).option(`version-ids`,{type:`string`,description:`Comma-separated list of version UUIDs (max 20).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get`,describe:`Get builds by Worker version`,builder:rt,handler:async e=>c({command:`builds versions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={version_ids:e[`version-ids`]};if(e.dryRun){let e=await r();o({command:`cf builds versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/builds`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(nt,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},X={command:`versions`,describe:`Find builds associated with Worker versions.`,builder:e=>e.command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/workers`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function at(e){return e.usage(`$0 builds workers create
57
57
 
58
- Connect a Worker tag to a repository and production build settings.`).option(`git-repository-branch`,{type:`string`,description:`Git branch to watch for builds`}).option(`git-repository-provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`git-repository-provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`git-repository-provider-type`,{type:`string`,description:`The git_repository.provider_type field`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`git-repository-provider-type`,e=>p(e,`git-repository-provider-type`,`text`)).option(`git-repository-repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`git-repository-repo-name`,{type:`string`,description:`Human-readable repository name.`}).option(`git-repository-grant-id`,{type:`string`,description:`Grant ID required for grant-backed providers`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`previews-enabled`,{type:`boolean`,description:`Whether Previews are enabled for this Worker`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`script-tag`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker 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 Worker build configuration.`})}const at={command:`create`,describe:`Create Worker build configuration`,builder:it,handler:async e=>c({command:`builds workers create`,classification:{safeFlags:[`git-repository-provider-type`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:p(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:p(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:p(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:p(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:p(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:p(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(Z,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`git-repository-branch`]===void 0&&(e[`git-repository-branch`]=await m(`git-repository-branch`,`Git branch to watch for builds`)),e[`git-repository-provider-account-id`]===void 0&&(e[`git-repository-provider-account-id`]=await m(`git-repository-provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`git-repository-provider-account-name`]===void 0&&(e[`git-repository-provider-account-name`]=await m(`git-repository-provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`git-repository-provider-type`]===void 0&&(e[`git-repository-provider-type`]=await h(`git-repository-provider-type`,`The git_repository.provider_type field`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`git-repository-repo-id`]===void 0&&(e[`git-repository-repo-id`]=await m(`git-repository-repo-id`,`Provider-specific repository identifier.`)),e[`git-repository-repo-name`]===void 0&&(e[`git-repository-repo-name`]=await m(`git-repository-repo-name`,`Human-readable repository name.`)),e[`previews-base-config-build-command`]===void 0&&(e[`previews-base-config-build-command`]=await m(`previews-base-config-build-command`,`Command to build the Worker.`)),e[`previews-base-config-build-token-uuid`]===void 0&&(e[`previews-base-config-build-token-uuid`]=await m(`previews-base-config-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`previews-base-config-deploy-command`]===void 0&&(e[`previews-base-config-deploy-command`]=await m(`previews-base-config-deploy-command`,`Command to deploy the Worker.`)),e[`previews-enabled`]===void 0)throw Error(`--previews-enabled is required (or pass --body with this field set).`);e[`production-settings-build-command`]===void 0&&(e[`production-settings-build-command`]=await m(`production-settings-build-command`,`Command to build the Worker.`)),e[`production-settings-build-token-uuid`]===void 0&&(e[`production-settings-build-token-uuid`]=await m(`production-settings-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`production-settings-deploy-command`]===void 0&&(e[`production-settings-deploy-command`]=await m(`production-settings-deploy-command`,`Command to deploy the Worker.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await m(`script-tag`,`System-generated tag of the Worker. This is not the Worker name.`));let g=f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:p(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:p(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:p(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:p(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:p(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:p(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]),_=await s(`Creating`,async()=>c.send(Z,{body:g,account_id:l}));a(_,{successLabel:`Created`})})};var Q={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ot(e){return e.usage(`$0 builds workers delete <script-tag>
58
+ Connect a Worker tag to a repository and production build settings.`).option(`git-repository-branch`,{type:`string`,description:`Git branch to watch for builds`}).option(`git-repository-provider-account-id`,{type:`string`,description:`Provider-specific identifier of the account or namespace that owns the repository.`}).option(`git-repository-provider-account-name`,{type:`string`,description:`Human-readable name of the account or namespace that owns the repository.`}).option(`git-repository-provider-type`,{type:`string`,description:`The git_repository.provider_type field`,choices:[`github`,`gitlab`,`gitlab_internal`,`origin`]}).coerce(`git-repository-provider-type`,e=>p(e,`git-repository-provider-type`,`text`)).option(`git-repository-repo-id`,{type:`string`,description:`Provider-specific repository identifier.`}).option(`git-repository-repo-name`,{type:`string`,description:`Human-readable repository name.`}).option(`git-repository-grant-id`,{type:`string`,description:`Grant ID required for grant-backed providers`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`previews-enabled`,{type:`boolean`,description:`Whether Previews are enabled for this Worker`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`,default:!0}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Map of environment-variable names to build-time values. Names must begin with a letter or underscore and contain only letters, numbers, and underscores. Provide as a JSON object or @path/to/file.json.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`,default:`/`}).option(`script-tag`,{type:`string`,description:`System-generated tag of the Worker. This is not the Worker 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 Worker build configuration.`})}const Q=[{path:[`git_repository`],selector:`provider_type`,variants:[{values:[`github`,`gitlab`],schema:{type:`object`,properties:{branch:{type:`string`},provider_account_id:{type:`string`},provider_account_name:{type:`string`},provider_type:{enum:[`github`,`gitlab`]},repo_id:{type:`string`},repo_name:{type:`string`}},required:[`branch`,`provider_account_id`,`provider_account_name`,`provider_type`,`repo_id`,`repo_name`],additionalProperties:!1}},{values:[`gitlab_internal`,`origin`],schema:{type:`object`,properties:{branch:{type:`string`},grant_id:{type:`string`},provider_account_id:{type:`string`},provider_account_name:{type:`string`},provider_type:{enum:[`gitlab_internal`,`origin`]},repo_id:{type:`string`},repo_name:{type:`string`}},required:[`branch`,`grant_id`,`provider_account_id`,`provider_account_name`,`provider_type`,`repo_id`,`repo_name`],additionalProperties:!1}}]}],ot={command:`create`,describe:`Create Worker build configuration`,builder:at,handler:async e=>c({command:`builds workers create`,classification:{safeFlags:[`git-repository-provider-type`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_(f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:p(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:p(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:p(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:p(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:p(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:p(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]),Q):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(Z,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`git-repository-branch`]===void 0&&(e[`git-repository-branch`]=await m(`git-repository-branch`,`Git branch to watch for builds`)),e[`git-repository-provider-account-id`]===void 0&&(e[`git-repository-provider-account-id`]=await m(`git-repository-provider-account-id`,`Provider-specific identifier of the account or namespace that owns the repository.`)),e[`git-repository-provider-account-name`]===void 0&&(e[`git-repository-provider-account-name`]=await m(`git-repository-provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`git-repository-provider-type`]===void 0&&(e[`git-repository-provider-type`]=await h(`git-repository-provider-type`,`The git_repository.provider_type field`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`git-repository-repo-id`]===void 0&&(e[`git-repository-repo-id`]=await m(`git-repository-repo-id`,`Provider-specific repository identifier.`)),e[`git-repository-repo-name`]===void 0&&(e[`git-repository-repo-name`]=await m(`git-repository-repo-name`,`Human-readable repository name.`)),e[`previews-base-config-build-command`]===void 0&&(e[`previews-base-config-build-command`]=await m(`previews-base-config-build-command`,`Command to build the Worker.`)),e[`previews-base-config-build-token-uuid`]===void 0&&(e[`previews-base-config-build-token-uuid`]=await m(`previews-base-config-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`previews-base-config-deploy-command`]===void 0&&(e[`previews-base-config-deploy-command`]=await m(`previews-base-config-deploy-command`,`Command to deploy the Worker.`)),e[`previews-enabled`]===void 0)throw Error(`--previews-enabled is required (or pass --body with this field set).`);e[`production-settings-build-command`]===void 0&&(e[`production-settings-build-command`]=await m(`production-settings-build-command`,`Command to build the Worker.`)),e[`production-settings-build-token-uuid`]===void 0&&(e[`production-settings-build-token-uuid`]=await m(`production-settings-build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`production-settings-deploy-command`]===void 0&&(e[`production-settings-deploy-command`]=await m(`production-settings-deploy-command`,`Command to deploy the Worker.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await m(`script-tag`,`System-generated tag of the Worker. This is not the Worker name.`));let g=f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:p(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:p(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:p(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:p(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:p(e[`git-repository-grant-id`],`git-repository-grant-id`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:p(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]);_(g,Q);let v=await s(`Creating`,async()=>c.send(Z,{body:g,account_id:l}));a(v,{successLabel:`Created`})})};var st={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ct(e){return e.usage(`$0 builds workers delete <script-tag>
59
59
 
60
- Delete build settings and triggers for a Worker tag and cancel unfinished builds. The Worker is not deleted.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,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 st={command:`delete <script-tag>`,describe:`Delete Worker build configuration`,builder:ot,handler:async e=>c({command:`builds workers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation deletes the Worker build configuration and its triggers, and cancels unfinished builds. The Worker is not deleted.`}))return;let u=await s(`Deleting`,async()=>c.send(Q,{account_id:l,script_tag:e[`script-tag`]}));a(u,{successLabel:`Deleted`})})};var ct={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function lt(e){return e.usage(`$0 builds workers get <script-tag>
60
+ Delete build settings and triggers for a Worker tag and cancel unfinished builds. The Worker is not deleted.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,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 lt={command:`delete <script-tag>`,describe:`Delete Worker build configuration`,builder:ct,handler:async e=>c({command:`builds workers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await g({force:!!e.force,message:`This operation deletes the Worker build configuration and its triggers, and cancels unfinished builds. The Worker is not deleted.`}))return;let u=await s(`Deleting`,async()=>c.send(st,{account_id:l,script_tag:e[`script-tag`]}));a(u,{successLabel:`Deleted`})})};var ut={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function dt(e){return e.usage(`$0 builds workers get <script-tag>
61
61
 
62
- Retrieve the repository and production build settings associated with a Worker tag.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ut={command:`get <script-tag>`,describe:`Get Worker build configuration`,builder:lt,handler:async e=>c({command:`builds workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ct,{account_id:l,script_tag:e[`script-tag`]}));a(u,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,query:[`patch_existing_previews`],body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function dt(e){return e.usage(`$0 builds workers update <script-tag>
62
+ Retrieve the repository and production build settings associated with a Worker tag.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ft={command:`get <script-tag>`,describe:`Get Worker build configuration`,builder:dt,handler:async e=>c({command:`builds workers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds workers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ut,{account_id:l,script_tag:e[`script-tag`]}));a(u,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,query:[`patch_existing_previews`],body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`}};function pt(e){return e.usage(`$0 builds workers update <script-tag>
63
63
 
64
- Update the build configuration for a Worker script. Supports partial updates to git repository settings, production build settings, and Preview settings.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`patch-existing-previews`,{type:`string`,description:`Apply a previews_base_config patch to every existing Preview of the Worker as well as to the base config.`,choices:[`true`,`false`]}).option(`git-repository-branch`,{type:`string`,description:`New git branch to watch for builds`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`previews-enabled`,{type:`boolean`,description:`Enable or disable Previews for this Worker. Enabling requires previews_base_config to already exist or to be sent in the same request.`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Worker build configuration. At least one field must be provided.`})}const ft={command:`update <script-tag>`,describe:`Update Worker build configuration`,builder:dt,handler:async e=>c({command:`builds workers update`,classification:{safeFlags:[`patch-existing-previews`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{let c={patch_existing_previews:e[`patch-existing-previews`]};if(e.dryRun){let t=await r();o({command:`cf builds workers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},query:c,bodyKind:`json`,body:e.body===void 0?f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]):u(e.body)});return}let l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=u(e.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Updating`,async()=>l.send($,{body:t,account_id:m,script_tag:e[`script-tag`],...c}));a(n,{successLabel:`Updated`});return}let h=f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await s(`Updating`,async()=>l.send($,{body:h,account_id:m,script_tag:e[`script-tag`],...c}));a(g,{successLabel:`Updated`})})},pt={command:`workers`,describe:`Manage repository-backed build configuration for Workers.`,builder:e=>e.command(at).command(st).command(ut).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},mt={command:`builds`,describe:`Build and deploy Workers from connected repositories, then inspect build status and logs.`,builder:e=>e.command(ee).command(ne).command(I).command(U).command(N).command(B).command(ce).command(ye).command(Oe).command($e).command(rt).command(pt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{mt as default};
64
+ Update the build configuration for a Worker script. Supports partial updates to git repository settings, production build settings, and Preview settings.`).positional(`script-tag`,{type:`string`,description:`The Worker script tag (external script ID)`,demandOption:!0}).option(`patch-existing-previews`,{type:`string`,description:`Apply a previews_base_config patch to every existing Preview of the Worker as well as to the base config.`,choices:[`true`,`false`]}).option(`git-repository-branch`,{type:`string`,description:`New git branch to watch for builds`}).option(`previews-base-config-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`previews-base-config-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`previews-base-config-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`previews-base-config-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`previews-base-config-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`previews-base-config-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`previews-base-config-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`previews-base-config-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`previews-enabled`,{type:`boolean`,description:`Enable or disable Previews for this Worker. Enabling requires previews_base_config to already exist or to be sent in the same request.`}).option(`production-settings-build-caching-enabled`,{type:`boolean`,description:`Whether builds reuse cached dependencies and build artifacts.`}).option(`production-settings-build-command`,{type:`string`,description:`Command to build the Worker.`}).option(`production-settings-build-token-uuid`,{type:`string`,description:`UUID of the build token used when deploying the Worker.`}).option(`production-settings-deploy-command`,{type:`string`,description:`Command to deploy the Worker.`}).option(`production-settings-environment-variables`,{type:`string`,description:`Environment variable updates. Set the variable entry to null to delete it. Provide as a JSON object or @path/to/file.json.`}).option(`production-settings-path-excludes`,{type:`string`,array:!0,description:`Path patterns that must not start builds.`}).option(`production-settings-path-includes`,{type:`string`,array:!0,description:`Path patterns that can start builds.`}).option(`production-settings-root-directory`,{type:`string`,description:`Repository directory in which build and deploy commands run.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for updating a Worker build configuration. At least one field must be provided.`})}const mt={command:`update <script-tag>`,describe:`Update Worker build configuration`,builder:pt,handler:async e=>c({command:`builds workers update`,classification:{safeFlags:[`patch-existing-previews`,`previews-base-config-build-caching-enabled`,`previews-enabled`,`production-settings-build-caching-enabled`,`dry-run`]}},e,async()=>{let c={patch_existing_previews:e[`patch-existing-previews`]};if(e.dryRun){let t=await r();o({command:`cf builds workers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/builds/workers/${e[`script-tag`]==null?`<script-tag>`:encodeURIComponent(String(e[`script-tag`]))}`,pathParams:{"script-tag":String(e[`script-tag`]??``)},query:c,bodyKind:`json`,body:e.body===void 0?f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]):u(e.body)});return}let l=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=u(e.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Updating`,async()=>l.send($,{body:t,account_id:m,script_tag:e[`script-tag`],...c}));a(n,{successLabel:`Updated`});return}let h=f({git_repository:{branch:p(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:p(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:p(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:p(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:d(e[`previews-base-config-environment-variables`],`previews-base-config-environment-variables`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:p(e[`previews-base-config-root-directory`],`previews-base-config-root-directory`,`text`)},previews_enabled:e[`previews-enabled`],production_settings:{build_caching_enabled:e[`production-settings-build-caching-enabled`],build_command:p(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:p(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:p(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:d(e[`production-settings-environment-variables`],`production-settings-environment-variables`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:p(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let g=await s(`Updating`,async()=>l.send($,{body:h,account_id:m,script_tag:e[`script-tag`],...c}));a(g,{successLabel:`Updated`})})},ht={command:`workers`,describe:`Manage repository-backed build configuration for Workers.`,builder:e=>e.command(ot).command(lt).command(ft).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},gt={command:`builds`,describe:`Build and deploy Workers from connected repositories, then inspect build status and logs.`,builder:e=>e.command(ee).command(ne).command(I).command(U).command(N).command(B).command(ue).command(xe).command(Ae).command(tt).command(X).command(ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{gt 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{i as t,n}from"./auth-D5Yj9eYU.mjs";import{i as r}from"./context-BvLXzoMs.mjs";import{t as i}from"./output-BJEgbI0G.mjs";import{t as a}from"./dry-run-gy0Hl9xo.mjs";import{t as o}from"./progress-B-CVX0kn.mjs";import{t as s}from"./run-BZ6Fj3jQ.mjs";import"./telemetry-BZdRnr26.mjs";import{n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-DJF_Rs5S.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/invalidate_cache`,body:`json`};function h(e){return e.usage("$0 cache invalidate-environment <environment-id>\n\nMarks cached content as stale for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/invalidate_cache`: the next request for invalidated content makes Cloudflare revalidate it with your origin, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To delete the content instead, use `POST /zones/{zone_id}/environments/{environment_id}/purge_cache`. Invalidating by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:h,handler:async e=>s({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation marks the selected content in the environment's cache as stale.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(m,{body:t,zone_id:l,environment_id:e[`environment-id`]}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`));i(u,{successLabel:`Deleted`})})};var ee={method:`POST`,path:t=>e`/zones/${t.zone_id}/invalidate_cache`,body:`json`};function te(e){return e.usage("$0 cache invalidate\n\nMarks cached content as stale in every Cloudflare data center and cache tier, including Cache Reserve. The content stays in cache. The next request for it makes Cloudflare revalidate it with your origin, using the `ETag` and `Last-Modified` values it was cached with: - If your origin answers `304 Not Modified`, Cloudflare serves the cached copy without downloading it again, and `CF-Cache-Status` is `REVALIDATED`. - If your origin sends a full response, Cloudflare serves and caches the new content, and `CF-Cache-Status` is `EXPIRED`. With Tiered Cache, each tier revalidates with the tier above it, so a visitor can see `EXPIRED` even when your origin answered `304`. Until content is revalidated, your `stale-while-revalidate` and `stale-if-error` directives still apply, counted from the time you invalidated it. For example, if your origin fails during revalidation, Cloudflare can keep serving the stale copy for the `stale-if-error` window. ### Invalidate or purge? - **Invalidate** when content may not have changed, for example after a deploy. Unchanged content costs your origin a `304` instead of a full response. That saving needs an origin that sends `ETag` or `Last-Modified` and answers conditional requests. Otherwise, every revalidation downloads the full response. - **Purge**, with `POST /zones/{zone_id}/purge_cache`, when content must not be served again, for example content you removed for legal or security reasons. Invalidating takes the same request bodies as purging, needs the same permission, and counts against the same rate limits. After a broad invalidation, such as `purge_everything`, expect more conditional requests to your origin while visitors request the invalidated content again. ### Choose what to invalidate Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. To check, request an invalidated URL and confirm that the `CF-Cache-Status` response header is `REVALIDATED` or `EXPIRED`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").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 ne={command:`invalidate`,describe:`Invalidate Cached Content`,builder:te,handler:async e=>s({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation marks the selected content in the zone's cache as stale.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(ee,{body:t,zone_id:l}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/invalidate_cache`));i(u,{successLabel:`Deleted`})})};function re(e){return e.usage("$0 cache origin-cloud-regions bulk delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").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 ie={command:`delete`,describe:`Batch delete origin cloud region mappings`,builder:re,handler:async e=>s({command:`cache origin-cloud-regions bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),await p({force:!!e.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})){if(e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>100){let r=Math.ceil(n.length/100),a=null;for(let i=0;i<n.length;i+=100){let c=n.slice(i,i+100),l=Math.floor(i/100)+1;a=await o(`Deleting: batch ${l}/${r}`,async()=>t(s,`DELETE`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:c}))}i(a,{successLabel:`Deleted`});return}let r=await o(`Deleting`,async()=>t(s,`DELETE`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:n}));i(r,{successLabel:`Deleted`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}})};function ae(e){return e.usage("$0 cache origin-cloud-regions bulk update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").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:`update`,describe:`Batch create or replace origin cloud region mappings`,builder:ae,handler:async e=>s({command:`cache origin-cloud-regions bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>100){let r=Math.ceil(n.length/100),a=null;for(let i=0;i<n.length;i+=100){let c=n.slice(i,i+100),l=Math.floor(i/100)+1;a=await o(`Updating: batch ${l}/${r}`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:c}))}i(a,{successLabel:`Updated`});return}let r=await o(`Updating`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:n}));i(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},v={command:`bulk`,describe:`Operations for origin-cloud-regions.bulk`,builder:e=>e.command(ie).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function b(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-FK2eLQ02.mjs";import{i as r}from"./context-Dp4CXG22.mjs";import{t as i}from"./output-BJEgbI0G.mjs";import{t as a}from"./dry-run-gy0Hl9xo.mjs";import{t as o}from"./progress-DLri-rA7.mjs";import{t as s}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-D0dXwuME.mjs";var m={method:`POST`,path:t=>e`/zones/${t.zone_id}/environments/${t.environment_id}/invalidate_cache`,body:`json`};function h(e){return e.usage("$0 cache invalidate-environment <environment-id>\n\nMarks cached content as stale for one environment of the zone. Content cached for the zone's other environments, including production, is not affected. Otherwise this works like `POST /zones/{zone_id}/invalidate_cache`: the next request for invalidated content makes Cloudflare revalidate it with your origin, and the request body takes the same fields. Environments are part of [Version Management](https://developers.cloudflare.com/version-management/). To delete the content instead, use `POST /zones/{zone_id}/environments/{environment_id}/purge_cache`. Invalidating by URL (`files`) does not work for environments that select requests by IP address, country, ASN, or threat score, and fails with error `1136`. Use `tags`, `hosts`, `prefixes`, or `purge_everything` for those environments. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").positional(`environment-id`,{type:`string`,description:`The environment ID, from Version Management.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`invalidate-environment <environment-id>`,describe:`Invalidate Cached Content by Environment`,builder:h,handler:async e=>s({command:`cache invalidate-environment`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate-environment`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/environments/${e[`environment-id`]==null?`<environment-id>`:encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"environment-id":String(e[`environment-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation marks the selected content in the environment's cache as stale.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(m,{body:t,zone_id:l,environment_id:e[`environment-id`]}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/environments/${encodeURIComponent(String(e[`environment-id`]))}/invalidate_cache`));i(u,{successLabel:`Deleted`})})};var ee={method:`POST`,path:t=>e`/zones/${t.zone_id}/invalidate_cache`,body:`json`};function te(e){return e.usage("$0 cache invalidate\n\nMarks cached content as stale in every Cloudflare data center and cache tier, including Cache Reserve. The content stays in cache. The next request for it makes Cloudflare revalidate it with your origin, using the `ETag` and `Last-Modified` values it was cached with: - If your origin answers `304 Not Modified`, Cloudflare serves the cached copy without downloading it again, and `CF-Cache-Status` is `REVALIDATED`. - If your origin sends a full response, Cloudflare serves and caches the new content, and `CF-Cache-Status` is `EXPIRED`. With Tiered Cache, each tier revalidates with the tier above it, so a visitor can see `EXPIRED` even when your origin answered `304`. Until content is revalidated, your `stale-while-revalidate` and `stale-if-error` directives still apply, counted from the time you invalidated it. For example, if your origin fails during revalidation, Cloudflare can keep serving the stale copy for the `stale-if-error` window. ### Invalidate or purge? - **Invalidate** when content may not have changed, for example after a deploy. Unchanged content costs your origin a `304` instead of a full response. That saving needs an origin that sends `ETag` or `Last-Modified` and answers conditional requests. Otherwise, every revalidation downloads the full response. - **Purge**, with `POST /zones/{zone_id}/purge_cache`, when content must not be served again, for example content you removed for legal or security reasons. Invalidating takes the same request bodies as purging, needs the same permission, and counts against the same rate limits. After a broad invalidation, such as `purge_everything`, expect more conditional requests to your origin while visitors request the invalidated content again. ### Choose what to invalidate Send one of these fields in the request body: - `files`: specific URLs. If your cache key includes request headers, send each URL with the header values it was cached with. - `tags`: all content whose `Cache-Tag` response header contains one of the tags. - `hosts`: all content cached for the hostnames. - `prefixes`: all content whose URL starts with one of the prefixes. - `purge_everything`: all cached content in the zone. ### Check the result A `200` response with `success: true` means Cloudflare accepted the request. To check, request an invalidated URL and confirm that the `CF-Cache-Status` response header is `REVALIDATED` or `EXPIRED`. ### Availability and limits Rate limits and the number of items you can send in one request depend on your plan. See [Purge cache: availability and limits](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).").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 ne={command:`invalidate`,describe:`Invalidate Cached Content`,builder:te,handler:async e=>s({command:`cache invalidate`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache invalidate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/invalidate_cache`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e),l=await r({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=l,!await p({force:!!e.force,message:`This operation marks the selected content in the zone's cache as stale.`}))return;if(e.body){let t=c(e.body),n=await o(`Deleting`,async()=>s.send(ee,{body:t,zone_id:l}));i(n,{successLabel:`Deleted`});return}let u=await o(`Deleting`,async()=>t(s,`POST`,`/zones/${e.zoneId}/invalidate_cache`));i(u,{successLabel:`Deleted`})})};function re(e){return e.usage("$0 cache origin-cloud-regions bulk delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").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 ie={command:`delete`,describe:`Batch delete origin cloud region mappings`,builder:re,handler:async e=>s({command:`cache origin-cloud-regions bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),await p({force:!!e.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})){if(e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>100){let r=Math.ceil(n.length/100),a=null;for(let i=0;i<n.length;i+=100){let c=n.slice(i,i+100),l=Math.floor(i/100)+1;a=await o(`Deleting: batch ${l}/${r}`,async()=>t(s,`DELETE`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:c}))}i(a,{successLabel:`Deleted`});return}let r=await o(`Deleting`,async()=>t(s,`DELETE`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:n}));i(r,{successLabel:`Deleted`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}})};function ae(e){return e.usage("$0 cache origin-cloud-regions bulk update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").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:`update`,describe:`Batch create or replace origin cloud region mappings`,builder:ae,handler:async e=>s({command:`cache origin-cloud-regions bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let s=await n(e);if(e.zoneId=await r({zone:e.zone},s,{quiet:e.quiet}),e.body){let n=c(e.body);if(Array.isArray(n)&&n.length>100){let r=Math.ceil(n.length/100),a=null;for(let i=0;i<n.length;i+=100){let c=n.slice(i,i+100),l=Math.floor(i/100)+1;a=await o(`Updating: batch ${l}/${r}`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:c}))}i(a,{successLabel:`Updated`});return}let r=await o(`Updating`,async()=>t(s,`PUT`,`/zones/${e.zoneId}/origin/cloud_regions/batch`,{body:n}));i(r,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},v={command:`bulk`,describe:`Operations for origin-cloud-regions.bulk`,builder:e=>e.command(ie).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function b(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
3
3
 
4
4
  Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted IP on success. Returns 404 if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address whose mapping should be deleted.`,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 <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:b,handler:async e=>s({command:`cache origin-cloud-regions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){a({command:`cf cache origin-cloud-regions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/origin/cloud_regions/${e[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(e[`origin-ip`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"origin-ip":String(e[`origin-ip`]??``)},bodyKind:`none`});return}let t=await n(e),s=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=s,!await p({force:!!e.force,message:`Are you sure you want to delete this Origin Cloud Region configuration?`}))return;let c=await o(`Deleting`,async()=>t.send(y,{zone_id:s,origin_ip:e[`origin-ip`]}));i(c,{successLabel:`Deleted`})})};var S={method:`GET`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function C(e){return e.usage(`$0 cache origin-cloud-regions get <origin-ip>
5
5