cf 0.15.0 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/LICENSE-APACHE +176 -0
  2. package/LICENSE-MIT +25 -0
  3. package/README.md +6 -7
  4. package/dist/_meta/commands.json +62 -6
  5. package/dist/_meta/hand-written-commands.json +31 -1
  6. package/dist/_meta/schemas.json +23 -1
  7. package/dist/{abuse-reports-BAQR1w79.mjs → abuse-reports-Dd6kJM7r.mjs} +1 -1
  8. package/dist/{access-C8KMplzp.mjs → access-C_2rEi0H.mjs} +1 -1
  9. package/dist/{account-B-KQSR0L.mjs → account-CZ9SPVdz.mjs} +1 -1
  10. package/dist/{account-tags-EncLJpLc.mjs → account-tags-DAf-hq1m.mjs} +1 -1
  11. package/dist/{accounts-BA4Mp3A_.mjs → accounts-BDIKjiG2.mjs} +1 -1
  12. package/dist/{acm-ByxUJcqF.mjs → acm-D-q1FVWJ.mjs} +1 -1
  13. package/dist/{addressing-C-ym0h0G.mjs → addressing-0w2U1NEy.mjs} +1 -1
  14. package/dist/{agent-memory-CkPSiZDI.mjs → agent-memory-Drumm4qd.mjs} +1 -1
  15. package/dist/{ai-DkE_Q64s.mjs → ai-ARwLeQ1O.mjs} +1 -1
  16. package/dist/{ai-audit-pPcjYWI5.mjs → ai-audit-CPrmohqf.mjs} +1 -1
  17. package/dist/{ai-gateway-DtrwF1lQ.mjs → ai-gateway-DNY4FPF2.mjs} +1 -1
  18. package/dist/{ai-search-DLD_kDS1.mjs → ai-search-B5l4IDSR.mjs} +1 -1
  19. package/dist/{ai-security-jyZcBl9g.mjs → ai-security-C7_IGDDl.mjs} +1 -1
  20. package/dist/{alerting-DOROjm8E.mjs → alerting-B6m1Rhf4.mjs} +1 -1
  21. package/dist/{analytics-rQ-h-plT.mjs → analytics-nnzFBB_7.mjs} +1 -1
  22. package/dist/{analytics_engine-Cg9gCAMt.mjs → analytics_engine-BvjKCwn1.mjs} +1 -1
  23. package/dist/{api-security-B8p8vp8u.mjs → api-security-B9IozS2a.mjs} +1 -1
  24. package/dist/{argo-g8SjUb_t.mjs → argo-C_QcqR6P.mjs} +1 -1
  25. package/dist/{artifacts-B1PaeF5h.mjs → artifacts-DDFNpYBz.mjs} +1 -1
  26. package/dist/{audit-logs-DmU_PHy_.mjs → audit-logs-cTzNV0DV.mjs} +1 -1
  27. package/dist/{auth-Cp7gT-AF.mjs → auth-DJhSjNNL.mjs} +1 -1
  28. package/dist/{auth-CZqics6E.mjs → auth-sAorfdWU.mjs} +1 -1
  29. package/dist/{billing-CvTbUg-H.mjs → billing-DU2X-q-x.mjs} +1 -1
  30. package/dist/{bot-management-z53tbcbH.mjs → bot-management-BHAAoZOh.mjs} +1 -1
  31. package/dist/{botnet-feed-CSBbJdr_.mjs → botnet-feed-DOOnGVVY.mjs} +1 -1
  32. package/dist/{brand-protection-DzV211IQ.mjs → brand-protection-C_DYa7IK.mjs} +1 -1
  33. package/dist/{browser-extension-C0Hi9CHX.mjs → browser-extension-C48pKh3t.mjs} +1 -1
  34. package/dist/{browser-run-DYQvMAyo.mjs → browser-run-Dw-vgWGR.mjs} +1 -1
  35. package/dist/build-1a8CiNIT.mjs +2 -0
  36. package/dist/build-Ca_drQY2.mjs +2 -0
  37. package/dist/{builds-CwKRqjQ5.mjs → builds-CO0MmSd3.mjs} +1 -1
  38. package/dist/{cache-CugNPPsJ.mjs → cache-XxusQxXe.mjs} +1 -1
  39. package/dist/{certificate-authorities-DaEnJYge.mjs → certificate-authorities-Dmxh7w-Z.mjs} +1 -1
  40. package/dist/{client-certificates-DZUIqBTB.mjs → client-certificates-CgaIc3zN.mjs} +1 -1
  41. package/dist/{client-side-security-Dk6F1ENG.mjs → client-side-security-D7NWV0YH.mjs} +1 -1
  42. package/dist/{cloud-connector-avpf86kG.mjs → cloud-connector-XMFOTNqT.mjs} +1 -1
  43. package/dist/{cloudforce-one-DNRhUD8z.mjs → cloudforce-one-Cew4MHvA.mjs} +1 -1
  44. package/dist/{command-B2Qe-WUa.mjs → command-CsZFRm3P.mjs} +1 -1
  45. package/dist/{command-DIvPLK8x.mjs → command-DBz8QiFk.mjs} +1 -1
  46. package/dist/command-RiZ_LYcm.mjs +2 -0
  47. package/dist/{connector-interrupts-BSztJ-Ko.mjs → connector-interrupts-BfQN_pm6.mjs} +1 -1
  48. package/dist/{connector-telemetry-events-_M8CCK6_.mjs → connector-telemetry-events-B7qLZsZJ.mjs} +1 -1
  49. package/dist/{connector-telemetry-snapshots-DySvmR9a.mjs → connector-telemetry-snapshots-Ckvg9BPc.mjs} +1 -1
  50. package/dist/{connectors-BSmhzNB7.mjs → connectors-BhvAP5fb.mjs} +1 -1
  51. package/dist/{containers-B5vDcFzo.mjs → containers-Bl3EY-cy.mjs} +1 -1
  52. package/dist/{containers-CFzvhmyz.mjs → containers-Cq1gtnq6.mjs} +1 -1
  53. package/dist/{content-scan-CeLZAcbT.mjs → content-scan-BYGe9fFj.mjs} +1 -1
  54. package/dist/{cps-BlI_Od72.mjs → cps-BWMDWeVq.mjs} +1 -1
  55. package/dist/{csamScanner-Cn7d0HWS.mjs → csamScanner-DMYGzLNi.mjs} +1 -1
  56. package/dist/{ct-alerting-lhgFPu-y.mjs → ct-alerting-Vq4l2s7n.mjs} +1 -1
  57. package/dist/{custom-certificates-Ba4Do5qt.mjs → custom-certificates-BDEHH0Ym.mjs} +1 -1
  58. package/dist/{custom-csrs-MNUIx8yX.mjs → custom-csrs-CHSkZNdX.mjs} +1 -1
  59. package/dist/{custom-hostnames-Dj1SBd0J.mjs → custom-hostnames-Bch3iQZC.mjs} +1 -1
  60. package/dist/{custom-nameservers-C7nzhNzV.mjs → custom-nameservers-Tdvu1-vr.mjs} +1 -1
  61. package/dist/{custom-pages-BgfhGksj.mjs → custom-pages-rFsiIXlr.mjs} +1 -1
  62. package/dist/{d1-P2kWbdID.mjs → d1-C1GK7DsW.mjs} +1 -1
  63. package/dist/{data-security-pBIozmRL.mjs → data-security-DDhPnX8Z.mjs} +1 -1
  64. package/dist/{dcv-delegation-Bpy9WnKZ.mjs → dcv-delegation-D6xiYj2l.mjs} +1 -1
  65. package/dist/{deploy-CVYdt3NK.mjs → deploy-D04Xvm0m.mjs} +1 -1
  66. package/dist/{deploy-input-DpOgndz4.mjs → deploy-input-COEKxOA1.mjs} +1 -1
  67. package/dist/{dev-PPUBjWcm.mjs → dev-CVD3BVUG.mjs} +1 -1
  68. package/dist/{diagnostics-C62habGQ.mjs → diagnostics-BZVAAguV.mjs} +1 -1
  69. package/dist/{dialog-C_ccBiZp.mjs → dialog--iw0F2s-.mjs} +1 -1
  70. package/dist/{dist-B4pQ4CXK.mjs → dist-CUUGKvjh.mjs} +1 -1
  71. package/dist/{dls-CpkcyQ8C.mjs → dls-BsnURYja.mjs} +1 -1
  72. package/dist/{dns-DG1X4Wap.mjs → dns-B_nTXhuM.mjs} +1 -1
  73. package/dist/{dns-firewall-B1gGHEDo.mjs → dns-firewall-DDsrdulo.mjs} +1 -1
  74. package/dist/{durable-objects-D214VhxH.mjs → durable-objects-8U8DpF9q.mjs} +1 -1
  75. package/dist/{email-auth-Ba4ONan2.mjs → email-auth-CzjtGH6g.mjs} +1 -1
  76. package/dist/{email-routing-BlqKnqNM.mjs → email-routing-B92fty1-.mjs} +1 -1
  77. package/dist/{email-security-Dl1E1Dko.mjs → email-security-keTqF0nJ.mjs} +1 -1
  78. package/dist/{email-sending-DIRSSRIz.mjs → email-sending-B7f95epu.mjs} +5 -5
  79. package/dist/error-sanitization-Cbd_oegl.mjs +2 -0
  80. package/dist/{error-sanitization-DOlqWkNu.mjs → error-sanitization-DwOlM3R7.mjs} +1 -1
  81. package/dist/{fieldExtractors-zqYKMCEn.mjs → fieldExtractors-DL_H1m7E.mjs} +1 -1
  82. package/dist/{firewall-DdsDh8GD.mjs → firewall-67qoXiqD.mjs} +1 -1
  83. package/dist/{flagship-CkUIVW7c.mjs → flagship-CjC3dF7L.mjs} +1 -1
  84. package/dist/{fraud-BUpZgvQT.mjs → fraud-DU_YCLC5.mjs} +1 -1
  85. package/dist/{google-tag-gateway-Bi1uLnEU.mjs → google-tag-gateway-xqN-QudN.mjs} +1 -1
  86. package/dist/{healthchecks-DjQWb3EM.mjs → healthchecks-COnq1YOx.mjs} +1 -1
  87. package/dist/{hostnames-ClBLPbct.mjs → hostnames-CxRAY_Pp.mjs} +1 -1
  88. package/dist/{hyperdrive-U54xZsWU.mjs → hyperdrive-DPWyiXpj.mjs} +1 -1
  89. package/dist/{iam-T-wWmOep.mjs → iam-CtX9NPCy.mjs} +1 -1
  90. package/dist/{images-ia5UG1GW.mjs → images-CuWFOsGw.mjs} +1 -1
  91. package/dist/index.mjs +1 -1
  92. package/dist/{intel-BhswZLMI.mjs → intel-BeGV3VXt.mjs} +1 -1
  93. package/dist/{ips-Dad_EvhM.mjs → ips-d6aoKAI4.mjs} +1 -1
  94. package/dist/{keyless-certificates-BhHaxLjM.mjs → keyless-certificates-Dvib4jhw.mjs} +1 -1
  95. package/dist/{keys-DjIPvqj4.mjs → keys-Fyf3vWcA.mjs} +1 -1
  96. package/dist/{kv-DzXVnK94.mjs → kv-CA4J7cCq.mjs} +1 -1
  97. package/dist/{leaked-credential-checks-B9G_ZTNH.mjs → leaked-credential-checks-B7ewx3W-.mjs} +1 -1
  98. package/dist/{load-balancers-3wGHPsYz.mjs → load-balancers-DHD4f2CT.mjs} +1 -1
  99. package/dist/{login-CEQbOgBM.mjs → login-CLW108XX.mjs} +1 -1
  100. package/dist/{login-DEWvGuaU.mjs → login-xgRjiyJa.mjs} +1 -1
  101. package/dist/{logo-matches-YGRPstPi.mjs → logo-matches-BAX8v3iL.mjs} +1 -1
  102. package/dist/{logos-BirufUgo.mjs → logos-BWBVGwU6.mjs} +1 -1
  103. package/dist/{logpush-BlNbUHyV.mjs → logpush-CZKR8DHO.mjs} +1 -1
  104. package/dist/{logs-DmFlVF9q.mjs → logs-CiDyrqEu.mjs} +1 -1
  105. package/dist/{magic-cloud-networking-B3Wj2dhJ.mjs → magic-cloud-networking-DttrBXqd.mjs} +1 -1
  106. package/dist/{magic-network-monitoring-ry63w2Rw.mjs → magic-network-monitoring-9VXDSYuL.mjs} +1 -1
  107. package/dist/{magic-transit-CBVOK2aa.mjs → magic-transit-Dsu_cSGM.mjs} +1 -1
  108. package/dist/{managed-defense-BdW6s483.mjs → managed-defense-SYreve4W.mjs} +1 -1
  109. package/dist/{managed-transforms-BIeiofIS.mjs → managed-transforms-CzSy_xPw.mjs} +1 -1
  110. package/dist/{matches-CAnwci0P.mjs → matches-qf7GReyu.mjs} +1 -1
  111. package/dist/{mcp-BfhOMGFE.mjs → mcp-DYSk5_gc.mjs} +1 -1
  112. package/dist/{mesh-CxUL2Wf-.mjs → mesh-DdY07OYt.mjs} +1 -1
  113. package/dist/{mtls-certificates-CzmTw4zs.mjs → mtls-certificates-LXlgdkf1.mjs} +1 -1
  114. package/dist/{network-C68psMbz.mjs → network-DpaZ5LJL.mjs} +1 -1
  115. package/dist/{network-interconnects-CLsMrTuk.mjs → network-interconnects-C4uUoeNa.mjs} +1 -1
  116. package/dist/{oauth-D4bkeMAw.mjs → oauth-Dzk6Gy-6.mjs} +1 -1
  117. package/dist/{oauth-clients-DbUmVE_5.mjs → oauth-clients-D7Ou7oAS.mjs} +1 -1
  118. package/dist/{oauth-DouM-qz0.mjs → oauth-nsTDJ0dF.mjs} +1 -1
  119. package/dist/{oauth-scopes-CQ18rwBg.mjs → oauth-scopes-BFoE82Mv.mjs} +1 -1
  120. package/dist/{observability-DpYxkFeZ.mjs → observability-smcOFbC1.mjs} +1 -1
  121. package/dist/{organization-Dg55Xfz7.mjs → organization-Dyf_0mq4.mjs} +1 -1
  122. package/dist/{organizations-QnyzGjB2.mjs → organizations-D7zGPLVm.mjs} +1 -1
  123. package/dist/{origin-ca-certificates-Co5lqIGL.mjs → origin-ca-certificates-DJrp29gv.mjs} +1 -1
  124. package/dist/{origin-post-quantum-encryption-Cz8JZamC.mjs → origin-post-quantum-encryption-BYj3kJiq.mjs} +1 -1
  125. package/dist/{origin-tls-client-auth-Dd0T1Kfv.mjs → origin-tls-client-auth-j0tGh6Fy.mjs} +1 -1
  126. package/dist/{page-rules--D3eXrCf.mjs → page-rules-CLzba_nr.mjs} +1 -1
  127. package/dist/{pages-Ce8DDgNr.mjs → pages-pah6dZBJ.mjs} +1 -1
  128. package/dist/{pay-per-crawl-CpkEbasz.mjs → pay-per-crawl-DbaTVI8V.mjs} +1 -1
  129. package/dist/{pay-per-use-fyM1DWgY.mjs → pay-per-use-BEvtoppJ.mjs} +1 -1
  130. package/dist/{pipelines-CAqCgBLh.mjs → pipelines-lps71uoA.mjs} +1 -1
  131. package/dist/{precursor-DBnn4Q35.mjs → precursor-DTTYLDEa.mjs} +1 -1
  132. package/dist/previews-B89cUmpr.mjs +4 -0
  133. package/dist/{progress-Bi02B6v4.mjs → progress-D_mL-Kcy.mjs} +1 -1
  134. package/dist/{prompt-Bx2PB-tt.mjs → prompt-sL_yMZbI.mjs} +1 -1
  135. package/dist/{queries-dg-CVXjf.mjs → queries-EJYlFw8m.mjs} +1 -1
  136. package/dist/{queues-C_ilLbRI.mjs → queues-CozKGaA4.mjs} +1 -1
  137. package/dist/{r2-hZAkra-l.mjs → r2-Chn_JQUM.mjs} +1 -1
  138. package/dist/{r2-data-catalog-DGv6aROr.mjs → r2-data-catalog-Bfn3AWzn.mjs} +1 -1
  139. package/dist/{radar-BO9b0aZy.mjs → radar-NmpdyMo5.mjs} +1 -1
  140. package/dist/{raw-fetch-DNTQkXbg.mjs → raw-fetch-lSVttVJF.mjs} +1 -1
  141. package/dist/{realtime-eSavuSeE.mjs → realtime-iWTz8WbH.mjs} +1 -1
  142. package/dist/{registrar-Ct30kOXZ.mjs → registrar-Cza1L8i_.mjs} +1 -1
  143. package/dist/{registrar-sandbox-Dmn9zGUk.mjs → registrar-sandbox-BP4GQg5s.mjs} +1 -1
  144. package/dist/{reporting-B-F5aWUJ.mjs → reporting-gvXX2MxY.mjs} +1 -1
  145. package/dist/{request-headers-Dnbzv6RZ.mjs → request-headers-POBKmu93.mjs} +1 -1
  146. package/dist/{request-tracers-CaubpUFV.mjs → request-tracers-F8a_aj32.mjs} +1 -1
  147. package/dist/{resource-sharing-6Snv-b69.mjs → resource-sharing-D6XWIDmb.mjs} +1 -1
  148. package/dist/{resource-tagging-W_LFiX2J.mjs → resource-tagging-c_z4VZt0.mjs} +1 -1
  149. package/dist/{rules-C26eyeA5.mjs → rules-_QDaG3U5.mjs} +1 -1
  150. package/dist/{rulesets-BKzIwVtJ.mjs → rulesets-Bc4ZuPG_.mjs} +1 -1
  151. package/dist/{rum-Xdw5hyWY.mjs → rum-ChPyfpM2.mjs} +1 -1
  152. package/dist/{run-BBBMrSrs.mjs → run-DtN51G2A.mjs} +1 -1
  153. package/dist/run-oACgYK8I.mjs +2 -0
  154. package/dist/{schema-DqtYndhB.mjs → schema-DZSSJaY0.mjs} +1 -1
  155. package/dist/{schema-flags-CebDI0f1.mjs → schema-flags-C9lbLgE-.mjs} +1 -1
  156. package/dist/{scim-odJTXiIe.mjs → scim-BjiswXbC.mjs} +1 -1
  157. package/dist/{sdk-CvIO3tWS.mjs → sdk-CsWOex96.mjs} +1 -1
  158. package/dist/{secrets-store-RYpWWzaw.mjs → secrets-store-Cn3D5a0d.mjs} +1 -1
  159. package/dist/{security-center-B3D95vCa.mjs → security-center-DP4GC1cG.mjs} +1 -1
  160. package/dist/{security-txt-BSytVv-9.mjs → security-txt-CaR5Idmz.mjs} +1 -1
  161. package/dist/shared-W9uoX1-W.mjs +2 -0
  162. package/dist/{smart-shield-C83Sfnf4.mjs → smart-shield-CphSzoh4.mjs} +1 -1
  163. package/dist/{snippets-B6oE9WIa.mjs → snippets-r-Mre0cE.mjs} +1 -1
  164. package/dist/{spawn-CKqJ9J4_.mjs → spawn-BWEuIO-w.mjs} +1 -1
  165. package/dist/{spectrum-CfxY--X_.mjs → spectrum-BhjCVFZk.mjs} +1 -1
  166. package/dist/{speed-DzK-kiWt.mjs → speed-CPgypY7n.mjs} +1 -1
  167. package/dist/{src-B3h6tKMt.mjs → src-Hw-TlVAO.mjs} +5 -5
  168. package/dist/{ssl-dnjzPcSB.mjs → ssl-DsMrXyqK.mjs} +1 -1
  169. package/dist/{stream-oFyhS4Wi.mjs → stream-L2NmGPby.mjs} +1 -1
  170. package/dist/{submit-4f-ravmC.mjs → submit-KN0Ul5fV.mjs} +1 -1
  171. package/dist/{tags-DrIP6Uiq.mjs → tags-CZMFKGdP.mjs} +1 -1
  172. package/dist/{telemetry-Ds4epd3D.mjs → telemetry-CSj_ezpk.mjs} +1 -1
  173. package/dist/telemetry-DAf9gLyH.mjs +2 -0
  174. package/dist/{tenant-C-gc3NWv.mjs → tenant-Cu4P-foo.mjs} +1 -1
  175. package/dist/{tenant-custom-nameservers-DduTQIwh.mjs → tenant-custom-nameservers-Nx59Buv0.mjs} +1 -1
  176. package/dist/{tunnels-D0QYsskp.mjs → tunnels-C-mMZy4v.mjs} +1 -1
  177. package/dist/{turnstile-C6Q3spRB.mjs → turnstile-39JL9tMt.mjs} +1 -1
  178. package/dist/{update-check-CTLoakFV.mjs → update-check-BKQBD4MQ.mjs} +1 -1
  179. package/dist/update-check-CE9XB6gf.mjs +2 -0
  180. package/dist/update-check-worker.mjs +1 -1
  181. package/dist/{url-info-Cs0V89qq.mjs → url-info-7ikewAnp.mjs} +1 -1
  182. package/dist/{url-normalization-DaEQYy5h.mjs → url-normalization-B0D7Fhf3.mjs} +1 -1
  183. package/dist/{url-scanner-C4YVeQ4v.mjs → url-scanner-DpKIqkin.mjs} +1 -1
  184. package/dist/{user-BV1VY3Kl.mjs → user-BFq8UM1s.mjs} +1 -1
  185. package/dist/{values-qDS63E43.mjs → values-DnBYV1ZD.mjs} +1 -1
  186. package/dist/{vectorize-NFzD3mP5.mjs → vectorize-BpZ4UsUj.mjs} +1 -1
  187. package/dist/version-Bh3b9vTa.mjs +2 -0
  188. package/dist/{waiting-rooms-Y9YGj3ih.mjs → waiting-rooms-DJfqehy9.mjs} +1 -1
  189. package/dist/{web-assets-Gd6z8dbt.mjs → web-assets-CCSSW_JH.mjs} +1 -1
  190. package/dist/{web3-DCJx4NRp.mjs → web3-bbT1REPc.mjs} +1 -1
  191. package/dist/{workers-B-j-1ygi.mjs → workers-CXuyjZB8.mjs} +20 -20
  192. package/dist/{workers-builds-DPrNKjZW.mjs → workers-builds-TRF3K416.mjs} +1 -1
  193. package/dist/{workers-for-platforms-BjKAhMLA.mjs → workers-for-platforms-B57iKiSN.mjs} +1 -1
  194. package/dist/{workers-vpc-C5YoCnQK.mjs → workers-vpc-kgryQ48l.mjs} +1 -1
  195. package/dist/{workflows-C2KKIJjl.mjs → workflows-CKdPlIkK.mjs} +1 -1
  196. package/dist/{zaraz-CVLCs1IX.mjs → zaraz-BXFlEWSx.mjs} +1 -1
  197. package/dist/{zero-trust-BtJi4OXF.mjs → zero-trust-M08mBsYd.mjs} +1 -1
  198. package/dist/{zone-hKgt0WzO.mjs → zone-DHmrotGW.mjs} +1 -1
  199. package/dist/{zones-CCNyaD3J.mjs → zones-C0eKBTqG.mjs} +1 -1
  200. package/package.json +15 -3
  201. package/dist/build-BPIp8J5F.mjs +0 -2
  202. package/dist/build-OC77a1zq.mjs +0 -2
  203. package/dist/command-D45NW-R3.mjs +0 -2
  204. package/dist/error-sanitization-BkgUhGVc.mjs +0 -2
  205. package/dist/previews-y_nSqWK5.mjs +0 -4
  206. package/dist/run-BRucX7Rz.mjs +0 -2
  207. package/dist/shared-D67owd9x.mjs +0 -2
  208. package/dist/telemetry-mKEb8lYB.mjs +0 -2
  209. package/dist/update-check-BBS1K1jt.mjs +0 -2
  210. package/dist/version-W6_TN_kN.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-Bx2PB-tt.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-sL_yMZbI.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
