cf 1.0.0-beta.1 → 1.0.0-beta.2

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 (350) hide show
  1. package/README.md +11 -0
  2. package/dist/_meta/commands.json +9993 -10535
  3. package/dist/_meta/hand-written-commands.json +515 -0
  4. package/dist/_meta/schemas.json +6429 -7062
  5. package/dist/{abuse-reports-Dd6kJM7r.mjs → abuse-reports-JcwSaW-c.mjs} +11 -11
  6. package/dist/access-B3TvAe5h.mjs +27 -0
  7. package/dist/{account-CZ9SPVdz.mjs → account-CLsfIk5j.mjs} +5 -5
  8. package/dist/{account-tags-DAf-hq1m.mjs → account-tags-BJdDiyDi.mjs} +4 -4
  9. package/dist/{accounts-BDIKjiG2.mjs → accounts-6eXqIqSW.mjs} +59 -59
  10. package/dist/{acm-D-q1FVWJ.mjs → acm-ChNLnPqM.mjs} +3 -3
  11. package/dist/{addressing-0w2U1NEy.mjs → addressing-z8ei_TCh.mjs} +49 -49
  12. package/dist/agent-context-GRiQ4zRU.mjs +2 -0
  13. package/dist/{agent-memory-Drumm4qd.mjs → agent-memory-Un0usAVF.mjs} +15 -15
  14. package/dist/{ai-ARwLeQ1O.mjs → ai-Bj8kgDf7.mjs} +14 -14
  15. package/dist/{ai-audit-CPrmohqf.mjs → ai-audit-FR6QuDK_.mjs} +1 -1
  16. package/dist/{ai-gateway-DNY4FPF2.mjs → ai-gateway-DrQhTvKf.mjs} +68 -68
  17. package/dist/{ai-search-B5l4IDSR.mjs → ai-search-BvMeOKK6.mjs} +37 -37
  18. package/dist/{ai-security-C7_IGDDl.mjs → ai-security-BHvDKoM1.mjs} +1 -1
  19. package/dist/{alerting-B6m1Rhf4.mjs → alerting-DmRZCAjg.mjs} +26 -26
  20. package/dist/{analytics-nnzFBB_7.mjs → analytics-DqidJ4qc.mjs} +9 -9
  21. package/dist/{analytics_engine-BvjKCwn1.mjs → analytics_engine-I7N0I6yP.mjs} +2 -2
  22. package/dist/{api-security-B9IozS2a.mjs → api-security-BMNhdDyR.mjs} +61 -61
  23. package/dist/{argo-C_QcqR6P.mjs → argo-U5TIBcub.mjs} +1 -1
  24. package/dist/args-CXgkQKK7.mjs +2 -0
  25. package/dist/{artifacts-DDFNpYBz.mjs → artifacts-Byw1W73U.mjs} +20 -20
  26. package/dist/{audit-logs-cTzNV0DV.mjs → audit-logs-C6zyFeKM.mjs} +2 -2
  27. package/dist/auth-B5p3SIhO.mjs +8 -0
  28. package/dist/auth-CosaKfuk.mjs +2 -0
  29. package/dist/autoconfig-DED3bWob.mjs +511 -0
  30. package/dist/banner-Xk4xBN8U.mjs +2 -0
  31. package/dist/{billing-DU2X-q-x.mjs → billing-BS1raRJt.mjs} +10 -10
  32. package/dist/{bot-management-BHAAoZOh.mjs → bot-management-Cn6xfGzJ.mjs} +1 -1
  33. package/dist/{botnet-feed-DOOnGVVY.mjs → botnet-feed-DtWOPNfw.mjs} +5 -5
  34. package/dist/{brand-protection-C_DYa7IK.mjs → brand-protection-BcEQ66bT.mjs} +13 -13
  35. package/dist/browser-extension-D_siSsD9.mjs +2 -0
  36. package/dist/{browser-run-Dw-vgWGR.mjs → browser-run-RZ7ZPRop.mjs} +23 -23
  37. package/dist/build-DG8NfVjJ.mjs +2 -0
  38. package/dist/build-kgS7iKwi.mjs +2 -0
  39. package/dist/{builds-CO0MmSd3.mjs → builds-AOCMH4CE.mjs} +31 -31
  40. package/dist/{cache-XxusQxXe.mjs → cache-D_EBxDff.mjs} +1 -1
  41. package/dist/{certificate-authorities-Dmxh7w-Z.mjs → certificate-authorities-B6rtjuaT.mjs} +1 -1
  42. package/dist/cf--3tGe71B.mjs +18 -0
  43. package/dist/chunk-M77HNR46-BqG3fjQz.mjs +2 -0
  44. package/dist/chunk-RV27PEH3-C8_6bMgi.mjs +97 -0
  45. package/dist/chunk-U6NEESU5-CAnOLcsu.mjs +2 -0
  46. package/dist/chunk-WMOON6TZ-D3H84qpM.mjs +2 -0
  47. package/dist/cli-Ct980dyx.mjs +3 -0
  48. package/dist/cli-exit-Dqoo6Jgb.mjs +2 -0
  49. package/dist/client-certificates-uBOjGcgo.mjs +13 -0
  50. package/dist/{client-side-security-D7NWV0YH.mjs → client-side-security-Bm7JwGaG.mjs} +1 -1
  51. package/dist/{cloud-connector-XMFOTNqT.mjs → cloud-connector-69M2Dx8h.mjs} +1 -1
  52. package/dist/{cloudflared-DhItYrCq.mjs → cloudflared-Ba5LySkU.mjs} +1 -1
  53. package/dist/{cloudforce-one-Cew4MHvA.mjs → cloudforce-one-Xn2mlAPv.mjs} +214 -214
  54. package/dist/command-B7SzqjQM.mjs +2 -0
  55. package/dist/command-BLHcNQ8m.mjs +2 -0
  56. package/dist/{command-RiZ_LYcm.mjs → command-BxQbIQWT.mjs} +1 -1
  57. package/dist/command-C0SMCHZp.mjs +2 -0
  58. package/dist/command-CE8k5TuK.mjs +2 -0
  59. package/dist/command-CPiCDUth.mjs +2 -0
  60. package/dist/command-Cb0pS8T5.mjs +2 -0
  61. package/dist/command-Cz_bKDWf.mjs +2 -0
  62. package/dist/command-DCpX9Cem.mjs +2 -0
  63. package/dist/command-DEC5PwJo.mjs +2 -0
  64. package/dist/command-DHjsstFb.mjs +2 -0
  65. package/dist/command-MTUsmZU5.mjs +2 -0
  66. package/dist/command-Sb9lOxWT.mjs +2 -0
  67. package/dist/command-sQ8yswii.mjs +2 -0
  68. package/dist/{completions-xPLd1cvL.mjs → completions-DZDltM9V.mjs} +3 -3
  69. package/dist/{config-B4vIa0zp.mjs → config-DcppJ5D2.mjs} +1 -1
  70. package/dist/{connector-interrupts-BfQN_pm6.mjs → connector-interrupts-DTy6laab.mjs} +3 -3
  71. package/dist/{connector-telemetry-events-B7qLZsZJ.mjs → connector-telemetry-events-CJqGGvFJ.mjs} +3 -3
  72. package/dist/{connector-telemetry-snapshots-Ckvg9BPc.mjs → connector-telemetry-snapshots-BPxhPhr6.mjs} +3 -3
  73. package/dist/{connectors-BhvAP5fb.mjs → connectors-CdfCcZuA.mjs} +7 -7
  74. package/dist/{containers-Cq1gtnq6.mjs → containers-C7z53QcY.mjs} +86 -86
  75. package/dist/{containers-Bl3EY-cy.mjs → containers-VMqcxH5a.mjs} +17 -17
  76. package/dist/{content-scan-BYGe9fFj.mjs → content-scan-BirgZrmr.mjs} +1 -1
  77. package/dist/context-Dzzbc9RK.mjs +7 -0
  78. package/dist/{cps-BWMDWeVq.mjs → cps-DzFm3zKp.mjs} +1 -1
  79. package/dist/{csamScanner-DMYGzLNi.mjs → csamScanner-D2_OO5-1.mjs} +1 -1
  80. package/dist/{ct-alerting-Vq4l2s7n.mjs → ct-alerting-B7wQkFVl.mjs} +1 -1
  81. package/dist/{custom-certificates-BDEHH0Ym.mjs → custom-certificates-BKcCfbH8.mjs} +4 -4
  82. package/dist/{custom-csrs-CHSkZNdX.mjs → custom-csrs-CXoOxir4.mjs} +5 -5
  83. package/dist/{custom-hostnames-Bch3iQZC.mjs → custom-hostnames-CNYfnCOd.mjs} +6 -6
  84. package/dist/{custom-nameservers-Tdvu1-vr.mjs → custom-nameservers-BlLM7a4L.mjs} +5 -5
  85. package/dist/{custom-pages-rFsiIXlr.mjs → custom-pages-BcWoypet.mjs} +10 -10
  86. package/dist/{d1-C1GK7DsW.mjs → d1-CvrHsqYY.mjs} +14 -14
  87. package/dist/{data-security-DDhPnX8Z.mjs → data-security-BxzLSdGk.mjs} +33 -33
  88. package/dist/{dcv-delegation-D6xiYj2l.mjs → dcv-delegation-9_Hl-5v-.mjs} +1 -1
  89. package/dist/{delegate-GctF_lrq.mjs → delegate-CCGgla7X.mjs} +1 -1
  90. package/dist/delegate.mjs +1 -1
  91. package/dist/{deploy-D04Xvm0m.mjs → deploy-BlXYtvTd.mjs} +1 -1
  92. package/dist/{deploy-input-COEKxOA1.mjs → deploy-input-DTXVZ2QJ.mjs} +1 -1
  93. package/dist/dev-reqdKM28.mjs +4 -0
  94. package/dist/{diagnostics-BZVAAguV.mjs → diagnostics-BxHs1EJB.mjs} +7 -7
  95. package/dist/dialog-ClHoC_cG.mjs +2 -0
  96. package/dist/dist-CmyJy57B.mjs +48 -0
  97. package/dist/{dist-BpadEMNY.mjs → dist-Cpb7_h4N.mjs} +35 -35
  98. package/dist/dist-cGGV-p_F.mjs +366 -0
  99. package/dist/{dls-BsnURYja.mjs → dls-D7GXW-N3.mjs} +8 -8
  100. package/dist/{dns-B_nTXhuM.mjs → dns-B0mdWJO5.mjs} +63 -63
  101. package/dist/{dns-firewall-DDsrdulo.mjs → dns-firewall-BG0bzuL3.mjs} +8 -8
  102. package/dist/dot-prop-IITUZ2XW-BO5KJUwL.mjs +2 -0
  103. package/dist/dry-run-BmzTxDtZ.mjs +2 -0
  104. package/dist/{durable-objects-8U8DpF9q.mjs → durable-objects-DW0CsJzR.mjs} +4 -4
  105. package/dist/{email-auth-CzjtGH6g.mjs → email-auth-Ls-7Yijm.mjs} +1 -1
  106. package/dist/{email-routing-B92fty1-.mjs → email-routing-DVaFhg-3.mjs} +24 -24
  107. package/dist/{email-security-keTqF0nJ.mjs → email-security-vnwkqlgp.mjs} +77 -79
  108. package/dist/{email-sending-B7f95epu.mjs → email-sending-CbMUicJz.mjs} +23 -23
  109. package/dist/error-sanitization-TV6O0aCD.mjs +2 -0
  110. package/dist/error-sanitization-cyGBhW1Z.mjs +2 -0
  111. package/dist/{fieldExtractors-DL_H1m7E.mjs → fieldExtractors-2EkDoJg8.mjs} +4 -4
  112. package/dist/firewall-BK4QYqRe.mjs +36 -0
  113. package/dist/{flagship-CjC3dF7L.mjs → flagship--lHQ0H3n.mjs} +13 -13
  114. package/dist/{fraud-DU_YCLC5.mjs → fraud-CaoRrQ8W.mjs} +1 -1
  115. package/dist/generate-CrKNH6ms.mjs +3 -0
  116. package/dist/generate-Djb5Af37.mjs +2 -0
  117. package/dist/{google-tag-gateway-xqN-QudN.mjs → google-tag-gateway-DDzLPmk5.mjs} +1 -1
  118. package/dist/{healthchecks-COnq1YOx.mjs → healthchecks-Q2uXvt4m.mjs} +1 -1
  119. package/dist/{hostnames-CxRAY_Pp.mjs → hostnames-CsaYnis6.mjs} +1 -1
  120. package/dist/{hyperdrive-DPWyiXpj.mjs → hyperdrive-DDr6sAkw.mjs} +9 -9
  121. package/dist/{iam-CtX9NPCy.mjs → iam-CmzocepZ.mjs} +24 -24
  122. package/dist/{images-CuWFOsGw.mjs → images-Ux0Phsbi.mjs} +38 -38
  123. package/dist/index.mjs +1 -1
  124. package/dist/init-Nx4RRgfT.mjs +39 -0
  125. package/dist/{intel-BeGV3VXt.mjs → intel-bgS4g7nx.mjs} +38 -38
  126. package/dist/interactive-B_dcVghB.mjs +2 -0
  127. package/dist/interactive-D80kbTap.mjs +32 -0
  128. package/dist/{ips-d6aoKAI4.mjs → ips-BDiolgWF.mjs} +1 -1
  129. package/dist/keyless-certificates-C_TwTMql.mjs +13 -0
  130. package/dist/{keys-Fyf3vWcA.mjs → keys-Cr8AqQDY.mjs} +2 -2
  131. package/dist/{kv-CA4J7cCq.mjs → kv-DmAQCqXl.mjs} +10 -10
  132. package/dist/lazy-command-B_bwSa2F.mjs +2 -0
  133. package/dist/{leaked-credential-checks-B7ewx3W-.mjs → leaked-credential-checks-De7ph4VA.mjs} +1 -1
  134. package/dist/{load-balancers-DHD4f2CT.mjs → load-balancers-DXt4ndF4.mjs} +39 -39
  135. package/dist/local-CFd107fr.mjs +2 -0
  136. package/dist/{local-B6b2OIBW.mjs → local-OKXweFsd.mjs} +1 -1
  137. package/dist/{local-runtime-DD8DAIlm.mjs → local-runtime-tTYpniPS.mjs} +1 -1
  138. package/dist/login-BurQ63Ws.mjs +5 -0
  139. package/dist/login-CmlHvH5k.mjs +2 -0
  140. package/dist/{logo-matches-BAX8v3iL.mjs → logo-matches-CQ60P96J.mjs} +3 -3
  141. package/dist/{logos-BWBVGwU6.mjs → logos-u7UwT8MH.mjs} +3 -3
  142. package/dist/{logpush-CZKR8DHO.mjs → logpush-IoIe8e80.mjs} +23 -23
  143. package/dist/{logs-CiDyrqEu.mjs → logs-ih5tyXEE.mjs} +16 -16
  144. package/dist/{magic-cloud-networking-DttrBXqd.mjs → magic-cloud-networking-CWNFnjcY.mjs} +34 -34
  145. package/dist/{magic-network-monitoring-9VXDSYuL.mjs → magic-network-monitoring-ClfZleF8.mjs} +17 -17
  146. package/dist/{magic-transit-Dsu_cSGM.mjs → magic-transit-D69pkEVW.mjs} +139 -139
  147. package/dist/{managed-defense-SYreve4W.mjs → managed-defense-BHdmL0vx.mjs} +9 -9
  148. package/dist/{managed-transforms-CzSy_xPw.mjs → managed-transforms-DbCR4LUg.mjs} +1 -1
  149. package/dist/{matches-qf7GReyu.mjs → matches-Cou6RVkh.mjs} +3 -3
  150. package/dist/{mcp-DYSk5_gc.mjs → mcp-CQYfM19s.mjs} +15 -15
  151. package/dist/{mesh-DdY07OYt.mjs → mesh-CXqaAFS4.mjs} +12 -12
  152. package/dist/migrate-CXMbQPyC.mjs +2 -0
  153. package/dist/mtls-certificates-DNeId8xS.mjs +13 -0
  154. package/dist/{network-DpaZ5LJL.mjs → network-B7V3JbU7.mjs} +24 -24
  155. package/dist/{network-interconnects-C4uUoeNa.mjs → network-interconnects-BNon8iUs.mjs} +17 -17
  156. package/dist/oauth-CeXh-ACI.mjs +9 -0
  157. package/dist/{oauth-nsTDJ0dF.mjs → oauth-DM8q-TYg.mjs} +1 -1
  158. package/dist/{oauth-clients-D7Ou7oAS.mjs → oauth-clients-gGmWIWHl.mjs} +7 -7
  159. package/dist/{oauth-scopes-BFoE82Mv.mjs → oauth-scopes-DSEu331u.mjs} +1 -1
  160. package/dist/{observability-smcOFbC1.mjs → observability-_VJhfwM1.mjs} +44 -44
  161. package/dist/open-PCXX3ZDZ-DobJT1Mj.mjs +4 -0
  162. package/dist/{organization-Dyf_0mq4.mjs → organization-DW4EpwGl.mjs} +1 -1
  163. package/dist/{organizations-D7zGPLVm.mjs → organizations-DE1g2wVq.mjs} +1 -1
  164. package/dist/{origin-ca-certificates-DJrp29gv.mjs → origin-ca-certificates-D3ULDV__.mjs} +3 -3
  165. package/dist/{origin-post-quantum-encryption-BYj3kJiq.mjs → origin-post-quantum-encryption-BLropaz7.mjs} +1 -1
  166. package/dist/{origin-tls-client-auth-j0tGh6Fy.mjs → origin-tls-client-auth-C87TG2i_.mjs} +5 -5
  167. package/dist/output-CZt-berV.mjs +2 -0
  168. package/dist/{page-rules-CLzba_nr.mjs → page-rules-tlb9P-7V.mjs} +1 -1
  169. package/dist/{pages-pah6dZBJ.mjs → pages-CjPErYik.mjs} +24 -24
  170. package/dist/{pay-per-crawl-DbaTVI8V.mjs → pay-per-crawl-C50wI-Iz.mjs} +32 -32
  171. package/dist/{pay-per-use-BEvtoppJ.mjs → pay-per-use-DHHIvynU.mjs} +3 -3
  172. package/dist/{pipelines-lps71uoA.mjs → pipelines-Y2icOwuf.mjs} +20 -20
  173. package/dist/precursor-DeyurJSC.mjs +4 -0
  174. package/dist/previews-Dj_LcGRd.mjs +4 -0
  175. package/dist/progress-C9dWgc3J.mjs +2 -0
  176. package/dist/prompt-Mh69ni1N.mjs +3 -0
  177. package/dist/{queries-EJYlFw8m.mjs → queries-DyUJefwL.mjs} +4 -4
  178. package/dist/{queues-CozKGaA4.mjs → queues-CdNe4tGY.mjs} +29 -35
  179. package/dist/{r2-Chn_JQUM.mjs → r2-C0W2J4sT.mjs} +52 -52
  180. package/dist/{r2-data-catalog-Bfn3AWzn.mjs → r2-data-catalog-D_zDlmVD.mjs} +16 -16
  181. package/dist/{radar-NmpdyMo5.mjs → radar-CSguicKC.mjs} +1 -1
  182. package/dist/raw-fetch-1ygCOcT_.mjs +2 -0
  183. package/dist/{realtime-iWTz8WbH.mjs → realtime-CvWs5pi3.mjs} +78 -78
  184. package/dist/{registrar-Cza1L8i_.mjs → registrar-DQUxn0FK.mjs} +8 -8
  185. package/dist/{registrar-sandbox-BP4GQg5s.mjs → registrar-sandbox-Q7ZEmg2x.mjs} +6 -6
  186. package/dist/{registry-vreNkX6u.mjs → registry-4Sw95M5_.mjs} +1 -1
  187. package/dist/{reporting-gvXX2MxY.mjs → reporting-DJShxeDv.mjs} +7 -7
  188. package/dist/request-headers-DFBBErJg.mjs +2 -0
  189. package/dist/{request-tracers-F8a_aj32.mjs → request-tracers-DD8HlG61.mjs} +2 -2
  190. package/dist/resolve-BVxXAYG7.mjs +2 -0
  191. package/dist/{resource-sharing-D6XWIDmb.mjs → resource-sharing-J46JMWQP.mjs} +14 -14
  192. package/dist/{resource-tagging-c_z4VZt0.mjs → resource-tagging-DLZJLIqy.mjs} +2 -2
  193. package/dist/{rules-_QDaG3U5.mjs → rules-D068LfBR.mjs} +8 -8
  194. package/dist/{rulesets-Bc4ZuPG_.mjs → rulesets-Cz6P7Oje.mjs} +17 -17
  195. package/dist/{rum-ChPyfpM2.mjs → rum-C6GQC2vI.mjs} +14 -14
  196. package/dist/run-C_qUgBTs.mjs +2 -0
  197. package/dist/run-DK1d9BJz.mjs +2 -0
  198. package/dist/schema-VZPw_2CY.mjs +2 -0
  199. package/dist/{schema-flags-C9lbLgE-.mjs → schema-flags-BmY0Nzp0.mjs} +2 -2
  200. package/dist/{scim-BjiswXbC.mjs → scim-DMTp_Zhc.mjs} +10 -10
  201. package/dist/{sdk-CsWOex96.mjs → sdk-BuF3fTHr.mjs} +2 -2
  202. package/dist/{secrets-store-Cn3D5a0d.mjs → secrets-store-C2epk0sQ.mjs} +11 -11
  203. package/dist/{security-center-DP4GC1cG.mjs → security-center-DwMdQ02Y.mjs} +15 -15
  204. package/dist/{security-txt-CaR5Idmz.mjs → security-txt-CORQfMul.mjs} +1 -1
  205. package/dist/session-BEXskZi2.mjs +2 -0
  206. package/dist/shared--lvrXmXY.mjs +2 -0
  207. package/dist/{smart-shield-CphSzoh4.mjs → smart-shield-BZ0xjy_6.mjs} +1 -1
  208. package/dist/{snippets-r-Mre0cE.mjs → snippets-LSkJGDOc.mjs} +1 -1
  209. package/dist/source-38bULAR8.mjs +6 -0
  210. package/dist/spawn-Da3HnlmB.mjs +10 -0
  211. package/dist/{spectrum-BhjCVFZk.mjs → spectrum-zU8_GFTV.mjs} +1 -1
  212. package/dist/{speed-CPgypY7n.mjs → speed-4XbFmeYM.mjs} +1 -1
  213. package/dist/src-BLLpnbzC.mjs +109 -0
  214. package/dist/{ssl-DsMrXyqK.mjs → ssl-DiCsMY_a.mjs} +4 -4
  215. package/dist/startup-profile-6fCkD04r.mjs +17 -0
  216. package/dist/startup-profile-Cw-_akjQ.mjs +2 -0
  217. package/dist/state-CcktNox9.mjs +2 -0
  218. package/dist/{state-BxCejn42.mjs → state-DiHwKWTy.mjs} +1 -1
  219. package/dist/{stream-L2NmGPby.mjs → stream-BG3NUAVE.mjs} +45 -45
  220. package/dist/{submit-KN0Ul5fV.mjs → submit-CKSaSFS1.mjs} +2 -2
  221. package/dist/{tags-CZMFKGdP.mjs → tags-uT9Mi-bX.mjs} +2 -2
  222. package/dist/telemetry-C0k8vfbq.mjs +2 -0
  223. package/dist/telemetry-Dh-8kdfY.mjs +5 -0
  224. package/dist/{telemetry-CSj_ezpk.mjs → telemetry-IrDBqbQW.mjs} +1 -1
  225. package/dist/{tenant-Cu4P-foo.mjs → tenant--UrYFHM0.mjs} +1 -1
  226. package/dist/{tenant-custom-nameservers-Nx59Buv0.mjs → tenant-custom-nameservers-8Z4TVJtr.mjs} +1 -1
  227. package/dist/{theme-BiIYWOed.mjs → theme-BIWQFmZ0.mjs} +2 -2
  228. package/dist/tools-DNGD0l7I.mjs +2 -0
  229. package/dist/{tunnels-C-mMZy4v.mjs → tunnels-5lGSXYpl.mjs} +15 -15
  230. package/dist/turnstile-CT3AkMPV.mjs +33 -0
  231. package/dist/ui-D1hhIDIs.mjs +5 -0
  232. package/dist/update-check-BYJnL8J8.mjs +2 -0
  233. package/dist/update-check-DFoSm5GT.mjs +2 -0
  234. package/dist/update-check-worker.mjs +1 -1
  235. package/dist/{url-info-7ikewAnp.mjs → url-info-DvpNcNl8.mjs} +2 -2
  236. package/dist/{url-normalization-B0D7Fhf3.mjs → url-normalization-C9URZnpq.mjs} +1 -1
  237. package/dist/{url-scanner-DpKIqkin.mjs → url-scanner-CIwK3wB5.mjs} +8 -8
  238. package/dist/{user-BFq8UM1s.mjs → user-DGA7cqdf.mjs} +1 -1
  239. package/dist/{values-DnBYV1ZD.mjs → values-BzS0b25w.mjs} +2 -2
  240. package/dist/{vectorize-BpZ4UsUj.mjs → vectorize-DtDjl2fJ.mjs} +15 -15
  241. package/dist/version-B47pK_PZ.mjs +2 -0
  242. package/dist/{waiting-rooms-DJfqehy9.mjs → waiting-rooms-CjTh4F3B.mjs} +25 -25
  243. package/dist/{web-assets-CCSSW_JH.mjs → web-assets-4l1B5V9b.mjs} +1 -1
  244. package/dist/{web3-bbT1REPc.mjs → web3-C0Z4AJjC.mjs} +1 -1
  245. package/dist/{workers-CXuyjZB8.mjs → workers-CNBv6GxE.mjs} +20 -20
  246. package/dist/{workers-builds-TRF3K416.mjs → workers-builds-DYGeoxmX.mjs} +7 -7
  247. package/dist/{workers-for-platforms-B57iKiSN.mjs → workers-for-platforms-CSw0K8Nl.mjs} +11 -11
  248. package/dist/{workers-vpc-kgryQ48l.mjs → workers-vpc-DJ7Couct.mjs} +6 -6
  249. package/dist/{workflows-CKdPlIkK.mjs → workflows-Dm03QT8U.mjs} +20 -20
  250. package/dist/{zaraz-BXFlEWSx.mjs → zaraz-DJbWUUe3.mjs} +1 -1
  251. package/dist/zero-trust-DiMY-pN5.mjs +685 -0
  252. package/dist/{zone-DHmrotGW.mjs → zone-BWjBv1yy.mjs} +1 -1
  253. package/dist/{zones-C0eKBTqG.mjs → zones-zGqcQvcY.mjs} +1 -1
  254. package/dist/zt-Bt4Q6iM1.mjs +110 -0
  255. package/package.json +13 -11
  256. package/dist/access-C_2rEi0H.mjs +0 -27
  257. package/dist/auth-DJhSjNNL.mjs +0 -8
  258. package/dist/auth-sAorfdWU.mjs +0 -2
  259. package/dist/browser-extension-C48pKh3t.mjs +0 -15
  260. package/dist/build-1a8CiNIT.mjs +0 -2
  261. package/dist/build-Ca_drQY2.mjs +0 -2
  262. package/dist/cf-oadujOtC.mjs +0 -18
  263. package/dist/chunk-6EUZQHAF-QVTL_mC-.mjs +0 -2
  264. package/dist/chunk-DL5FNmn1.mjs +0 -2
  265. package/dist/chunk-Q72B4Q5Z-Cr1H_iK6.mjs +0 -2
  266. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +0 -2
  267. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +0 -2
  268. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +0 -374
  269. package/dist/client-certificates-CgaIc3zN.mjs +0 -13
  270. package/dist/command-CF0giIIc.mjs +0 -3
  271. package/dist/command-CsZFRm3P.mjs +0 -2
  272. package/dist/command-DBz8QiFk.mjs +0 -2
  273. package/dist/dev-CVD3BVUG.mjs +0 -4
  274. package/dist/dialog--iw0F2s-.mjs +0 -2
  275. package/dist/dist-CUUGKvjh.mjs +0 -48
  276. package/dist/dist-dc4E1u01.mjs +0 -272
  277. package/dist/dot-prop-6SRZBKHT-Dj7YOlwR.mjs +0 -2
  278. package/dist/dry-run-CLX6Pbtq.mjs +0 -2
  279. package/dist/error-sanitization-Cbd_oegl.mjs +0 -2
  280. package/dist/error-sanitization-DwOlM3R7.mjs +0 -2
  281. package/dist/firewall-67qoXiqD.mjs +0 -56
  282. package/dist/interactive-B6woOLo-.mjs +0 -32
  283. package/dist/interactive-DnUvQHjc.mjs +0 -2
  284. package/dist/keyless-certificates-Dvib4jhw.mjs +0 -13
  285. package/dist/local-BrfySqnx.mjs +0 -2
  286. package/dist/login-CLW108XX.mjs +0 -5
  287. package/dist/login-xgRjiyJa.mjs +0 -2
  288. package/dist/mtls-certificates-LXlgdkf1.mjs +0 -13
  289. package/dist/oauth-Dzk6Gy-6.mjs +0 -14
  290. package/dist/open-PBXRGS4R-C4CKEADM.mjs +0 -4
  291. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +0 -4
  292. package/dist/output-Bia1u2k5.mjs +0 -2
  293. package/dist/precursor-DTTYLDEa.mjs +0 -4
  294. package/dist/previews-B89cUmpr.mjs +0 -4
  295. package/dist/progress-D_mL-Kcy.mjs +0 -2
  296. package/dist/prompt-sL_yMZbI.mjs +0 -3
  297. package/dist/raw-fetch-lSVttVJF.mjs +0 -2
  298. package/dist/request-headers-POBKmu93.mjs +0 -2
  299. package/dist/resolve-BXemCSyA.mjs +0 -2
  300. package/dist/run-DtN51G2A.mjs +0 -2
  301. package/dist/run-oACgYK8I.mjs +0 -2
  302. package/dist/schema-DZSSJaY0.mjs +0 -2
  303. package/dist/shared-W9uoX1-W.mjs +0 -2
  304. package/dist/source-BR4_k2ad.mjs +0 -6
  305. package/dist/spawn-BWEuIO-w.mjs +0 -523
  306. package/dist/src-Hw-TlVAO.mjs +0 -108
  307. package/dist/startup-profile-CYEokTVe.mjs +0 -2
  308. package/dist/startup-profile-CgWHy4rE.mjs +0 -17
  309. package/dist/state-DSzkxXML.mjs +0 -2
  310. package/dist/telemetry-DAf9gLyH.mjs +0 -2
  311. package/dist/telemetry-Dk1GcQ0u.mjs +0 -5
  312. package/dist/tools-BMKpYraQ.mjs +0 -2
  313. package/dist/turnstile-39JL9tMt.mjs +0 -33
  314. package/dist/ui-DH95w1Qk.mjs +0 -5
  315. package/dist/undici-DTSBJHNS.mjs +0 -96
  316. package/dist/update-check-BKQBD4MQ.mjs +0 -2
  317. package/dist/update-check-CE9XB6gf.mjs +0 -2
  318. package/dist/version-Bh3b9vTa.mjs +0 -2
  319. package/dist/zero-trust-M08mBsYd.mjs +0 -795
  320. /package/dist/{Page-C-JHZnIy.mjs → Page-BchtVjAO.mjs} +0 -0
  321. /package/dist/{alerts-CstOk8n0.mjs → alerts-DY_7Nknx.mjs} +0 -0
  322. /package/dist/{autorag-PRTwXGgn.mjs → autorag-K396-M2S.mjs} +0 -0
  323. /package/dist/{body-parser-CUWbw_Tq.mjs → body-parser-BpPZBRMr.mjs} +0 -0
  324. /package/dist/{brands-BHRXlWDm.mjs → brands-Uy0Cmv1w.mjs} +0 -0
  325. /package/dist/{clear-UvKESVx3.mjs → clear-CpcO2ExU.mjs} +0 -0
  326. /package/dist/{cli-types-tt_LZMbn.mjs → cli-types-B6tm-8uL.mjs} +0 -0
  327. /package/dist/{connector-telemetry-events-latest-DwnFeZg0.mjs → connector-telemetry-events-latest-oguk5Zyj.mjs} +0 -0
  328. /package/dist/{connector-telemetry-snapshots-latest-Dv6rZlxs.mjs → connector-telemetry-snapshots-latest-B6zuxkr0.mjs} +0 -0
  329. /package/dist/{domain-info-BqTDXNBo.mjs → domain-info-aiwP60Fo.mjs} +0 -0
  330. /package/dist/{health-CwPzzrV6.mjs → health-Bz33n-_F.mjs} +0 -0
  331. /package/dist/{input-validation-Ch4Vllrm.mjs → input-validation-D3e278L_.mjs} +0 -0
  332. /package/dist/{internal-WLHfxX64.mjs → internal-BHrJbbdA.mjs} +0 -0
  333. /package/dist/{lifecycle-Ichnb2x1.mjs → lifecycle-Cyc3fmyN.mjs} +0 -0
  334. /package/dist/{live-D_k7eHdv.mjs → live-a01OfPf9.mjs} +0 -0
  335. /package/dist/{metadata-APBiectA.mjs → metadata-C33s4rc-.mjs} +0 -0
  336. /package/dist/{project-settings-DSXevRvj.mjs → project-settings-Bf6rReo1.mjs} +0 -0
  337. /package/dist/{rate-limit-analytics-CDTPxSET.mjs → rate-limit-analytics-Bw9qmxMx.mjs} +0 -0
  338. /package/dist/{rate-limits-C3K9smdl.mjs → rate-limits-CDm_xzKt.mjs} +0 -0
  339. /package/dist/{ready-CvwvbdTX.mjs → ready-BXGqY1Wi.mjs} +0 -0
  340. /package/dist/{recent-submissions-CjzcT-iH.mjs → recent-submissions-AhGZD3a3.mjs} +0 -0
  341. /package/dist/{refute-CIAFMj00.mjs → refute-D_w5Gw20.mjs} +0 -0
  342. /package/dist/{resolve-CUDKxUrW.mjs → resolve-qPFfBMrn.mjs} +0 -0
  343. /package/dist/{scan-logo-zFkphtQ3.mjs → scan-logo-BZzFam-Q.mjs} +0 -0
  344. /package/dist/{scan-page-CLl2MAkZ.mjs → scan-page-BPA8nSPM.mjs} +0 -0
  345. /package/dist/{search-12jA1b4l.mjs → search-De0UlXYN.mjs} +0 -0
  346. /package/dist/{signed-url-U0T_PEMR.mjs → signed-url-ziDz9frX.mjs} +0 -0
  347. /package/dist/{submission-info-CZ84a3Nb.mjs → submission-info-83D2DCCG.mjs} +0 -0
  348. /package/dist/{total-queries-CJTc9Pde.mjs → total-queries-Dhol31Kn.mjs} +0 -0
  349. /package/dist/{tracked-domains-BKLxnnSv.mjs → tracked-domains-DoOPs6Vd.mjs} +0 -0
  350. /package/dist/{verify-CZW5Fo1q.mjs → verify-CxpGEnJb.mjs} +0 -0
