cf 1.0.0-beta.17 → 1.0.0-beta.18

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 (226) hide show
  1. package/dist/_meta/commands.json +6117 -4540
  2. package/dist/_meta/schemas.json +5016 -3257
  3. package/dist/{abuse-reports-C4LxDvUM.mjs → abuse-reports-Ce-g5uZP.mjs} +6 -6
  4. package/dist/{access-DnWW2AAT.mjs → access-BtsMwesh.mjs} +1 -1
  5. package/dist/{accounts-8UcHNm3S.mjs → accounts-X5QVzEUW.mjs} +27 -21
  6. package/dist/{acm-qRM3iy4Z.mjs → acm-C_NepMi6.mjs} +1 -1
  7. package/dist/{addressing-CAb8z2Dq.mjs → addressing-BkQY1hoA.mjs} +18 -18
  8. package/dist/{agent-memory-oIUP4ZV5.mjs → agent-memory-1OPgC3lK.mjs} +6 -6
  9. package/dist/{ai-DnhytGdc.mjs → ai-Bb0_Zknm.mjs} +1 -1
  10. package/dist/{ai-audit-B7_5EOcN.mjs → ai-audit-DuEjVdML.mjs} +1 -1
  11. package/dist/{ai-gateway-b3FFu6UV.mjs → ai-gateway-Cm2vWMSI.mjs} +42 -42
  12. package/dist/ai-search-DDRpxyOM.mjs +79 -0
  13. package/dist/{ai-security-KUs94UW-.mjs → ai-security-A2STvE1b.mjs} +5 -5
  14. package/dist/{alerting-CCmyEPzN.mjs → alerting-CIwSk-Ks.mjs} +1 -1
  15. package/dist/{analytics-BAvBj6qx.mjs → analytics-H--uM3DA.mjs} +7 -7
  16. package/dist/{analytics-engine-DAJp89gM.mjs → analytics-engine-Alu7cllT.mjs} +1 -1
  17. package/dist/{api-security-BItVQymb.mjs → api-security-D-pcnhUL.mjs} +26 -26
  18. package/dist/{argo-DsJCvfml.mjs → argo-Lvmcx3am.mjs} +1 -1
  19. package/dist/{artifacts-DzHXeah6.mjs → artifacts-xT5S-mVa.mjs} +1 -1
  20. package/dist/{audit-logs-D9XxsVZm.mjs → audit-logs-DEoRBLkU.mjs} +1 -1
  21. package/dist/{auth-C530fHKQ.mjs → auth-B73lQS2h.mjs} +1 -1
  22. package/dist/auth-DMzEmOhG.mjs +2 -0
  23. package/dist/{auth-MNz2D-PD.mjs → auth-Db1KT0vm.mjs} +1 -1
  24. package/dist/{auth-token-Cw4c0y89.mjs → auth-token-D9XIPlwf.mjs} +1 -1
  25. package/dist/{basin-catalog-DcMiZV9J.mjs → basin-catalog-DFHt3cWi.mjs} +1 -1
  26. package/dist/{billing-COgAWTYh.mjs → billing-Bm2JNSGa.mjs} +6 -6
  27. package/dist/body-parser-DnBfDdx3.mjs +2 -0
  28. package/dist/{bot-management-Dx3lh9Fi.mjs → bot-management-CSr38g-O.mjs} +4 -4
  29. package/dist/{botnet-feed-C8496Nhl.mjs → botnet-feed-ebeWWSJj.mjs} +1 -1
  30. package/dist/{brand-protection-B0p8Sv6s.mjs → brand-protection-BCn9Mv-d.mjs} +5 -5
  31. package/dist/browser-run-BcWxzhAn.mjs +42 -0
  32. package/dist/{builds-DmEFTQTa.mjs → builds-BMwDzi7G.mjs} +39 -39
  33. package/dist/{cache-BUh85NRr.mjs → cache-_VaTLC5T.mjs} +1 -1
  34. package/dist/{cli-DJhpXf38.mjs → cli-P3q5DG3W.mjs} +1 -1
  35. package/dist/{client-side-security-km3-4L_4.mjs → client-side-security-CjSXrpa9.mjs} +1 -1
  36. package/dist/{cloud-connector-BoKFprDD.mjs → cloud-connector-BPJBeP06.mjs} +1 -1
  37. package/dist/{cloudforce-one-DN5N3C3w.mjs → cloudforce-one-DXX31GMi.mjs} +189 -189
  38. package/dist/{command-B694oLDo.mjs → command-BXiA79DP.mjs} +1 -1
  39. package/dist/{command-rx0Kb5pn.mjs → command-BbsPxJBT.mjs} +1 -1
  40. package/dist/{command-RC9WM5jq.mjs → command-Bkc04OyY.mjs} +1 -1
  41. package/dist/{command-Bmee6uwe.mjs → command-BtTc28ql.mjs} +1 -1
  42. package/dist/{command-CAs3SxlI.mjs → command-CBZhxmKD.mjs} +1 -1
  43. package/dist/{command-CCq-Z2Ua.mjs → command-CL7LLXM7.mjs} +1 -1
  44. package/dist/{command-DerHAjQL.mjs → command-CYyfigfC.mjs} +1 -1
  45. package/dist/{command-D1JR8Fb7.mjs → command-CxWLFv5Y.mjs} +1 -1
  46. package/dist/{command-CiApsRql.mjs → command-DDcBC4px.mjs} +1 -1
  47. package/dist/{command-CbQFbfps.mjs → command-NoxvOARP.mjs} +1 -1
  48. package/dist/{completions-11latun5.mjs → completions-CrDmwKnK.mjs} +1 -1
  49. package/dist/{connector-interrupts-wvQcZsO1.mjs → connector-interrupts-V4HGULCM.mjs} +1 -1
  50. package/dist/{connector-telemetry-events-C0GGCIQk.mjs → connector-telemetry-events-D9mTcfbJ.mjs} +1 -1
  51. package/dist/{connector-telemetry-snapshots-ZXzsFgea.mjs → connector-telemetry-snapshots-COrPVKol.mjs} +1 -1
  52. package/dist/{connectors-DXIUG4Zi.mjs → connectors-DvVlxGDx.mjs} +1 -1
  53. package/dist/{containers-DCH6MFjY.mjs → containers-Bt2zFsFd.mjs} +8 -8
  54. package/dist/{containers-WMWKhLkp.mjs → containers-BtcOgwm5.mjs} +2 -2
  55. package/dist/{content-scan-CRDmR7rD.mjs → content-scan-DldLmTjy.mjs} +1 -1
  56. package/dist/{context-q-6bMSL-.mjs → context-C_a8oSY9.mjs} +1 -1
  57. package/dist/cps-REo1OWP1.mjs +6 -0
  58. package/dist/csam-scanner-CIbbdoJK.mjs +10 -0
  59. package/dist/{custom-csrs-BV017SqE.mjs → custom-csrs-iGNc3rSZ.mjs} +1 -1
  60. package/dist/{custom-hostnames-DI_dFaof.mjs → custom-hostnames-BNxYbTyu.mjs} +15 -15
  61. package/dist/{custom-nameservers-BLoE8VGG.mjs → custom-nameservers-BMJoTSlQ.mjs} +1 -1
  62. package/dist/custom-pages-Qdemt1Fm.mjs +21 -0
  63. package/dist/{d1-Dbs8HItA.mjs → d1-DvCiQibO.mjs} +8 -8
  64. package/dist/{deploy-5utIiOMN.mjs → deploy-K664XPOb.mjs} +1 -1
  65. package/dist/{deploy-context-C0iVbWRG.mjs → deploy-context-ClNVJYlR.mjs} +13 -13
  66. package/dist/{diagnostics-C9B07eJY.mjs → diagnostics-Cw0mtcep.mjs} +2 -2
  67. package/dist/{dls-lbM3i4x-.mjs → dls-DoqfqutH.mjs} +1 -1
  68. package/dist/{dns-QTMPGYMa.mjs → dns-DC6WcO3m.mjs} +21 -21
  69. package/dist/{dns-firewall-Bfv0S44I.mjs → dns-firewall-DpQH9BCE.mjs} +9 -9
  70. package/dist/{docs-bV3hPwQL.mjs → docs-CqNRBHab.mjs} +1 -1
  71. package/dist/{durable-objects-0JvGTV27.mjs → durable-objects-CJDDy3CC.mjs} +1 -1
  72. package/dist/{email-auth-PzRqG0ex.mjs → email-auth--NHg1TjG.mjs} +1 -1
  73. package/dist/{email-routing-BgHL0Rbz.mjs → email-routing-COjENK55.mjs} +13 -13
  74. package/dist/{email-security-CSTKIecn.mjs → email-security-rdjH95T2.mjs} +38 -38
  75. package/dist/{email-sending-BSwuAir8.mjs → email-sending-26VJhR6Q.mjs} +18 -18
  76. package/dist/{field-extractors-B_lFnwaL.mjs → field-extractors-DBOvGOwz.mjs} +2 -2
  77. package/dist/{firewall-BsZxVitA.mjs → firewall-D8K93ffF.mjs} +20 -20
  78. package/dist/{flagship-qBohOZaM.mjs → flagship-CHdmCmvQ.mjs} +11 -11
  79. package/dist/{fraud-vGNdrSm-.mjs → fraud-CY4TV5Vc.mjs} +1 -1
  80. package/dist/{google-tag-gateway-BHdOg4VW.mjs → google-tag-gateway-DzSt4wlz.mjs} +1 -1
  81. package/dist/healthchecks-B52Mf3uL.mjs +22 -0
  82. package/dist/{hostnames-CLlaMqHu.mjs → hostnames-BMITIM8P.mjs} +1 -1
  83. package/dist/{hyperdrive-CXTqaIqk.mjs → hyperdrive-CHsW0r6Z.mjs} +1 -1
  84. package/dist/{iam-Dl_n_Lqq.mjs → iam-o1n9eUXf.mjs} +9 -9
  85. package/dist/{images-vMtXk2Rf.mjs → images-CJHAGxX6.mjs} +37 -37
  86. package/dist/index.mjs +1 -1
  87. package/dist/{init-_7djeBVw.mjs → init-CqQDL6i3.mjs} +1 -1
  88. package/dist/{intel-Bq4GGXv-.mjs → intel-B3S1gxUg.mjs} +1 -1
  89. package/dist/{ips-BcvZS46g.mjs → ips-q_UJMiy8.mjs} +1 -1
  90. package/dist/{k2-DL4hrVTj.mjs → k2-BNqVZnDN.mjs} +2 -2
  91. package/dist/{kv-BLo9wMgb.mjs → kv-B0nXSOcW.mjs} +1 -1
  92. package/dist/{lazy-command-CRcT6Dx-.mjs → lazy-command-4ccdBqrc.mjs} +1 -1
  93. package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-BXwIjlTs.mjs} +1 -1
  94. package/dist/load-balancers-DJtMztJ0.mjs +76 -0
  95. package/dist/{login-Du_W6b9o.mjs → login-D-1FiBNv.mjs} +1 -1
  96. package/dist/{login-DT6Q1UJw.mjs → login-chQP8825.mjs} +1 -1
  97. package/dist/{logo-matches-C-1J0Oc3.mjs → logo-matches-qVYq8tWL.mjs} +1 -1
  98. package/dist/{logos-BuhvSu_H.mjs → logos-tnIahhcu.mjs} +1 -1
  99. package/dist/{logpush-DgZtF9vG.mjs → logpush-D4s3pJRw.mjs} +24 -24
  100. package/dist/{logs-CaKOk-1v.mjs → logs-cw7UL5V2.mjs} +3 -3
  101. package/dist/{magic-cloud-networking-CKxXYT8r.mjs → magic-cloud-networking-CLEHztNY.mjs} +1 -1
  102. package/dist/{magic-network-monitoring-BykFGQCz.mjs → magic-network-monitoring-DRwygeVq.mjs} +9 -9
  103. package/dist/{magic-transit-DYULsrUP.mjs → magic-transit-BFopRdPs.mjs} +170 -170
  104. package/dist/{managed-defense-DIb_uN25.mjs → managed-defense-D5kpmq0T.mjs} +9 -9
  105. package/dist/{managed-transforms-an3wQ0DW.mjs → managed-transforms-CT4jjnzJ.mjs} +2 -2
  106. package/dist/{matches-DkLSWb5X.mjs → matches-ClJ_24EY.mjs} +1 -1
  107. package/dist/{mcp-BcV1XqE8.mjs → mcp-50os3IRG.mjs} +10 -10
  108. package/dist/{mesh-CSSlZ-0F.mjs → mesh-jxtQP8sS.mjs} +2 -2
  109. package/dist/{monetization-B-nJ0SyI.mjs → monetization-D6cCDi-h.mjs} +4 -4
  110. package/dist/{network-ZzxQ_Dcz.mjs → network-dnWHB2uY.mjs} +27 -25
  111. package/dist/{network-interconnects-CI9NXQpe.mjs → network-interconnects-Cf8qSVdt.mjs} +1 -1
  112. package/dist/{o11y-LG6Y9LUZ.mjs → o11y-oMSg1pG4.mjs} +49 -49
  113. package/dist/{oauth-CP82E1_0.mjs → oauth-BfBdHhPS.mjs} +1 -1
  114. package/dist/{oauth-Bx693Af5.mjs → oauth-DDOiiH7h.mjs} +1 -1
  115. package/dist/{oauth-clients-BA30rTEl.mjs → oauth-clients-XDmoe-b4.mjs} +1 -1
  116. package/dist/{oauth-scopes-hseWES1v.mjs → oauth-scopes-D9VYGuTs.mjs} +1 -1
  117. package/dist/organization-94lHeeOs.mjs +75 -0
  118. package/dist/{organizations-CcgZPmFl.mjs → organizations-BJf3UTFi.mjs} +1 -1
  119. package/dist/{origin-post-quantum-encryption-BhdlaolV.mjs → origin-post-quantum-encryption-DMytVSUZ.mjs} +1 -1
  120. package/dist/{page-rules-DFfqfllI.mjs → page-rules-BUI-50oz.mjs} +4 -4
  121. package/dist/pages-CcdpCzHs.mjs +54 -0
  122. package/dist/pay-per-crawl-B1uHZn9j.mjs +38 -0
  123. package/dist/{pay-per-use-C_HxhpM4.mjs → pay-per-use-t066I5wm.mjs} +7 -7
  124. package/dist/{pipelines-DUMIVwof.mjs → pipelines-Co6S044l.mjs} +8 -8
  125. package/dist/precursor-BftyvS86.mjs +4 -0
  126. package/dist/previews-BLhnhElx.mjs +7 -0
  127. package/dist/{progress-DaQ4MzBI.mjs → progress-Q5w9PNTT.mjs} +1 -1
  128. package/dist/{prompt-KWYZvJWM.mjs → prompt-C0hKSr-R.mjs} +1 -1
  129. package/dist/{queries-DoyhspQf.mjs → queries-4MubO6Sz.mjs} +3 -3
  130. package/dist/{queues-BPxTU2rU.mjs → queues-CteS5M92.mjs} +17 -17
  131. package/dist/{r2-CQt4S7o7.mjs → r2-2QpT_Gso.mjs} +24 -24
  132. package/dist/{radar-CALpR1vq.mjs → radar-ODKaK4FJ.mjs} +1 -1
  133. package/dist/{raw-fetch-Cy09TjHc.mjs → raw-fetch-CEOuoKl9.mjs} +1 -1
  134. package/dist/{realtime-BiHKBoI4.mjs → realtime-DkfU8uEX.mjs} +84 -84
  135. package/dist/registrar-DM6JTVPS.mjs +43 -0
  136. package/dist/{registrar-sandbox-BttFwYqE.mjs → registrar-sandbox-BPNGf65G.mjs} +11 -9
  137. package/dist/{reporting-8aRJD5HX.mjs → reporting-5yFNXbJg.mjs} +1 -1
  138. package/dist/{request-headers-CqfJOkpO.mjs → request-headers-DXvswze2.mjs} +1 -1
  139. package/dist/request-tracers-BarLZY95.mjs +4 -0
  140. package/dist/{resource-sharing-uVVpMW0w.mjs → resource-sharing-BVEwBPs8.mjs} +19 -19
  141. package/dist/{rules-CFOuN3t2.mjs → rules-_C31X4Jz.mjs} +6 -6
  142. package/dist/{rulesets-DkhV2Hny.mjs → rulesets-8RwxoFhG.mjs} +6 -6
  143. package/dist/{rum-BnMW0Tlb.mjs → rum-CAUcpXpM.mjs} +6 -6
  144. package/dist/{run-Clc3P2u7.mjs → run-DtFLvOHB.mjs} +1 -1
  145. package/dist/run-LcOb9rhI.mjs +2 -0
  146. package/dist/{schema-flags-b096XMpt.mjs → schema-flags-DibfxEF6.mjs} +1 -1
  147. package/dist/{scim-tvZm6A-r.mjs → scim-DX5XrQ4w.mjs} +1 -1
  148. package/dist/{secrets-store-DuNxSh1_.mjs → secrets-store-DSqqrr25.mjs} +1 -1
  149. package/dist/{security-insights-C17c9ZYZ.mjs → security-insights-FSktO04S.mjs} +1 -1
  150. package/dist/{security-txt-D4pRk7-w.mjs → security-txt-D2g3lQdg.mjs} +1 -1
  151. package/dist/{shared-zePemxHi.mjs → shared-eefMO8R4.mjs} +1 -1
  152. package/dist/smart-shield-IVb2sR0C.mjs +24 -0
  153. package/dist/{snippets-BIcZ6vSW.mjs → snippets-cWwWficN.mjs} +2 -2
  154. package/dist/{spectrum-DjDX0geK.mjs → spectrum-DYiIBYRB.mjs} +1 -1
  155. package/dist/{speed-DiPoFJMm.mjs → speed-C7uiW2Wf.mjs} +1 -1
  156. package/dist/{sql-DLjCt_R3.mjs → sql-TGV8qQMj.mjs} +1 -1
  157. package/dist/{src-CutrsNl4.mjs → src-BUH-P_zd.mjs} +5 -5
  158. package/dist/ssl-xQP_HbWN.mjs +139 -0
  159. package/dist/{stream-uhn_Zsni.mjs → stream-CfWgj8Cr.mjs} +55 -55
  160. package/dist/{submit-C3suIDBX.mjs → submit-DxGr1T40.mjs} +1 -1
  161. package/dist/tags-LEJ2VYhQ.mjs +23 -0
  162. package/dist/{telemetry-DYjsavEr.mjs → telemetry-BHne10Yy.mjs} +1 -1
  163. package/dist/telemetry-BavSU4ku.mjs +2 -0
  164. package/dist/{tenant-DK88yQM4.mjs → tenant-7d5vwc6K.mjs} +1 -1
  165. package/dist/{tenant-custom-nameservers-BZ1JD1Yf.mjs → tenant-custom-nameservers-BkxlPr5O.mjs} +1 -1
  166. package/dist/{tunnels-DjbomhCa.mjs → tunnels-DlGODvwT.mjs} +4 -4
  167. package/dist/{turnstile-DXrbEy2A.mjs → turnstile-DhLkdhij.mjs} +5 -5
  168. package/dist/update-check-nLfkSfdz.mjs +2 -0
  169. package/dist/update-check-worker.mjs +1 -1
  170. package/dist/{update-check-BhhtSXVZ.mjs → update-check-wvjOsnGK.mjs} +1 -1
  171. package/dist/{url-info-a0mY4UsC.mjs → url-info-CeoV5dBc.mjs} +1 -1
  172. package/dist/{url-normalization-DiwpDIhc.mjs → url-normalization-9NoaoRNh.mjs} +1 -1
  173. package/dist/{url-scanner-D0egjBe5.mjs → url-scanner-w_-Sumz-.mjs} +8 -8
  174. package/dist/{user-DDH9lxf5.mjs → user-D33B3alX.mjs} +59 -59
  175. package/dist/{vectorize-DaT3amFV.mjs → vectorize-Wp9De13y.mjs} +17 -17
  176. package/dist/version-B2RUUqGT.mjs +2 -0
  177. package/dist/{waiting-rooms-BGMpu9gS.mjs → waiting-rooms-BE8FloRd.mjs} +13 -13
  178. package/dist/{web-assets-NqNglLSI.mjs → web-assets-ew0iaP7c.mjs} +35 -35
  179. package/dist/{web3-UnCUuIfB.mjs → web3-BUyXBaqq.mjs} +6 -6
  180. package/dist/{workers-builds-Cy6fdtm5.mjs → workers-builds-DzU9NGno.mjs} +7 -7
  181. package/dist/{workers-for-platforms-JscCHivQ.mjs → workers-for-platforms-B4xzFNxJ.mjs} +25 -22
  182. package/dist/{workers-DfA9ugmb.mjs → workers-pP5tsDbD.mjs} +25 -22
  183. package/dist/{workers-vpc-FDZQBqOu.mjs → workers-vpc-Bre_t9Al.mjs} +1 -1
  184. package/dist/{workflows-Dq-k81hU.mjs → workflows-DXYGKtqq.mjs} +1 -1
  185. package/dist/zaraz-DoH4QD0u.mjs +22 -0
  186. package/dist/{zero-trust-CZ685QhO.mjs → zero-trust-DKt20rzE.mjs} +461 -458
  187. package/dist/{zone-DcZIUTWt.mjs → zone-BXM3p0JR.mjs} +1 -1
  188. package/dist/{zones-BVdvYUCv.mjs → zones-CJdtqEBx.mjs} +21 -21
  189. package/package.json +9 -9
  190. package/dist/account-tags-zvHRQZxb.mjs +0 -15
  191. package/dist/ai-search-CtfW5fzl.mjs +0 -79
  192. package/dist/auth-Ccm5viK_.mjs +0 -2
  193. package/dist/body-parser-DkHKPkJ7.mjs +0 -2
  194. package/dist/browser-run-ChXohmNG.mjs +0 -42
  195. package/dist/certificate-authorities-BTLdA7EQ.mjs +0 -6
  196. package/dist/client-certificates-B3UxH_Au.mjs +0 -13
  197. package/dist/cps-Due0P5IW.mjs +0 -6
  198. package/dist/csam-scanner-DvLrPw45.mjs +0 -10
  199. package/dist/ct-alerting-BtEGkRJi.mjs +0 -5
  200. package/dist/custom-certificates-CMLXTTEc.mjs +0 -17
  201. package/dist/custom-pages-ubava9Qm.mjs +0 -21
  202. package/dist/dcv-delegation-sGGt6UU_.mjs +0 -4
  203. package/dist/healthchecks-DAYYLZ6u.mjs +0 -22
  204. package/dist/keyless-certificates-0pzjkZb6.mjs +0 -13
  205. package/dist/keys-BSV5IXdU.mjs +0 -4
  206. package/dist/load-balancers-CCCWoQXv.mjs +0 -76
  207. package/dist/mtls-certificates-ukwDz6Lc.mjs +0 -13
  208. package/dist/organization-DMr_z6n4.mjs +0 -71
  209. package/dist/origin-ca-certificates-BZxUbB5N.mjs +0 -11
  210. package/dist/origin-tls-client-auth-DzbZvtmi.mjs +0 -30
  211. package/dist/pages-BkcL5rC4.mjs +0 -54
  212. package/dist/pay-per-crawl-Dulm7Xy5.mjs +0 -38
  213. package/dist/precursor-DsGbA_YJ.mjs +0 -4
  214. package/dist/previews-Cma3-M7K.mjs +0 -7
  215. package/dist/registrar-gERQ3b85.mjs +0 -43
  216. package/dist/request-tracers-DcnwQg3K.mjs +0 -4
  217. package/dist/resource-tagging-SlsUtLsq.mjs +0 -4
  218. package/dist/run-CHNyLZLG.mjs +0 -2
  219. package/dist/smart-shield-2egm1Vaw.mjs +0 -24
  220. package/dist/ssl-vNzK0c9S.mjs +0 -45
  221. package/dist/tags-Dy2jG-Dt.mjs +0 -4
  222. package/dist/telemetry-Bdv5LZZs.mjs +0 -2
  223. package/dist/update-check-Dld7rbLd.mjs +0 -2
  224. package/dist/values-Bfr5-bL6.mjs +0 -4
  225. package/dist/version-CAuKDZAG.mjs +0 -2
  226. package/dist/zaraz-Dpr1pLDx.mjs +0 -22