3
3
 
4
4
  Get information about a specific permission group in an account.`).positional(`permission-group-id`,{type:`string`,description:`Permission Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <permission-group-id>`,describe:`Permission Group Details`,builder:h,handler:async c=>s({command:`iam permission-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf iam permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/iam/permission_groups/${c[`permission-group-id`]==null?`<permission-group-id>`:encodeURIComponent(String(c[`permission-group-id`]))}`,pathParams:{"permission-group-id":String(c[`permission-group-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.iam.permissionGroups.get({account_id:l,permission_group_id:c[`permission-group-id`]})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 iam permission-groups list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{a as i,r as a}from"./auth-Cp7gT-AF.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-Bi02B6v4.mjs";import{t as l}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p,t as m}from"./input-validation-Ch4Vllrm.mjs";import{a as h,i as g,n as _}from"./prompt-Bx2PB-tt.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";import{n as te,t as v}from"./raw-fetch-DNTQkXbg.mjs";function y(e){return e.usage(`$0 images create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{a as i,r as a}from"./auth-DJhSjNNL.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-D_mL-Kcy.mjs";import{t as l}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p,t as m}from"./input-validation-Ch4Vllrm.mjs";import{a as h,i as g,n as _}from"./prompt-sL_yMZbI.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";import{n as te,t as v}from"./raw-fetch-lSVttVJF.mjs";function y(e){return e.usage(`$0 images create
3
3
 
4
4
  Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const b={command:`create`,describe:`Upload an image`,builder:y,handler:async t=>l({command:`images create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:t.body,file:t.file,creator:t.creator,id:t.id,metadata:t.metadata,"require-signed-urls":t[`require-signed-urls`],url:t.url}});return}let l=await a(t),u=t.local?e:await n();if(t.accountId=u,t.file!==void 0||t.body!==void 0||t.creator!==void 0||t.id!==void 0||t.metadata!==void 0||t[`require-signed-urls`]!==void 0||t.url!==void 0){let e=new FormData;if(t.file){let n=m(t.file);e.append(`file`,new Blob([n]),t.file.split(/[\\/]/).filter(Boolean).pop())}else t.body!==void 0&&e.append(`file`,t.body);if(t.creator!==void 0&&e.append(`creator`,String(p(t.creator,`creator`,`text`)??``)),t.id!==void 0&&e.append(`id`,String(p(t.id,`id`,`text`)??``)),t.metadata!==void 0){let n=typeof t.metadata==`string`?p(t.metadata,`metadata`,`text`):t.metadata;e.append(`metadata`,typeof n==`string`?n:JSON.stringify(n))}t[`require-signed-urls`]!==void 0&&e.append(`requireSignedURLs`,String(t[`require-signed-urls`])),t.url!==void 0&&e.append(`url`,String(p(t.url,`url`,`text`)??``)),o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/images/v1`,{body:e})),{successLabel:`Created`});return}if(t.body){let e=p(t.body,`body`,`binary`);o(await c(`Creating`,async()=>i(l,`POST`,`/accounts/${u}/images/v1`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}o(await c(`Creating`,async()=>l.images.create({account_id:u})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 images delete <image-id>
5
5
 
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t,r as n,t as r}from"./src-B3h6tKMt.mjs";export{r as CliExit,t as buildCli,n as main,e as runMain};
2
+ import{i as e,n as t,r as n,t as r}from"./src-Hw-TlVAO.mjs";export{r as CliExit,t as buildCli,n as main,e as runMain};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{a as i,r as a}from"./auth-Cp7gT-AF.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-Bi02B6v4.mjs";import{t as l}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f,t as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,n as h}from"./prompt-Bx2PB-tt.mjs";import{t as g}from"./cli-types-tt_LZMbn.mjs";import{n as ee,t as te}from"./raw-fetch-DNTQkXbg.mjs";function _(e){return e.usage(`$0 intel asn get <asn>
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{a as i,r as a}from"./auth-DJhSjNNL.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-D_mL-Kcy.mjs";import{t as l}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f,t as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,n as h}from"./prompt-sL_yMZbI.mjs";import{t as g}from"./cli-types-tt_LZMbn.mjs";import{n as ee,t as te}from"./raw-fetch-lSVttVJF.mjs";function _(e){return e.usage(`$0 intel asn get <asn>
3
3
 
4
4
  Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <asn>`,describe:`Get ASN Overview.`,builder:_,handler:async t=>l({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/asn/${t.asn==null?`<asn>`:encodeURIComponent(String(t.asn))}`,pathParams:{asn:String(t.asn??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.asn.get({account_id:l,asn:t.asn})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 intel asn subnets get <asn>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-Cp7gT-AF.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bi02B6v4.mjs";import{t as i}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";function a(e){return e.usage(`$0 ips list
2
+ import{r as e}from"./auth-DJhSjNNL.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-D_mL-Kcy.mjs";import{t as i}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";function a(e){return e.usage(`$0 ips list
3
3
 
4
4
  Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:a,handler:async a=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={networks:a.networks};if(a.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.ips.list(i)),{successLabel:`Loaded`})})},s={command:`ips`,describe:`ips`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-D4bkeMAw.mjs";import{r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,n as u}from"./prompt-Bx2PB-tt.mjs";function d(e){return e.usage(`$0 keyless-certificates create
2
+ import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,n as u}from"./prompt-sL_yMZbI.mjs";function d(e){return e.usage(`$0 keyless-certificates create
3
3
 
4
4
  Creates a Keyless SSL configuration that allows SSL/TLS termination without exposing private keys to Cloudflare. Keys remain on your infrastructure.`).option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or SSL certificate and intermediate(s).`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`,default:24008}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).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([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].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 --tunnel-* flag is set`)}return!0})}const f={command:`create`,describe:`Create Keyless SSL Configuration`,builder:d,handler:async u=>a({command:`keyless-certificates create`,classification:{safeFlags:[`bundle-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf keyless-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({bundle_method:c(u[`bundle-method`],`bundle-method`,`text`),certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.keylessCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}if(u.certificate===void 0&&(u.certificate=await l(`certificate`,`The zone's SSL certificate or SSL certificate and intermediate(s).`)),u.host===void 0&&(u.host=await l(`host`,`The keyless SSL name.`)),u.port===void 0)throw Error(`--port is required (or pass --body with this field set).`);let f=s({bundle_method:c(u[`bundle-method`],`bundle-method`,`text`),certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}});n(await i(`Creating`,async()=>a.keylessCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 keyless-certificates delete <keyless-certificate-id>
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";function c(e){return e.usage(`$0 keys list
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";function c(e){return e.usage(`$0 keys list
3
3
 
4
4
  Lists all distinct tag keys used across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`List tag keys`,builder:c,handler:async c=>s({command:`keys list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){a({command:`cf keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/keys`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.keys.list({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`keys`,describe:`keys`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d,t as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,n as m}from"./prompt-Bx2PB-tt.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";import{n as g,t as _}from"./raw-fetch-DNTQkXbg.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d,t as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,n as m}from"./prompt-sL_yMZbI.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";import{n as g,t as _}from"./raw-fetch-lSVttVJF.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
3
3
 
4
4
  Remove multiple KV pairs from the namespace. Body should be an array of up to 10,000 keys to be removed.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:v,handler:async u=>c({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){o({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await i(u),d=u.local?e:await t();if(u.accountId=d,!await m({force:!!u.force,message:`This operation deletes the specified keys from the namespace.`})){process.stderr.write(`Aborted.
5
5
  `);return}if(u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Deleting: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:a}))}a(n,{successLabel:`Deleted`});return}a(await s(`Deleting`,async()=>r(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:e})),{successLabel:`Deleted`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function b(e){return e.usage(`$0 kv bulk get <namespace-id>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-D4bkeMAw.mjs";import{r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{n as l}from"./prompt-Bx2PB-tt.mjs";function u(e){return e.usage(`$0 leaked-credential-checks detections create
2
+ import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{n as l}from"./prompt-sL_yMZbI.mjs";function u(e){return e.usage(`$0 leaked-credential-checks detections create
3
3
 
4
4
  Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const d={command:`create`,describe:`Create a custom detection location for a zone.`,builder:u,handler:async l=>a({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:e,zone_id:u})),{successLabel:`Created`});return}let d=s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)});n(await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:d,zone_id:u})),{successLabel:`Created`})})};function f(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,n as m}from"./prompt-Bx2PB-tt.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function g(e){return e.usage(`$0 load-balancers account create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,n as m}from"./prompt-sL_yMZbI.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function g(e){return e.usage(`$0 load-balancers account create
3
3
 
4
4
  Create a new account or zone-scoped load balancer.`).option(`adaptive-routing-failover-across-pools`,{type:`boolean`,description:"Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set false (the default) zero-downtime failover will only occur between origins within the same pool. See `session_affinity_attributes` for control over when sessions are broken or reassigned."}).option(`default-pools`,{type:`string`,array:!0,description:`A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.`}).option(`description`,{type:`string`,description:`Object description.`}).option(`enabled`,{type:`boolean`,description:`Whether to enable (the default) this load balancer.`,default:!0}).option(`fallback-pool`,{type:`string`,description:`The pool ID to use when all other pools are detected as unhealthy.`}).option(`location-strategy-mode`,{type:`string`,description:'Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.\n- `"pop"`: Use the Cloudflare PoP location.\n- `"resolver_ip"`: Use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, use the Cloudflare PoP location.',choices:[`pop`,`resolver_ip`]}).option(`location-strategy-prefer-ecs`,{type:`string`,description:'Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.\n- `"always"`: Always prefer ECS.\n- `"never"`: Never prefer ECS.\n- `"proximity"`: Prefer ECS only when `steering_policy="proximity"`.\n- `"geo"`: Prefer ECS only when `steering_policy="geo"`.',choices:[`always`,`never`,`proximity`,`geo`]}).option(`name`,{type:`string`,description:`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`}).option(`networks`,{type:`string`,array:!0,description:`List of networks where Load Balancer or Pool is enabled.`}).option(`proxied`,{type:`boolean`,description:`Whether the hostname should be gray clouded (false) or orange clouded (true).`,default:!1}).option(`random-steering-default-weight`,{type:`number`,description:`The default weight for pools in the load balancer that are not specified in the pool_weights map.`}).option(`rules`,{type:`string`,description:`BETA Field Not General Access: A list of rules for this load balancer to execute. Provide as a JSON array of objects or @path/to/file.json.`}).option(`session-affinity`,{type:`string`,description:'Specifies the type of session affinity the load balancer should use unless specified as `"none"`. The supported types are: - `"cookie"`: On the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy, then a new origin server is calculated and used. - `"ip_cookie"`: Behaves the same as `"cookie"` except the initial origin selection is stable and based on the client\'s ip address. - `"header"`: On the first request to a proxied load balancer, a session key based on the configured HTTP headers (see `session_affinity_attributes.headers`) is generated, encoding the request headers used for storing in the load balancer session state which origin the request will be forwarded to. Subsequent requests to the load balancer with the same headers will be sent to the same origin server, for the duration of the session and as long as the origin server remains healthy. If the session has been idle for the duration of `session_affinity_ttl` seconds or the origin server is unhealthy, then a new origin server is calculated and used. See `headers` in `session_affinity_attributes` for additional required configuration.',choices:[`none`,`cookie`,`ip_cookie`,`header`],default:`none`}).option(`session-affinity-attributes-drain-duration`,{type:`number`,description:`Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.`}).option(`session-affinity-attributes-headers`,{type:`string`,array:!0,description:'Configures the names of HTTP headers to base session affinity on when header `session_affinity` is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: `"cookie:<cookie-name-1>,<cookie-name-2>"` (example) where everything after the colon is a comma-separated list of cookie names. Providing only `"cookie"` will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.'}).option(`session-affinity-attributes-require-all-headers`,{type:`boolean`,description:'When header `session_affinity` is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are: - `"true"`: Load balancing requests must contain *all* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created. - `"false"`: Load balancing requests must contain *at least one* of the HTTP headers specified by the `headers` session affinity attribute, otherwise sessions aren\'t created.'}).option(`session-affinity-attributes-samesite`,{type:`string`,description:`Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "Never".`,choices:[`Auto`,`Lax`,`None`,`Strict`]}).option(`session-affinity-attributes-secure`,{type:`string`,description:`Configures the Secure attribute on session affinity cookie. Value "Always" indicates the Secure attribute will be set in the Set-Cookie header, "Never" indicates the Secure attribute will not be set, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled.`,choices:[`Auto`,`Always`,`Never`]}).option(`session-affinity-attributes-zero-downtime-failover`,{type:`string`,description:'Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are: - `"none"`: No failover takes place for sessions pinned to the origin (default). - `"temporary"`: Traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. - `"sticky"`: The session affinity cookie is updated and subsequent requests are sent to the new origin. Note: Zero-downtime failover with sticky sessions is currently not supported for session affinity by header.',choices:[`none`,`temporary`,`sticky`]}).option(`session-affinity-ttl`,{type:`number`,description:'Time, in seconds, until a client\'s session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per `session_affinity` policy are: - `"cookie"` / `"ip_cookie"`: The current default of 23 hours will be used unless explicitly set. The accepted range of values is between [1800, 604800]. - `"header"`: The current default of 1800 seconds will be used unless explicitly set. The accepted range of values is between [30, 3600]. Note: With session affinity by header, sessions only expire after they haven\'t been used for the number of seconds specified.'}).option(`steering-policy`,{type:`string`,description:'Steering Policy for this load balancer.\n- `"off"`: Use `default_pools`.\n- `"geo"`: Use `region_pools`/`country_pools`/`pop_pools`. For non-proxied requests, the country for `country_pools` is determined by `location_strategy`.\n- `"random"`: Select a pool randomly.\n- `"dynamic_latency"`: Use round trip time to select the closest pool in default_pools (requires pool health checks).\n- `"proximity"`: Use the pools\' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by `location_strategy` for non-proxied requests.\n- `"least_outstanding_requests"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others.\n- `"least_connections"`: Select a pool by taking into consideration `random_steering` weights, as well as each pool\'s number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.\n- `""`: Will map to `"geo"` if you use `region_pools`/`country_pools`/`pop_pools` otherwise `"off"`.',choices:[`off`,`geo`,`random`,`dynamic_latency`,`proximity`,`least_outstanding_requests`,`least_connections`],default:``}).option(`ttl`,{type:`number`,description:`Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create account or zone Load Balancer`,builder:g,handler:async m=>c({command:`load-balancers account create`,classification:{safeFlags:[`adaptive-routing-failover-across-pools`,`enabled`,`location-strategy-mode`,`location-strategy-prefer-ecs`,`proxied`,`session-affinity`,`session-affinity-attributes-require-all-headers`,`session-affinity-attributes-samesite`,`session-affinity-attributes-secure`,`session-affinity-attributes-zero-downtime-failover`,`steering-policy`,`dry-run`]}},m,async()=>{if(m.dryRun){let e=m.zone===void 0?await r():void 0,t=m.zone===void 0?`accounts`:`zones`,n=m.zone??e??`<account-id>`;o({command:`cf load-balancers account create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/load_balancers`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:m.body===void 0?d({adaptive_routing:{failover_across_pools:m[`adaptive-routing-failover-across-pools`]},default_pools:m[`default-pools`],description:f(m.description,`description`,`text`),enabled:m.enabled,fallback_pool:f(m[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:f(m[`location-strategy-mode`],`location-strategy-mode`,`text`),prefer_ecs:f(m[`location-strategy-prefer-ecs`],`location-strategy-prefer-ecs`,`text`)},name:f(m.name,`name`,`text`),networks:m.networks,proxied:m.proxied,random_steering:{default_weight:m[`random-steering-default-weight`]},rules:u(m.rules,`rules`),session_affinity:f(m[`session-affinity`],`session-affinity`,`text`),session_affinity_attributes:{drain_duration:m[`session-affinity-attributes-drain-duration`],headers:m[`session-affinity-attributes-headers`],require_all_headers:m[`session-affinity-attributes-require-all-headers`],samesite:f(m[`session-affinity-attributes-samesite`],`session-affinity-attributes-samesite`,`text`),secure:f(m[`session-affinity-attributes-secure`],`session-affinity-attributes-secure`,`text`),zero_downtime_failover:f(m[`session-affinity-attributes-zero-downtime-failover`],`session-affinity-attributes-zero-downtime-failover`,`text`)},session_affinity_ttl:m[`session-affinity-ttl`],steering_policy:f(m[`steering-policy`],`steering-policy`,`text`),ttl:m.ttl}):l(m.body)});return}let c=await i(m),h=m.zone===void 0?`accounts`:`zones`,g=h===`zones`?await t({zone:m.zone},c,{quiet:m.quiet}):m.local?e:await n();if(h===`zones`?m.zoneId=g:m.accountId=g,m.body){let e=l(m.body);a(await s(`Creating`,async()=>c.loadBalancers.account.create({...e,account_or_zone:h,account_or_zone_id:g})),{successLabel:`Created`});return}if(m[`default-pools`]===void 0)throw Error(`--default-pools is required (or pass --body with this field set).`);m[`fallback-pool`]===void 0&&(m[`fallback-pool`]=await p(`fallback-pool`,`The pool ID to use when all other pools are detected as unhealthy.`)),m.name===void 0&&(m.name=await p(`name`,`The DNS hostname to associate with your Load Balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the Load Balancer will take precedence and the DNS record will not be used.`));let _=d({adaptive_routing:{failover_across_pools:m[`adaptive-routing-failover-across-pools`]},default_pools:m[`default-pools`],description:f(m.description,`description`,`text`),enabled:m.enabled,fallback_pool:f(m[`fallback-pool`],`fallback-pool`,`text`),location_strategy:{mode:f(m[`location-strategy-mode`],`location-strategy-mode`,`text`),prefer_ecs:f(m[`location-strategy-prefer-ecs`],`location-strategy-prefer-ecs`,`text`)},name:f(m.name,`name`,`text`),networks:m.networks,proxied:m.proxied,random_steering:{default_weight:m[`random-steering-default-weight`]},rules:u(m.rules,`rules`),session_affinity:f(m[`session-affinity`],`session-affinity`,`text`),session_affinity_attributes:{drain_duration:m[`session-affinity-attributes-drain-duration`],headers:m[`session-affinity-attributes-headers`],require_all_headers:m[`session-affinity-attributes-require-all-headers`],samesite:f(m[`session-affinity-attributes-samesite`],`session-affinity-attributes-samesite`,`text`),secure:f(m[`session-affinity-attributes-secure`],`session-affinity-attributes-secure`,`text`),zero_downtime_failover:f(m[`session-affinity-attributes-zero-downtime-failover`],`session-affinity-attributes-zero-downtime-failover`,`text`)},session_affinity_ttl:m[`session-affinity-ttl`],steering_policy:f(m[`steering-policy`],`steering-policy`,`text`),ttl:m.ttl});a(await s(`Creating`,async()=>c.loadBalancers.account.create({..._,account_or_zone:h,account_or_zone_id:g})),{successLabel:`Created`})})};function ee(e){return e.usage(`$0 load-balancers account delete <load-balancer-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{m as e,o as t}from"./chunk-XLADBZ7F-BXKOjWbx.mjs";import{a as n}from"./theme-BiIYWOed.mjs";import{a as r,i,r as a}from"./ui-DH95w1Qk.mjs";import{c as o,d as s,i as c,l,o as u,p as d,r as f,s as p,u as m}from"./oauth-D4bkeMAw.mjs";import"./auth-Cp7gT-AF.mjs";import{t as h}from"./output-Bia1u2k5.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(t({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async t=>{_(t,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),e(t.name);let r=u().configs.exists(t.name);await l({browser:t.browser,device:t.device,scopes:t.scopes,profile:t.name}),console.log(i(r?`Profile "${t.name}" re-authenticated.`:`Profile "${t.name}" created.`)),console.log(a(`Run ${n.code(`cf auth activate ${t.name}`)} to use this profile in a directory.`))}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async t=>{_(t,`delete`),v(),e(t.name);let r=u();if(!r.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist.`);let o=r.bindings.removeAllBindingsForProfile(t.name);if(o.length>0){console.log(i(`Removed directory bindings:`));for(let e of o)console.log(` ${e}`)}await m(t.name),r.configs.delete(t.name),console.log(i(`Profile "${t.name}" deleted.`));let s=r.bindings.getProfileForDirectory(process.cwd());s?console.log(i(`Active profile for this directory: ${s}.`)):r.configs.exists(`default`)?console.log(i(`This directory now uses the default profile.`)):console.log(a(`No active profile for this directory. Run ${n.code(`cf auth login`)} to set up the default profile, or ${n.code(`cf auth create <name>`)} to create a named profile.`))}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:t=>{_(t,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),e(t.name);let n=u();if(!n.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist. Run \`cf auth create ${t.name}\` first.`);let r=t.dir??process.cwd();n.bindings.activate(t.name,r),console.log(i(`Profile "${t.name}" activated for "${g.resolve(r)}".`))}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:e=>{_(e,`deactivate`),v();let t=u(),r=e.dir??process.cwd(),{removedProfile:o,newResolution:s}=t.bindings.deactivate(r);console.log(i(`Profile "${o}" deactivated from "${g.resolve(r)}".`)),s.profile===void 0?console.log(a(`Run ${n.code(`cf auth login`)} to set up the default profile, or ${n.code(`cf auth create <name>`)} to create a named profile.`)):s.profile===`default`?console.log(i(`This directory now uses the default profile.`)):console.log(i(`Now using: ${s.profile} (${s.source}).`))}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async e=>{_(e,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let t=f();if(t!==`default`&&console.log(r(`This directory has profile "${t}" active. \`cf auth login\` updates the default profile, not "${t}".\nTo re-authenticate "${t}", run \`cf auth create ${t}\`.`)),d(`default`),!e.force&&o()){if(await p()){let e=s();console.log(i(`You are already logged in.`)),console.log(`${n.info(`Config file:`)} ${n.muted(c())}`),e?.expiration_time&&console.log(`${n.info(`Token expires:`)} ${new Date(e.expiration_time).toLocaleString()}`),console.log(a(`Run ${n.code(`cf auth login --force`)} to re-authenticate, or ${n.code(`cf auth logout`)} to log out.`));return}console.log(r(`Existing tokens are invalid or expired. Starting fresh login...
2
+ import{m as e,o as t}from"./chunk-XLADBZ7F-BXKOjWbx.mjs";import{a as n}from"./theme-BiIYWOed.mjs";import{a as r,i,r as a}from"./ui-DH95w1Qk.mjs";import{c as o,d as s,i as c,l,o as u,p as d,r as f,s as p,u as m}from"./oauth-Dzk6Gy-6.mjs";import"./auth-DJhSjNNL.mjs";import{t as h}from"./output-Bia1u2k5.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(t({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async t=>{_(t,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),e(t.name);let r=u().configs.exists(t.name);await l({browser:t.browser,device:t.device,scopes:t.scopes,profile:t.name}),console.log(i(r?`Profile "${t.name}" re-authenticated.`:`Profile "${t.name}" created.`)),console.log(a(`Run ${n.code(`cf auth activate ${t.name}`)} to use this profile in a directory.`))}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async t=>{_(t,`delete`),v(),e(t.name);let r=u();if(!r.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist.`);let o=r.bindings.removeAllBindingsForProfile(t.name);if(o.length>0){console.log(i(`Removed directory bindings:`));for(let e of o)console.log(` ${e}`)}await m(t.name),r.configs.delete(t.name),console.log(i(`Profile "${t.name}" deleted.`));let s=r.bindings.getProfileForDirectory(process.cwd());s?console.log(i(`Active profile for this directory: ${s}.`)):r.configs.exists(`default`)?console.log(i(`This directory now uses the default profile.`)):console.log(a(`No active profile for this directory. Run ${n.code(`cf auth login`)} to set up the default profile, or ${n.code(`cf auth create <name>`)} to create a named profile.`))}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:t=>{_(t,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),e(t.name);let n=u();if(!n.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist. Run \`cf auth create ${t.name}\` first.`);let r=t.dir??process.cwd();n.bindings.activate(t.name,r),console.log(i(`Profile "${t.name}" activated for "${g.resolve(r)}".`))}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:e=>{_(e,`deactivate`),v();let t=u(),r=e.dir??process.cwd(),{removedProfile:o,newResolution:s}=t.bindings.deactivate(r);console.log(i(`Profile "${o}" deactivated from "${g.resolve(r)}".`)),s.profile===void 0?console.log(a(`Run ${n.code(`cf auth login`)} to set up the default profile, or ${n.code(`cf auth create <name>`)} to create a named profile.`)):s.profile===`default`?console.log(i(`This directory now uses the default profile.`)):console.log(i(`Now using: ${s.profile} (${s.source}).`))}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async e=>{_(e,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let t=f();if(t!==`default`&&console.log(r(`This directory has profile "${t}" active. \`cf auth login\` updates the default profile, not "${t}".\nTo re-authenticate "${t}", run \`cf auth create ${t}\`.`)),d(`default`),!e.force&&o()){if(await p()){let e=s();console.log(i(`You are already logged in.`)),console.log(`${n.info(`Config file:`)} ${n.muted(c())}`),e?.expiration_time&&console.log(`${n.info(`Token expires:`)} ${new Date(e.expiration_time).toLocaleString()}`),console.log(a(`Run ${n.code(`cf auth login --force`)} to re-authenticate, or ${n.code(`cf auth logout`)} to log out.`));return}console.log(r(`Existing tokens are invalid or expired. Starting fresh login...
3
3
  `))}else e.force&&o()&&console.log(i(`Re-authenticating...
4
4
  `));if(console.log(i(`Starting OAuth login flow...
5
5
  `)),!await l({browser:e.browser,device:e.device,scopes:e.scopes,profile:`default`})){console.log(r(`CLOUDFLARE_API_TOKEN is set and takes precedence. Unset it to log in via OAuth.`));return}let u=s();console.log(`${n.info(`Config file:`)} ${n.muted(c())}`),u?.scopes&&console.log(`${n.info(`Scopes:`)} ${u.scopes.join(`, `)}`),u?.expiration_time&&console.log(`${n.info(`Token expires:`)} ${new Date(u.expiration_time).toLocaleString()}`)}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as e}from"./theme-BiIYWOed.mjs";import{i as t}from"./ui-DH95w1Qk.mjs";import{n}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as r,t as i}from"./login-CEQbOgBM.mjs";var a=n({...i,describe:!1,handler:async n=>{n.quiet||console.error(t(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`)),await i.handler(n)}},{command:`login`,classification:r});export{a as default};
2
+ import{a as e}from"./theme-BiIYWOed.mjs";import{i as t}from"./ui-DH95w1Qk.mjs";import{n}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as r,t as i}from"./login-CLW108XX.mjs";var a=n({...i,describe:!1,handler:async n=>{n.quiet||console.error(t(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`)),await i.handler(n)}},{command:`login`,classification:r});export{a as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";function c(e){return e.usage(`$0 logo-matches download get
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";function c(e){return e.usage(`$0 logo-matches download get
3
3
 
4
4
  Return matches as CSV for logo queries based on ID`).option(`logo-id`,{type:`string`,description:`Logo ID`}).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Download matches for logo queries by ID`,builder:c,handler:async c=>s({command:`logo-matches download get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){a({command:`cf logo-matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/logo-matches/download`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.logoMatches.download.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 logo-matches get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as l,t as u}from"./input-validation-Ch4Vllrm.mjs";import{n as d}from"./prompt-Bx2PB-tt.mjs";function f(e){return e.usage(`$0 logos create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./input-validation-Ch4Vllrm.mjs";import{n as d}from"./prompt-sL_yMZbI.mjs";function f(e){return e.usage(`$0 logos create
3
3
 
4
4
  Return new saved logo queries created from image files`).option(`tag`,{type:`string`,description:`Tag`}).option(`match-type`,{type:`string`,description:`Match type`}).option(`threshold`,{type:`number`,description:`Threshold`}).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const p={command:`create`,describe:`Create new saved logo queries from image files`,builder:f,handler:async d=>c({command:`logos create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{let c={tag:d.tag,match_type:d[`match-type`],threshold:d.threshold};if(d.dryRun){o({command:`cf logos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/logos`,pathParams:{},query:c,bodyKind:`octet-stream`,body:d.body});return}let f=await i(d),p=d.local?e:await t();if(d.accountId=p,d.file){let e=u(d.file);a(await s(`Creating`,async()=>r(f,`POST`,`/accounts/${p}/brand-protection/logos`,{body:e,headers:{"Content-Type":`application/x-www-form-urlencoded`}})),{successLabel:`Created`});return}if(d.body){let e=l(d.body,`body`,`binary`),t=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Creating`,async()=>r(f,`POST`,`/accounts/${p}/brand-protection/logos${t?`?`+t:``}`,{body:e,headers:{"Content-Type":`application/x-www-form-urlencoded`}})),{successLabel:`Created`});return}if(d.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function m(e){return e.usage(`$0 logos delete <logo-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-Bx2PB-tt.mjs";function m(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-sL_yMZbI.mjs";function m(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
3
3
 
4
4
  Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <dataset-id>`,describe:`List fields`,builder:m,handler:async l=>c({command:`logpush account-datasets fields get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf logpush account-datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/datasets/${l[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(l[`dataset-id`]))}/fields`,pathParams:{"account-or-zone":String(t),"dataset-id":String(l[`dataset-id`]??``),"account-or-zone-id":String(n)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await n();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.logpush.accountDatasets.fields.get({account_or_zone:u,account_or_zone_id:d,dataset_id:l[`dataset-id`]})),{successLabel:`Loaded`})})},g={command:`fields`,describe:`Operations for account-datasets.fields`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ee(e){return e.usage(`$0 logpush account-datasets jobs get <dataset-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{a as i,r as a}from"./auth-Cp7gT-AF.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-Bi02B6v4.mjs";import{t as l}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p,t as m}from"./input-validation-Ch4Vllrm.mjs";import{a as h,n as g}from"./prompt-Bx2PB-tt.mjs";import{t as _}from"./cli-types-tt_LZMbn.mjs";function v(e){return e.usage(`$0 logs control cmb config create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{a as i,r as a}from"./auth-DJhSjNNL.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-D_mL-Kcy.mjs";import{t as l}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p,t as m}from"./input-validation-Ch4Vllrm.mjs";import{a as h,n as g}from"./prompt-sL_yMZbI.mjs";import{t as _}from"./cli-types-tt_LZMbn.mjs";function v(e){return e.usage(`$0 logs control cmb config create
3
3
 
4
4
  Updates CMB config.`).option(`allow-out-of-region-access`,{type:`boolean`,description:`Allow out of region access`}).option(`regions`,{type:`string`,description:`Name of the region.`}).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 y={command:`create`,describe:`Update CMB config`,builder:v,handler:async t=>l({command:`logs control cmb config create`,classification:{safeFlags:[`allow-out-of-region-access`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf logs control cmb config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logs/control/cmb/config`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({allow_out_of_region_access:t[`allow-out-of-region-access`],regions:p(t.regions,`regions`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.logs.control.cmb.config.create({body:e,account_id:l})),{successLabel:`Created`});return}let d=f({allow_out_of_region_access:t[`allow-out-of-region-access`],regions:p(t.regions,`regions`,`text`)});o(await c(`Creating`,async()=>i.logs.control.cmb.config.create({body:d,account_id:l})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 logs control cmb config delete
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{i as l,n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-Bx2PB-tt.mjs";import{t as g}from"./cli-types-tt_LZMbn.mjs";import{n as _,t as v}from"./raw-fetch-DNTQkXbg.mjs";function ee(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{i as l,n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-sL_yMZbI.mjs";import{t as g}from"./cli-types-tt_LZMbn.mjs";import{n as _,t as v}from"./raw-fetch-lSVttVJF.mjs";function ee(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
3
3
 
4
4
  Create a new Catalog Sync (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`description`,{type:`string`,description:`The description field`}).option(`destination-type`,{type:`string`,description:`The destination_type field`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).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 te={command:`create`,describe:`Create Catalog Sync`,builder:ee,handler:async h=>c({command:`magic-cloud-networking catalog-syncs create`,classification:{safeFlags:[`destination-type`,`update-mode`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){o({command:`cf magic-cloud-networking catalog-syncs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({description:f(h.description,`description`,`text`),destination_type:f(h[`destination-type`],`destination-type`,`text`),name:f(h.name,`name`,`text`),policy:f(h.policy,`policy`,`text`),update_mode:f(h[`update-mode`],`update-mode`,`text`)}):u(h.body)});return}let g=await i(h),_=h.local?e:await t();if(h.accountId=_,h.body){let e=u(h.body);a(await s(`Creating`,async()=>r(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}h[`destination-type`]===void 0&&(h[`destination-type`]=await m(`destination-type`,`The destination_type field`,[`NONE`,`ZERO_TRUST_LIST`])),h.name===void 0&&(h.name=await p(`name`,`The name field`)),h[`update-mode`]===void 0&&(h[`update-mode`]=await m(`update-mode`,`The update_mode field`,[`AUTO`,`MANUAL`]));let v={};h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`destination-type`]!==void 0&&l(v,[`destination_type`],f(h[`destination-type`],`destination-type`,`text`)),h.name!==void 0&&l(v,[`name`],f(h.name,`name`,`text`)),h.policy!==void 0&&l(v,[`policy`],f(h.policy,`policy`,`text`)),h[`update-mode`]!==void 0&&l(v,[`update_mode`],f(h[`update-mode`],`update-mode`,`text`)),a(await s(`Creating`,async()=>r(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 magic-cloud-networking catalog-syncs delete <sync-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-Bx2PB-tt.mjs";function g(e){return e.usage(`$0 magic-network-monitoring configs create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-sL_yMZbI.mjs";function g(e){return e.usage(`$0 magic-network-monitoring configs create
3
3
 
4
4
  Create a new network monitoring configuration.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`,default:1}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create account configuration`,builder:g,handler:async r=>c({command:`magic-network-monitoring configs create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-network-monitoring configs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({default_sampling:r[`default-sampling`],name:f(r.name,`name`,`text`),router_ips:r[`router-ips`],warp_devices:u(r[`warp-devices`],`warp-devices`)}):l(r.body)});return}let c=await i(r),m=r.local?e:await t();if(r.accountId=m,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.magicNetworkMonitoring.configs.create({...e,account_id:m})),{successLabel:`Created`});return}if(r[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await p(`name`,`The account name.`));let h=d({default_sampling:r[`default-sampling`],name:f(r.name,`name`,`text`),router_ips:r[`router-ips`],warp_devices:u(r[`warp-devices`],`warp-devices`)});a(await s(`Creating`,async()=>c.magicNetworkMonitoring.configs.create({...h,account_id:m})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 magic-network-monitoring configs delete
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,i as h,n as g}from"./prompt-Bx2PB-tt.mjs";import{n as _,t as ee}from"./raw-fetch-DNTQkXbg.mjs";function te(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,i as h,n as g}from"./prompt-sL_yMZbI.mjs";import{n as _,t as ee}from"./raw-fetch-lSVttVJF.mjs";function te(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules create
3
3
 
4
4
  Create a DNS Protection rule for an account.`).option(`block-any-queries`,{type:`boolean`,description:`Whether to block DNS ANY queries. Optional. Defaults to true.`}).option(`burst-sensitivity`,{type:`string`,description:`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`name`,{type:`string`,description:`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`}).option(`profile-sensitivity`,{type:`string`,description:`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`}).option(`rate-sensitivity`,{type:`string`,description:`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`}).option(`scope`,{type:`string`,description:`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new DNS Protection rule to add.`})}const v={command:`create`,describe:`Create DNS Protection rule.`,builder:te,handler:async r=>c({command:`magic-transit advanced-dns-protection configs dns protection rules create`,classification:{safeFlags:[`block-any-queries`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-transit advanced-dns-protection configs dns protection rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/advanced_dns_protection/configs/dns_protection/rules`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({block_any_queries:r[`block-any-queries`],burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(r.name,`name`,`text`),profile_sensitivity:p(r[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(r.scope,`scope`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.create({...e,account_id:l})),{successLabel:`Created`});return}r[`burst-sensitivity`]===void 0&&(r[`burst-sensitivity`]=await m(`burst-sensitivity`,`The burst sensitivity. Must be one of 'low', 'medium', 'high'.`)),r.name===void 0&&(r.name=await m(`name`,`The name of the DNS Protection rule. Value is relative to the 'scope' setting. For 'global' scope, name should be 'global'. For either the 'region' or 'datacenter' scope, name should be the actual name of the region or datacenter, e.g., 'wnam' or 'lax'.`)),r[`profile-sensitivity`]===void 0&&(r[`profile-sensitivity`]=await m(`profile-sensitivity`,`The profile sensitivity. Recommended setting is 'low'. Must be one of 'low', 'medium', 'high', or 'very_high'.`)),r[`rate-sensitivity`]===void 0&&(r[`rate-sensitivity`]=await m(`rate-sensitivity`,`The rate sensitivity. Must be one of 'low', 'medium', 'high'.`)),r.scope===void 0&&(r.scope=await m(`scope`,`The scope for the DNS Protection rule. Must be one of 'global', 'region', or 'datacenter'.`));let d=f({block_any_queries:r[`block-any-queries`],burst_sensitivity:p(r[`burst-sensitivity`],`burst-sensitivity`,`text`),name:p(r.name,`name`,`text`),profile_sensitivity:p(r[`profile-sensitivity`],`profile-sensitivity`,`text`),rate_sensitivity:p(r[`rate-sensitivity`],`rate-sensitivity`,`text`),scope:p(r.scope,`scope`,`text`)});a(await s(`Creating`,async()=>c.magicTransit.advancedDnsProtection.configs.dns.protection.rules.create({...d,account_id:l})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 magic-transit advanced-dns-protection configs dns protection rules delete for account
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{i as l,n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p}from"./prompt-Bx2PB-tt.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{i as l,n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p}from"./prompt-sL_yMZbI.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
3
3
 
4
4
  Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:h,handler:async r=>c({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${r[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(r[`repo-id`]))}/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}/report`,pathParams:{"repo-id":String(r[`repo-id`]??``),"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.reports.get({account_id:l,repo_id:r[`repo-id`],scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})},_={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{_ as e}from"./oauth-D4bkeMAw.mjs";import{r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./prompt-Bx2PB-tt.mjs";function u(e){return e.usage(`$0 managed-transforms delete
2
+ import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./prompt-sL_yMZbI.mjs";function u(e){return e.usage(`$0 managed-transforms delete
3
3
 
4
4
  Disables all Managed Transforms.`).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 d={command:`delete`,describe:`Delete Managed Transforms`,builder:u,handler:async o=>a({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await l({force:!!o.force})){process.stderr.write(`Aborted.
5
5
  `);return}n(await i(`Deleting`,async()=>a.managedTransforms.delete({zone_id:s})),{successLabel:`Deleted`})})};function f(e){return e.usage(`$0 managed-transforms list
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";function c(e){return e.usage(`$0 matches download get
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";function c(e){return e.usage(`$0 matches download get
3
3
 
4
4
  Return matches as CSV for string queries based on ID`).option(`id`,{type:`string`,description:`ID`}).option(`offset`,{type:`number`,description:`Offset`}).option(`limit`,{type:`number`,description:`Limit`}).option(`include-domain-id`,{type:`boolean`,description:`Include domain ID`}).option(`include-dismissed`,{type:`boolean`,description:`Include dismissed`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Download matches for string queries by ID`,builder:c,handler:async c=>s({command:`matches download get`,classification:{safeFlags:[`include-domain-id`,`include-dismissed`,`dry-run`]}},c,async()=>{let s={id:c.id,offset:c.offset,limit:c.limit,include_domain_id:c[`include-domain-id`],include_dismissed:c[`include-dismissed`]};if(c.dryRun){a({command:`cf matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/matches/download`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.matches.download.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 matches get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-Bx2PB-tt.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function g(e){return e.usage(`$0 mcp portals account-tool-call-analytics
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-sL_yMZbI.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function g(e){return e.usage(`$0 mcp portals account-tool-call-analytics
3
3
 
4
4
  Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:h(g),handler:async c=>s({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.mcp.portals.accountToolCallAnalytics({account_id:u,...s})),{successLabel:`Loaded`})})};function v(e){return e.usage(`$0 mcp portals create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-Bx2PB-tt.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-sL_yMZbI.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
3
3
 
4
4
  Gets the high-availability configuration for a WARP Connector tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <tunnel-id>`,describe:`Get WARP Connector HA configuration`,builder:h,handler:async c=>s({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.configurations.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-Bx2PB-tt.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function m(e){return e.usage(`$0 mtls-certificates associations get <mtls-certificate-id>
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-sL_yMZbI.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function m(e){return e.usage(`$0 mtls-certificates associations get <mtls-certificate-id>
3
3
 
4
4
  Lists all active associations between the certificate and Cloudflare services.`).positional(`mtls-certificate-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 <mtls-certificate-id>`,describe:`List mTLS certificate associations`,builder:m,handler:async c=>s({command:`mtls-certificates associations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}/associations`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mtlsCertificates.associations.get({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Loaded`})})},g={command:`associations`,describe:`Operations for associations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 mtls-certificates create
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-Bx2PB-tt.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function m(e){return e.usage(`$0 network routes cidr create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-sL_yMZbI.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function m(e){return e.usage(`$0 network routes cidr create
3
3
 
4
4
  Routes a private network through a Cloudflare Tunnel.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`,default:``}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).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 ee={command:`create`,describe:`Create a tunnel route`,builder:m,handler:async f=>s({command:`network routes cidr create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf network routes cidr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/routes`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({comment:u(f.comment,`comment`,`text`),network:u(f.network,`network`,`text`),virtual_network_id:u(f[`virtual-network-id`],`virtual-network-id`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.network.routes.cidr.create({...e,account_id:p})),{successLabel:`Created`});return}f.network===void 0&&(f.network=await d(`network`,`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`));let m=l({comment:u(f.comment,`comment`,`text`),network:u(f.network,`network`,`text`),virtual_network_id:u(f[`virtual-network-id`],`virtual-network-id`,`text`)});i(await o(`Creating`,async()=>s.network.routes.cidr.create({...m,account_id:p})),{successLabel:`Created`})})};function h(e){return e.usage(`$0 network routes cidr delete <route-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-Bx2PB-tt.mjs";function p(e){return e.usage(`$0 network-interconnects cnis create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-sL_yMZbI.mjs";function p(e){return e.usage(`$0 network-interconnects cnis create
3
3
 
4
4
  Creates a new Cloud Network Interconnect (CNI) for private network connectivity between Cloudflare and your infrastructure. CNIs enable dedicated, high-performance network links.`).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{a as e,t}from"./src-B3h6tKMt.mjs";import{n,t as r}from"./version-W6_TN_kN.mjs";import{i,r as a}from"./project-settings-DSXevRvj.mjs";import{a as o,n as s,t as c}from"./cf-oadujOtC.mjs";import{n as l}from"./resolve-CUDKxUrW.mjs";import{M as u,n as d}from"./interactive-B6woOLo-.mjs";import{i as f,o as p}from"./dist-BpadEMNY.mjs";function m(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function h(e={}){let t=process.env.CLOUDFLARE_ACCOUNT_ID;if(t)return{value:t,source:`env`};let n=a(void 0,e),r=n===void 0?await i(void 0,e):n;if(r?.settings?.accountId)return{value:r.settings.accountId,source:`settings`,path:r.path}}async function g(){let e=await h();if(e)return e.value;let{getActiveAccountId:t}=await import(`./oauth-DouM-qz0.mjs`);try{return t()}catch{return}}async function _(e){let t=await h(e);t&&v(t.value,D(t,`accountId`));let{getOrSelectAccountId:n}=await import(`./oauth-DouM-qz0.mjs`);return n(t?.value,e)}function v(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function y(e,t,n){if(e?.zoneId)return b(e.zoneId,t);let r=m(`CLOUDFLARE_ZONE_ID`,e?.zone);if(r){if(!n?.quiet&&r.source!==`flag`){let e=D(r);console.error(`Using zone: ${r.value} (from ${e})`)}return b(r.value,t)}throw Error(`No zone specified.
2
+ import{a as e,t}from"./src-Hw-TlVAO.mjs";import{n,t as r}from"./version-Bh3b9vTa.mjs";import{i,r as a}from"./project-settings-DSXevRvj.mjs";import{a as o,n as s,t as c}from"./cf-oadujOtC.mjs";import{n as l}from"./resolve-CUDKxUrW.mjs";import{M as u,n as d}from"./interactive-B6woOLo-.mjs";import{i as f,o as p}from"./dist-BpadEMNY.mjs";function m(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function h(e={}){let t=process.env.CLOUDFLARE_ACCOUNT_ID;if(t)return{value:t,source:`env`};let n=a(void 0,e),r=n===void 0?await i(void 0,e):n;if(r?.settings?.accountId)return{value:r.settings.accountId,source:`settings`,path:r.path}}async function g(){let e=await h();if(e)return e.value;let{getActiveAccountId:t}=await import(`./oauth-nsTDJ0dF.mjs`);try{return t()}catch{return}}async function _(e){let t=await h(e);t&&v(t.value,D(t,`accountId`));let{getOrSelectAccountId:n}=await import(`./oauth-nsTDJ0dF.mjs`);return n(t?.value,e)}function v(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function y(e,t,n){if(e?.zoneId)return b(e.zoneId,t);let r=m(`CLOUDFLARE_ZONE_ID`,e?.zone);if(r){if(!n?.quiet&&r.source!==`flag`){let e=D(r);console.error(`Using zone: ${r.value} (from ${e})`)}return b(r.value,t)}throw Error(`No zone specified.
3
3
 
4
4
  Please provide one of the following:
5
5
  1. Zone as a positional argument: cf dns records list <zone>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-Bx2PB-tt.mjs";function m(e){return e.usage(`$0 oauth-clients create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-sL_yMZbI.mjs";function m(e){return e.usage(`$0 oauth-clients create
3
3
 
4
4
  Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).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 h={command:`create`,describe:`Create OAuth Client`,builder:m,handler:async p=>s({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await t();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.oauthClients.create({...e,account_id:m})),{successLabel:`Created`});return}if(p[`client-name`]===void 0&&(p[`client-name`]=await d(`client-name`,`Human-readable name of the OAuth client.`)),p[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(p[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(p[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(p.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);p[`token-endpoint-auth-method`]===void 0&&(p[`token-endpoint-auth-method`]=await f(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let h=l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)});i(await o(`Creating`,async()=>s.oauthClients.create({...h,account_id:m})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 oauth-clients delete-rotated-secret <oauth-client-id>
5
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as e,f as t,n}from"./oauth-D4bkeMAw.mjs";export{n as getActiveAccountId,e as getOrSelectAccountId,t as resolveProfile};
2
+ import{a as e,f as t,n}from"./oauth-Dzk6Gy-6.mjs";export{n as getActiveAccountId,e as getOrSelectAccountId,t as resolveProfile};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-Cp7gT-AF.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bi02B6v4.mjs";import{t as i}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";function a(e){return e.usage(`$0 oauth-scopes list
2
+ import{r as e}from"./auth-DJhSjNNL.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-D_mL-Kcy.mjs";import{t as i}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";function a(e){return e.usage(`$0 oauth-scopes list
3
3
 
4
4
  List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`List OAuth Scopes`,builder:a,handler:async a=>i({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.oauthScopes.list()),{successLabel:`Loaded`})})},s={command:`oauth-scopes`,describe:`oauth-scopes`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-Bx2PB-tt.mjs";import{t as g}from"./cli-types-tt_LZMbn.mjs";function ee(e){return e.usage(`$0 observability destinations create
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-sL_yMZbI.mjs";import{t as g}from"./cli-types-tt_LZMbn.mjs";function ee(e){return e.usage(`$0 observability destinations create
3
3
 
4
4
  Create a new Workers Observability Telemetry Destination.`).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`skip-preflight-check`,{type:`boolean`,description:`The skipPreflightCheck 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 te={command:`create`,describe:`Create Destination`,builder:ee,handler:async t=>c({command:`observability destinations create`,classification:{safeFlags:[`configuration-type`,`enabled`,`skip-preflight-check`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf observability destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({configuration:{type:f(t[`configuration-type`],`configuration-type`,`text`),url:f(t[`configuration-url`],`configuration-url`,`text`)},enabled:t.enabled,name:f(t.name,`name`,`text`),skipPreflightCheck:t[`skip-preflight-check`]}):l(t.body)});return}let c=await i(t),u=t.local?e:await n();if(t.accountId=u,t.body){let e=l(t.body);a(await s(`Creating`,async()=>c.observability.destinations.create({...e,account_id:u})),{successLabel:`Created`});return}if(t[`configuration-type`]===void 0&&(t[`configuration-type`]=await m(`configuration-type`,`The configuration.type field`,[`logpush`])),t[`configuration-url`]===void 0&&(t[`configuration-url`]=await p(`configuration-url`,`The configuration.url field`)),t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await p(`name`,`The name field`));let h=d({configuration:{type:f(t[`configuration-type`],`configuration-type`,`text`),url:f(t[`configuration-url`],`configuration-url`,`text`)},enabled:t.enabled,name:f(t.name,`name`,`text`),skipPreflightCheck:t[`skip-preflight-check`]});a(await s(`Creating`,async()=>c.observability.destinations.create({...h,account_id:u})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 observability destinations delete <slug>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-Cp7gT-AF.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bi02B6v4.mjs";import{t as i}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as a,r as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,i as u,n as d}from"./prompt-Bx2PB-tt.mjs";import{t as f}from"./cli-types-tt_LZMbn.mjs";function p(e){return e.usage(`$0 organization account list
2
+ import{r as e}from"./auth-DJhSjNNL.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-D_mL-Kcy.mjs";import{t as i}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as a,r as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,i as u,n as d}from"./prompt-sL_yMZbI.mjs";import{t as f}from"./cli-types-tt_LZMbn.mjs";function p(e){return e.usage(`$0 organization account list
3
3
 
4
4
  Retrieve a list of accounts that belong to a specific organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`).option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname is equal to
5
5
  a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-Cp7gT-AF.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bi02B6v4.mjs";import{t as i}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{t as a}from"./cli-types-tt_LZMbn.mjs";function o(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:o,handler:async a=>i({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={from:a.from,to:a.to};if(a.dryRun){n({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.billing.usage.get({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})},c={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.usage(`$0 organizations logs audit get <organization-id>
2
+ import{r as e}from"./auth-DJhSjNNL.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-D_mL-Kcy.mjs";import{t as i}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{t as a}from"./cli-types-tt_LZMbn.mjs";function o(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:o,handler:async a=>i({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={from:a.from,to:a.to};if(a.dryRun){n({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.billing.usage.get({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})},c={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.usage(`$0 organizations logs audit get <organization-id>
3
3
 
4
4
  Gets a list of audit logs for an organization.`).positional(`organization-id`,{type:`string`,description:`The unique id that identifies the organization.`,demandOption:!0}).option(`action-result`,{type:`string`,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,description:"Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email`,{type:`string`,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,description:`Filters by the actor's user ID.`}).option(`actor-ip-address`,{type:`string`,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,description:`Filters by the actor type.`}).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,description:`Filters by the resource scope, specifying whether the resource is associated with an organization.`}).option(`action-result-not`,{type:`string`,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,description:"Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email-not`,{type:`string`,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,description:`Filters out audit logs by the actor's user ID.`}).option(`actor-ip-address-not`,{type:`string`,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,description:`Filters out audit logs by the actor type.`}).option(`id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an organization.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get <organization-id>`,describe:`Get organization audit logs (Version 2)`,builder:a(u),handler:async a=>i({command:`organizations logs audit get`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_result:a[`action-result`],action_type:a[`action-type`],actor_context:a[`actor-context`],actor_email:a[`actor-email`],actor_id:a[`actor-id`],actor_ip_address:a[`actor-ip-address`],actor_token_id:a[`actor-token-id`],actor_token_name:a[`actor-token-name`],actor_type:a[`actor-type`],id:a.id,raw_cf_ray_id:a[`raw-cf-ray-id`],raw_method:a[`raw-method`],raw_status_code:a[`raw-status-code`],raw_uri:a[`raw-uri`],resource_id:a[`resource-id`],resource_product:a[`resource-product`],resource_type:a[`resource-type`],resource_scope:a[`resource-scope`],"action_result.not":a[`action-result-not`],"action_type.not":a[`action-type-not`],"actor_context.not":a[`actor-context-not`],"actor_email.not":a[`actor-email-not`],"actor_id.not":a[`actor-id-not`],"actor_ip_address.not":a[`actor-ip-address-not`],"actor_token_id.not":a[`actor-token-id-not`],"actor_token_name.not":a[`actor-token-name-not`],"actor_type.not":a[`actor-type-not`],"id.not":a[`id-not`],"raw_cf_ray_id.not":a[`raw-cf-ray-id-not`],"raw_method.not":a[`raw-method-not`],"raw_status_code.not":a[`raw-status-code-not`],"raw_uri.not":a[`raw-uri-not`],"resource_id.not":a[`resource-id-not`],"resource_product.not":a[`resource-product-not`],"resource_type.not":a[`resource-type-not`],"resource_scope.not":a[`resource-scope-not`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.logs.audit.get({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 organizations logs audit history <id>\n\nReturns the chronological change history for the resource identified by the given organization-scoped audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.").positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The unique ID that identifies the organization.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`history <id>`,describe:`Get resource change history from an organization audit log entry (Version 2)`,builder:a(f),handler:async a=>i({command:`organizations logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_time:a[`action-time`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit/${a.id==null?`<id>`:encodeURIComponent(String(a.id))}/history`,pathParams:{"organization-id":String(a[`organization-id`]??``),id:String(a.id??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.logs.audit.history({organization_id:a[`organization-id`],id:a.id,...i})),{successLabel:`Loaded`})})},m={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`organizations`,describe:`Multi-user organizations that group accounts, members, and shared settings under a single entity`,builder:e=>e.command(l).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./auth-Cp7gT-AF.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bi02B6v4.mjs";import{t as i}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as a,t as o}from"./body-parser-CUWbw_Tq.mjs";import{n as s}from"./input-validation-Ch4Vllrm.mjs";import{a as c,i as l,n as u}from"./prompt-Bx2PB-tt.mjs";import{t as d}from"./cli-types-tt_LZMbn.mjs";function f(e){return e.usage(`$0 origin-ca-certificates create
2
+ import{r as e}from"./auth-DJhSjNNL.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-D_mL-Kcy.mjs";import{t as i}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as a,t as o}from"./body-parser-CUWbw_Tq.mjs";import{n as s}from"./input-validation-Ch4Vllrm.mjs";import{a as c,i as l,n as u}from"./prompt-sL_yMZbI.mjs";import{t as d}from"./cli-types-tt_LZMbn.mjs";function f(e){return e.usage(`$0 origin-ca-certificates create
3
3
 
4
4
  Create an Origin CA certificate. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`hostnames`,{type:`string`,array:!0,description:"Array of hostnames or wildcard names bound to the certificate.\nHostnames must be fully qualified domain names (FQDNs) belonging to zones on your account (e.g., `example.com` or `sub.example.com`). Wildcards are supported only as a `*.` prefix for a single level (e.g., `*.example.com`). Double wildcards (`*.*.example.com`) and interior wildcards (`foo.*.example.com`) are not allowed. The wildcard suffix must be a multi-label domain (`*.example.com` is valid, but `*.com` is not). Unicode/IDN hostnames are accepted and automatically converted to punycode."}).option(`request-type`,{type:`string`,description:`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,choices:[`origin-rsa`,`origin-ecc`,`keyless-certificate`]}).option(`requested-validity`,{type:`number`,description:`The number of days for which the certificate should be valid.`,default:5475}).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 p={command:`create`,describe:`Create Certificate`,builder:f,handler:async u=>i({command:`origin-ca-certificates create`,classification:{safeFlags:[`request-type`,`dry-run`]}},u,async()=>{if(u.dryRun){n({command:`cf origin-ca-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},bodyKind:`json`,body:u.body===void 0?o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]}):a(u.body)});return}let i=await e(u);if(u.body){let e=a(u.body);t(await r(`Creating`,async()=>i.originCaCertificates.create({...e})),{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await c(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u.hostnames===void 0)throw Error(`--hostnames is required (or pass --body with this field set).`);u[`request-type`]===void 0&&(u[`request-type`]=await l(`request-type`,`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,[`origin-rsa`,`origin-ecc`,`keyless-certificate`]));let d=o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]});t(await r(`Creating`,async()=>i.originCaCertificates.create({...d})),{successLabel:`Created`})})};function m(e){return e.usage(`$0 origin-ca-certificates delete <certificate-id>
5
5