@@ -1,40 +1,40 @@
1
1
  #!/usr/bin/env node
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 resource-sharing create
2
+ import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,r as l,t as u}from"./body-parser-BpPZBRMr.mjs";import{n as d}from"./input-validation-D3e278L_.mjs";import{a as f,i as p,n as m}from"./prompt-Mh69ni1N.mjs";import{t as h}from"./cli-types-B6tm-8uL.mjs";function g(e){return e.usage(`$0 resource-sharing create
3
3
 
4
- Creates a new resource share for sharing Cloudflare resources with other accounts or organizations.`).option(`name`,{type:`string`,description:`The name of the share.`}).option(`recipients`,{type:`string`,description:`The recipients field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`resources`,{type:`string`,description:`The resources 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 a new share`,builder:g,handler:async p=>s({command:`resource-sharing create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf resource-sharing create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)}):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.resourceSharing.create({...e,account_id:m})),{successLabel:`Created`});return}if(p.name===void 0&&(p.name=await f(`name`,`The name of the share.`)),p.recipients===void 0)throw Error(`--recipients is required (or pass --body with this field set).`);if(p.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let h=u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)});i(await o(`Creating`,async()=>s.resourceSharing.create({...h,account_id:m})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 resource-sharing delete <share-id>
4
+ Creates a new resource share for sharing Cloudflare resources with other accounts or organizations.`).option(`name`,{type:`string`,description:`The name of the share.`}).option(`recipients`,{type:`string`,description:`The recipients field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`resources`,{type:`string`,description:`The resources 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 a new share`,builder:g,handler:async p=>s({command:`resource-sharing create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf resource-sharing create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await n();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.resourceSharing.create({...e,account_id:m})),{successLabel:`Created`});return}if(p.name===void 0&&(p.name=await f(`name`,`The name of the share.`)),p.recipients===void 0)throw Error(`--recipients is required (or pass --body with this field set).`);if(p.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let h=u({name:d(p.name,`name`,`text`),recipients:l(p.recipients,`recipients`),resources:l(p.resources,`resources`)});i(await o(`Creating`,async()=>s.resourceSharing.create({...h,account_id:m})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 resource-sharing delete <share-id>
5
5
 
6
- Deletion is not immediate, an updated share object with a new status will be returned.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <share-id>`,describe:`Delete a share`,builder:v,handler:async c=>s({command:`resource-sharing delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
6
+ Deletion is not immediate, an updated share object with a new status will be returned.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <share-id>`,describe:`Delete a share`,builder:v,handler:async c=>s({command:`resource-sharing delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
7
7
  `);return}i(await o(`Deleting`,async()=>s.resourceSharing.delete({account_id:l,share_id:c[`share-id`]})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 resource-sharing excluded-recipients create <share-id>
8
8
 
9
9
  Excludes a single account from an organization-targeted share. The share continues to target the entire organization, but the excluded account is skipped during reconciliation.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).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 x={command:`create <share-id>`,describe:`Create a new share excluded recipient`,builder:b,handler:async e=>s({command:`resource-sharing excluded-recipients create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing excluded-recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.resourceSharing.excludedRecipients.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function S(e){return e.usage(`$0 resource-sharing excluded-recipients delete <excluded-recipient-id>
10
10
 
11
- Removes a single account from a share's excluded-recipient list. The account becomes eligible to receive the share again on the next reconciliation cycle.`).positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <excluded-recipient-id>`,describe:`Delete a share excluded recipient`,builder:S,handler:async c=>s({command:`resource-sharing excluded-recipients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing excluded-recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/excluded-recipients/${c[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(c[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"excluded-recipient-id":String(c[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
11
+ Removes a single account from a share's excluded-recipient list. The account becomes eligible to receive the share again on the next reconciliation cycle.`).positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <excluded-recipient-id>`,describe:`Delete a share excluded recipient`,builder:S,handler:async c=>s({command:`resource-sharing excluded-recipients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing excluded-recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/excluded-recipients/${c[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(c[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"excluded-recipient-id":String(c[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
12
12
  `);return}i(await o(`Deleting`,async()=>s.resourceSharing.excludedRecipients.delete({account_id:l,share_id:c[`share-id`],excluded_recipient_id:c[`excluded-recipient-id`]})),{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 resource-sharing excluded-recipients get <excluded-recipient-id>
13
13
 
14
- Gets a single excluded recipient of a share by its identifier tag.`).positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <excluded-recipient-id>`,describe:`Get share excluded recipient by ID`,builder:w,handler:async c=>s({command:`resource-sharing excluded-recipients get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing excluded-recipients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/excluded-recipients/${c[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(c[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"excluded-recipient-id":String(c[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.resourceSharing.excludedRecipients.get({account_id:l,share_id:c[`share-id`],excluded_recipient_id:c[`excluded-recipient-id`]})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 resource-sharing excluded-recipients list
14
+ Gets a single excluded recipient of a share by its identifier tag.`).positional(`excluded-recipient-id`,{type:`string`,description:`Share Excluded Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <excluded-recipient-id>`,describe:`Get share excluded recipient by ID`,builder:w,handler:async c=>s({command:`resource-sharing excluded-recipients get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing excluded-recipients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/excluded-recipients/${c[`excluded-recipient-id`]==null?`<excluded-recipient-id>`:encodeURIComponent(String(c[`excluded-recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"excluded-recipient-id":String(c[`excluded-recipient-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.resourceSharing.excludedRecipients.get({account_id:l,share_id:c[`share-id`],excluded_recipient_id:c[`excluded-recipient-id`]})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 resource-sharing excluded-recipients list
15
15
 
16
16
  Lists the accounts excluded from an organization-targeted share. Only valid for shares with \`target_type=organization\`.`).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List share excluded recipients by share ID`,builder:E,handler:async e=>s({command:`resource-sharing excluded-recipients list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf resource-sharing excluded-recipients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e);i(await o(`Loading`,async()=>n.resourceSharing.excludedRecipients.list({account_id_path:e[`account-id-path`],share_id:e[`share-id`],...t})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 resource-sharing excluded-recipients update <share-id>
17
17
 
18
18
  Reconciles a share's excluded recipients to match the given list. Only valid for shares with \`target_type=organization\`.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).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 k={command:`update <share-id>`,describe:`Update a share's excluded recipients`,builder:O,handler:async e=>s({command:`resource-sharing excluded-recipients update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing excluded-recipients update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/excluded-recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Updating`,async()=>t.resourceSharing.excludedRecipients.update({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},A={command:`excluded-recipients`,describe:`Operations for excluded-recipients`,builder:e=>e.command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 resource-sharing get <share-id>
19
19
 
20
- Fetches share by ID.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <share-id>`,describe:`Get account share by ID`,builder:j,handler:async c=>s({command:`resource-sharing get`,classification:{safeFlags:[`include-resources`,`include-recipient-counts`,`dry-run`]}},c,async()=>{let s={include_resources:c[`include-resources`],include_recipient_counts:c[`include-recipient-counts`]};if(c.dryRun){a({command:`cf resource-sharing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``)},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.resourceSharing.get({account_id:u,share_id:c[`share-id`],...s})),{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 resource-sharing list
20
+ Fetches share by ID.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <share-id>`,describe:`Get account share by ID`,builder:j,handler:async c=>s({command:`resource-sharing get`,classification:{safeFlags:[`include-resources`,`include-recipient-counts`,`dry-run`]}},c,async()=>{let s={include_resources:c[`include-resources`],include_recipient_counts:c[`include-recipient-counts`]};if(c.dryRun){a({command:`cf resource-sharing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.resourceSharing.get({account_id:u,share_id:c[`share-id`],...s})),{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 resource-sharing list
21
21
 
22
- Lists all account shares.`).option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`tag`,{type:`string`,description:"Filter shares by tag. Each value is either `key=value` (matches shares whose tags contain that key/value pair) or `key` alone (matches shares that have any value for that key). May be repeated; multiple `tag` parameters are ANDed together. Maximum 20 `tag` parameters per request."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List account shares`,builder:h(N),handler:async c=>s({command:`resource-sharing list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`include-resources`,`include-recipient-counts`,`dry-run`]}},c,async()=>{let s={status:c.status,kind:c.kind,target_type:c[`target-type`],resource_types:c[`resource-types`],order:c.order,direction:c.direction,page:c.page,per_page:c[`per-page`],include_resources:c[`include-resources`],include_recipient_counts:c[`include-recipient-counts`],tag:c.tag};if(c.dryRun){a({command:`cf resource-sharing list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares`,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.resourceSharing.list({account_id:u,...s})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 resource-sharing recipients create <share-id>
22
+ Lists all account shares.`).option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`tag`,{type:`string`,description:"Filter shares by tag. Each value is either `key=value` (matches shares whose tags contain that key/value pair) or `key` alone (matches shares that have any value for that key). May be repeated; multiple `tag` parameters are ANDed together. Maximum 20 `tag` parameters per request."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List account shares`,builder:h(N),handler:async c=>s({command:`resource-sharing list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`include-resources`,`include-recipient-counts`,`dry-run`]}},c,async()=>{let s={status:c.status,kind:c.kind,target_type:c[`target-type`],resource_types:c[`resource-types`],order:c.order,direction:c.direction,page:c.page,per_page:c[`per-page`],include_resources:c[`include-resources`],include_recipient_counts:c[`include-recipient-counts`],tag:c.tag};if(c.dryRun){a({command:`cf resource-sharing list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.resourceSharing.list({account_id:u,...s})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 resource-sharing recipients create <share-id>
23
23
 
24
- Adds a single recipient to an account-targeted resource share, granting them access to the shared resources. The recipient account must belong to the same organization as the share owner. To replace the entire recipient list in one call, use \`PUT /accounts/{account_id}/shares/{share_id}/recipients\` instead.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Optionally specify `recipient_account_id` to target a specific account, or `organization_id` to target the caller's whole organization. If neither is provided, the caller's organization is used. The legacy field `account_id` is accepted as a synonym for `recipient_account_id` during the deprecation period (see `x-sunset` on that field). "})}const I={command:`create <share-id>`,describe:`Create a new share recipient`,builder:F,handler:async e=>s({command:`resource-sharing recipients create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({organization_id:d(e[`organization-id`],`organization-id`,`text`)}):c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.resourceSharing.recipients.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Created`});return}let n=u({organization_id:d(e[`organization-id`],`organization-id`,`text`)});i(await o(`Creating`,async()=>t.resourceSharing.recipients.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Created`})})};function ee(e){return e.usage("$0 resource-sharing recipients delete <recipient-id>\n\nPerforms a **soft delete**: sets the recipient's `desired_association_status` to `disassociated`, which signals the background reconciliation workflow (Temporal) to remove the shared resources from the recipient account. The recipient record remains in the database for audit purposes and is still returned by `GET /accounts/{account_id}/shares/{share_id}/recipients` with its updated status. Resource access is not fully removed until the workflow completes and `current_association_status` transitions to `disassociated`. The recipient record itself is never physically deleted.").positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const L={command:`delete <recipient-id>`,describe:`Delete a share recipient`,builder:ee,handler:async c=>s({command:`resource-sharing recipients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/recipients/${c[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(c[`recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"recipient-id":String(c[`recipient-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
24
+ Adds a single recipient to an account-targeted resource share, granting them access to the shared resources. The recipient account must belong to the same organization as the share owner. To replace the entire recipient list in one call, use \`PUT /accounts/{account_id}/shares/{share_id}/recipients\` instead.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Optionally specify `recipient_account_id` to target a specific account, or `organization_id` to target the caller's whole organization. If neither is provided, the caller's organization is used. The legacy field `account_id` is accepted as a synonym for `recipient_account_id` during the deprecation period (see `x-sunset` on that field). "})}const I={command:`create <share-id>`,describe:`Create a new share recipient`,builder:F,handler:async e=>s({command:`resource-sharing recipients create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing recipients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({organization_id:d(e[`organization-id`],`organization-id`,`text`)}):c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.resourceSharing.recipients.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Created`});return}let n=u({organization_id:d(e[`organization-id`],`organization-id`,`text`)});i(await o(`Creating`,async()=>t.resourceSharing.recipients.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Created`})})};function ee(e){return e.usage("$0 resource-sharing recipients delete <recipient-id>\n\nPerforms a **soft delete**: sets the recipient's `desired_association_status` to `disassociated`, which signals the background reconciliation workflow (Temporal) to remove the shared resources from the recipient account. The recipient record remains in the database for audit purposes and is still returned by `GET /accounts/{account_id}/shares/{share_id}/recipients` with its updated status. Resource access is not fully removed until the workflow completes and `current_association_status` transitions to `disassociated`. The recipient record itself is never physically deleted.").positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const L={command:`delete <recipient-id>`,describe:`Delete a share recipient`,builder:ee,handler:async c=>s({command:`resource-sharing recipients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing recipients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/recipients/${c[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(c[`recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"recipient-id":String(c[`recipient-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
25
25
  `);return}i(await o(`Deleting`,async()=>s.resourceSharing.recipients.delete({account_id:l,share_id:c[`share-id`],recipient_id:c[`recipient-id`]})),{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 resource-sharing recipients get <recipient-id>
26
26
 
27
- Get share recipient by ID.`).positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <recipient-id>`,describe:`Get share recipient by ID`,builder:R,handler:async c=>s({command:`resource-sharing recipients get`,classification:{safeFlags:[`include-resources`,`dry-run`]}},c,async()=>{let s={include_resources:c[`include-resources`]};if(c.dryRun){a({command:`cf resource-sharing recipients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/recipients/${c[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(c[`recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"recipient-id":String(c[`recipient-id`]??``)},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.resourceSharing.recipients.get({account_id:u,share_id:c[`share-id`],recipient_id:c[`recipient-id`],...s})),{successLabel:`Loaded`})})};function B(e){return e.usage('$0 resource-sharing recipients list\n\nList share recipients by share ID. Returns **all** recipients regardless of their `association_status` (associating, associated, disassociating, disassociated). Callers that want only "active" recipients must filter client-side on the `association_status` field.').option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List share recipients by share ID`,builder:B,handler:async e=>s({command:`resource-sharing recipients list`,classification:{safeFlags:[`include-resources`,`dry-run`]}},e,async()=>{let t={include_resources:e[`include-resources`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf resource-sharing recipients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e);i(await o(`Loading`,async()=>n.resourceSharing.recipients.list({account_id_path:e[`account-id-path`],share_id:e[`share-id`],...t})),{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 resource-sharing recipients update <share-id>
27
+ Get share recipient by ID.`).positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <recipient-id>`,describe:`Get share recipient by ID`,builder:R,handler:async c=>s({command:`resource-sharing recipients get`,classification:{safeFlags:[`include-resources`,`dry-run`]}},c,async()=>{let s={include_resources:c[`include-resources`]};if(c.dryRun){a({command:`cf resource-sharing recipients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/recipients/${c[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(c[`recipient-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"recipient-id":String(c[`recipient-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.resourceSharing.recipients.get({account_id:u,share_id:c[`share-id`],recipient_id:c[`recipient-id`],...s})),{successLabel:`Loaded`})})};function B(e){return e.usage('$0 resource-sharing recipients list\n\nList share recipients by share ID. Returns **all** recipients regardless of their `association_status` (associating, associated, disassociating, disassociated). Callers that want only "active" recipients must filter client-side on the `association_status` field.').option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List share recipients by share ID`,builder:B,handler:async e=>s({command:`resource-sharing recipients list`,classification:{safeFlags:[`include-resources`,`dry-run`]}},e,async()=>{let t={include_resources:e[`include-resources`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf resource-sharing recipients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e);i(await o(`Loading`,async()=>n.resourceSharing.recipients.list({account_id_path:e[`account-id-path`],share_id:e[`share-id`],...t})),{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 resource-sharing recipients update <share-id>
28
28
 
29
29
  Replaces the full recipient list for an account-targeted share. The server computes the diff between the current and desired recipients: new accounts are added, accounts no longer in the list are marked for disassociation, and unchanged accounts are left as-is. Returns an error if the share targets an organization (\`target_type=organization\`); org-targeted shares derive their recipients dynamically from org membership and cannot be modified through this endpoint.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).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 U={command:`update <share-id>`,describe:`Update a share's recipients`,builder:H,handler:async e=>s({command:`resource-sharing recipients update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf resource-sharing recipients update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Updating`,async()=>t.resourceSharing.recipients.update({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},W={command:`recipients`,describe:`Update share recipients`,builder:e=>e.command(I).command(L).command(z).command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 resource-sharing resources create <share-id>
30
30
 
31
- Adds a resource to an existing share, making it available to share recipients.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`resource-account-id`,{type:`string`,description:`Account identifier.`}).option(`resource-id`,{type:`string`,description:`Share Resource identifier.`}).option(`resource-type`,{type:`string`,description:`Resource Type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).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 K={command:`create <share-id>`,describe:`Create a new share resource`,builder:G,handler:async l=>s({command:`resource-sharing resources create`,classification:{safeFlags:[`resource-type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf resource-sharing resources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}/resources`,pathParams:{"share-id":String(l[`share-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({resource_account_id:d(l[`resource-account-id`],`resource-account-id`,`text`),resource_id:d(l[`resource-id`],`resource-id`,`text`),resource_type:d(l[`resource-type`],`resource-type`,`text`)}):c(l.body)});return}let s=await r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.resourceSharing.resources.create({body:e,account_id:m,share_id:l[`share-id`]})),{successLabel:`Created`});return}l[`resource-account-id`]===void 0&&(l[`resource-account-id`]=await f(`resource-account-id`,`Account identifier.`)),l[`resource-id`]===void 0&&(l[`resource-id`]=await f(`resource-id`,`Share Resource identifier.`)),l[`resource-type`]===void 0&&(l[`resource-type`]=await p(`resource-type`,`Resource Type.`,[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]));let h=u({resource_account_id:d(l[`resource-account-id`],`resource-account-id`,`text`),resource_id:d(l[`resource-id`],`resource-id`,`text`),resource_type:d(l[`resource-type`],`resource-type`,`text`)});i(await o(`Creating`,async()=>s.resourceSharing.resources.create({body:h,account_id:m,share_id:l[`share-id`]})),{successLabel:`Created`})})};function q(e){return e.usage(`$0 resource-sharing resources delete <share-resource-id>
31
+ Adds a resource to an existing share, making it available to share recipients.`).positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`resource-account-id`,{type:`string`,description:`Account identifier.`}).option(`resource-id`,{type:`string`,description:`Share Resource identifier.`}).option(`resource-type`,{type:`string`,description:`Resource Type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).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 K={command:`create <share-id>`,describe:`Create a new share resource`,builder:G,handler:async l=>s({command:`resource-sharing resources create`,classification:{safeFlags:[`resource-type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf resource-sharing resources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}/resources`,pathParams:{"share-id":String(l[`share-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({resource_account_id:d(l[`resource-account-id`],`resource-account-id`,`text`),resource_id:d(l[`resource-id`],`resource-id`,`text`),resource_type:d(l[`resource-type`],`resource-type`,`text`)}):c(l.body)});return}let s=await r(l),m=l.local?e:await n();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.resourceSharing.resources.create({body:e,account_id:m,share_id:l[`share-id`]})),{successLabel:`Created`});return}l[`resource-account-id`]===void 0&&(l[`resource-account-id`]=await f(`resource-account-id`,`Account identifier.`)),l[`resource-id`]===void 0&&(l[`resource-id`]=await f(`resource-id`,`Share Resource identifier.`)),l[`resource-type`]===void 0&&(l[`resource-type`]=await p(`resource-type`,`Resource Type.`,[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]));let h=u({resource_account_id:d(l[`resource-account-id`],`resource-account-id`,`text`),resource_id:d(l[`resource-id`],`resource-id`,`text`),resource_type:d(l[`resource-type`],`resource-type`,`text`)});i(await o(`Creating`,async()=>s.resourceSharing.resources.create({body:h,account_id:m,share_id:l[`share-id`]})),{successLabel:`Created`})})};function q(e){return e.usage(`$0 resource-sharing resources delete <share-resource-id>
32
32
 
33
- Deletion is not immediate, an updated share resource object with a new status will be returned.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const J={command:`delete <share-resource-id>`,describe:`Delete a share resource`,builder:q,handler:async c=>s({command:`resource-sharing resources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing resources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources/${c[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(c[`share-resource-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"share-resource-id":String(c[`share-resource-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
33
+ Deletion is not immediate, an updated share resource object with a new status will be returned.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const J={command:`delete <share-resource-id>`,describe:`Delete a share resource`,builder:q,handler:async c=>s({command:`resource-sharing resources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing resources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources/${c[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(c[`share-resource-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"share-resource-id":String(c[`share-resource-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await m({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
34
34
  `);return}i(await o(`Deleting`,async()=>s.resourceSharing.resources.delete({account_id:l,share_id:c[`share-id`],share_resource_id:c[`share-resource-id`]})),{successLabel:`Deleted`})})};function Y(e){return e.usage(`$0 resource-sharing resources get <share-resource-id>
35
35
 
36
- Get share resource by ID.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get <share-resource-id>`,describe:`Get share resource by ID`,builder:Y,handler:async c=>s({command:`resource-sharing resources get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources/${c[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(c[`share-resource-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"share-resource-id":String(c[`share-resource-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.resourceSharing.resources.get({account_id:l,share_id:c[`share-id`],share_resource_id:c[`share-resource-id`]})),{successLabel:`Loaded`})})};function Z(e){return e.usage(`$0 resource-sharing resources list
36
+ Get share resource by ID.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`get <share-resource-id>`,describe:`Get share resource by ID`,builder:Y,handler:async c=>s({command:`resource-sharing resources get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf resource-sharing resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources/${c[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(c[`share-resource-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"share-resource-id":String(c[`share-resource-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.resourceSharing.resources.get({account_id:l,share_id:c[`share-id`],share_resource_id:c[`share-resource-id`]})),{successLabel:`Loaded`})})};function Z(e){return e.usage(`$0 resource-sharing resources list
37
37
 
38
- List share resources by share ID.`).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter share resources by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`resource-type`,{type:`string`,description:`Filter share resources by resource_type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`list`,describe:`List share resources by share ID`,builder:h(Z),handler:async c=>s({command:`resource-sharing resources list`,classification:{safeFlags:[`status`,`resource-type`,`dry-run`]}},c,async()=>{let s={status:c.status,resource_type:c[`resource-type`],page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf resource-sharing resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources`,pathParams:{"share-id":String(c[`share-id`]??``)},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.resourceSharing.resources.list({account_id:u,share_id:c[`share-id`],...s})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 resource-sharing resources update <share-resource-id>
38
+ List share resources by share ID.`).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter share resources by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`resource-type`,{type:`string`,description:`Filter share resources by resource_type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`list`,describe:`List share resources by share ID`,builder:h(Z),handler:async c=>s({command:`resource-sharing resources list`,classification:{safeFlags:[`status`,`resource-type`,`dry-run`]}},c,async()=>{let s={status:c.status,resource_type:c[`resource-type`],page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf resource-sharing resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources`,pathParams:{"share-id":String(c[`share-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.resourceSharing.resources.list({account_id:u,share_id:c[`share-id`],...s})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 resource-sharing resources update <share-resource-id>
39
39
 
40
- Update is not immediate, an updated share resource object with a new status will be returned.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).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:`update <share-resource-id>`,describe:`Update a share resource`,builder:$,handler:async l=>s({command:`resource-sharing resources update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf resource-sharing resources update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}/resources/${l[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(l[`share-resource-id`]))}`,pathParams:{"share-id":String(l[`share-id`]??``),"share-resource-id":String(l[`share-resource-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.resourceSharing.resources.update({...e,account_id:u,share_id:l[`share-id`],share_resource_id:l[`share-resource-id`]})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ne={command:`resources`,describe:`Individual resources (zones, configs) that have been shared with recipients`,builder:e=>e.command(K).command(J).command(X).command(Q).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.usage("$0 resource-sharing update <share-id>\n\nUpdates the share's display name and tags. This endpoint does **not** modify recipients or resources — those are managed via dedicated subresource endpoints: - **Recipients**: Use `POST /accounts/{account_id}/shares/{share_id}/recipients` to add a single recipient, `PUT /accounts/{account_id}/shares/{share_id}/recipients` to replace the full recipient list, or `DELETE /accounts/{account_id}/shares/{share_id}/recipients/{recipient_id}` to remove a recipient. - **Resources**: Use the share's resource subresource endpoints. Updating is not immediate; an updated share object with a new status will be returned.").positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the share.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for `PUT /accounts/{account_id}/shares/{share_id}`. The share's display `name` and `tags` can be updated via this endpoint. To modify recipients, use the `/accounts/{account_id}/shares/{share_id}/recipients` subresource endpoints (POST, PUT, DELETE). "})}const ie={command:`update <share-id>`,describe:`Update a share`,builder:re,handler:async l=>s({command:`resource-sharing update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf resource-sharing update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}`,pathParams:{"share-id":String(l[`share-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.resourceSharing.update({...e,account_id:p,share_id:l[`share-id`]})),{successLabel:`Updated`});return}l.name===void 0&&(l.name=await f(`name`,`The name of the share.`));let m=u({name:d(l.name,`name`,`text`)});i(await o(`Updating`,async()=>s.resourceSharing.update({...m,account_id:p,share_id:l[`share-id`]})),{successLabel:`Updated`})})},ae={command:`resource-sharing`,describe:`Share Cloudflare resources (zones, accounts) across organizations with granular access controls`,builder:e=>e.command(_).command(y).command(M).command(P).command(ie).command(A).command(W).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ae as default};
40
+ Update is not immediate, an updated share resource object with a new status will be returned.`).positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).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:`update <share-resource-id>`,describe:`Update a share resource`,builder:$,handler:async l=>s({command:`resource-sharing resources update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf resource-sharing resources update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}/resources/${l[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(l[`share-resource-id`]))}`,pathParams:{"share-id":String(l[`share-id`]??``),"share-resource-id":String(l[`share-resource-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await n();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.resourceSharing.resources.update({...e,account_id:u,share_id:l[`share-id`],share_resource_id:l[`share-resource-id`]})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ne={command:`resources`,describe:`Individual resources (zones, configs) that have been shared with recipients`,builder:e=>e.command(K).command(J).command(X).command(Q).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.usage("$0 resource-sharing update <share-id>\n\nUpdates the share's display name and tags. This endpoint does **not** modify recipients or resources — those are managed via dedicated subresource endpoints: - **Recipients**: Use `POST /accounts/{account_id}/shares/{share_id}/recipients` to add a single recipient, `PUT /accounts/{account_id}/shares/{share_id}/recipients` to replace the full recipient list, or `DELETE /accounts/{account_id}/shares/{share_id}/recipients/{recipient_id}` to remove a recipient. - **Resources**: Use the share's resource subresource endpoints. Updating is not immediate; an updated share object with a new status will be returned.").positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the share.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for `PUT /accounts/{account_id}/shares/{share_id}`. The share's display `name` and `tags` can be updated via this endpoint. To modify recipients, use the `/accounts/{account_id}/shares/{share_id}/recipients` subresource endpoints (POST, PUT, DELETE). "})}const ie={command:`update <share-id>`,describe:`Update a share`,builder:re,handler:async l=>s({command:`resource-sharing update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf resource-sharing update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/shares/${l[`share-id`]==null?`<share-id>`:encodeURIComponent(String(l[`share-id`]))}`,pathParams:{"share-id":String(l[`share-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.resourceSharing.update({...e,account_id:p,share_id:l[`share-id`]})),{successLabel:`Updated`});return}l.name===void 0&&(l.name=await f(`name`,`The name of the share.`));let m=u({name:d(l.name,`name`,`text`)});i(await o(`Updating`,async()=>s.resourceSharing.update({...m,account_id:p,share_id:l[`share-id`]})),{successLabel:`Updated`})})},ae={command:`resource-sharing`,describe:`Share Cloudflare resources (zones, accounts) across organizations with granular access controls`,builder:e=>e.command(_).command(y).command(M).command(P).command(ie).command(A).command(W).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ae as default};
@@ -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-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 resource-tagging summary get
2
+ import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";function c(e){return e.usage(`$0 resource-tagging summary get
3
3
 
4
- Lists all distinct tag keys and their distinct values 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:`get`,describe:`List tag key summary`,builder:c,handler:async c=>s({command:`resource-tagging summary get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){a({command:`cf resource-tagging summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/summary`,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.resourceTagging.summary.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`summary`,describe:`Operations for summary`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},d={command:`resource-tagging`,describe:`resource-tagging`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
4
+ Lists all distinct tag keys and their distinct values 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:`get`,describe:`List tag key summary`,builder:c,handler:async c=>s({command:`resource-tagging summary get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){a({command:`cf resource-tagging summary get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/tags/summary`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.resourceTagging.summary.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`summary`,describe:`Operations for summary`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},d={command:`resource-tagging`,describe:`resource-tagging`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
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";function m(e){return e.usage("$0 rules lists bulk-operations get <operation-id>\n\nGets the current status of an asynchronous operation on a list. The `status` property can have one of the following values: `pending`, `running`, `completed`, or `failed`. If the status is `failed`, the `error` property will contain a message describing the error.").positional(`operation-id`,{type:`string`,description:`The unique operation ID of the asynchronous action.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <operation-id>`,describe:`Get bulk operation status`,builder:m,handler:async c=>s({command:`rules lists bulk-operations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists bulk-operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/bulk_operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}`,pathParams:{"operation-id":String(c[`operation-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.bulkOperations.get({account_id:l,operation_id:c[`operation-id`]})),{successLabel:`Loaded`})})},g={command:`bulk-operations`,describe:`Operations for lists.bulk-operations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 rules lists create
2
+ import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,r as l,t as u}from"./body-parser-BpPZBRMr.mjs";import{n as d}from"./input-validation-D3e278L_.mjs";import{a as f,n as p}from"./prompt-Mh69ni1N.mjs";function m(e){return e.usage("$0 rules lists bulk-operations get <operation-id>\n\nGets the current status of an asynchronous operation on a list. The `status` property can have one of the following values: `pending`, `running`, `completed`, or `failed`. If the status is `failed`, the `error` property will contain a message describing the error.").positional(`operation-id`,{type:`string`,description:`The unique operation ID of the asynchronous action.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <operation-id>`,describe:`Get bulk operation status`,builder:m,handler:async c=>s({command:`rules lists bulk-operations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists bulk-operations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/bulk_operations/${c[`operation-id`]==null?`<operation-id>`:encodeURIComponent(String(c[`operation-id`]))}`,pathParams:{"operation-id":String(c[`operation-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.bulkOperations.get({account_id:l,operation_id:c[`operation-id`]})),{successLabel:`Loaded`})})},g={command:`bulk-operations`,describe:`Operations for lists.bulk-operations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 rules lists create
3
3
 
4
- Creates a new list of the specified kind.`).option(`description`,{type:`string`,description:`An informative summary of the list.`}).option(`name`,{type:`string`,description:`An informative name for the list. Use this name in filter and rule expressions.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create a list`,builder:_,handler:async l=>s({command:`rules lists create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({description:d(l.description,`description`,`text`),name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.rules.lists.create({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`An informative name for the list. Use this name in filter and rule expressions.`));let m=u({description:d(l.description,`description`,`text`),name:d(l.name,`name`,`text`)});i(await o(`Creating`,async()=>s.rules.lists.create({...m,account_id:p})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 rules lists delete <list-id>
4
+ Creates a new list of the specified kind.`).option(`description`,{type:`string`,description:`An informative summary of the list.`}).option(`name`,{type:`string`,description:`An informative name for the list. Use this name in filter and rule expressions.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create a list`,builder:_,handler:async l=>s({command:`rules lists create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({description:d(l.description,`description`,`text`),name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.rules.lists.create({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`An informative name for the list. Use this name in filter and rule expressions.`));let m=u({description:d(l.description,`description`,`text`),name:d(l.name,`name`,`text`)});i(await o(`Creating`,async()=>s.rules.lists.create({...m,account_id:p})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 rules lists delete <list-id>
5
5
 
6
- Deletes a specific list and all its items.`).positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <list-id>`,describe:`Delete a list`,builder:y,handler:async c=>s({command:`rules lists delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf rules lists delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}`,pathParams:{"list-id":String(c[`list-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes the custom list and every item it contains.`})){process.stderr.write(`Aborted.
6
+ Deletes a specific list and all its items.`).positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <list-id>`,describe:`Delete a list`,builder:y,handler:async c=>s({command:`rules lists delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf rules lists delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}`,pathParams:{"list-id":String(c[`list-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();if(c.accountId=l,!await p({force:!!c.force,message:`This operation deletes the custom list and every item it contains.`})){process.stderr.write(`Aborted.
7
7
  `);return}i(await o(`Deleting`,async()=>s.rules.lists.delete({account_id:l,list_id:c[`list-id`]})),{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 rules lists get <list-id>
8
8
 
9
- Fetches the details of a list.`).positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <list-id>`,describe:`Get a list`,builder:x,handler:async c=>s({command:`rules lists get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}`,pathParams:{"list-id":String(c[`list-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.get({account_id:l,list_id:c[`list-id`]})),{successLabel:`Loaded`})})};function C(e){return e.usage("$0 rules lists items create <list-id>\n\nAppends new items to the list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.").positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create <list-id>`,describe:`Create list items`,builder:C,handler:async l=>s({command:`rules lists items create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists items create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${l[`list-id`]==null?`<list-id>`:encodeURIComponent(String(l[`list-id`]))}/items`,pathParams:{"list-id":String(l[`list-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.rules.lists.items.create({body:e,account_id:u,list_id:l[`list-id`]})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function T(e){return e.usage("$0 rules lists items delete <list-id>\n\nRemoves one or more items from a list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.").positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`items`,{type:`string`,description:`The items 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(`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 E={command:`delete <list-id>`,describe:`Delete list items`,builder:T,handler:async d=>s({command:`rules lists items delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf rules lists items delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${d[`list-id`]==null?`<list-id>`:encodeURIComponent(String(d[`list-id`]))}/items`,pathParams:{"list-id":String(d[`list-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({items:l(d.items,`items`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,!await p({force:!!d.force,message:`This operation deletes the selected items from the custom list.`})){process.stderr.write(`Aborted.
9
+ Fetches the details of a list.`).positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <list-id>`,describe:`Get a list`,builder:x,handler:async c=>s({command:`rules lists get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}`,pathParams:{"list-id":String(c[`list-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.get({account_id:l,list_id:c[`list-id`]})),{successLabel:`Loaded`})})};function C(e){return e.usage("$0 rules lists items create <list-id>\n\nAppends new items to the list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.").positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create <list-id>`,describe:`Create list items`,builder:C,handler:async l=>s({command:`rules lists items create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists items create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/${l[`list-id`]==null?`<list-id>`:encodeURIComponent(String(l[`list-id`]))}/items`,pathParams:{"list-id":String(l[`list-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await n();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.rules.lists.items.create({body:e,account_id:u,list_id:l[`list-id`]})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function T(e){return e.usage("$0 rules lists items delete <list-id>\n\nRemoves one or more items from a list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.").positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`items`,{type:`string`,description:`The items 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(`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 E={command:`delete <list-id>`,describe:`Delete list items`,builder:T,handler:async d=>s({command:`rules lists items delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf rules lists items delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/${d[`list-id`]==null?`<list-id>`:encodeURIComponent(String(d[`list-id`]))}/items`,pathParams:{"list-id":String(d[`list-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({items:l(d.items,`items`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await n();if(d.accountId=f,!await p({force:!!d.force,message:`This operation deletes the selected items from the custom list.`})){process.stderr.write(`Aborted.
10
10
  `);return}if(d.body){let e=c(d.body);i(await o(`Deleting`,async()=>s.rules.lists.items.delete({...e,account_id:f,list_id:d[`list-id`]})),{successLabel:`Deleted`});return}let m=u({items:l(d.items,`items`)});i(await o(`Deleting`,async()=>s.rules.lists.items.delete({...m,account_id:f,list_id:d[`list-id`]})),{successLabel:`Deleted`})})};function D(e){return e.usage(`$0 rules lists items get <item-id>
11
11
 
12
- Fetches a list item in the list.`).positional(`item-id`,{type:`string`,description:`Defines the unique ID of the item in the List.`,demandOption:!0}).option(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <item-id>`,describe:`Get a list item`,builder:D,handler:async c=>s({command:`rules lists items get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists items get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}/items/${c[`item-id`]==null?`<item-id>`:encodeURIComponent(String(c[`item-id`]))}`,pathParams:{"item-id":String(c[`item-id`]??``),"list-id":String(c[`list-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.items.get({account_id:l,list_id:c[`list-id`],item_id:c[`item-id`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 rules lists items list
12
+ Fetches a list item in the list.`).positional(`item-id`,{type:`string`,description:`Defines the unique ID of the item in the List.`,demandOption:!0}).option(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <item-id>`,describe:`Get a list item`,builder:D,handler:async c=>s({command:`rules lists items get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists items get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}/items/${c[`item-id`]==null?`<item-id>`:encodeURIComponent(String(c[`item-id`]))}`,pathParams:{"item-id":String(c[`item-id`]??``),"list-id":String(c[`list-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.items.get({account_id:l,list_id:c[`list-id`],item_id:c[`item-id`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 rules lists items list
13
13
 
14
- Fetches all the items in the list.`).option(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`cursor`,{type:`string`,description:"The pagination cursor. An opaque string token that indicates where to continue when requesting the next/previous set of records. The response provides cursor values under `result_info.cursors`. You should make no assumptions about a cursor's content or length."}).option(`per-page`,{type:`number`,description:`Amount of results to include in each paginated response. A non-negative 32 bit integer.`}).option(`search`,{type:`string`,description:`A search query to filter returned items. Its meaning depends on the list type: IP addresses must start with the provided string, hostnames and bulk redirects must contain the string, and ASNs must match the string exactly.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`Get list items`,builder:k,handler:async c=>s({command:`rules lists items list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor,per_page:c[`per-page`],search:c.search};if(c.dryRun){a({command:`cf rules lists items list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}/items`,pathParams:{"list-id":String(c[`list-id`]??``)},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.rules.lists.items.list({account_id:u,list_id:c[`list-id`],...s})),{successLabel:`Loaded`})})};function j(e){return e.usage("$0 rules lists items update <list-id>\n\nRemoves all existing items from the list and adds the provided items to the list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.").positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).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 M={command:`update <list-id>`,describe:`Update all list items`,builder:j,handler:async l=>s({command:`rules lists items update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists items update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${l[`list-id`]==null?`<list-id>`:encodeURIComponent(String(l[`list-id`]))}/items`,pathParams:{"list-id":String(l[`list-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.rules.lists.items.update({body:e,account_id:u,list_id:l[`list-id`]})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},N={command:`items`,describe:`Operations for lists.items`,builder:e=>e.command(w).command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 rules lists list
14
+ Fetches all the items in the list.`).option(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`cursor`,{type:`string`,description:"The pagination cursor. An opaque string token that indicates where to continue when requesting the next/previous set of records. The response provides cursor values under `result_info.cursors`. You should make no assumptions about a cursor's content or length."}).option(`per-page`,{type:`number`,description:`Amount of results to include in each paginated response. A non-negative 32 bit integer.`}).option(`search`,{type:`string`,description:`A search query to filter returned items. Its meaning depends on the list type: IP addresses must start with the provided string, hostnames and bulk redirects must contain the string, and ASNs must match the string exactly.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`Get list items`,builder:k,handler:async c=>s({command:`rules lists items list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor,per_page:c[`per-page`],search:c.search};if(c.dryRun){a({command:`cf rules lists items list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/${c[`list-id`]==null?`<list-id>`:encodeURIComponent(String(c[`list-id`]))}/items`,pathParams:{"list-id":String(c[`list-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.rules.lists.items.list({account_id:u,list_id:c[`list-id`],...s})),{successLabel:`Loaded`})})};function j(e){return e.usage("$0 rules lists items update <list-id>\n\nRemoves all existing items from the list and adds the provided items to the list. This operation is asynchronous. To get current the operation status, invoke the `Get bulk operation status` endpoint with the returned `operation_id`. There is a limit of 1 pending bulk operation per account. If an outstanding bulk operation is in progress, the request will be rejected.").positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).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 M={command:`update <list-id>`,describe:`Update all list items`,builder:j,handler:async l=>s({command:`rules lists items update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists items update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/${l[`list-id`]==null?`<list-id>`:encodeURIComponent(String(l[`list-id`]))}/items`,pathParams:{"list-id":String(l[`list-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await n();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.rules.lists.items.update({body:e,account_id:u,list_id:l[`list-id`]})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},N={command:`items`,describe:`Operations for lists.items`,builder:e=>e.command(w).command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 rules lists list
15
15
 
16
- Fetches all lists in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`list`,describe:`Get lists`,builder:P,handler:async c=>s({command:`rules lists list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.list({account_id:l})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 rules lists update <list-id>
16
+ Fetches all lists in the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`list`,describe:`Get lists`,builder:P,handler:async c=>s({command:`rules lists list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf rules lists list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.rules.lists.list({account_id:l})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 rules lists update <list-id>
17
17
 
18
- Updates the description of a list.`).positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`description`,{type:`string`,description:`An informative summary of the list.`}).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 L={command:`update <list-id>`,describe:`Update a list`,builder:I,handler:async l=>s({command:`rules lists update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/rules/lists/${l[`list-id`]==null?`<list-id>`:encodeURIComponent(String(l[`list-id`]))}`,pathParams:{"list-id":String(l[`list-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({description:d(l.description,`description`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.rules.lists.update({...e,account_id:f,list_id:l[`list-id`]})),{successLabel:`Updated`});return}let p=u({description:d(l.description,`description`,`text`)});i(await o(`Updating`,async()=>s.rules.lists.update({...p,account_id:f,list_id:l[`list-id`]})),{successLabel:`Updated`})})},R={command:`lists`,describe:`Named lists of IPs, hostnames, ASNs, or redirects that can be referenced in rule expressions`,builder:e=>e.command(v).command(b).command(S).command(F).command(L).command(g).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},z={command:`rules`,describe:`Account-level IP lists, hostname lists, and other reusable lists referenced by Rulesets rules`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{z as default};
18
+ Updates the description of a list.`).positional(`list-id`,{type:`string`,description:`The unique ID of the list.`,demandOption:!0}).option(`description`,{type:`string`,description:`An informative summary of the list.`}).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 L={command:`update <list-id>`,describe:`Update a list`,builder:I,handler:async l=>s({command:`rules lists update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf rules lists update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/rules/lists/${l[`list-id`]==null?`<list-id>`:encodeURIComponent(String(l[`list-id`]))}`,pathParams:{"list-id":String(l[`list-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({description:d(l.description,`description`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await n();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.rules.lists.update({...e,account_id:f,list_id:l[`list-id`]})),{successLabel:`Updated`});return}let p=u({description:d(l.description,`description`,`text`)});i(await o(`Updating`,async()=>s.rules.lists.update({...p,account_id:f,list_id:l[`list-id`]})),{successLabel:`Updated`})})},R={command:`lists`,describe:`Named lists of IPs, hostnames, ASNs, or redirects that can be referenced in rule expressions`,builder:e=>e.command(v).command(b).command(S).command(F).command(L).command(g).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},z={command:`rules`,describe:`Account-level IP lists, hostname lists, and other reusable lists referenced by Rulesets rules`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{z as default};
@@ -1,37 +1,37 @@
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-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";function g(e){return e.usage(`$0 rulesets account-rulesets create
2
+ import{t as e}from"./local-OKXweFsd.mjs";import{a as t,i as n,t as r}from"./context-Dzzbc9RK.mjs";import{r as i}from"./auth-B5p3SIhO.mjs";import{t as a}from"./output-CZt-berV.mjs";import{t as o}from"./dry-run-BmzTxDtZ.mjs";import{t as s}from"./progress-C9dWgc3J.mjs";import{t as c}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as l,r as u,t as d}from"./body-parser-BpPZBRMr.mjs";import{n as f}from"./input-validation-D3e278L_.mjs";import{a as p,i as m,n as h}from"./prompt-Mh69ni1N.mjs";function g(e){return e.usage(`$0 rulesets account-rulesets create
3
3
 
4
- Creates a ruleset.`).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`,default:``}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`kind`,{type:`string`,description:`The kind of the ruleset.`,choices:[`managed`,`custom`,`root`,`zone`]}).option(`phase`,{type:`string`,description:`The phase of the ruleset.`,choices:[`ddos_l4`,`ddos_l7`,`http_config_settings`,`http_custom_errors`,`http_log_custom_fields`,`http_ratelimit`,`http_request_cache_settings`,`http_request_dynamic_redirect`,`http_request_firewall_custom`,`http_request_firewall_managed`,`http_request_late_transform`,`http_request_origin`,`http_request_redirect`,`http_request_sanitize`,`http_request_sbfm`,`http_request_transform`,`http_response_cache_settings`,`http_response_compression`,`http_response_firewall_managed`,`http_response_headers_transform`,`magic_transit`,`magic_transit_ids_managed`,`magic_transit_managed`,`magic_transit_ratelimit`]}).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. 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 an account or zone ruleset`,builder:g,handler:async h=>c({command:`rulesets account-rulesets create`,classification:{safeFlags:[`validate-only`,`kind`,`phase`,`dry-run`]}},h,async()=>{let c={dry_run:h[`validate-only`]};if(h.dryRun){let e=h.zone===void 0?await r():void 0,t=h.zone===void 0?`accounts`:`zones`,n=h.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},query:c,bodyKind:`json`,body:h.body===void 0?d({description:f(h.description,`description`,`text`),name:f(h.name,`name`,`text`),kind:f(h.kind,`kind`,`text`),phase:f(h.phase,`phase`,`text`),rules:u(h.rules,`rules`)}):l(h.body)});return}let g=await i(h),_=h.zone===void 0?`accounts`:`zones`,v=_===`zones`?await t({zone:h.zone},g,{quiet:h.quiet}):h.local?e:await n();if(_===`zones`?h.zoneId=v:h.accountId=v,h.body){let e=l(h.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>g.rulesets.accountRulesets.create({...e,account_or_zone:_,account_or_zone_id:v,...c})),{successLabel:`Created`});return}h.name===void 0&&(h.name=await p(`name`,`The human-readable name of the ruleset.`)),h.kind===void 0&&(h.kind=await m(`kind`,`The kind of the ruleset.`,[`managed`,`custom`,`root`,`zone`])),h.phase===void 0&&(h.phase=await m(`phase`,`The phase of the ruleset.`,[`ddos_l4`,`ddos_l7`,`http_config_settings`,`http_custom_errors`,`http_log_custom_fields`,`http_ratelimit`,`http_request_cache_settings`,`http_request_dynamic_redirect`,`http_request_firewall_custom`,`http_request_firewall_managed`,`http_request_late_transform`,`http_request_origin`,`http_request_redirect`,`http_request_sanitize`,`http_request_sbfm`,`http_request_transform`,`http_response_cache_settings`,`http_response_compression`,`http_response_firewall_managed`,`http_response_headers_transform`,`magic_transit`,`magic_transit_ids_managed`,`magic_transit_managed`,`magic_transit_ratelimit`]));let y=d({description:f(h.description,`description`,`text`),name:f(h.name,`name`,`text`),kind:f(h.kind,`kind`,`text`),phase:f(h.phase,`phase`,`text`),rules:u(h.rules,`rules`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>g.rulesets.accountRulesets.create({...y,account_or_zone:_,account_or_zone_id:v,...c})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 rulesets account-rulesets delete <ruleset-id>
4
+ Creates a ruleset.`).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`,default:``}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`kind`,{type:`string`,description:`The kind of the ruleset.`,choices:[`managed`,`custom`,`root`,`zone`]}).option(`phase`,{type:`string`,description:`The phase of the ruleset.`,choices:[`ddos_l4`,`ddos_l7`,`http_config_settings`,`http_custom_errors`,`http_log_custom_fields`,`http_ratelimit`,`http_request_cache_settings`,`http_request_dynamic_redirect`,`http_request_firewall_custom`,`http_request_firewall_managed`,`http_request_late_transform`,`http_request_origin`,`http_request_redirect`,`http_request_sanitize`,`http_request_sbfm`,`http_request_transform`,`http_response_cache_settings`,`http_response_compression`,`http_response_firewall_managed`,`http_response_headers_transform`,`magic_transit`,`magic_transit_ids_managed`,`magic_transit_managed`,`magic_transit_ratelimit`]}).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. 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 an account or zone ruleset`,builder:g,handler:async h=>c({command:`rulesets account-rulesets create`,classification:{safeFlags:[`validate-only`,`kind`,`phase`,`dry-run`]}},h,async()=>{let c={dry_run:h[`validate-only`]};if(h.dryRun){let e=h.zone===void 0?await t():void 0,n=h.zone===void 0?`accounts`:`zones`,r=h.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:h.body===void 0?d({description:f(h.description,`description`,`text`),name:f(h.name,`name`,`text`),kind:f(h.kind,`kind`,`text`),phase:f(h.phase,`phase`,`text`),rules:u(h.rules,`rules`)}):l(h.body)});return}let g=await i(h),_=h.zone===void 0?`accounts`:`zones`,v=_===`zones`?await n({zone:h.zone},g,{quiet:h.quiet}):h.local?e:await r();if(_===`zones`?h.zoneId=v:h.accountId=v,h.body){let e=l(h.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>g.rulesets.accountRulesets.create({...e,account_or_zone:_,account_or_zone_id:v,...c})),{successLabel:`Created`});return}h.name===void 0&&(h.name=await p(`name`,`The human-readable name of the ruleset.`)),h.kind===void 0&&(h.kind=await m(`kind`,`The kind of the ruleset.`,[`managed`,`custom`,`root`,`zone`])),h.phase===void 0&&(h.phase=await m(`phase`,`The phase of the ruleset.`,[`ddos_l4`,`ddos_l7`,`http_config_settings`,`http_custom_errors`,`http_log_custom_fields`,`http_ratelimit`,`http_request_cache_settings`,`http_request_dynamic_redirect`,`http_request_firewall_custom`,`http_request_firewall_managed`,`http_request_late_transform`,`http_request_origin`,`http_request_redirect`,`http_request_sanitize`,`http_request_sbfm`,`http_request_transform`,`http_response_cache_settings`,`http_response_compression`,`http_response_firewall_managed`,`http_response_headers_transform`,`magic_transit`,`magic_transit_ids_managed`,`magic_transit_managed`,`magic_transit_ratelimit`]));let y=d({description:f(h.description,`description`,`text`),name:f(h.name,`name`,`text`),kind:f(h.kind,`kind`,`text`),phase:f(h.phase,`phase`,`text`),rules:u(h.rules,`rules`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>g.rulesets.accountRulesets.create({...y,account_or_zone:_,account_or_zone_id:v,...c})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 rulesets account-rulesets delete <ruleset-id>
5
5
 
6
- Deletes all versions of an existing account or zone ruleset.`).positional(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).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 y={command:`delete <ruleset-id>`,describe:`Delete an account or zone ruleset`,builder:v,handler:async l=>c({command:`rulesets account-rulesets delete`,classification:{safeFlags:[`validate-only`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={dry_run:l[`validate-only`]};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 rulesets account-rulesets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}`,pathParams:{"account-or-zone":String(t),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(n)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await t({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await n();if(d===`zones`?l.zoneId=f:l.accountId=f,!await h({force:!!l.force})){process.stderr.write(`Aborted.
6
+ Deletes all versions of an existing account or zone ruleset.`).positional(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).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 y={command:`delete <ruleset-id>`,describe:`Delete an account or zone ruleset`,builder:v,handler:async l=>c({command:`rulesets account-rulesets delete`,classification:{safeFlags:[`validate-only`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={dry_run:l[`validate-only`]};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}`,pathParams:{"account-or-zone":String(n),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();if(d===`zones`?l.zoneId=f:l.accountId=f,!await h({force:!!l.force})){process.stderr.write(`Aborted.
7
7
  `);return}a(await s(`Deleting`,async()=>u.rulesets.accountRulesets.delete({account_or_zone:d,account_or_zone_id:f,ruleset_id:l[`ruleset-id`],...c})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 rulesets account-rulesets get <ruleset-id>
8
8
 
9
- Fetches the latest version of an account or zone ruleset.`).positional(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <ruleset-id>`,describe:`Get an account or zone ruleset`,builder:b,handler:async l=>c({command:`rulesets account-rulesets 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 rulesets account-rulesets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}`,pathParams:{"account-or-zone":String(t),"ruleset-id":String(l[`ruleset-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.rulesets.accountRulesets.get({account_or_zone:u,account_or_zone_id:d,ruleset_id:l[`ruleset-id`]})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 rulesets account-rulesets list
9
+ Fetches the latest version of an account or zone ruleset.`).positional(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <ruleset-id>`,describe:`Get an account or zone ruleset`,builder:b,handler:async l=>c({command:`rulesets account-rulesets get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}`,pathParams:{"account-or-zone":String(n),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.rulesets.accountRulesets.get({account_or_zone:u,account_or_zone_id:d,ruleset_id:l[`ruleset-id`]})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 rulesets account-rulesets list
10
10
 
11
- Fetches all rulesets.`).option(`cursor`,{type:`string`,description:`The cursor to use for the next page.`}).option(`per-page`,{type:`number`,description:`The number of rulesets to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List account or zone rulesets`,builder:S,handler:async l=>c({command:`rulesets account-rulesets list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={cursor:l.cursor,per_page:l[`per-page`]};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 rulesets account-rulesets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await t({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await n();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.rulesets.accountRulesets.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 rulesets account-rulesets phases get <ruleset-phase>
11
+ Fetches all rulesets.`).option(`cursor`,{type:`string`,description:`The cursor to use for the next page.`}).option(`per-page`,{type:`number`,description:`The number of rulesets to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List account or zone rulesets`,builder:S,handler:async l=>c({command:`rulesets account-rulesets list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={cursor:l.cursor,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.rulesets.accountRulesets.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 rulesets account-rulesets phases get <ruleset-phase>
12
12
 
13
- Fetches the latest version of the account or zone entry point ruleset for a given phase.`).positional(`ruleset-phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <ruleset-phase>`,describe:`Get an account or zone entry point ruleset`,builder:w,handler:async l=>c({command:`rulesets account-rulesets phases 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 rulesets account-rulesets phases get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/phases/${l[`ruleset-phase`]==null?`<ruleset-phase>`:encodeURIComponent(String(l[`ruleset-phase`]))}/entrypoint`,pathParams:{"account-or-zone":String(t),"ruleset-phase":String(l[`ruleset-phase`]??``),"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.rulesets.accountRulesets.phases.get({account_or_zone:u,account_or_zone_id:d,ruleset_phase:l[`ruleset-phase`]})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 rulesets account-rulesets phases update <ruleset-phase>
13
+ Fetches the latest version of the account or zone entry point ruleset for a given phase.`).positional(`ruleset-phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <ruleset-phase>`,describe:`Get an account or zone entry point ruleset`,builder:w,handler:async l=>c({command:`rulesets account-rulesets phases get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets phases get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/phases/${l[`ruleset-phase`]==null?`<ruleset-phase>`:encodeURIComponent(String(l[`ruleset-phase`]))}/entrypoint`,pathParams:{"account-or-zone":String(n),"ruleset-phase":String(l[`ruleset-phase`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.rulesets.accountRulesets.phases.get({account_or_zone:u,account_or_zone_id:d,ruleset_phase:l[`ruleset-phase`]})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 rulesets account-rulesets phases update <ruleset-phase>
14
14
 
15
- Updates an account or zone entry point ruleset, creating a new version.`).positional(`ruleset-phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. 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 D={command:`update <ruleset-phase>`,describe:`Update an account or zone entry point ruleset`,builder:E,handler:async p=>c({command:`rulesets account-rulesets phases update`,classification:{safeFlags:[`validate-only`,`dry-run`]}},p,async()=>{let c={dry_run:p[`validate-only`]};if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets phases update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/phases/${p[`ruleset-phase`]==null?`<ruleset-phase>`:encodeURIComponent(String(p[`ruleset-phase`]))}/entrypoint`,pathParams:{"account-or-zone":String(t),"ruleset-phase":String(p[`ruleset-phase`]??``),"account-or-zone-id":String(n)},query:c,bodyKind:`json`,body:p.body===void 0?d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),rules:u(p.rules,`rules`)}):l(p.body)});return}let m=await i(p),h=p.zone===void 0?`accounts`:`zones`,g=h===`zones`?await t({zone:p.zone},m,{quiet:p.quiet}):p.local?e:await n();if(h===`zones`?p.zoneId=g:p.accountId=g,p.body){let e=l(p.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>m.rulesets.accountRulesets.phases.update({...e,account_or_zone:h,account_or_zone_id:g,ruleset_phase:p[`ruleset-phase`],...c})),{successLabel:`Updated`});return}let _=d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),rules:u(p.rules,`rules`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>m.rulesets.accountRulesets.phases.update({..._,account_or_zone:h,account_or_zone_id:g,ruleset_phase:p[`ruleset-phase`],...c})),{successLabel:`Updated`})})};function O(e){return e.usage(`$0 rulesets account-rulesets phases versions get <ruleset-version>
15
+ Updates an account or zone entry point ruleset, creating a new version.`).positional(`ruleset-phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. 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 D={command:`update <ruleset-phase>`,describe:`Update an account or zone entry point ruleset`,builder:E,handler:async p=>c({command:`rulesets account-rulesets phases update`,classification:{safeFlags:[`validate-only`,`dry-run`]}},p,async()=>{let c={dry_run:p[`validate-only`]};if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets phases update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/phases/${p[`ruleset-phase`]==null?`<ruleset-phase>`:encodeURIComponent(String(p[`ruleset-phase`]))}/entrypoint`,pathParams:{"account-or-zone":String(n),"ruleset-phase":String(p[`ruleset-phase`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:p.body===void 0?d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),rules:u(p.rules,`rules`)}):l(p.body)});return}let m=await i(p),h=p.zone===void 0?`accounts`:`zones`,g=h===`zones`?await n({zone:p.zone},m,{quiet:p.quiet}):p.local?e:await r();if(h===`zones`?p.zoneId=g:p.accountId=g,p.body){let e=l(p.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>m.rulesets.accountRulesets.phases.update({...e,account_or_zone:h,account_or_zone_id:g,ruleset_phase:p[`ruleset-phase`],...c})),{successLabel:`Updated`});return}let _=d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),rules:u(p.rules,`rules`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>m.rulesets.accountRulesets.phases.update({..._,account_or_zone:h,account_or_zone_id:g,ruleset_phase:p[`ruleset-phase`],...c})),{successLabel:`Updated`})})};function O(e){return e.usage(`$0 rulesets account-rulesets phases versions get <ruleset-version>
16
16
 
17
- Fetches a specific version of an account or zone entry point ruleset.`).positional(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`ruleset-phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <ruleset-version>`,describe:`Get an account or zone entry point ruleset version`,builder:O,handler:async l=>c({command:`rulesets account-rulesets phases versions 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 rulesets account-rulesets phases versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/phases/${l[`ruleset-phase`]==null?`<ruleset-phase>`:encodeURIComponent(String(l[`ruleset-phase`]))}/entrypoint/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}`,pathParams:{"account-or-zone":String(t),"ruleset-version":String(l[`ruleset-version`]??``),"ruleset-phase":String(l[`ruleset-phase`]??``),"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.rulesets.accountRulesets.phases.versions.get({account_or_zone:u,account_or_zone_id:d,ruleset_phase:l[`ruleset-phase`],ruleset_version:l[`ruleset-version`]})),{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 rulesets account-rulesets phases versions list
17
+ Fetches a specific version of an account or zone entry point ruleset.`).positional(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`ruleset-phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <ruleset-version>`,describe:`Get an account or zone entry point ruleset version`,builder:O,handler:async l=>c({command:`rulesets account-rulesets phases versions get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets phases versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/phases/${l[`ruleset-phase`]==null?`<ruleset-phase>`:encodeURIComponent(String(l[`ruleset-phase`]))}/entrypoint/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}`,pathParams:{"account-or-zone":String(n),"ruleset-version":String(l[`ruleset-version`]??``),"ruleset-phase":String(l[`ruleset-phase`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.rulesets.accountRulesets.phases.versions.get({account_or_zone:u,account_or_zone_id:d,ruleset_phase:l[`ruleset-phase`],ruleset_version:l[`ruleset-version`]})),{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 rulesets account-rulesets phases versions list
18
18
 
19
- Fetches the versions of an account or zone entry point ruleset.`).option(`ruleset-phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List an account or zone entry point ruleset's versions`,builder:A,handler:async l=>c({command:`rulesets account-rulesets phases versions list`,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 rulesets account-rulesets phases versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/phases/${l[`ruleset-phase`]==null?`<ruleset-phase>`:encodeURIComponent(String(l[`ruleset-phase`]))}/entrypoint/versions`,pathParams:{"account-or-zone":String(t),"ruleset-phase":String(l[`ruleset-phase`]??``),"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.rulesets.accountRulesets.phases.versions.list({account_or_zone:u,account_or_zone_id:d,ruleset_phase:l[`ruleset-phase`]})),{successLabel:`Loaded`})})},M={command:`versions`,describe:`Operations for account-rulesets.phases.versions`,builder:e=>e.command(k).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},N={command:`phases`,describe:`Operations for account-rulesets.phases`,builder:e=>e.command(T).command(D).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 rulesets account-rulesets rules create <ruleset-id>
19
+ Fetches the versions of an account or zone entry point ruleset.`).option(`ruleset-phase`,{type:`string`,description:`The phase of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List an account or zone entry point ruleset's versions`,builder:A,handler:async l=>c({command:`rulesets account-rulesets phases versions list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets phases versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/phases/${l[`ruleset-phase`]==null?`<ruleset-phase>`:encodeURIComponent(String(l[`ruleset-phase`]))}/entrypoint/versions`,pathParams:{"account-or-zone":String(n),"ruleset-phase":String(l[`ruleset-phase`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.rulesets.accountRulesets.phases.versions.list({account_or_zone:u,account_or_zone_id:d,ruleset_phase:l[`ruleset-phase`]})),{successLabel:`Loaded`})})},M={command:`versions`,describe:`Operations for account-rulesets.phases.versions`,builder:e=>e.command(k).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},N={command:`phases`,describe:`Operations for account-rulesets.phases`,builder:e=>e.command(T).command(D).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 rulesets account-rulesets rules create <ruleset-id>
20
20
 
21
- Adds a new rule to an account or zone ruleset. The rule will be added to the end of the existing list of rules in the ruleset by default.`).positional(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`position-before`,{type:`string`,description:`The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top.`}).option(`position-after`,{type:`string`,description:`The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom.`}).option(`position-index`,{type:`number`,description:`An index at which to place the rule, where index 1 is the first rule.`}).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)`}).conflicts(`position-before`,[`position-after`,`position-index`]).conflicts(`position-after`,[`position-before`,`position-index`]).conflicts(`position-index`,[`position-before`,`position-after`])}const F={command:`create <ruleset-id>`,describe:`Create an account or zone ruleset rule`,builder:P,handler:async u=>c({command:`rulesets account-rulesets rules create`,classification:{safeFlags:[`validate-only`,`dry-run`]}},u,async()=>{let c={dry_run:u[`validate-only`]};if(u.dryRun){let e=u.zone===void 0?await r():void 0,t=u.zone===void 0?`accounts`:`zones`,n=u.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/${u[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(u[`ruleset-id`]))}/rules`,pathParams:{"account-or-zone":String(t),"ruleset-id":String(u[`ruleset-id`]??``),"account-or-zone-id":String(n)},query:c,bodyKind:`json`,body:u.body===void 0?d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}}):l(u.body)});return}let p=await i(u),m=u.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:u.zone},p,{quiet:u.quiet}):u.local?e:await n();if(m===`zones`?u.zoneId=h:u.accountId=h,u.body){let e=l(u.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>p.rulesets.accountRulesets.rules.create({...e,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],...c})),{successLabel:`Created`});return}let g=d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>p.rulesets.accountRulesets.rules.create({...g,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],...c})),{successLabel:`Created`})})};function I(e){return e.usage(`$0 rulesets account-rulesets rules delete <rule-id>
21
+ Adds a new rule to an account or zone ruleset. The rule will be added to the end of the existing list of rules in the ruleset by default.`).positional(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`position-before`,{type:`string`,description:`The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top.`}).option(`position-after`,{type:`string`,description:`The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom.`}).option(`position-index`,{type:`number`,description:`An index at which to place the rule, where index 1 is the first rule.`}).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)`}).conflicts(`position-before`,[`position-after`,`position-index`]).conflicts(`position-after`,[`position-before`,`position-index`]).conflicts(`position-index`,[`position-before`,`position-after`])}const F={command:`create <ruleset-id>`,describe:`Create an account or zone ruleset rule`,builder:P,handler:async u=>c({command:`rulesets account-rulesets rules create`,classification:{safeFlags:[`validate-only`,`dry-run`]}},u,async()=>{let c={dry_run:u[`validate-only`]};if(u.dryRun){let e=u.zone===void 0?await t():void 0,n=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/${u[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(u[`ruleset-id`]))}/rules`,pathParams:{"account-or-zone":String(n),"ruleset-id":String(u[`ruleset-id`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:u.body===void 0?d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}}):l(u.body)});return}let p=await i(u),m=u.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:u.zone},p,{quiet:u.quiet}):u.local?e:await r();if(m===`zones`?u.zoneId=h:u.accountId=h,u.body){let e=l(u.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>p.rulesets.accountRulesets.rules.create({...e,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],...c})),{successLabel:`Created`});return}let g=d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>p.rulesets.accountRulesets.rules.create({...g,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],...c})),{successLabel:`Created`})})};function I(e){return e.usage(`$0 rulesets account-rulesets rules delete <rule-id>
22
22
 
23
- Deletes an existing rule from an account or zone ruleset.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the rule.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ee={command:`delete <rule-id>`,describe:`Delete an account or zone ruleset rule`,builder:I,handler:async l=>c({command:`rulesets account-rulesets rules delete`,classification:{safeFlags:[`validate-only`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={dry_run:l[`validate-only`]};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 rulesets account-rulesets rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(l[`rule-id`]??``),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(n)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await t({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await n();if(d===`zones`?l.zoneId=f:l.accountId=f,!await h({force:!!l.force})){process.stderr.write(`Aborted.
23
+ Deletes an existing rule from an account or zone ruleset.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the rule.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ee={command:`delete <rule-id>`,describe:`Delete an account or zone ruleset rule`,builder:I,handler:async l=>c({command:`rulesets account-rulesets rules delete`,classification:{safeFlags:[`validate-only`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={dry_run:l[`validate-only`]};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"rule-id":String(l[`rule-id`]??``),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();if(d===`zones`?l.zoneId=f:l.accountId=f,!await h({force:!!l.force})){process.stderr.write(`Aborted.
24
24
  `);return}a(await s(`Deleting`,async()=>u.rulesets.accountRulesets.rules.delete({account_or_zone:d,account_or_zone_id:f,ruleset_id:l[`ruleset-id`],rule_id:l[`rule-id`],...c})),{successLabel:`Deleted`})})};function L(e){return e.usage(`$0 rulesets account-rulesets rules update <rule-id>
25
25
 
26
- Updates an existing rule in an account or zone ruleset.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the rule.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`position-before`,{type:`string`,description:`The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top.`}).option(`position-after`,{type:`string`,description:`The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom.`}).option(`position-index`,{type:`number`,description:`An index at which to place the rule, where index 1 is the first rule.`}).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)`}).conflicts(`position-before`,[`position-after`,`position-index`]).conflicts(`position-after`,[`position-before`,`position-index`]).conflicts(`position-index`,[`position-before`,`position-after`])}const R={command:`update <rule-id>`,describe:`Update an account or zone ruleset rule`,builder:L,handler:async u=>c({command:`rulesets account-rulesets rules update`,classification:{safeFlags:[`validate-only`,`dry-run`]}},u,async()=>{let c={dry_run:u[`validate-only`]};if(u.dryRun){let e=u.zone===void 0?await r():void 0,t=u.zone===void 0?`accounts`:`zones`,n=u.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/${u[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(u[`ruleset-id`]))}/rules/${u[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(u[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(u[`rule-id`]??``),"ruleset-id":String(u[`ruleset-id`]??``),"account-or-zone-id":String(n)},query:c,bodyKind:`json`,body:u.body===void 0?d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}}):l(u.body)});return}let p=await i(u),m=u.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:u.zone},p,{quiet:u.quiet}):u.local?e:await n();if(m===`zones`?u.zoneId=h:u.accountId=h,u.body){let e=l(u.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>p.rulesets.accountRulesets.rules.update({...e,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],rule_id:u[`rule-id`],...c})),{successLabel:`Updated`});return}let g=d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>p.rulesets.accountRulesets.rules.update({...g,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],rule_id:u[`rule-id`],...c})),{successLabel:`Updated`})})},z={command:`rules`,describe:`Operations for account-rulesets.rules`,builder:e=>e.command(F).command(ee).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.usage(`$0 rulesets account-rulesets update <ruleset-id>
26
+ Updates an existing rule in an account or zone ruleset.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the rule.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`position-before`,{type:`string`,description:`The ID of another rule to place the rule before. An empty value causes the rule to be placed at the top.`}).option(`position-after`,{type:`string`,description:`The ID of another rule to place the rule after. An empty value causes the rule to be placed at the bottom.`}).option(`position-index`,{type:`number`,description:`An index at which to place the rule, where index 1 is the first rule.`}).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)`}).conflicts(`position-before`,[`position-after`,`position-index`]).conflicts(`position-after`,[`position-before`,`position-index`]).conflicts(`position-index`,[`position-before`,`position-after`])}const R={command:`update <rule-id>`,describe:`Update an account or zone ruleset rule`,builder:L,handler:async u=>c({command:`rulesets account-rulesets rules update`,classification:{safeFlags:[`validate-only`,`dry-run`]}},u,async()=>{let c={dry_run:u[`validate-only`]};if(u.dryRun){let e=u.zone===void 0?await t():void 0,n=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets rules update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/${u[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(u[`ruleset-id`]))}/rules/${u[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(u[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"rule-id":String(u[`rule-id`]??``),"ruleset-id":String(u[`ruleset-id`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:u.body===void 0?d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}}):l(u.body)});return}let p=await i(u),m=u.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:u.zone},p,{quiet:u.quiet}):u.local?e:await r();if(m===`zones`?u.zoneId=h:u.accountId=h,u.body){let e=l(u.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>p.rulesets.accountRulesets.rules.update({...e,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],rule_id:u[`rule-id`],...c})),{successLabel:`Updated`});return}let g=d({position:{before:f(u[`position-before`],`position-before`,`text`),after:f(u[`position-after`],`position-after`,`text`),index:u[`position-index`]}});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>p.rulesets.accountRulesets.rules.update({...g,account_or_zone:m,account_or_zone_id:h,ruleset_id:u[`ruleset-id`],rule_id:u[`rule-id`],...c})),{successLabel:`Updated`})})},z={command:`rules`,describe:`Operations for account-rulesets.rules`,builder:e=>e.command(F).command(ee).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.usage(`$0 rulesets account-rulesets update <ruleset-id>
27
27
 
28
- Updates an account or zone ruleset, creating a new version.`).positional(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`kind`,{type:`string`,description:`The kind of the ruleset.`,choices:[`managed`,`custom`,`root`,`zone`]}).option(`phase`,{type:`string`,description:`The phase of the ruleset.`,choices:[`ddos_l4`,`ddos_l7`,`http_config_settings`,`http_custom_errors`,`http_log_custom_fields`,`http_ratelimit`,`http_request_cache_settings`,`http_request_dynamic_redirect`,`http_request_firewall_custom`,`http_request_firewall_managed`,`http_request_late_transform`,`http_request_origin`,`http_request_redirect`,`http_request_sanitize`,`http_request_sbfm`,`http_request_transform`,`http_response_cache_settings`,`http_response_compression`,`http_response_firewall_managed`,`http_response_headers_transform`,`magic_transit`,`magic_transit_ids_managed`,`magic_transit_managed`,`magic_transit_ratelimit`]}).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. 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 V={command:`update <ruleset-id>`,describe:`Update an account or zone ruleset`,builder:B,handler:async p=>c({command:`rulesets account-rulesets update`,classification:{safeFlags:[`validate-only`,`kind`,`phase`,`dry-run`]}},p,async()=>{let c={dry_run:p[`validate-only`]};if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/${p[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(p[`ruleset-id`]))}`,pathParams:{"account-or-zone":String(t),"ruleset-id":String(p[`ruleset-id`]??``),"account-or-zone-id":String(n)},query:c,bodyKind:`json`,body:p.body===void 0?d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),kind:f(p.kind,`kind`,`text`),phase:f(p.phase,`phase`,`text`),rules:u(p.rules,`rules`)}):l(p.body)});return}let m=await i(p),h=p.zone===void 0?`accounts`:`zones`,g=h===`zones`?await t({zone:p.zone},m,{quiet:p.quiet}):p.local?e:await n();if(h===`zones`?p.zoneId=g:p.accountId=g,p.body){let e=l(p.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>m.rulesets.accountRulesets.update({...e,account_or_zone:h,account_or_zone_id:g,ruleset_id:p[`ruleset-id`],...c})),{successLabel:`Updated`});return}let _=d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),kind:f(p.kind,`kind`,`text`),phase:f(p.phase,`phase`,`text`),rules:u(p.rules,`rules`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>m.rulesets.accountRulesets.update({..._,account_or_zone:h,account_or_zone_id:g,ruleset_id:p[`ruleset-id`],...c})),{successLabel:`Updated`})})};function H(e){return e.usage(`$0 rulesets account-rulesets versions by-tag list
28
+ Updates an account or zone ruleset, creating a new version.`).positional(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).option(`description`,{type:`string`,description:`An informative description of the ruleset.`}).option(`name`,{type:`string`,description:`The human-readable name of the ruleset.`}).option(`kind`,{type:`string`,description:`The kind of the ruleset.`,choices:[`managed`,`custom`,`root`,`zone`]}).option(`phase`,{type:`string`,description:`The phase of the ruleset.`,choices:[`ddos_l4`,`ddos_l7`,`http_config_settings`,`http_custom_errors`,`http_log_custom_fields`,`http_ratelimit`,`http_request_cache_settings`,`http_request_dynamic_redirect`,`http_request_firewall_custom`,`http_request_firewall_managed`,`http_request_late_transform`,`http_request_origin`,`http_request_redirect`,`http_request_sanitize`,`http_request_sbfm`,`http_request_transform`,`http_response_cache_settings`,`http_response_compression`,`http_response_firewall_managed`,`http_response_headers_transform`,`magic_transit`,`magic_transit_ids_managed`,`magic_transit_managed`,`magic_transit_ratelimit`]}).option(`rules`,{type:`string`,description:`The list of rules in the ruleset. 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 V={command:`update <ruleset-id>`,describe:`Update an account or zone ruleset`,builder:B,handler:async p=>c({command:`rulesets account-rulesets update`,classification:{safeFlags:[`validate-only`,`kind`,`phase`,`dry-run`]}},p,async()=>{let c={dry_run:p[`validate-only`]};if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/${p[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(p[`ruleset-id`]))}`,pathParams:{"account-or-zone":String(n),"ruleset-id":String(p[`ruleset-id`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`json`,body:p.body===void 0?d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),kind:f(p.kind,`kind`,`text`),phase:f(p.phase,`phase`,`text`),rules:u(p.rules,`rules`)}):l(p.body)});return}let m=await i(p),h=p.zone===void 0?`accounts`:`zones`,g=h===`zones`?await n({zone:p.zone},m,{quiet:p.quiet}):p.local?e:await r();if(h===`zones`?p.zoneId=g:p.accountId=g,p.body){let e=l(p.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>m.rulesets.accountRulesets.update({...e,account_or_zone:h,account_or_zone_id:g,ruleset_id:p[`ruleset-id`],...c})),{successLabel:`Updated`});return}let _=d({description:f(p.description,`description`,`text`),name:f(p.name,`name`,`text`),kind:f(p.kind,`kind`,`text`),phase:f(p.phase,`phase`,`text`),rules:u(p.rules,`rules`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Updating`,async()=>m.rulesets.accountRulesets.update({..._,account_or_zone:h,account_or_zone_id:g,ruleset_id:p[`ruleset-id`],...c})),{successLabel:`Updated`})})};function H(e){return e.usage(`$0 rulesets account-rulesets versions by-tag list
29
29
 
30
- Fetches the rules of a managed account or zone ruleset version for a given tag.`).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`rule-tag`,{type:`string`,description:`The category of a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List an account or zone ruleset version's rules by tag`,builder:H,handler:async l=>c({command:`rulesets account-rulesets versions by-tag list`,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 rulesets account-rulesets versions by-tag list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}/by_tag/${l[`rule-tag`]==null?`<rule-tag>`:encodeURIComponent(String(l[`rule-tag`]))}`,pathParams:{"account-or-zone":String(t),"rule-tag":String(l[`rule-tag`]??``),"ruleset-version":String(l[`ruleset-version`]??``),"ruleset-id":String(l[`ruleset-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.rulesets.accountRulesets.versions.byTag.list({account_or_zone:u,account_or_zone_id:d,ruleset_id:l[`ruleset-id`],ruleset_version:l[`ruleset-version`],rule_tag:l[`rule-tag`]})),{successLabel:`Loaded`})})},W={command:`by-tag`,describe:`Operations for account-rulesets.versions.by-tag`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 rulesets account-rulesets versions delete <ruleset-version>
30
+ Fetches the rules of a managed account or zone ruleset version for a given tag.`).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`rule-tag`,{type:`string`,description:`The category of a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List an account or zone ruleset version's rules by tag`,builder:H,handler:async l=>c({command:`rulesets account-rulesets versions by-tag list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets versions by-tag list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}/by_tag/${l[`rule-tag`]==null?`<rule-tag>`:encodeURIComponent(String(l[`rule-tag`]))}`,pathParams:{"account-or-zone":String(n),"rule-tag":String(l[`rule-tag`]??``),"ruleset-version":String(l[`ruleset-version`]??``),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.rulesets.accountRulesets.versions.byTag.list({account_or_zone:u,account_or_zone_id:d,ruleset_id:l[`ruleset-id`],ruleset_version:l[`ruleset-version`],rule_tag:l[`rule-tag`]})),{successLabel:`Loaded`})})},W={command:`by-tag`,describe:`Operations for account-rulesets.versions.by-tag`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 rulesets account-rulesets versions delete <ruleset-version>
31
31
 
32
- Deletes an existing version of an account or zone ruleset.`).positional(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).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 K={command:`delete <ruleset-version>`,describe:`Delete an account or zone ruleset version`,builder:G,handler:async l=>c({command:`rulesets account-rulesets versions delete`,classification:{safeFlags:[`validate-only`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={dry_run:l[`validate-only`]};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 rulesets account-rulesets versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}`,pathParams:{"account-or-zone":String(t),"ruleset-version":String(l[`ruleset-version`]??``),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(n)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await t({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await n();if(d===`zones`?l.zoneId=f:l.accountId=f,!await h({force:!!l.force})){process.stderr.write(`Aborted.
32
+ Deletes an existing version of an account or zone ruleset.`).positional(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`validate-only`,{type:`boolean`,description:"Validates the request without persisting changes when set to `true`. Responses that normally return 200 return `result: null`; endpoints that normally return 204 continue to return 204."}).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 K={command:`delete <ruleset-version>`,describe:`Delete an account or zone ruleset version`,builder:G,handler:async l=>c({command:`rulesets account-rulesets versions delete`,classification:{safeFlags:[`validate-only`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={dry_run:l[`validate-only`]};if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets versions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}`,pathParams:{"account-or-zone":String(n),"ruleset-version":String(l[`ruleset-version`]??``),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await r();if(d===`zones`?l.zoneId=f:l.accountId=f,!await h({force:!!l.force})){process.stderr.write(`Aborted.
33
33
  `);return}a(await s(`Deleting`,async()=>u.rulesets.accountRulesets.versions.delete({account_or_zone:d,account_or_zone_id:f,ruleset_id:l[`ruleset-id`],ruleset_version:l[`ruleset-version`],...c})),{successLabel:`Deleted`})})};function q(e){return e.usage(`$0 rulesets account-rulesets versions get <ruleset-version>
34
34
 
35
- Fetches a specific version of an account or zone ruleset.`).positional(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get <ruleset-version>`,describe:`Get an account or zone ruleset version`,builder:q,handler:async l=>c({command:`rulesets account-rulesets versions 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 rulesets account-rulesets versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}`,pathParams:{"account-or-zone":String(t),"ruleset-version":String(l[`ruleset-version`]??``),"ruleset-id":String(l[`ruleset-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.rulesets.accountRulesets.versions.get({account_or_zone:u,account_or_zone_id:d,ruleset_id:l[`ruleset-id`],ruleset_version:l[`ruleset-version`]})),{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 rulesets account-rulesets versions list
35
+ Fetches a specific version of an account or zone ruleset.`).positional(`ruleset-version`,{type:`string`,description:`The version of the ruleset.`,demandOption:!0}).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get <ruleset-version>`,describe:`Get an account or zone ruleset version`,builder:q,handler:async l=>c({command:`rulesets account-rulesets versions get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/versions/${l[`ruleset-version`]==null?`<ruleset-version>`:encodeURIComponent(String(l[`ruleset-version`]))}`,pathParams:{"account-or-zone":String(n),"ruleset-version":String(l[`ruleset-version`]??``),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.rulesets.accountRulesets.versions.get({account_or_zone:u,account_or_zone_id:d,ruleset_id:l[`ruleset-id`],ruleset_version:l[`ruleset-version`]})),{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 rulesets account-rulesets versions list
36
36
 
37
- Fetches the versions of an account or zone ruleset.`).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`list`,describe:`List an account or zone ruleset's versions`,builder:Y,handler:async l=>c({command:`rulesets account-rulesets versions list`,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 rulesets account-rulesets versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/versions`,pathParams:{"account-or-zone":String(t),"ruleset-id":String(l[`ruleset-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.rulesets.accountRulesets.versions.list({account_or_zone:u,account_or_zone_id:d,ruleset_id:l[`ruleset-id`]})),{successLabel:`Loaded`})})},Z={command:`versions`,describe:`Operations for account-rulesets.versions`,builder:e=>e.command(K).command(J).command(X).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Q={command:`account-rulesets`,describe:`Operations for account-rulesets`,builder:e=>e.command(_).command(y).command(x).command(C).command(V).command(N).command(z).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$={command:`rulesets`,describe:`rulesets`,builder:e=>e.command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{$ as default};
37
+ Fetches the versions of an account or zone ruleset.`).option(`ruleset-id`,{type:`string`,description:`The unique ID of the ruleset.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`list`,describe:`List an account or zone ruleset's versions`,builder:Y,handler:async l=>c({command:`rulesets account-rulesets versions list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf rulesets account-rulesets versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/rulesets/${l[`ruleset-id`]==null?`<ruleset-id>`:encodeURIComponent(String(l[`ruleset-id`]))}/versions`,pathParams:{"account-or-zone":String(n),"ruleset-id":String(l[`ruleset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.rulesets.accountRulesets.versions.list({account_or_zone:u,account_or_zone_id:d,ruleset_id:l[`ruleset-id`]})),{successLabel:`Loaded`})})},Z={command:`versions`,describe:`Operations for account-rulesets.versions`,builder:e=>e.command(K).command(J).command(X).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Q={command:`account-rulesets`,describe:`Operations for account-rulesets`,builder:e=>e.command(_).command(y).command(x).command(C).command(V).command(N).command(z).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$={command:`rulesets`,describe:`rulesets`,builder:e=>e.command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{$ as default};