@@ -1,71 +1,71 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-MNz2D-PD.mjs";import{a as r,t as i}from"./context-q-6bMSL-.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-DaQ4MzBI.mjs";import{t as c}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-KWYZvJWM.mjs";var h={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/cancel`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function g(e){return e.usage(`$0 builds cancel <build-uuid>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,t as i}from"./context-C_a8oSY9.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-Q5w9PNTT.mjs";import{t as c}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as l,r as u,t as d}from"./body-parser-DnBfDdx3.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-C0hKSr-R.mjs";var g={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/cancel`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function _(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:g,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(h,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Updated`})})};var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/builds`,body:`json`,errors:{401:`UnauthorizedError`}};function v(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:_,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(g,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Updated`})})};var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/builds`,body:`json`,errors:{401:`UnauthorizedError`}};function y(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-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=>d(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-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 te={command:`create <trigger-uuid>`,describe:`Start a Workers build`,builder:v,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?u({branch:d(e.branch,`branch`,`text`),commit_hash:d(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:d(e[`seed-repo-branch`],`seed-repo-branch`,`text`),owner:d(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:d(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:d(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(_,{body:t,account_id:f,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Created`});return}let p=u({branch:d(e.branch,`branch`,`text`),commit_hash:d(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:d(e[`seed-repo-branch`],`seed-repo-branch`,`text`),owner:d(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:d(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:d(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}),m=await s(`Creating`,async()=>c.send(_,{body:p,account_id:f,trigger_uuid:e[`trigger-uuid`]}));a(m,{successLabel:`Created`})})};var y={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 ne(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-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=>f(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-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 te={command:`create <trigger-uuid>`,describe:`Start a Workers build`,builder:y,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?d({branch:f(e.branch,`branch`,`text`),commit_hash:f(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:f(e[`seed-repo-branch`],`seed-repo-branch`,`text`),owner:f(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:f(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:f(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(v,{body:t,account_id:u,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Created`});return}let p=d({branch:f(e.branch,`branch`,`text`),commit_hash:f(e[`commit-hash`],`commit-hash`,`text`),seed_repo:{branch:f(e[`seed-repo-branch`],`seed-repo-branch`,`text`),owner:f(e[`seed-repo-owner`],`seed-repo-owner`,`text`),path:f(e[`seed-repo-path`],`seed-repo-path`,`text`),provider:e[`seed-repo-provider`],repository:f(e[`seed-repo-repository`],`seed-repo-repository`,`text`)}}),m=await s(`Creating`,async()=>c.send(v,{body:p,account_id:u,trigger_uuid:e[`trigger-uuid`]}));a(m,{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 ne(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 re={command:`create <script-name>`,describe:`Create a deploy hook`,builder:ne,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?u({branch:d(e.branch,`branch`,`text`),deploy_hook_name:d(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(y,{body:t,account_id:p,script_name:e[`script-name`]}));a(n,{successLabel:`Created`});return}e.branch===void 0&&(e.branch=await f(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await f(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let m=u({branch:d(e.branch,`branch`,`text`),deploy_hook_name:d(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}),h=await s(`Creating`,async()=>c.send(y,{body:m,account_id:p,script_name:e[`script-name`]}));a(h,{successLabel:`Created`})})};var ie={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 ae(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 re={command:`create <script-name>`,describe:`Create a deploy hook`,builder:ne,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?d({branch:f(e.branch,`branch`,`text`),deploy_hook_name:f(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(b,{body:t,account_id:u,script_name:e[`script-name`]}));a(n,{successLabel:`Created`});return}e.branch===void 0&&(e.branch=await p(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await p(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let m=d({branch:f(e.branch,`branch`,`text`),deploy_hook_name:f(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}),h=await s(`Creating`,async()=>c.send(b,{body:m,account_id:u,script_name:e[`script-name`]}));a(h,{successLabel:`Created`})})};var ie={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 ae(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 oe={command:`delete <deploy-hook-uuid>`,describe:`Delete a deploy hook`,builder:ae,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 m({force:!!e.force})){process.stderr.write(`Aborted.
11
- `);return}let u=await s(`Deleting`,async()=>c.send(ie,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Deleted`})})};var se={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 b(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 oe={command:`delete <deploy-hook-uuid>`,describe:`Delete a deploy hook`,builder:ae,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 h({force:!!e.force})){process.stderr.write(`Aborted.
11
+ `);return}let u=await s(`Deleting`,async()=>c.send(ie,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Deleted`})})};var se={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 x(e){return e.usage(`$0 builds deploy-hooks get <deploy-hook-uuid>
12
12
 
13
- 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 x={command:`get <deploy-hook-uuid>`,describe:`Get a deploy hook`,builder:b,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(se,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Loaded`})})};var S={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks`,errors:{401:`UnauthorizedError`}};function C(e){return e.usage(`$0 builds deploy-hooks list
13
+ 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 S={command:`get <deploy-hook-uuid>`,describe:`Get a deploy hook`,builder:x,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(se,{account_id:l,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(u,{successLabel:`Loaded`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks`,errors:{401:`UnauthorizedError`}};function w(e){return e.usage(`$0 builds deploy-hooks list
14
14
 
15
- 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 w={command:`list`,describe:`List deploy hooks`,builder:C,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(S,{account_id:l,script_name:e[`script-name`]}));a(u,{successLabel:`Loaded`})})};var T={method:`POST`,path:t=>e`/workers/builds/deploy_hooks/${t.deploy_hook_uuid}`,errors:{404:`NotFoundError`,429:`TooManyRequestsError`}};function E(e){return e.usage(`$0 builds deploy-hooks trigger <deploy-hook-uuid>
15
+ 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 T={command:`list`,describe:`List deploy hooks`,builder:w,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(C,{account_id:l,script_name:e[`script-name`]}));a(u,{successLabel:`Loaded`})})};var E={method:`POST`,path:t=>e`/workers/builds/deploy_hooks/${t.deploy_hook_uuid}`,errors:{404:`NotFoundError`,429:`TooManyRequestsError`}};function D(e){return e.usage(`$0 builds deploy-hooks trigger <deploy-hook-uuid>
16
16
 
17
- Trigger a build using a deploy hook. This endpoint does not require authentication - the deploy_hook_uuid acts as a secret token.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`trigger <deploy-hook-uuid>`,describe:`Trigger deploy hook`,builder:E,handler:async e=>c({command:`builds deploy-hooks trigger`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf builds deploy-hooks trigger`,method:`POST`,url:`https://api.cloudflare.com/client/v4/workers/builds/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let t=await n(e),r=await s(`Creating`,async()=>t.send(T,{deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(r,{successLabel:`Created`})})};var O={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function k(e){return e.usage(`$0 builds deploy-hooks update <deploy-hook-uuid>
17
+ Trigger a build using a deploy hook. This endpoint does not require authentication - the deploy_hook_uuid acts as a secret token.`).positional(`deploy-hook-uuid`,{type:`string`,description:`Deploy hook UUID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`trigger <deploy-hook-uuid>`,describe:`Trigger deploy hook`,builder:D,handler:async e=>c({command:`builds deploy-hooks trigger`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf builds deploy-hooks trigger`,method:`POST`,url:`https://api.cloudflare.com/client/v4/workers/builds/deploy_hooks/${e[`deploy-hook-uuid`]==null?`<deploy-hook-uuid>`:encodeURIComponent(String(e[`deploy-hook-uuid`]))}`,pathParams:{"deploy-hook-uuid":String(e[`deploy-hook-uuid`]??``)},bodyKind:`none`});return}let t=await n(e),r=await s(`Creating`,async()=>t.send(E,{deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(r,{successLabel:`Created`})})};var k={method:`PUT`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_name}/deploy_hooks/${t.deploy_hook_uuid}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`}};function A(e){return e.usage(`$0 builds deploy-hooks update <deploy-hook-uuid>
18
18
 
19
- Replace the name and target branch 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(`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 A={command:`update <deploy-hook-uuid>`,describe:`Update a deploy hook`,builder:k,handler:async e=>c({command:`builds deploy-hooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks update`,method:`PUT`,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:`json`,body:e.body===void 0?u({branch:d(e.branch,`branch`,`text`),deploy_hook_name:d(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(O,{body:t,account_id:p,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(n,{successLabel:`Updated`});return}e.branch===void 0&&(e.branch=await f(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await f(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let m=u({branch:d(e.branch,`branch`,`text`),deploy_hook_name:d(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}),h=await s(`Updating`,async()=>c.send(O,{body:m,account_id:p,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(h,{successLabel:`Updated`})})},j={command:`deploy-hooks`,describe:`Manage branch-specific HTTP hooks that start builds.`,builder:e=>e.command(re).command(oe).command(x).command(w).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function N(e){return e.usage(`$0 builds get <build-uuid>
19
+ Replace the name and target branch 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(`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 j={command:`update <deploy-hook-uuid>`,describe:`Update a deploy hook`,builder:A,handler:async e=>c({command:`builds deploy-hooks update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds deploy-hooks update`,method:`PUT`,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:`json`,body:e.body===void 0?d({branch:f(e.branch,`branch`,`text`),deploy_hook_name:f(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(k,{body:t,account_id:u,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(n,{successLabel:`Updated`});return}e.branch===void 0&&(e.branch=await p(`branch`,`Git branch name.`)),e[`deploy-hook-name`]===void 0&&(e[`deploy-hook-name`]=await p(`deploy-hook-name`,`Deploy hook name (1-58 characters).`));let m=d({branch:f(e.branch,`branch`,`text`),deploy_hook_name:f(e[`deploy-hook-name`],`deploy-hook-name`,`text`)}),h=await s(`Updating`,async()=>c.send(k,{body:m,account_id:u,script_name:e[`script-name`],deploy_hook_uuid:e[`deploy-hook-uuid`]}));a(h,{successLabel:`Updated`})})},M={command:`deploy-hooks`,describe:`Manage branch-specific HTTP hooks that start builds.`,builder:e=>e.command(re).command(oe).command(S).command(T).command(O).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 builds get <build-uuid>
20
20
 
21
- Retrieve status, outcome, timestamps, trigger settings, and source metadata for a build UUID.`).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 P={command:`get <build-uuid>`,describe:`Get a Workers build`,builder:N,handler:async e=>c({command:`builds get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds 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`]))}`,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(`Loading`,async()=>c.send(M,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/account/limits`,errors:{401:`UnauthorizedError`}};function I(e){return e.usage(`$0 builds limits get
21
+ Retrieve status, outcome, timestamps, trigger settings, and source metadata for a build UUID.`).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 F={command:`get <build-uuid>`,describe:`Get a Workers build`,builder:P,handler:async e=>c({command:`builds get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf builds 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`]))}`,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(`Loading`,async()=>c.send(N,{account_id:l,build_uuid:e[`build-uuid`]}));a(u,{successLabel:`Loaded`})})};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/account/limits`,errors:{401:`UnauthorizedError`}};function L(e){return e.usage(`$0 builds limits get
22
22
 
23
- Return whether the account's build-minute allowance is exhausted and when it refreshes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get`,describe:`Get build-minute availability`,builder:I,handler:async e=>c({command:`builds limits get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf builds limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/account/limits`,pathParams:{},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(F,{account_id:l}));a(u,{successLabel:`Loaded`})})},R={command:`limits`,describe:`View build-minute availability and refresh information.`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.external_script_id}/builds`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function B(e){return e.usage(`$0 builds list
23
+ Return whether the account's build-minute allowance is exhausted and when it refreshes.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get`,describe:`Get build-minute availability`,builder:L,handler:async e=>c({command:`builds limits get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf builds limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/builds/account/limits`,pathParams:{},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(I,{account_id:l}));a(u,{successLabel:`Loaded`})})},z={command:`limits`,describe:`View build-minute availability and refresh information.`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.external_script_id}/builds`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function V(e){return e.usage(`$0 builds list
24
24
 
25
- 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 V={command:`list`,describe:`List builds for a Worker`,builder:B,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(z,{account_id:u,external_script_id:e[`external-script-id`],...c}));a(d,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/logs`,query:[`cursor`],errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function U(e){return e.usage(`$0 builds logs get <build-uuid>
25
+ 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 H={command:`list`,describe:`List builds for a Worker`,builder:V,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(B,{account_id:u,external_script_id:e[`external-script-id`],...c}));a(d,{successLabel:`Loaded`})})};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds/${t.build_uuid}/logs`,query:[`cursor`],errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function W(e){return e.usage(`$0 builds logs get <build-uuid>
26
26
 
27
- 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 W={command:`get <build-uuid>`,describe:`Get Workers build logs`,builder:U,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(H,{account_id:u,build_uuid:e[`build-uuid`],...c}));a(d,{successLabel:`Loaded`})})},G={command:`logs`,describe:`Retrieve build logs.`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={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 ce(e){return e.usage(`$0 builds repos config-autofill get <repo-id>
27
+ 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 G={command:`get <build-uuid>`,describe:`Get Workers build logs`,builder:W,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(U,{account_id:u,build_uuid:e[`build-uuid`],...c}));a(d,{successLabel:`Loaded`})})},K={command:`logs`,describe:`Retrieve build logs.`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ce={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 le(e){return e.usage(`$0 builds repos config-autofill get <repo-id>
28
28
 
29
- 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 le={command:`get <repo-id>`,describe:`Get repository configuration autofill`,builder:ce,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(K,{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`})})},ue={command:`config-autofill`,describe:`Operations for repos.config-autofill`,builder:e=>e.command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var de={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections/${t.repo_connection_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function fe(e){return e.usage(`$0 builds repos connections delete <repo-connection-uuid>
29
+ 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 ue={command:`get <repo-id>`,describe:`Get repository configuration autofill`,builder:le,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(ce,{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`})})},de={command:`config-autofill`,describe:`Operations for repos.config-autofill`,builder:e=>e.command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var fe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/repos/connections/${t.repo_connection_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function pe(e){return e.usage(`$0 builds repos connections delete <repo-connection-uuid>
30
30
 
31
- 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 pe={command:`delete <repo-connection-uuid>`,describe:`Delete a repository connection`,builder:fe,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 m({force:!!e.force})){process.stderr.write(`Aborted.
32
- `);return}let u=await s(`Deleting`,async()=>c.send(de,{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 me(e){return e.usage(`$0 builds repos connections upsert
31
+ 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 me={command:`delete <repo-connection-uuid>`,describe:`Delete a repository connection`,builder:pe,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 h({force:!!e.force})){process.stderr.write(`Aborted.
32
+ `);return}let u=await s(`Deleting`,async()=>c.send(fe,{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 he(e){return e.usage(`$0 builds repos connections upsert
33
33
 
34
- 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=>d(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 he={command:`upsert`,describe:`Create or update a repository connection`,builder:me,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?u({provider_account_id:d(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:d(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:d(e[`repo-id`],`repo-id`,`text`),repo_name:d(e[`repo-name`],`repo-name`,`text`)}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(q,{body:t,account_id:m}));a(n,{successLabel:`Updated`});return}e[`provider-account-id`]===void 0&&(e[`provider-account-id`]=await f(`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 f(`provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`provider-type`]===void 0&&(e[`provider-type`]=await p(`provider-type`,`Source control provider.`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`repo-id`]===void 0&&(e[`repo-id`]=await f(`repo-id`,`Provider-specific repository identifier.`)),e[`repo-name`]===void 0&&(e[`repo-name`]=await f(`repo-name`,`Human-readable repository name.`));let h=u({provider_account_id:d(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:d(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:d(e[`repo-id`],`repo-id`,`text`),repo_name:d(e[`repo-name`],`repo-name`,`text`)}),g=await s(`Updating`,async()=>c.send(q,{body:h,account_id:m}));a(g,{successLabel:`Updated`})})},ge={command:`connections`,describe:`Operations for repos.connections`,builder:e=>e.command(pe).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_e={command:`repos`,describe:`Manage source repository connections for Workers Builds.`,builder:e=>e.command(ue).command(ge).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 ve(e){return e.usage(`$0 builds tokens create
34
+ 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=>f(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 ge={command:`upsert`,describe:`Create or update a repository connection`,builder:he,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?d({provider_account_id:f(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:f(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:f(e[`repo-id`],`repo-id`,`text`),repo_name:f(e[`repo-name`],`repo-name`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(q,{body:t,account_id:u}));a(n,{successLabel:`Updated`});return}e[`provider-account-id`]===void 0&&(e[`provider-account-id`]=await p(`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 p(`provider-account-name`,`Human-readable name of the account or namespace that owns the repository.`)),e[`provider-type`]===void 0&&(e[`provider-type`]=await m(`provider-type`,`Source control provider.`,[`github`,`gitlab`,`gitlab_internal`,`origin`])),e[`repo-id`]===void 0&&(e[`repo-id`]=await p(`repo-id`,`Provider-specific repository identifier.`)),e[`repo-name`]===void 0&&(e[`repo-name`]=await p(`repo-name`,`Human-readable repository name.`));let h=d({provider_account_id:f(e[`provider-account-id`],`provider-account-id`,`text`),provider_account_name:f(e[`provider-account-name`],`provider-account-name`,`text`),provider_type:e[`provider-type`],repo_id:f(e[`repo-id`],`repo-id`,`text`),repo_name:f(e[`repo-name`],`repo-name`,`text`)}),g=await s(`Updating`,async()=>c.send(q,{body:h,account_id:u}));a(g,{successLabel:`Updated`})})},_e={command:`connections`,describe:`Operations for repos.connections`,builder:e=>e.command(me).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ve={command:`repos`,describe:`Manage source repository connections for Workers Builds.`,builder:e=>e.command(de).command(_e).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 ye(e){return e.usage(`$0 builds tokens create
35
35
 
36
- 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 ye={command:`create`,describe:`Create build token`,builder:ve,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?u({build_token_name:d(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:d(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:d(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(J,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e[`build-token-name`]===void 0&&(e[`build-token-name`]=await f(`build-token-name`,`The build_token_name field`)),e[`build-token-secret`]===void 0&&(e[`build-token-secret`]=await f(`build-token-secret`,`The build_token_secret field`)),e[`cloudflare-token-id`]===void 0&&(e[`cloudflare-token-id`]=await f(`cloudflare-token-id`,`The cloudflare_token_id field`));let m=u({build_token_name:d(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:d(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:d(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}),h=await s(`Creating`,async()=>c.send(J,{body:m,account_id:p}));a(h,{successLabel:`Created`})})};var be={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/tokens/${t.build_token_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function xe(e){return e.usage(`$0 builds tokens delete <build-token-uuid>
36
+ 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 be={command:`create`,describe:`Create build token`,builder:ye,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?d({build_token_name:f(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:f(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:f(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(J,{body:t,account_id:u}));a(n,{successLabel:`Created`});return}e[`build-token-name`]===void 0&&(e[`build-token-name`]=await p(`build-token-name`,`The build_token_name field`)),e[`build-token-secret`]===void 0&&(e[`build-token-secret`]=await p(`build-token-secret`,`The build_token_secret field`)),e[`cloudflare-token-id`]===void 0&&(e[`cloudflare-token-id`]=await p(`cloudflare-token-id`,`The cloudflare_token_id field`));let m=d({build_token_name:f(e[`build-token-name`],`build-token-name`,`text`),build_token_secret:f(e[`build-token-secret`],`build-token-secret`,`text`),cloudflare_token_id:f(e[`cloudflare-token-id`],`cloudflare-token-id`,`text`)}),h=await s(`Creating`,async()=>c.send(J,{body:m,account_id:u}));a(h,{successLabel:`Created`})})};var xe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/tokens/${t.build_token_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Se(e){return e.usage(`$0 builds tokens delete <build-token-uuid>
37
37
 
38
- 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 Se={command:`delete <build-token-uuid>`,describe:`Delete a build token`,builder:xe,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 m({force:!!e.force})){process.stderr.write(`Aborted.
39
- `);return}let u=await s(`Deleting`,async()=>c.send(be,{account_id:l,build_token_uuid:e[`build-token-uuid`]}));a(u,{successLabel:`Deleted`})})};var Ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function we(e){return e.usage(`$0 builds tokens list
38
+ 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 Ce={command:`delete <build-token-uuid>`,describe:`Delete a build token`,builder:Se,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 h({force:!!e.force})){process.stderr.write(`Aborted.
39
+ `);return}let u=await s(`Deleting`,async()=>c.send(xe,{account_id:l,build_token_uuid:e[`build-token-uuid`]}));a(u,{successLabel:`Deleted`})})};var we={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/tokens`,query:[`page`,`per_page`],errors:{401:`UnauthorizedError`}};function Te(e){return e.usage(`$0 builds tokens list
40
40
 
41
- 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 Te={command:`list`,describe:`List build tokens`,builder:we,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(Ce,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Ee={command:`tokens`,describe:`Manage credentials used by Workers Builds to deploy Workers.`,builder:e=>e.command(ye).command(Se).command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var De={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/purge_build_cache`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Oe(e){return e.usage(`$0 builds triggers cache purge <trigger-uuid>
41
+ 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 Ee={command:`list`,describe:`List build tokens`,builder:Te,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(we,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},De={command:`tokens`,describe:`Manage credentials used by Workers Builds to deploy Workers.`,builder:e=>e.command(be).command(Ce).command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Oe={method:`POST`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/purge_build_cache`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function ke(e){return e.usage(`$0 builds triggers cache purge <trigger-uuid>
42
42
 
43
- 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 ke={command:`purge <trigger-uuid>`,describe:`Purge a trigger's build cache`,builder:Oe,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 m({force:!!e.force,message:`This operation purges the build cache for a Workers Builds trigger.`})){process.stderr.write(`Aborted.
44
- `);return}let u=await s(`Deleting`,async()=>c.send(De,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Deleted`})})},Ae={command:`cache`,describe:`Operations for triggers.cache`,builder:e=>e.command(ke).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 je(e){return e.usage(`$0 builds triggers create
43
+ 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 Ae={command:`purge <trigger-uuid>`,describe:`Purge a trigger's build cache`,builder:ke,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 h({force:!!e.force,message:`This operation purges the build cache for a Workers Builds trigger.`})){process.stderr.write(`Aborted.
44
+ `);return}let u=await s(`Deleting`,async()=>c.send(Oe,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Deleted`})})},je={command:`cache`,describe:`Operations for triggers.cache`,builder:e=>e.command(Ae).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 Me(e){return e.usage(`$0 builds triggers create
45
45
 
46
- 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 Me={command:`create`,describe:`Create a build trigger`,builder:je,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?u({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:d(e[`build-command`],`build-command`,`text`),build_token_uuid:d(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:d(e[`deploy-command`],`deploy-command`,`text`),external_script_id:d(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:d(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:d(e[`root-directory`],`root-directory`,`text`),trigger_name:d(e[`trigger-name`],`trigger-name`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Y,{body:t,account_id:p}));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 f(`build-command`,`Command to build the Worker.`)),e[`build-token-uuid`]===void 0&&(e[`build-token-uuid`]=await f(`build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`deploy-command`]===void 0&&(e[`deploy-command`]=await f(`deploy-command`,`Command to deploy the Worker.`)),e[`external-script-id`]===void 0&&(e[`external-script-id`]=await f(`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 f(`repo-connection-uuid`,`Repository connection UUID.`)),e[`root-directory`]===void 0&&(e[`root-directory`]=await f(`root-directory`,`Repository directory in which build and deploy commands run.`)),e[`trigger-name`]===void 0&&(e[`trigger-name`]=await f(`trigger-name`,`Human-readable name of the build trigger.`));let m=u({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:d(e[`build-command`],`build-command`,`text`),build_token_uuid:d(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:d(e[`deploy-command`],`deploy-command`,`text`),external_script_id:d(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:d(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:d(e[`root-directory`],`root-directory`,`text`),trigger_name:d(e[`trigger-name`],`trigger-name`,`text`)}),h=await s(`Creating`,async()=>c.send(Y,{body:m,account_id:p}));a(h,{successLabel:`Created`})})};var Ne={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Pe(e){return e.usage(`$0 builds triggers delete <trigger-uuid>
46
+ 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 Ne={command:`create`,describe:`Create a build trigger`,builder:Me,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?d({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:f(e[`build-command`],`build-command`,`text`),build_token_uuid:f(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:f(e[`deploy-command`],`deploy-command`,`text`),external_script_id:f(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:f(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:f(e[`root-directory`],`root-directory`,`text`),trigger_name:f(e[`trigger-name`],`trigger-name`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Y,{body:t,account_id:u}));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 p(`build-command`,`Command to build the Worker.`)),e[`build-token-uuid`]===void 0&&(e[`build-token-uuid`]=await p(`build-token-uuid`,`UUID of the build token used when deploying the Worker.`)),e[`deploy-command`]===void 0&&(e[`deploy-command`]=await p(`deploy-command`,`Command to deploy the Worker.`)),e[`external-script-id`]===void 0&&(e[`external-script-id`]=await p(`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 p(`repo-connection-uuid`,`Repository connection UUID.`)),e[`root-directory`]===void 0&&(e[`root-directory`]=await p(`root-directory`,`Repository directory in which build and deploy commands run.`)),e[`trigger-name`]===void 0&&(e[`trigger-name`]=await p(`trigger-name`,`Human-readable name of the build trigger.`));let m=d({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:f(e[`build-command`],`build-command`,`text`),build_token_uuid:f(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:f(e[`deploy-command`],`deploy-command`,`text`),external_script_id:f(e[`external-script-id`],`external-script-id`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],repo_connection_uuid:f(e[`repo-connection-uuid`],`repo-connection-uuid`,`text`),root_directory:f(e[`root-directory`],`root-directory`,`text`),trigger_name:f(e[`trigger-name`],`trigger-name`,`text`)}),h=await s(`Creating`,async()=>c.send(Y,{body:m,account_id:u}));a(h,{successLabel:`Created`})})};var Pe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Fe(e){return e.usage(`$0 builds triggers delete <trigger-uuid>
47
47
 
48
- 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 Fe={command:`delete <trigger-uuid>`,describe:`Delete a build trigger`,builder:Pe,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 m({force:!!e.force,message:`This operation deletes the build trigger and cancels its unfinished builds.`})){process.stderr.write(`Aborted.
49
- `);return}let u=await s(`Deleting`,async()=>c.send(Ne,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Deleted`})})};var Ie={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 Le(e){return e.usage(`$0 builds triggers environment-variables delete <environment-variable-key>
48
+ 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 Ie={command:`delete <trigger-uuid>`,describe:`Delete a build trigger`,builder:Fe,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 h({force:!!e.force,message:`This operation deletes the build trigger and cancels its unfinished builds.`})){process.stderr.write(`Aborted.
49
+ `);return}let u=await s(`Deleting`,async()=>c.send(Pe,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Deleted`})})};var Le={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 Re(e){return e.usage(`$0 builds triggers environment-variables delete <environment-variable-key>
50
50
 
51
- 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 Re={command:`delete <environment-variable-key>`,describe:`Delete a build variable`,builder:Le,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 m({force:!!e.force})){process.stderr.write(`Aborted.
52
- `);return}let u=await s(`Deleting`,async()=>c.send(Ie,{account_id:l,trigger_uuid:e[`trigger-uuid`],environment_variable_key:e[`environment-variable-key`]}));a(u,{successLabel:`Deleted`})})};var ze={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,errors:{401:`UnauthorizedError`}};function Be(e){return e.usage(`$0 builds triggers environment-variables list
51
+ 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 ze={command:`delete <environment-variable-key>`,describe:`Delete a build variable`,builder:Re,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 h({force:!!e.force})){process.stderr.write(`Aborted.
52
+ `);return}let u=await s(`Deleting`,async()=>c.send(Le,{account_id:l,trigger_uuid:e[`trigger-uuid`],environment_variable_key:e[`environment-variable-key`]}));a(u,{successLabel:`Deleted`})})};var Be={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,errors:{401:`UnauthorizedError`}};function Ve(e){return e.usage(`$0 builds triggers environment-variables list
53
53
 
54
- 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 Ve={command:`list`,describe:`List build variables`,builder:Be,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(ze,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Loaded`})})};var He={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function Ue(e){return e.usage(`$0 builds triggers environment-variables upsert <trigger-uuid>
54
+ 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 He={command:`list`,describe:`List build variables`,builder:Ve,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(Be,{account_id:l,trigger_uuid:e[`trigger-uuid`]}));a(u,{successLabel:`Loaded`})})};var Ue={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/builds/triggers/${t.trigger_uuid}/environment_variables`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function We(e){return e.usage(`$0 builds triggers environment-variables upsert <trigger-uuid>
55
55
 
56
- 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 We={command:`upsert <trigger-uuid>`,describe:`Set build variables`,builder:Ue,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:l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(He,{body:t,account_id:u,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Ge={command:`environment-variables`,describe:`Operations for triggers.environment-variables`,builder:e=>e.command(Re).command(Ve).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.external_script_id}/triggers`,errors:{401:`UnauthorizedError`}};function qe(e){return e.usage(`$0 builds triggers list
56
+ 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 Ge={command:`upsert <trigger-uuid>`,describe:`Set build variables`,builder:We,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:l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(Ue,{body:t,account_id:u,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Ke={command:`environment-variables`,describe:`Operations for triggers.environment-variables`,builder:e=>e.command(ze).command(He).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.external_script_id}/triggers`,errors:{401:`UnauthorizedError`}};function Je(e){return e.usage(`$0 builds triggers list
57
57
 
58
- 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 Je={command:`list`,describe:`List triggers for a Worker`,builder:qe,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(Ke,{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 Ye(e){return e.usage(`$0 builds triggers update <trigger-uuid>
58
+ 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 Ye={command:`list`,describe:`List triggers for a Worker`,builder:Je,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(qe,{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 Xe(e){return e.usage(`$0 builds triggers update <trigger-uuid>
59
59
 
60
- 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 Xe={command:`update <trigger-uuid>`,describe:`Update a build trigger`,builder:Ye,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?u({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:d(e[`build-command`],`build-command`,`text`),build_token_uuid:d(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:d(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:d(e[`root-directory`],`root-directory`,`text`),trigger_name:d(e[`trigger-name`],`trigger-name`,`text`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(X,{body:t,account_id:f,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`});return}let p=u({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:d(e[`build-command`],`build-command`,`text`),build_token_uuid:d(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:d(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:d(e[`root-directory`],`root-directory`,`text`),trigger_name:d(e[`trigger-name`],`trigger-name`,`text`)}),m=await s(`Updating`,async()=>c.send(X,{body:p,account_id:f,trigger_uuid:e[`trigger-uuid`]}));a(m,{successLabel:`Updated`})})},Ze={command:`triggers`,describe:`Configure how repository changes build and deploy Workers.`,builder:e=>e.command(Me).command(Fe).command(Je).command(Xe).command(Ae).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds`,query:[`version_ids`],errors:{401:`UnauthorizedError`}};function $e(e){return e.usage(`$0 builds versions get
60
+ 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 Ze={command:`update <trigger-uuid>`,describe:`Update a build trigger`,builder:Xe,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?d({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:f(e[`build-command`],`build-command`,`text`),build_token_uuid:f(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:f(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:f(e[`root-directory`],`root-directory`,`text`),trigger_name:f(e[`trigger-name`],`trigger-name`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(X,{body:t,account_id:u,trigger_uuid:e[`trigger-uuid`]}));a(n,{successLabel:`Updated`});return}let p=d({branch_excludes:e[`branch-excludes`],branch_includes:e[`branch-includes`],build_caching_enabled:e[`build-caching-enabled`],build_command:f(e[`build-command`],`build-command`,`text`),build_token_uuid:f(e[`build-token-uuid`],`build-token-uuid`,`text`),deploy_command:f(e[`deploy-command`],`deploy-command`,`text`),path_excludes:e[`path-excludes`],path_includes:e[`path-includes`],root_directory:f(e[`root-directory`],`root-directory`,`text`),trigger_name:f(e[`trigger-name`],`trigger-name`,`text`)}),m=await s(`Updating`,async()=>c.send(X,{body:p,account_id:u,trigger_uuid:e[`trigger-uuid`]}));a(m,{successLabel:`Updated`})})},Qe={command:`triggers`,describe:`Configure how repository changes build and deploy Workers.`,builder:e=>e.command(Ne).command(Ie).command(Ye).command(Ze).command(je).command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var $e={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/builds`,query:[`version_ids`],errors:{401:`UnauthorizedError`}};function et(e){return e.usage(`$0 builds versions get
61
61
 
62
- 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 et={command:`get`,describe:`Get builds by Worker version`,builder:$e,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(Qe,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},tt={command:`versions`,describe:`Find builds associated with Worker versions.`,builder:e=>e.command(et).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 nt(e){return e.usage(`$0 builds workers create
62
+ 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 tt={command:`get`,describe:`Get builds by Worker version`,builder:et,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($e,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},nt={command:`versions`,describe:`Find builds associated with Worker versions.`,builder:e=>e.command(tt).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 Q(e){return e.usage(`$0 builds workers create
63
63
 
64
- 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=>d(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-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-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={command:`create`,describe:`Create Worker build configuration`,builder:nt,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?u({git_repository:{branch:d(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:d(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:d(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:d(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:d(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:d(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:d(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:d(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:d(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:d(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:d(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:d(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:d(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:d(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:d(e[`script-tag`],`script-tag`,`text`)}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Z,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}if(e[`git-repository-branch`]===void 0&&(e[`git-repository-branch`]=await f(`git-repository-branch`,`Git branch to watch for builds`)),e[`git-repository-provider-account-id`]===void 0&&(e[`git-repository-provider-account-id`]=await f(`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 f(`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 p(`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 f(`git-repository-repo-id`,`Provider-specific repository identifier.`)),e[`git-repository-repo-name`]===void 0&&(e[`git-repository-repo-name`]=await f(`git-repository-repo-name`,`Human-readable repository name.`)),e[`previews-base-config-build-command`]===void 0&&(e[`previews-base-config-build-command`]=await f(`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 f(`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 f(`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 f(`production-settings-build-command`,`Command to build the Worker.`)),e[`production-settings-build-token-uuid`]===void 0&&(e[`production-settings-build-token-uuid`]=await f(`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 f(`production-settings-deploy-command`,`Command to deploy the Worker.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await f(`script-tag`,`System-generated tag of the Worker. This is not the Worker name.`));let h=u({git_repository:{branch:d(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:d(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:d(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:d(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:d(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:d(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:d(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:d(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:d(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:d(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:d(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:d(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:d(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:d(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:d(e[`script-tag`],`script-tag`,`text`)}),g=await s(`Creating`,async()=>c.send(Z,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var rt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function it(e){return e.usage(`$0 builds workers delete <script-tag>
64
+ 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=>f(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 rt={command:`create`,describe:`Create Worker build configuration`,builder:Q,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?d({git_repository:{branch:f(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:f(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:f(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:f(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:f(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:f(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:f(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:f(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:f(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:u(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:f(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:f(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:f(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:f(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:u(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:f(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:f(e[`script-tag`],`script-tag`,`text`)},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]):l(e.body)});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Z,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}if(e[`git-repository-branch`]===void 0&&(e[`git-repository-branch`]=await p(`git-repository-branch`,`Git branch to watch for builds`)),e[`git-repository-provider-account-id`]===void 0&&(e[`git-repository-provider-account-id`]=await p(`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 p(`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 m(`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 p(`git-repository-repo-id`,`Provider-specific repository identifier.`)),e[`git-repository-repo-name`]===void 0&&(e[`git-repository-repo-name`]=await p(`git-repository-repo-name`,`Human-readable repository name.`)),e[`previews-base-config-build-command`]===void 0&&(e[`previews-base-config-build-command`]=await p(`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 p(`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 p(`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 p(`production-settings-build-command`,`Command to build the Worker.`)),e[`production-settings-build-token-uuid`]===void 0&&(e[`production-settings-build-token-uuid`]=await p(`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 p(`production-settings-deploy-command`,`Command to deploy the Worker.`)),e[`script-tag`]===void 0&&(e[`script-tag`]=await p(`script-tag`,`System-generated tag of the Worker. This is not the Worker name.`));let g=d({git_repository:{branch:f(e[`git-repository-branch`],`git-repository-branch`,`text`),provider_account_id:f(e[`git-repository-provider-account-id`],`git-repository-provider-account-id`,`text`),provider_account_name:f(e[`git-repository-provider-account-name`],`git-repository-provider-account-name`,`text`),provider_type:e[`git-repository-provider-type`],repo_id:f(e[`git-repository-repo-id`],`git-repository-repo-id`,`text`),repo_name:f(e[`git-repository-repo-name`],`git-repository-repo-name`,`text`),grant_id:f(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:f(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:f(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:f(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:u(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:f(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:f(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:f(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:f(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:u(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:f(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)},script_tag:f(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:h}));a(_,{successLabel:`Created`})})};var it={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function at(e){return e.usage(`$0 builds workers delete <script-tag>
65
65
 
66
- 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 at={command:`delete <script-tag>`,describe:`Delete Worker build configuration`,builder:it,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 m({force:!!e.force,message:`This operation deletes the Worker build configuration and its triggers, and cancels unfinished builds. The Worker is not deleted.`})){process.stderr.write(`Aborted.
67
- `);return}let u=await s(`Deleting`,async()=>c.send(rt,{account_id:l,script_tag:e[`script-tag`]}));a(u,{successLabel:`Deleted`})})};var ot={method:`GET`,path:t=>e`/accounts/${t.account_id}/builds/workers/${t.script_tag}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`}};function st(e){return e.usage(`$0 builds workers get <script-tag>
66
+ 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 ot={command:`delete <script-tag>`,describe:`Delete Worker build configuration`,builder:at,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 h({force:!!e.force,message:`This operation deletes the Worker build configuration and its triggers, and cancels unfinished builds. The Worker is not deleted.`})){process.stderr.write(`Aborted.
67
+ `);return}let u=await s(`Deleting`,async()=>c.send(it,{account_id:l,script_tag:e[`script-tag`]}));a(u,{successLabel:`Deleted`})})};var st={method:`GET`,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 get <script-tag>
68
68
 
69
- 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 ct={command:`get <script-tag>`,describe:`Get Worker build configuration`,builder:st,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(ot,{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 lt(e){return e.usage(`$0 builds workers update <script-tag>
69
+ 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 lt={command:`get <script-tag>`,describe:`Get Worker build configuration`,builder:ct,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(st,{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 ut(e){return e.usage(`$0 builds workers update <script-tag>
70
70
 
71
- 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-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-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 ut={command:`update <script-tag>`,describe:`Update Worker build configuration`,builder:lt,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?u({git_repository:{branch:d(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:d(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:d(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:d(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:d(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:d(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:d(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:d(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:d(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}}):l(e.body)});return}let f=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(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()=>f.send($,{body:t,account_id:p,script_tag:e[`script-tag`],...c}));a(n,{successLabel:`Updated`});return}let m=u({git_repository:{branch:d(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:d(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:d(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:d(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),path_excludes:e[`previews-base-config-path-excludes`],path_includes:e[`previews-base-config-path-includes`],root_directory:d(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:d(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:d(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:d(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),path_excludes:e[`production-settings-path-excludes`],path_includes:e[`production-settings-path-includes`],root_directory:d(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await s(`Updating`,async()=>f.send($,{body:m,account_id:p,script_tag:e[`script-tag`],...c}));a(h,{successLabel:`Updated`})})},dt={command:`workers`,describe:`Manage repository-backed build configuration for Workers.`,builder:e=>e.command(Q).command(at).command(ct).command(ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ft={command:`builds`,describe:`Build and deploy Workers from connected repositories, then inspect build status and logs.`,builder:e=>e.command(ee).command(te).command(P).command(V).command(j).command(R).command(G).command(_e).command(Ee).command(Ze).command(tt).command(dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ft as default};
71
+ 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 dt={command:`update <script-tag>`,describe:`Update Worker build configuration`,builder:ut,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?d({git_repository:{branch:f(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:f(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:f(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:f(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:u(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:f(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:f(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:f(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:f(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:u(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:f(e[`production-settings-root-directory`],`production-settings-root-directory`,`text`)}},[[`previews_base_config`,`environment_variables`],[`production_settings`,`environment_variables`]]):l(e.body)});return}let p=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(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()=>p.send($,{body:t,account_id:m,script_tag:e[`script-tag`],...c}));a(n,{successLabel:`Updated`});return}let h=d({git_repository:{branch:f(e[`git-repository-branch`],`git-repository-branch`,`text`)},previews_base_config:{build_caching_enabled:e[`previews-base-config-build-caching-enabled`],build_command:f(e[`previews-base-config-build-command`],`previews-base-config-build-command`,`text`),build_token_uuid:f(e[`previews-base-config-build-token-uuid`],`previews-base-config-build-token-uuid`,`text`),deploy_command:f(e[`previews-base-config-deploy-command`],`previews-base-config-deploy-command`,`text`),environment_variables:u(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:f(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:f(e[`production-settings-build-command`],`production-settings-build-command`,`text`),build_token_uuid:f(e[`production-settings-build-token-uuid`],`production-settings-build-token-uuid`,`text`),deploy_command:f(e[`production-settings-deploy-command`],`production-settings-deploy-command`,`text`),environment_variables:u(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:f(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()=>p.send($,{body:h,account_id:m,script_tag:e[`script-tag`],...c}));a(g,{successLabel:`Updated`})})},ft={command:`workers`,describe:`Manage repository-backed build configuration for Workers.`,builder:e=>e.command(rt).command(ot).command(lt).command(dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pt={command:`builds`,describe:`Build and deploy Workers from connected repositories, then inspect build status and logs.`,builder:e=>e.command(ee).command(te).command(F).command(H).command(M).command(z).command(K).command(ve).command(De).command(Qe).command(nt).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{pt as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-MNz2D-PD.mjs";import{i as r}from"./context-q-6bMSL-.mjs";import{t as i}from"./output-Co4xdFf6.mjs";import{t as a}from"./dry-run-C2KjGX10.mjs";import{t as o}from"./progress-DaQ4MzBI.mjs";import{t as s}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-KWYZvJWM.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.`})){process.stderr.write(`Aborted.
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-Db1KT0vm.mjs";import{i as r}from"./context-C_a8oSY9.mjs";import{t as i}from"./output-Co4xdFf6.mjs";import{t as a}from"./dry-run-C2KjGX10.mjs";import{t as o}from"./progress-Q5w9PNTT.mjs";import{t as s}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as c,t as l}from"./body-parser-DnBfDdx3.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-C0hKSr-R.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.`})){process.stderr.write(`Aborted.
3
3
  `);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.`})){process.stderr.write(`Aborted.
4
4
  `);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:`bulk-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?`})){process.stderr.write(`Aborted.
5
5
  `);return}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`});return}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:`bulk-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`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var v={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/origin/cloud_regions/${t.origin_ip}`};function y(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,t}from"./metadata-Df5kCWJv.mjs";import{r as n}from"./theme-BGHWSKCw.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import"./ui-BtIBQeaG.mjs";import{t as i}from"./output-Co4xdFf6.mjs";import{a,f as o,m as s,t as c,u as l}from"./run-Clc3P2u7.mjs";function u({enabled:e,source:t}){let r=e?n.success(`Enabled`):n.error(`Disabled`),i=l(t);return`Status: ${r}${i?` (set by ${i})`:``}\n`}const d={command:`disable`,describe:`Disable cf telemetry collection`,handler:()=>{s(!1);let{enabled:e,source:t}=o();console.log(u({enabled:e,source:t})),console.log(e?`cf is collecting usage telemetry because ${l(t)}=true overrides this setting.\n`:`cf is no longer collecting usage telemetry.
2
+ import{n as e,t}from"./metadata-Df5kCWJv.mjs";import{r as n}from"./theme-BGHWSKCw.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import"./ui-BtIBQeaG.mjs";import{t as i}from"./output-Co4xdFf6.mjs";import{a,f as o,m as s,t as c,u as l}from"./run-DtFLvOHB.mjs";function u({enabled:e,source:t}){let r=e?n.success(`Enabled`):n.error(`Disabled`),i=l(t);return`Status: ${r}${i?` (set by ${i})`:``}\n`}const d={command:`disable`,describe:`Disable cf telemetry collection`,handler:()=>{s(!1);let{enabled:e,source:t}=o();console.log(u({enabled:e,source:t})),console.log(e?`cf is collecting usage telemetry because ${l(t)}=true overrides this setting.\n`:`cf is no longer collecting usage telemetry.
3
3
  `)}},f={command:`enable`,describe:`Enable cf telemetry collection`,handler:()=>{s(!0);let{enabled:e,source:t}=o();console.log(u({enabled:e,source:t})),console.log(e?`cf is now collecting anonymous usage telemetry. Thank you for helping make cf better.
4
4
  `:`cf is not collecting usage telemetry because ${l(t)}${t===`env`||t===`wrangler-env`?`=false`:``} overrides this setting.\n`)}},p={command:`status`,describe:`Check whether cf telemetry collection is enabled`,handler:()=>{console.log(u(o())),console.log(n.muted(`Configure on this machine: \`cf cli telemetry enable\` / \`cf cli telemetry disable\`.
5
5
  Override per invocation with ${a}=true/false. DO_NOT_TRACK is also honored.\nLearn more: https://github.com/cloudflare/cf/blob/main/packages/cli/telemetry.md`))}},m={command:`telemetry`,describe:`Configure whether cf collects anonymous usage telemetry`,builder:e=>e.command(p).command(f).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h=`KEYS`,g=`VALUES`;var _=class{constructor(e,t){let n=e._tree,r=Array.from(n.keys());this.set=e,this._type=t,this._path=r.length>0?[{node:n,keys:r}]:[]}next(){let e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};let{node:e,keys:t}=v(this._path);if(v(t)===``)return{done:!1,value:this.result()};let n=e.get(v(t));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;let e=v(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>v(e)).filter(e=>e!==``).join(``)}value(){return v(this._path).node.get(``)}result(){switch(this._type){case g:return this.value();case h:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}};const v=e=>e[e.length-1],y=(e,t,n)=>{let r=/* @__PURE__ */ new Map;if(t===void 0)return r;let i=t.length+1,a=i+n,o=new Uint8Array(a*i).fill(n+1);for(let e=0;e<i;++e)o[e]=e;for(let e=1;e<a;++e)o[e*i]=e;return b(e,t,n,r,o,1,i,``),r},b=(e,t,n,r,i,a,o,s)=>{let c=a*o;key:for(let l of e.keys())if(l===``){let t=i[c-1];t<=n&&r.set(s,[e.get(l),t])}else{let c=a;for(let e=0;e<l.length;++e,++c){let r=l[e],a=o*c,s=a-o,u=i[a],d=Math.max(0,c-n-1),f=Math.min(o-1,c+n);for(let e=d;e<f;++e){let n=r!==t[e],o=i[s+e]+ +n,c=i[s+e+1]+1,l=i[a+e]+1,d=i[a+e+1]=Math.min(o,c,l);d<u&&(u=d)}if(u>n)continue key}b(e.get(l),t,n,r,i,c,o,s+l)}};var x=class e{constructor(e=/* @__PURE__ */ new Map,t=``){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(t){if(!t.startsWith(this._prefix))throw Error(`Mismatched prefix`);let[n,r]=S(this._tree,t.slice(this._prefix.length));if(n===void 0){let[n,i]=O(r);for(let r of n.keys())if(r!==``&&r.startsWith(i)){let a=/* @__PURE__ */ new Map;return a.set(r.slice(i.length),n.get(r)),new e(a,t)}}return new e(n,t)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,T(this._tree,e)}entries(){return new _(this,`ENTRIES`)}forEach(e){for(let[t,n]of this)e(t,n,this)}fuzzyGet(e,t){return y(this._tree,e,t)}get(e){let t=C(this._tree,e);return t===void 0?void 0:t.get(``)}has(e){let t=C(this._tree,e);return t!==void 0&&t.has(``)}keys(){return new _(this,h)}set(e,t){if(typeof e!=`string`)throw Error(`key must be a string`);return this._size=void 0,w(this._tree,e).set(``,t),this}get size(){if(this._size)return this._size;this._size=0;let e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!=`string`)throw Error(`key must be a string`);this._size=void 0;let n=w(this._tree,e);return n.set(``,t(n.get(``))),this}fetch(e,t){if(typeof e!=`string`)throw Error(`key must be a string`);this._size=void 0;let n=w(this._tree,e),r=n.get(``);return r===void 0&&n.set(``,r=t()),r}values(){return new _(this,g)}[Symbol.iterator](){return this.entries()}static from(t){let n=new e;for(let[e,r]of t)n.set(e,r);return n}static fromObject(t){return e.from(Object.entries(t))}};const S=(e,t,n=[])=>{if(t.length===0||e==null)return[e,n];for(let r of e.keys())if(r!==``&&t.startsWith(r))return n.push([e,r]),S(e.get(r),t.slice(r.length),n);return n.push([e,t]),S(void 0,``,n)},C=(e,t)=>{if(t.length===0||e==null)return e;for(let n of e.keys())if(n!==``&&t.startsWith(n))return C(e.get(n),t.slice(n.length))},w=(e,t)=>{let n=t.length;outer:for(let r=0;e&&r<n;){for(let i of e.keys())if(i!==``&&t[r]===i[0]){let a=Math.min(n-r,i.length),o=1;for(;o<a&&t[r+o]===i[o];)++o;let s=e.get(i);if(o===i.length)e=s;else{let n=/* @__PURE__ */ new Map;n.set(i.slice(o),s),e.set(t.slice(r,r+o),n),e.delete(i),e=n}r+=o;continue outer}let i=/* @__PURE__ */ new Map;return e.set(t.slice(r),i),i}return e},T=(e,t)=>{let[n,r]=S(e,t);if(n!==void 0){if(n.delete(``),n.size===0)E(r);else if(n.size===1){let[e,t]=n.entries().next().value;D(r,e,t)}}},E=e=>{if(e.length===0)return;let[t,n]=O(e);if(t.delete(n),t.size===0)E(e.slice(0,-1));else if(t.size===1){let[n,r]=t.entries().next().value;n!==``&&D(e.slice(0,-1),n,r)}},D=(e,t,n)=>{if(e.length===0)return;let[r,i]=O(e);r.set(i+t,n),r.delete(i)},O=e=>e[e.length-1];var k=class e{constructor(e){if(e?.fields==null)throw Error(`MiniSearch: option "fields" must be provided`);let t=e.autoVacuum==null||e.autoVacuum===!0?B:e.autoVacuum;this._options={...F,...e,autoVacuum:t,searchOptions:{...I,...e.searchOptions||{}},autoSuggestOptions:{...L,...e.autoSuggestOptions||{}}},this._index=new x,this._documentCount=0,this._documentIds=/* @__PURE__ */ new Map,this._idToShortId=/* @__PURE__ */ new Map,this._fieldIds={},this._fieldLength=/* @__PURE__ */ new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=/* @__PURE__ */ new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=z,this.addFields(this._options.fields)}add(e){let{extractField:t,stringifyField:n,tokenize:r,processTerm:i,fields:a,idField:o}=this._options,s=t(e,o);if(s==null)throw Error(`MiniSearch: document does not have ID field "${o}"`);if(this._idToShortId.has(s))throw Error(`MiniSearch: duplicate ID ${s}`);let c=this.addDocumentId(s);this.saveStoredFields(c,e);for(let o of a){let a=t(e,o);if(a==null)continue;let s=r(n(a,o),o),l=this._fieldIds[o],u=new Set(s).size;this.addFieldLength(c,l,this._documentCount-1,u);for(let e of s){let t=i(e,o);if(Array.isArray(t))for(let e of t)this.addTerm(l,c,e);else t&&this.addTerm(l,c,t)}}}addAll(e){for(let t of e)this.add(t)}addAllAsync(e,t={}){let{chunkSize:n=10}=t,r={chunk:[],promise:Promise.resolve()},{chunk:i,promise:a}=e.reduce(({chunk:e,promise:t},r,i)=>(e.push(r),(i+1)%n===0?{chunk:[],promise:t.then(()=>new Promise(e=>setTimeout(e,0))).then(()=>this.addAll(e))}:{chunk:e,promise:t}),r);return a.then(()=>this.addAll(i))}remove(e){let{tokenize:t,processTerm:n,extractField:r,stringifyField:i,fields:a,idField:o}=this._options,s=r(e,o);if(s==null)throw Error(`MiniSearch: document does not have ID field "${o}"`);let c=this._idToShortId.get(s);if(c==null)throw Error(`MiniSearch: cannot remove document with ID ${s}: it is not in the index`);for(let o of a){let a=r(e,o);if(a==null)continue;let s=t(i(a,o),o),l=this._fieldIds[o],u=new Set(s).size;this.removeFieldLength(c,l,this._documentCount,u);for(let e of s){let t=n(e,o);if(Array.isArray(t))for(let e of t)this.removeTerm(l,c,e);else t&&this.removeTerm(l,c,t)}}this._storedFields.delete(c),this._documentIds.delete(c),this._idToShortId.delete(s),this._fieldLength.delete(c),--this._documentCount}removeAll(e){if(e)for(let t of e)this.remove(t);else if(arguments.length>0)throw Error(`Expected documents to be present. Omit the argument to remove all documents.`);else this._index=new x,this._documentCount=0,this._documentIds=/* @__PURE__ */ new Map,this._idToShortId=/* @__PURE__ */ new Map,this._fieldLength=/* @__PURE__ */ new Map,this._avgFieldLength=[],this._storedFields=/* @__PURE__ */ new Map,this._nextId=0}discard(e){let t=this._idToShortId.get(e);if(t==null)throw Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((e,n)=>{this.removeFieldLength(t,n,this._documentCount,e)}),this._fieldLength.delete(t),--this._documentCount,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;let{minDirtFactor:e,minDirtCount:t,batchSize:n,batchWait:r}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:r},{minDirtCount:t,minDirtFactor:e})}discardAll(e){let t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(let t of e)this.discard(t)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){let{idField:t,extractField:n}=this._options,r=n(e,t);this.discard(r),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum??=this._currentVacuum.then(()=>{let t=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=z,this.performVacuuming(e,t)}),this._enqueuedVacuum):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,t){let n=this._dirtCount;if(this.vacuumConditionsMet(t)){let t=e.batchSize||R.batchSize,r=e.batchWait||R.batchWait,i=1;for(let[e,n]of this._index){for(let[e,t]of n)for(let[r]of t)this._documentIds.has(r)||(t.size<=1?n.delete(e):t.delete(r));this._index.get(e).size===0&&this._index.delete(e),i%t===0&&await new Promise(e=>setTimeout(e,r)),i+=1}this._dirtCount-=n}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:n}=e;return t||=B.minDirtCount,n||=B.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=n}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){let t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(t,n={}){let{searchOptions:r}=this._options,i={...r,...n},a=this.executeQuery(t,n),o=[];for(let[e,{score:t,terms:n,match:r}]of a){let a=n.length||1,s={id:this._documentIds.get(e),score:t*a,terms:Object.keys(r),queryTerms:n,match:r};Object.assign(s,this._storedFields.get(e)),(i.filter==null||i.filter(s))&&o.push(s)}return t===e.wildcard&&i.boostDocument==null||o.sort(U),o}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};let n=/* @__PURE__ */ new Map;for(let{score:r,terms:i}of this.search(e,t)){let e=i.join(` `),t=n.get(e);t==null?n.set(e,{score:r,terms:i,count:1}):(t.score+=r,t.count+=1)}let r=[];for(let[e,{score:t,terms:i,count:a}]of n)r.push({suggestion:e,terms:i,score:t/a});return r.sort(U),r}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw Error(`MiniSearch: loadJSON should be given the same options used when serializing the index`);return this.loadJS(JSON.parse(e),t)}static async loadJSONAsync(e,t){if(t==null)throw Error(`MiniSearch: loadJSON should be given the same options used when serializing the index`);return this.loadJSAsync(JSON.parse(e),t)}static getDefault(e){if(F.hasOwnProperty(e))return A(F,e);throw Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){let{index:n,documentIds:r,fieldLength:i,storedFields:a,serializationVersion:o}=e,s=this.instantiateMiniSearch(e,t);s._documentIds=G(r),s._fieldLength=G(i),s._storedFields=G(a);for(let[e,t]of s._documentIds)s._idToShortId.set(t,e);for(let[e,t]of n){let n=/* @__PURE__ */ new Map;for(let e of Object.keys(t)){let r=t[e];o===1&&(r=r.ds),n.set(parseInt(e,10),G(r))}s._index.set(e,n)}return s}static async loadJSAsync(e,t){let{index:n,documentIds:r,fieldLength:i,storedFields:a,serializationVersion:o}=e,s=this.instantiateMiniSearch(e,t);s._documentIds=await K(r),s._fieldLength=await K(i),s._storedFields=await K(a);for(let[e,t]of s._documentIds)s._idToShortId.set(t,e);let c=0;for(let[e,t]of n){let n=/* @__PURE__ */ new Map;for(let e of Object.keys(t)){let r=t[e];o===1&&(r=r.ds),n.set(parseInt(e,10),await K(r))}++c%1e3==0&&await q(0),s._index.set(e,n)}return s}static instantiateMiniSearch(t,n){let{documentCount:r,nextId:i,fieldIds:a,averageFieldLength:o,dirtCount:s,serializationVersion:c}=t;if(c!==1&&c!==2)throw Error(`MiniSearch: cannot deserialize an index created with an incompatible version`);let l=new e(n);return l._documentCount=r,l._nextId=i,l._idToShortId=/* @__PURE__ */ new Map,l._fieldIds=a,l._avgFieldLength=o,l._dirtCount=s||0,l._index=new x,l}executeQuery(t,n={}){if(t===e.wildcard)return this.executeWildcardQuery(n);if(typeof t!=`string`){let e={...n,...t,queries:void 0},r=t.queries.map(t=>this.executeQuery(t,e));return this.combineResults(r,e.combineWith)}let{tokenize:r,processTerm:i,searchOptions:a}=this._options,o={tokenize:r,processTerm:i,...a,...n},{tokenize:s,processTerm:c}=o,l=s(t).flatMap(e=>c(e)).filter(e=>!!e).map(P(o)).map(e=>this.executeQuerySpec(e,o));return this.combineResults(l,o.combineWith)}executeQuerySpec(e,t){let n={...this._options.searchOptions,...t},r=(n.fields||this._options.fields).reduce((e,t)=>({...e,[t]:A(n.boost,t)||1}),{}),{boostDocument:i,weights:a,maxFuzzy:o,bm25:s}=n,{fuzzy:c,prefix:l}={...I.weights,...a},u=this._index.get(e.term),d=this.termResults(e.term,e.term,1,e.termBoost,u,r,i,s),f,p;if(e.prefix&&(f=this._index.atPrefix(e.term)),e.fuzzy){let t=e.fuzzy===!0?.2:e.fuzzy,n=t<1?Math.min(o,Math.round(e.term.length*t)):t;n&&(p=this._index.fuzzyGet(e.term,n))}if(f)for(let[t,n]of f){let a=t.length-e.term.length;if(!a)continue;p?.delete(t);let o=l*t.length/(t.length+.3*a);this.termResults(e.term,t,o,e.termBoost,n,r,i,s,d)}if(p)for(let t of p.keys()){let[n,a]=p.get(t);if(!a)continue;let o=c*t.length/(t.length+a);this.termResults(e.term,t,o,e.termBoost,n,r,i,s,d)}return d}executeWildcardQuery(e){let t=/* @__PURE__ */ new Map,n={...this._options.searchOptions,...e};for(let[e,r]of this._documentIds){let i=n.boostDocument?n.boostDocument(r,``,this._storedFields.get(e)):1;t.set(e,{score:i,terms:[],match:{}})}return t}combineResults(e,t=`or`){if(e.length===0)return/* @__PURE__ */ new Map;let n=t.toLowerCase(),r=j[n];if(!r)throw Error(`Invalid combination operator: ${t}`);return e.reduce(r)||/* @__PURE__ */ new Map}toJSON(){let e=[];for(let[t,n]of this._index){let r={};for(let[e,t]of n)r[e]=Object.fromEntries(t);e.push([t,r])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,n,r,i,a,o,s,c=/* @__PURE__ */ new Map){if(i==null)return c;for(let l of Object.keys(a)){let u=a[l],d=this._fieldIds[l],f=i.get(d);if(f==null)continue;let p=f.size,m=this._avgFieldLength[d];for(let i of f.keys()){if(!this._documentIds.has(i)){this.removeTerm(d,i,t),--p;continue}let a=o?o(this._documentIds.get(i),t,this._storedFields.get(i)):1;if(!a)continue;let h=f.get(i),g=this._fieldLength.get(i)[d],_=N(h,p,this._documentCount,g,m,s),v=n*r*u*a*_,y=c.get(i);if(y){y.score+=v,V(y.terms,e);let n=A(y.match,t);n?n.push(l):y.match[t]=[l]}else c.set(i,{score:v,terms:[e],match:{[t]:[l]}})}}return c}addTerm(e,t,n){let r=this._index.fetch(n,W),i=r.get(e);if(i==null)i=/* @__PURE__ */ new Map,i.set(t,1),r.set(e,i);else{let e=i.get(t);i.set(t,(e||0)+1)}}removeTerm(e,t,n){if(!this._index.has(n)){this.warnDocumentChanged(t,e,n);return}let r=this._index.fetch(n,W),i=r.get(e);i==null||i.get(t)==null?this.warnDocumentChanged(t,e,n):i.get(t)<=1?i.size<=1?r.delete(e):i.delete(t):i.set(t,i.get(t)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(e,t,n){for(let r of Object.keys(this._fieldIds))if(this._fieldIds[r]===t){this._options.logger(`warn`,`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${n}" was not present in field "${r}". Removing a document after it has changed can corrupt the index!`,`version_conflict`);return}}addDocumentId(e){let t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,n,r){let i=this._fieldLength.get(e);i??this._fieldLength.set(e,i=[]),i[t]=r;let a=(this._avgFieldLength[t]||0)*n+r;this._avgFieldLength[t]=a/(n+1)}removeFieldLength(e,t,n,r){if(n===1){this._avgFieldLength[t]=0;return}let i=this._avgFieldLength[t]*n-r;this._avgFieldLength[t]=i/(n-1)}saveStoredFields(e,t){let{storeFields:n,extractField:r}=this._options;if(n==null||n.length===0)return;let i=this._storedFields.get(e);i??this._storedFields.set(e,i={});for(let e of n){let n=r(t,e);n!==void 0&&(i[e]=n)}}};k.wildcard=Symbol(`*`);const A=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,j={or:(e,t)=>{for(let n of t.keys()){let r=e.get(n);if(r==null)e.set(n,t.get(n));else{let{score:e,terms:i,match:a}=t.get(n);r.score+=e,r.match=Object.assign(r.match,a),H(r.terms,i)}}return e},and:(e,t)=>{let n=/* @__PURE__ */ new Map;for(let r of t.keys()){let i=e.get(r);if(i==null)continue;let{score:a,terms:o,match:s}=t.get(r);H(i.terms,o),n.set(r,{score:i.score+a,terms:i.terms,match:Object.assign(i.match,s)})}return n},and_not:(e,t)=>{for(let n of t.keys())e.delete(n);return e}},M={k:1.2,b:.7,d:.5},N=(e,t,n,r,i,a)=>{let{k:o,b:s,d:c}=a;return Math.log(1+(n-t+.5)/(t+.5))*(c+e*(o+1)/(e+o*(1-s+s*r/i)))},P=e=>(t,n,r)=>({term:t,fuzzy:typeof e.fuzzy==`function`?e.fuzzy(t,n,r):e.fuzzy||!1,prefix:typeof e.prefix==`function`?e.prefix(t,n,r):e.prefix===!0,termBoost:typeof e.boostTerm==`function`?e.boostTerm(t,n,r):1}),F={idField:`id`,extractField:(e,t)=>e[t],stringifyField:(e,t)=>e.toString(),tokenize:e=>e.split(J),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof(console==null?void 0:console[e])==`function`&&console[e](t)},autoVacuum:!0},I={combineWith:`or`,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:M},L={combineWith:`and`,prefix:(e,t,n)=>t===n.length-1},R={batchSize:1e3,batchWait:10},z={minDirtFactor:.1,minDirtCount:20},B={...R,...z},V=(e,t)=>{e.includes(t)||e.push(t)},H=(e,t)=>{for(let n of t)e.includes(n)||e.push(n)},U=({score:e},{score:t})=>t-e,W=()=>/* @__PURE__ */ new Map,G=e=>{let t=/* @__PURE__ */ new Map;for(let n of Object.keys(e))t.set(parseInt(n,10),e[n]);return t},K=async e=>{let t=/* @__PURE__ */ new Map,n=0;for(let r of Object.keys(e))t.set(parseInt(r,10),e[r]),++n%1e3==0&&await q(0);return t},q=e=>new Promise(t=>setTimeout(t,e)),J=/[\n\r\p{Z}\p{P}]+/u;function Y(e,t){let n=e.fullPath.slice(0,-1).map((t,n)=>e.fullPath.slice(0,n+1).join(` `));return{command:e.command,summary:e.summary||e.description.split(`
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-MNz2D-PD.mjs";import{i as n}from"./context-q-6bMSL-.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-DaQ4MzBI.mjs";import{t as o}from"./run-Clc3P2u7.mjs";import"./telemetry-Bdv5LZZs.mjs";import{n as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-KWYZvJWM.mjs";var p={method:`GET`,path:t=>e`/zones/${t.zone_id}/page_shield/connections/${t.connection_id}`};function m(e){return e.usage(`$0 client-side-security connections get <connection-id>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as s,t as c}from"./body-parser-DnBfDdx3.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,i as d,n as f}from"./prompt-C0hKSr-R.mjs";var p={method:`GET`,path:t=>e`/zones/${t.zone_id}/page_shield/connections/${t.connection_id}`};function m(e){return e.usage(`$0 client-side-security connections get <connection-id>
3
3
 
4
4
  Returns a webpage connection detected on the zone by connection ID.`).positional(`connection-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <connection-id>`,describe:`Get a detected connection`,builder:m,handler:async e=>o({command:`client-side-security connections get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf client-side-security connections get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/page_shield/connections/${e[`connection-id`]==null?`<connection-id>`:encodeURIComponent(String(e[`connection-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"connection-id":String(e[`connection-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(p,{zone_id:s,connection_id:e[`connection-id`]}));r(c,{successLabel:`Loaded`})})};var g={method:`GET`,path:t=>e`/zones/${t.zone_id}/page_shield/connections`,query:[`exclude_urls`,`urls`,`hosts`,`page`,`per_page`,`order_by`,`direction`,`prioritize_malicious`,`exclude_cdn_cgi`,`status`,`page_url`,`export`]};function _(e){return e.usage(`$0 client-side-security connections list
5
5