cf 0.12.0 → 0.13.0

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 (416) hide show
  1. package/dist/_meta/agent-context.json +55 -55
  2. package/dist/_meta/commands.json +24282 -24542
  3. package/dist/_meta/hand-written-commands.json +53 -12
  4. package/dist/_meta/schemas.json +27680 -28212
  5. package/dist/abuse-reports-BbaHw4ST.mjs +8 -0
  6. package/dist/access-D6Xz892p.mjs +11 -0
  7. package/dist/account-DvxcqeaK.mjs +2 -0
  8. package/dist/account-tags-CeqfEWpz.mjs +9 -0
  9. package/dist/accounts-Bx-8BMH9.mjs +30 -0
  10. package/dist/acm--0opdSGE.mjs +3 -0
  11. package/dist/addressing-BS1ynzLA.mjs +13 -0
  12. package/dist/agent-context-BPhyrSns.mjs +8 -0
  13. package/dist/agent-memory-DczzpEw5.mjs +6 -0
  14. package/dist/ai-CDdCTcQl.mjs +5 -0
  15. package/dist/ai-audit-Bx9KMQYh.mjs +2 -0
  16. package/dist/ai-gateway-BSXJEaYS.mjs +13 -0
  17. package/dist/ai-search-DRQj1aMu.mjs +7 -0
  18. package/dist/ai-security-C_Rb0lGT.mjs +4 -0
  19. package/dist/alerting-BAR9eFs2.mjs +6 -0
  20. package/dist/analytics-BaUZwNc5.mjs +4 -0
  21. package/dist/analytics_engine-DkEzlhfT.mjs +2 -0
  22. package/dist/api-security-jA0lOk6a.mjs +50 -0
  23. package/dist/argo-Cz4pDagx.mjs +2 -0
  24. package/dist/artifacts-BcLTGfAv.mjs +5 -0
  25. package/dist/audit-logs-DbIv4n6u.mjs +2 -0
  26. package/dist/auth-rW5d3jtr.mjs +5 -0
  27. package/dist/auth-tvDdC1J-.mjs +8 -0
  28. package/dist/billing-Md87QjqW.mjs +3 -0
  29. package/dist/bot-management-VHMo4hpU.mjs +5 -0
  30. package/dist/botnet-feed-BHqfo3sa.mjs +3 -0
  31. package/dist/brand-protection-HUeR6Pof.mjs +3 -0
  32. package/dist/browser-extension-199oZg3X.mjs +3 -0
  33. package/dist/browser-run-DDasyux-.mjs +4 -0
  34. package/dist/build-0QlYUfFS.mjs +2 -0
  35. package/dist/builds-B-lXn6JR.mjs +9 -0
  36. package/dist/cache-CevKpiTM.mjs +9 -0
  37. package/dist/certificate-authorities-DAg-aO1B.mjs +2 -0
  38. package/dist/{cf-yPz_IqW6.mjs → cf-C11NGkjx.mjs} +1 -1
  39. package/dist/{chunk-LQW53VED-9MACsvSG.mjs → chunk-LQW53VED-CoECHA3R.mjs} +1 -1
  40. package/dist/{chunk-QBZBEHZB-yeyhVUeD.mjs → chunk-QBZBEHZB-BuiXJn8j.mjs} +1 -1
  41. package/dist/client-certificates-Bay7oPLE.mjs +3 -0
  42. package/dist/client-side-security-CbU9xn0k.mjs +37 -0
  43. package/dist/cloud-connector-AH2ClcSL.mjs +2 -0
  44. package/dist/cloudforce-one-DwOfS75V.mjs +32 -0
  45. package/dist/{command-BV87D4tR.mjs → command-CMzMsll4.mjs} +1 -1
  46. package/dist/{completions-BnD46cXe.mjs → completions-nPO9PdSu.mjs} +1 -1
  47. package/dist/config-B8lwPpVl.mjs +2 -0
  48. package/dist/config.mjs +1 -1
  49. package/dist/connector-interrupts-DcLrqM2V.mjs +2 -0
  50. package/dist/connector-telemetry-events-PrJWgNs9.mjs +2 -0
  51. package/dist/connector-telemetry-snapshots-CIjJm5yu.mjs +2 -0
  52. package/dist/connectors-CEAy30E-.mjs +3 -0
  53. package/dist/containers-BsbDqbSn.mjs +58 -0
  54. package/dist/content-scan-BdK936iO.mjs +4 -0
  55. package/dist/cps-oP97-qkm.mjs +2 -0
  56. package/dist/csamScanner-DUNN4INg.mjs +6 -0
  57. package/dist/ct-alerting-dV_gsV2w.mjs +3 -0
  58. package/dist/custom-certificates-DYspvjo4.mjs +5 -0
  59. package/dist/custom-csrs-DjSWLQRu.mjs +3 -0
  60. package/dist/custom-hostnames-df1lH6IY.mjs +5 -0
  61. package/dist/custom-nameservers-CLTbN-9R.mjs +3 -0
  62. package/dist/custom-pages-DzKnSgL3.mjs +3 -0
  63. package/dist/d1-JBEqjJoj.mjs +20 -0
  64. package/dist/data-security-CIktWnXt.mjs +7 -0
  65. package/dist/dcv-delegation-_r6Vc6VL.mjs +2 -0
  66. package/dist/{deploy-BUSz35vq.mjs → deploy-QTGENpOM.mjs} +1 -1
  67. package/dist/{deploy-input-BvD9aRP1.mjs → deploy-input-C7W1Bsji.mjs} +1 -1
  68. package/dist/{dev-DY_DquQx.mjs → dev-CAubuxCc.mjs} +1 -1
  69. package/dist/diagnostics-B0DRh714.mjs +3 -0
  70. package/dist/{dist-DV7LR38l.mjs → dist-12KzRsBM.mjs} +36 -36
  71. package/dist/{dist-BBx1io2f.mjs → dist-BCVqQpg2.mjs} +1 -1
  72. package/dist/dist-Cp3uJN1x.mjs +48 -0
  73. package/dist/dist-DW5BPGFs.mjs +57 -0
  74. package/dist/{dist-Cb9TJ2VV.mjs → dist-S9K_8gq9.mjs} +1 -1
  75. package/dist/dls-CFzTHcZM.mjs +3 -0
  76. package/dist/dns-Dw6u-NV1.mjs +29 -0
  77. package/dist/dns-firewall-CIPptslp.mjs +57 -0
  78. package/dist/{dot-prop-6SRZBKHT-wwGHcwAa.mjs → dot-prop-6SRZBKHT-wIVDg_fl.mjs} +1 -1
  79. package/dist/dry-run-DiVy1lVo.mjs +2 -0
  80. package/dist/durable-objects-CCkeqqBq.mjs +2 -0
  81. package/dist/email-auth-kdxO51Oz.mjs +2 -0
  82. package/dist/email-routing-BLggZdQq.mjs +6 -0
  83. package/dist/email-security-DjADlgdM.mjs +18 -0
  84. package/dist/email-sending-Cz7E7GoP.mjs +7 -0
  85. package/dist/error-sanitization-DfLijlBJ.mjs +2 -0
  86. package/dist/fieldExtractors-BWaMi6lD.mjs +3 -0
  87. package/dist/firewall-5t6OBIOl.mjs +8 -0
  88. package/dist/flagship-CzG_VoNR.mjs +4 -0
  89. package/dist/fraud-UOg_69Ob.mjs +20 -0
  90. package/dist/google-tag-gateway-DirkD-Q2.mjs +2 -0
  91. package/dist/healthchecks-BkHZGTp1.mjs +4 -0
  92. package/dist/hostnames-EUYOZm21.mjs +3 -0
  93. package/dist/hyperdrive-ZoLJlJCL.mjs +21 -0
  94. package/dist/iam-BQ2xSgYN.mjs +6 -0
  95. package/dist/images-CkEq6ScP.mjs +8 -0
  96. package/dist/index.mjs +1 -1
  97. package/dist/intel-DDWEdGyl.mjs +8 -0
  98. package/dist/interactive-B2E03Fs-.mjs +11 -0
  99. package/dist/interactive-_B-EqD0Y.mjs +23 -0
  100. package/dist/ips-54Qmy-Uw.mjs +2 -0
  101. package/dist/keyless-certificates-CXHLc3Qz.mjs +3 -0
  102. package/dist/keys-rvI4TC3Z.mjs +2 -0
  103. package/dist/kv-CAeN1zBy.mjs +5 -0
  104. package/dist/leaked-credential-checks-CbbwtG-p.mjs +4 -0
  105. package/dist/lifecycle-XswDq0ZB.mjs +2 -0
  106. package/dist/load-balancers-BFwdwAIU.mjs +6 -0
  107. package/dist/{local-DGiIS1uM.mjs → local-C6XsFD_W.mjs} +1 -1
  108. package/dist/{local-runtime--IQr44qq.mjs → local-runtime-BUGCbx8r.mjs} +1 -1
  109. package/dist/logexplorer-D8rOPB5I.mjs +17 -0
  110. package/dist/logo-matches-Y3PxVn7t.mjs +2 -0
  111. package/dist/logos-BN8SvJhS.mjs +3 -0
  112. package/dist/logpush-BnLA4WVm.mjs +4 -0
  113. package/dist/logs-CDo7Y5sA.mjs +3 -0
  114. package/dist/magic-cloud-networking-wPuLwu-F.mjs +5 -0
  115. package/dist/magic-network-monitoring-BNERUpxS.mjs +4 -0
  116. package/dist/magic-transit-6tvVOECW.mjs +111 -0
  117. package/dist/managed-defense-AYwBOYIH.mjs +2 -0
  118. package/dist/managed-transforms-HZZNrkC7.mjs +3 -0
  119. package/dist/matches-Dp91L3dL.mjs +2 -0
  120. package/dist/mcp-P7pcieiT.mjs +4 -0
  121. package/dist/mesh-DjFrk6PL.mjs +4 -0
  122. package/dist/mtls-certificates-DZMoef2H.mjs +3 -0
  123. package/dist/network-7cd1U6-I.mjs +6 -0
  124. package/dist/network-interconnects-CQ7cPZjK.mjs +41 -0
  125. package/dist/oauth-DH3kMXSs.mjs +14 -0
  126. package/dist/oauth-clients-P9t-eMnx.mjs +4 -0
  127. package/dist/oauth-scopes-C3r9Qh_y.mjs +2 -0
  128. package/dist/observability-M1DnLhMR.mjs +10 -0
  129. package/dist/{open-PBXRGS4R-DIiYQyU9.mjs → open-PBXRGS4R-DARSUDEI.mjs} +1 -1
  130. package/dist/organization-cUE7GDCt.mjs +45 -0
  131. package/dist/organizations-C-Hcpd0w.mjs +2 -0
  132. package/dist/origin-ca-certificates-C8cJMyQH.mjs +3 -0
  133. package/dist/origin-post-quantum-encryption-DjZJCk8M.mjs +2 -0
  134. package/dist/origin-tls-client-auth-BsjR5EAV.mjs +4 -0
  135. package/dist/{output-BqDR9h74.mjs → output-COcSQsfn.mjs} +1 -1
  136. package/dist/page-rules-B-zq1EUb.mjs +27 -0
  137. package/dist/pages-B6YpkPos.mjs +14 -0
  138. package/dist/pay-per-crawl-B4wx0lUb.mjs +4 -0
  139. package/dist/pipelines-BJc_RylD.mjs +6 -0
  140. package/dist/precursor-CLQu7suY.mjs +4 -0
  141. package/dist/progress-V6SZV3Ux.mjs +2 -0
  142. package/dist/prompt-DjRTpML4.mjs +3 -0
  143. package/dist/queries-DSrrket-.mjs +3 -0
  144. package/dist/queues-Tf7kPBpn.mjs +7 -0
  145. package/dist/r2-DmKNnxtC.mjs +25 -0
  146. package/dist/r2-data-catalog-DBxoifOq.mjs +16 -0
  147. package/dist/radar-Csk7Ab-b.mjs +2 -0
  148. package/dist/rate-limits-cdChIg_S.mjs +2 -0
  149. package/dist/raw-fetch-BVYQR6C5.mjs +2 -0
  150. package/dist/realtime-CDehZVhV.mjs +20 -0
  151. package/dist/registrar-sandbox-BxVdfnam.mjs +56 -0
  152. package/dist/registrar-vflzeNQ9.mjs +43 -0
  153. package/dist/{registry-5-I2XLwF.mjs → registry-CWUfXloz.mjs} +1 -1
  154. package/dist/reporting-BaPZ1PHN.mjs +2 -0
  155. package/dist/request-headers-CC4eHmI2.mjs +3 -0
  156. package/dist/request-tracers-C_UVBexV.mjs +2 -0
  157. package/dist/resource-sharing-CoB4S9j1.mjs +6 -0
  158. package/dist/resource-tagging-CUiUC5g4.mjs +2 -0
  159. package/dist/rules-4O8076_s.mjs +4 -0
  160. package/dist/rulesets-C84MxTYo.mjs +5 -0
  161. package/dist/rum-Bvwkrntx.mjs +4 -0
  162. package/dist/run-CRfinkSe.mjs +2 -0
  163. package/dist/schema-C8hU6G9R.mjs +2 -0
  164. package/dist/{schema-flags-CTfQVGCs.mjs → schema-flags-DC4c6dka.mjs} +1 -1
  165. package/dist/scim-BvxQmde6.mjs +4 -0
  166. package/dist/{sdk-ZctLa5jW.mjs → sdk-C12y5qCN.mjs} +2 -2
  167. package/dist/secrets-store-DOKWiC-j.mjs +7 -0
  168. package/dist/security-center-Bhy_aC-w.mjs +2 -0
  169. package/dist/security-txt-L7HJ9tq5.mjs +3 -0
  170. package/dist/{shared-DlKGNPiT.mjs → shared-YJtB5KZB.mjs} +17 -17
  171. package/dist/smart-shield-COMXuQ1S.mjs +4 -0
  172. package/dist/snippets-DffQhlKt.mjs +4 -0
  173. package/dist/{spawn-C3_tJ3RB.mjs → spawn-C1AISA2V.mjs} +3 -3
  174. package/dist/spectrum-Cmf7SqQE.mjs +63 -0
  175. package/dist/speed-m8cdhLFS.mjs +4 -0
  176. package/dist/src-C8phrg-8.mjs +109 -0
  177. package/dist/ssl-D4ffsdSw.mjs +15 -0
  178. package/dist/{startup-profile-Dpxg-MjV.mjs → startup-profile-Dx95Y5cl.mjs} +1 -1
  179. package/dist/state-CHif8Y5I.mjs +2 -0
  180. package/dist/stream-DPF5fojV.mjs +16 -0
  181. package/dist/submit-Br8hfP0_.mjs +2 -0
  182. package/dist/tags-Bnt4JuxQ.mjs +2 -0
  183. package/dist/telemetry-Ch1vCICm.mjs +2 -0
  184. package/dist/telemetry-DjGNSlkU.mjs +5 -0
  185. package/dist/tenant-D8u0CxoC.mjs +2 -0
  186. package/dist/tenant-custom-nameservers-BrWMyslZ.mjs +3 -0
  187. package/dist/{tools-j8UGEtP1.mjs → tools-D9RZkZRc.mjs} +1 -1
  188. package/dist/tunnels-BkNPpTHa.mjs +5 -0
  189. package/dist/turnstile-MgwRECJv.mjs +23 -0
  190. package/dist/ui-DQSZeaG5.mjs +5 -0
  191. package/dist/url-info-Ddp7MgcI.mjs +2 -0
  192. package/dist/url-normalization-3ptK9ntV.mjs +3 -0
  193. package/dist/url-scanner-Psb9ollR.mjs +2 -0
  194. package/dist/user-DWdshcIu.mjs +12 -0
  195. package/dist/values-CDKQL1z2.mjs +2 -0
  196. package/dist/vectorize-CTYYUyQj.mjs +4 -0
  197. package/dist/waiting-rooms-BUdmwXDY.mjs +11 -0
  198. package/dist/web-assets-CpDwDEx8.mjs +8 -0
  199. package/dist/web3-YsjDyAzH.mjs +4 -0
  200. package/dist/workers-BKKxaZcz.mjs +6 -0
  201. package/dist/workers-builds-BWo5vUA9.mjs +2 -0
  202. package/dist/workers-for-platforms-ASJsxYdM.mjs +5 -0
  203. package/dist/workers-vpc-RkTnRvA2.mjs +3 -0
  204. package/dist/workflows-KrIFI9ns.mjs +5 -0
  205. package/dist/zaraz-DglXbVzZ.mjs +2 -0
  206. package/dist/zero-trust-RilTdSjX.mjs +91 -0
  207. package/dist/zone-DsBtVkvT.mjs +2 -0
  208. package/dist/zones-BFxvWFQW.mjs +44 -0
  209. package/package.json +1 -1
  210. package/dist/abuse-reports-D40QFl-y.mjs +0 -8
  211. package/dist/access-Dl2IU1ID.mjs +0 -11
  212. package/dist/account-CPbieCZ4.mjs +0 -2
  213. package/dist/account-tags-skfP7H8k.mjs +0 -9
  214. package/dist/accounts-CSgR6909.mjs +0 -28
  215. package/dist/acm-CVvCTaNk.mjs +0 -3
  216. package/dist/addressing-Uq5hEDDP.mjs +0 -13
  217. package/dist/agent-context-BvuDdaJb.mjs +0 -8
  218. package/dist/agent-memory-BrHMIU0E.mjs +0 -6
  219. package/dist/ai-audit-BoZuL84i.mjs +0 -2
  220. package/dist/ai-gateway-DE50Jem1.mjs +0 -13
  221. package/dist/ai-search-Fx7NHCHB.mjs +0 -7
  222. package/dist/ai-security-DyLbY9kv.mjs +0 -4
  223. package/dist/ai-v2fP1r0s.mjs +0 -5
  224. package/dist/alerting-5mFZjTcD.mjs +0 -6
  225. package/dist/analytics-BygTfozw.mjs +0 -3
  226. package/dist/analytics_engine-4L-q362P.mjs +0 -2
  227. package/dist/api-security-DjFsRYWx.mjs +0 -50
  228. package/dist/argo-TzXPN7tz.mjs +0 -2
  229. package/dist/args-CDgWUP4J.mjs +0 -2
  230. package/dist/artifacts-dEw2UUBV.mjs +0 -4
  231. package/dist/audit-logs-CqY7zzwv.mjs +0 -2
  232. package/dist/auth-CPLdkOC7.mjs +0 -5
  233. package/dist/auth-DY_Y2bXC.mjs +0 -9
  234. package/dist/billing-DHQuRT8S.mjs +0 -3
  235. package/dist/bot-management-CfqG79hF.mjs +0 -5
  236. package/dist/botnet-feed-BOeNnDoH.mjs +0 -3
  237. package/dist/brand-protection-DYttrKIM.mjs +0 -3
  238. package/dist/browser-extension-CTUCdgfn.mjs +0 -3
  239. package/dist/browser-run-373D4e1i.mjs +0 -4
  240. package/dist/build-D0ir_S70.mjs +0 -2
  241. package/dist/cache-DJXBmc3w.mjs +0 -7
  242. package/dist/calls-COO0Eoz1.mjs +0 -4
  243. package/dist/certificate-authorities-DbHLmKbd.mjs +0 -2
  244. package/dist/client-certificates-RBRqYP3f.mjs +0 -3
  245. package/dist/client-side-security-HOmA37et.mjs +0 -37
  246. package/dist/cloud-connector-C7hw1c1f.mjs +0 -2
  247. package/dist/cloudforce-one-DLOj76q4.mjs +0 -36
  248. package/dist/connector-interrupts-DY-z_LrH.mjs +0 -2
  249. package/dist/connector-telemetry-events-DCXmcAc9.mjs +0 -2
  250. package/dist/connector-telemetry-snapshots-D8GNuzx3.mjs +0 -2
  251. package/dist/connectors-fEOn-J_i.mjs +0 -3
  252. package/dist/containers-BDBsEs7-.mjs +0 -58
  253. package/dist/content-scan-Cmj9--XY.mjs +0 -4
  254. package/dist/csamScanner-BRXyMCyH.mjs +0 -6
  255. package/dist/ct-alerting-9AvYys-f.mjs +0 -3
  256. package/dist/custom-certificates-C5qrlyhb.mjs +0 -5
  257. package/dist/custom-csrs-BgOnTbBW.mjs +0 -3
  258. package/dist/custom-hostnames-CbQD9aYo.mjs +0 -5
  259. package/dist/custom-nameservers-2ZajBkRC.mjs +0 -3
  260. package/dist/custom-pages-Buki_Cb8.mjs +0 -3
  261. package/dist/d1-n2in0cSF.mjs +0 -20
  262. package/dist/data-security-DzOQMkv3.mjs +0 -7
  263. package/dist/dcv-delegation-BTP9LCOm.mjs +0 -2
  264. package/dist/diagnostics-BvHV8kQb.mjs +0 -3
  265. package/dist/directory-BeiSyg8A.mjs +0 -3
  266. package/dist/dispatch-namespaces-Dp8Jjpwy.mjs +0 -7
  267. package/dist/dist-DvizctjW.mjs +0 -48
  268. package/dist/dls-BwoU29mS.mjs +0 -3
  269. package/dist/dns-DISAfuzj.mjs +0 -29
  270. package/dist/dns-firewall-wBcCx_ua.mjs +0 -57
  271. package/dist/dry-run-ILZRVpnp.mjs +0 -2
  272. package/dist/durable-objects-DhDL3San.mjs +0 -2
  273. package/dist/email-auth-BROqK6-C.mjs +0 -2
  274. package/dist/email-routing-BZXHDAOO.mjs +0 -6
  275. package/dist/email-security-DVumybrk.mjs +0 -18
  276. package/dist/email-sending-CDQ3_wyz.mjs +0 -7
  277. package/dist/fieldExtractors-Cy1rxHEF.mjs +0 -3
  278. package/dist/firewall-C0g5X7Zd.mjs +0 -11
  279. package/dist/flagship-fFBiZUz-.mjs +0 -4
  280. package/dist/fraud-CjIETOaM.mjs +0 -20
  281. package/dist/google-tag-gateway-hPa5IHUx.mjs +0 -2
  282. package/dist/healthchecks-CoycpTf9.mjs +0 -4
  283. package/dist/hostnames-x_Yezxpr.mjs +0 -3
  284. package/dist/hyperdrive-BlfrTwSq.mjs +0 -21
  285. package/dist/iam-Bk7K_PPO.mjs +0 -6
  286. package/dist/images-BAEFb9q1.mjs +0 -8
  287. package/dist/intel-DDkyJVaP.mjs +0 -8
  288. package/dist/interactive-CRnq-B5I.mjs +0 -11
  289. package/dist/interactive-cytQzL94.mjs +0 -78
  290. package/dist/ips-DU0ti0i0.mjs +0 -2
  291. package/dist/keyless-certificates-E1P9jBTb.mjs +0 -3
  292. package/dist/keys-DqldTZqH.mjs +0 -2
  293. package/dist/kv-CcfCfnwq.mjs +0 -5
  294. package/dist/leaked-credential-checks-CqmKaEbd.mjs +0 -4
  295. package/dist/load-balancers-Dg4pDad1.mjs +0 -6
  296. package/dist/logexplorer-Bu2mG5rh.mjs +0 -17
  297. package/dist/logo-matches-CWUzxY7G.mjs +0 -2
  298. package/dist/logos-BTfdkDPi.mjs +0 -3
  299. package/dist/logpush-BZyay3h2.mjs +0 -4
  300. package/dist/logs-BqF7jjQO.mjs +0 -3
  301. package/dist/magic-cloud-networking-Dhd8pTyM.mjs +0 -5
  302. package/dist/magic-network-monitoring-D0FnkjuN.mjs +0 -4
  303. package/dist/magic-transit-B5skt0G7.mjs +0 -111
  304. package/dist/managed-transforms-B6X_crcJ.mjs +0 -3
  305. package/dist/matches-DeYaB4I0.mjs +0 -2
  306. package/dist/mcp-ChjBiMx2.mjs +0 -4
  307. package/dist/mesh-DRVAFLBX.mjs +0 -4
  308. package/dist/moq-DE7VDEFS.mjs +0 -13
  309. package/dist/mtls-certificates-Cbc3uAkN.mjs +0 -3
  310. package/dist/network-CDPZNFbn.mjs +0 -6
  311. package/dist/network-interconnects-CMRs_chR.mjs +0 -41
  312. package/dist/oauth-DAa7SwkM.mjs +0 -14
  313. package/dist/oauth-clients-DAI_gcuL.mjs +0 -4
  314. package/dist/oauth-scopes-BE6xF4_h.mjs +0 -2
  315. package/dist/observability-DnyI8rPJ.mjs +0 -4
  316. package/dist/organization-yh0mSUdI.mjs +0 -41
  317. package/dist/organizations-B3aU-RCG.mjs +0 -2
  318. package/dist/origin-ca-certificates-BaNWfVqf.mjs +0 -3
  319. package/dist/origin-post-quantum-encryption-CIUtQgyv.mjs +0 -2
  320. package/dist/origin-tls-client-auth-CvEpbX2Q.mjs +0 -4
  321. package/dist/page-rules-CzbyXbt6.mjs +0 -27
  322. package/dist/pages-CX8yefTI.mjs +0 -14
  323. package/dist/pay-per-crawl-v4vBOMWD.mjs +0 -4
  324. package/dist/pipelines-BZ1KGupx.mjs +0 -6
  325. package/dist/precursor-D42A9ay5.mjs +0 -4
  326. package/dist/progress-jYW64HY7.mjs +0 -2
  327. package/dist/project-settings-BN7tL0c7.mjs +0 -3
  328. package/dist/prompt-CyATfGUu.mjs +0 -3
  329. package/dist/queries-xvETUjUE.mjs +0 -3
  330. package/dist/queues-CpqHDtxF.mjs +0 -6
  331. package/dist/r2-data-catalog-DgKmlTKR.mjs +0 -16
  332. package/dist/r2-jhmLvD1z.mjs +0 -24
  333. package/dist/radar-C2J16wpX.mjs +0 -2
  334. package/dist/rate-limits-CoH9Xma0.mjs +0 -5
  335. package/dist/raw-fetch-CNKIypJ7.mjs +0 -2
  336. package/dist/realtimekit-CDs0Z5WW.mjs +0 -7
  337. package/dist/registrar-BI5ewTAk.mjs +0 -23
  338. package/dist/registrar-sandbox-al1znWMc.mjs +0 -61
  339. package/dist/reporting-CxsdHAH3.mjs +0 -2
  340. package/dist/request-tracers-DJJCncft.mjs +0 -2
  341. package/dist/resource-sharing-qQGn8AEn.mjs +0 -3
  342. package/dist/resource-tagging-aTtpX5e5.mjs +0 -2
  343. package/dist/rules-PpsDU89Q.mjs +0 -4
  344. package/dist/rulesets-DP12Aqik.mjs +0 -5
  345. package/dist/rum-DxvpzJYc.mjs +0 -4
  346. package/dist/schema-DlLbiOJj.mjs +0 -2
  347. package/dist/scim-DJ4AVU20.mjs +0 -4
  348. package/dist/secrets-store-D6KDNo_s.mjs +0 -7
  349. package/dist/security-center-008FMs_z.mjs +0 -2
  350. package/dist/security-txt-CqcfrhlN.mjs +0 -3
  351. package/dist/share-D5fzsVAJ.mjs +0 -5
  352. package/dist/smart-shield-DpFscIk8.mjs +0 -4
  353. package/dist/snippets-CCKgI2ZX.mjs +0 -4
  354. package/dist/spectrum-LmdqY3ki.mjs +0 -7
  355. package/dist/speed-CEK36h3A.mjs +0 -4
  356. package/dist/src-CEb2fgtT.mjs +0 -108
  357. package/dist/ssl-ChHUyaQm.mjs +0 -15
  358. package/dist/state-DeX23Kmg.mjs +0 -2
  359. package/dist/stream-DfUSELMX.mjs +0 -14
  360. package/dist/submit-DF2G5CIz.mjs +0 -2
  361. package/dist/tags-nFJJHlLJ.mjs +0 -2
  362. package/dist/tenant-CRLw1oRU.mjs +0 -2
  363. package/dist/tenant-custom-nameservers-BvBQRDcs.mjs +0 -3
  364. package/dist/tunnel-CMQeBgmb.mjs +0 -5
  365. package/dist/tunnels-iVA3MrdS.mjs +0 -2
  366. package/dist/turnstile-DQHP6-_b.mjs +0 -23
  367. package/dist/ui-DJFcf61J.mjs +0 -5
  368. package/dist/url-info-BVgdb_pf.mjs +0 -2
  369. package/dist/url-normalization-BTcxLxIQ.mjs +0 -3
  370. package/dist/url-scanner-DwuDZLPk.mjs +0 -2
  371. package/dist/user-I_MbB_KX.mjs +0 -12
  372. package/dist/values-S-Q7-5o8.mjs +0 -2
  373. package/dist/vectorize-CNZdF_0A.mjs +0 -4
  374. package/dist/waiting-rooms-Bo-OSsxu.mjs +0 -11
  375. package/dist/web-assets-tlFzKdNL.mjs +0 -8
  376. package/dist/web3-CdbfoZ2x.mjs +0 -4
  377. package/dist/workers-DQ9Q7czn.mjs +0 -28
  378. package/dist/workers-builds-CGRhYx-x.mjs +0 -9
  379. package/dist/workflows-BhEy-crm.mjs +0 -5
  380. package/dist/zaraz-DbKvA_8C.mjs +0 -2
  381. package/dist/zero-trust-DrHCPVOc.mjs +0 -93
  382. package/dist/zone-D2zrbJI2.mjs +0 -2
  383. package/dist/zones-DrpxQ_-A.mjs +0 -21
  384. /package/dist/{Page-9ry_XAVC.mjs → Page-C-JHZnIy.mjs} +0 -0
  385. /package/dist/{alerts-9PR5sQ_z.mjs → alerts-B2SJO4nd.mjs} +0 -0
  386. /package/dist/{autorag-Bevo1kIH.mjs → autorag-iNjZXw1n.mjs} +0 -0
  387. /package/dist/{body-parser-BGVbwPeM.mjs → body-parser-DIlfApuJ.mjs} +0 -0
  388. /package/dist/{brands-C4M04Man.mjs → brands-BrVnNrT3.mjs} +0 -0
  389. /package/dist/{chunk-6EUZQHAF-C3w62dek.mjs → chunk-6EUZQHAF-B7bSMYLe.mjs} +0 -0
  390. /package/dist/{chunk-Q72B4Q5Z-DVMMVVEs.mjs → chunk-Q72B4Q5Z-CPy_WJKU.mjs} +0 -0
  391. /package/dist/{clear-DS0eRXOc.mjs → clear-an9o3dJ3.mjs} +0 -0
  392. /package/dist/{cli-types-C3nVfpSG.mjs → cli-types-CrSoSMPF.mjs} +0 -0
  393. /package/dist/{connector-telemetry-events-latest-CKKG6_pD.mjs → connector-telemetry-events-latest-BqWfopFc.mjs} +0 -0
  394. /package/dist/{connector-telemetry-snapshots-latest-Bv5OddJr.mjs → connector-telemetry-snapshots-latest-C1m9U1En.mjs} +0 -0
  395. /package/dist/{domain-info-BUiaGCEq.mjs → domain-info-B0Ykqv5l.mjs} +0 -0
  396. /package/dist/{health-vX6Ml2Na.mjs → health-CIUg1C5o.mjs} +0 -0
  397. /package/dist/{input-validation-1esLElok.mjs → input-validation-BxchZ9jE.mjs} +0 -0
  398. /package/dist/{internal-ROz7anul.mjs → internal-DmpATljO.mjs} +0 -0
  399. /package/dist/{live-CSxvigCS.mjs → live-B66u3_0g.mjs} +0 -0
  400. /package/dist/{metadata-DEqBUaSv.mjs → metadata-D062SVyy.mjs} +0 -0
  401. /package/dist/{public-BMg6-Hxh-DgIH5obr.mjs → public-BMg6-Hxh-BfUOZTDP.mjs} +0 -0
  402. /package/dist/{rate-limit-analytics-CgHgKjmV.mjs → rate-limit-analytics-BknoecoM.mjs} +0 -0
  403. /package/dist/{ready-6G9zVGPJ.mjs → ready-C-H2cwp_.mjs} +0 -0
  404. /package/dist/{recent-submissions-B3Smh-QM.mjs → recent-submissions-DyuH_n5u.mjs} +0 -0
  405. /package/dist/{refute-DjkmLSNe.mjs → refute-uSlzkQKq.mjs} +0 -0
  406. /package/dist/{resolve-DEvdeprv.mjs → resolve-B8CyM1mi.mjs} +0 -0
  407. /package/dist/{scan-logo-545qLcGs.mjs → scan-logo-DMk--WT7.mjs} +0 -0
  408. /package/dist/{scan-page-DRQiVufl.mjs → scan-page-DEHnAOJo.mjs} +0 -0
  409. /package/dist/{schemas-BFCBlp_W.mjs → schemas-O_ZNaF8R.mjs} +0 -0
  410. /package/dist/{search-CXbqFoqe.mjs → search-BlKeSfVD.mjs} +0 -0
  411. /package/dist/{signed-url-rU_nvgFA.mjs → signed-url-CiGmGkLQ.mjs} +0 -0
  412. /package/dist/{submission-info-D6PgXNQP.mjs → submission-info-DHlTHDrs.mjs} +0 -0
  413. /package/dist/{theme-CrIBazAF.mjs → theme-CeVf-5qG.mjs} +0 -0
  414. /package/dist/{total-queries-XkFyu8H5.mjs → total-queries-D5WvVfYi.mjs} +0 -0
  415. /package/dist/{tracked-domains-CmcRXHj_.mjs → tracked-domains-9deBK9bp.mjs} +0 -0
  416. /package/dist/{verify-CM1NakP0.mjs → verify-S-TmhUDr.mjs} +0 -0
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-C6XsFD_W.mjs";import{f as t,g as n,h as r}from"./oauth-DH3kMXSs.mjs";import{r as i}from"./auth-tvDdC1J-.mjs";import{t as a}from"./output-COcSQsfn.mjs";import{t as o}from"./dry-run-DiVy1lVo.mjs";import{t as s}from"./progress-V6SZV3Ux.mjs";import{t as c}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as l,r as u,t as d}from"./body-parser-DIlfApuJ.mjs";import{n as f}from"./input-validation-BxchZ9jE.mjs";import{a as p,i as m,n as h}from"./prompt-DjRTpML4.mjs";import{t as g}from"./cli-types-CrSoSMPF.mjs";function ee(e){return e.option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`skip-preflight-check`,{type:`boolean`,description:`The skipPreflightCheck field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Create a new Workers Observability Telemetry Destination.`,builder:ee,handler:async r=>c({command:`observability destinations create`,classification:{safeFlags:[`configuration-type`,`enabled`,`skip-preflight-check`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({configuration:{type:f(r[`configuration-type`],`configuration-type`,`text`),url:f(r[`configuration-url`],`configuration-url`,`text`)},enabled:r.enabled,name:f(r.name,`name`,`text`),skipPreflightCheck:r[`skip-preflight-check`]}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.observability.destinations.create({...e,account_id:u})),{successLabel:`Created`});return}if(r[`configuration-type`]===void 0&&(r[`configuration-type`]=await m(`configuration-type`,`The configuration.type field`,[`logpush`])),r[`configuration-url`]===void 0&&(r[`configuration-url`]=await p(`configuration-url`,`The configuration.url field`)),r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await p(`name`,`The name field`));let h=d({configuration:{type:f(r[`configuration-type`],`configuration-type`,`text`),url:f(r[`configuration-url`],`configuration-url`,`text`)},enabled:r.enabled,name:f(r.name,`name`,`text`),skipPreflightCheck:r[`skip-preflight-check`]});a(await s(`Creating`,async()=>c.observability.destinations.create({...h,account_id:u})),{successLabel:`Created`})})};function _(e){return e.positional(`slug`,{type:`string`,description:`Slug`,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 v={command:`delete <slug>`,describe:`Delete a Workers Observability Telemetry Destination.`,builder:_,handler:async r=>c({command:`observability destinations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf observability destinations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/destinations/${r.slug==null?`<slug>`:encodeURIComponent(String(r.slug))}`,pathParams:{slug:String(r.slug??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force,message:`This operation deletes the destination.`})){process.stderr.write(`Aborted.
3
+ `);return}a(await s(`Deleting`,async()=>c.observability.destinations.delete({account_id:l,slug:r.slug})),{successLabel:`Deleted`})})};function y(e){return e.option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`PerPage`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`order-by`,{type:`string`,description:`OrderBy`,choices:[`created`,`updated`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List your Workers Observability Telemetry Destinations.`,builder:g(y),handler:async r=>c({command:`observability destinations list`,classification:{safeFlags:[`order`,`order-by`,`dry-run`]}},r,async()=>{let c={page:r.page,perPage:r[`per-page`],order:r.order,orderBy:r[`order-by`]};if(r.dryRun){o({command:`cf observability destinations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/destinations`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.observability.destinations.list({account_id:u,...c})),{successLabel:`Loaded`})})};function x(e){return e.positional(`slug`,{type:`string`,description:`Slug`,demandOption:!0}).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`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 S={command:`update <slug>`,describe:`Update an existing Workers Observability Telemetry Destination.`,builder:x,handler:async r=>c({command:`observability destinations update`,classification:{safeFlags:[`configuration-type`,`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability destinations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/destinations/${r.slug==null?`<slug>`:encodeURIComponent(String(r.slug))}`,pathParams:{slug:String(r.slug??``)},bodyKind:`json`,body:r.body===void 0?d({configuration:{type:f(r[`configuration-type`],`configuration-type`,`text`),url:f(r[`configuration-url`],`configuration-url`,`text`)},enabled:r.enabled}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.observability.destinations.update({...e,account_id:u,slug:r.slug})),{successLabel:`Updated`});return}if(r[`configuration-type`]===void 0&&(r[`configuration-type`]=await m(`configuration-type`,`The configuration.type field`,[`logpush`])),r[`configuration-url`]===void 0&&(r[`configuration-url`]=await p(`configuration-url`,`The configuration.url field`)),r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let h=d({configuration:{type:f(r[`configuration-type`],`configuration-type`,`text`),url:f(r[`configuration-url`],`configuration-url`,`text`)},enabled:r.enabled});a(await s(`Updating`,async()=>c.observability.destinations.update({...h,account_id:u,slug:r.slug})),{successLabel:`Updated`})})},C={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(te).command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.positional(`group-id`,{type:`string`,description:`GroupId`,demandOption:!0}).option(`issue-ids`,{type:`string`,array:!0,description:`The issueIds field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const T={command:`add <groupId>`,describe:`Add one or more ungrouped issues to an existing issue group.`,builder:w,handler:async r=>c({command:`observability issues add`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability issues add`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/groups/${r[`group-id`]==null?`<group-id>`:encodeURIComponent(String(r[`group-id`]))}/members`,pathParams:{"group-id":String(r[`group-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({issueIds:r[`issue-ids`]}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.observability.issues.add({...e,account_id:u,groupId:r[`group-id`]})),{successLabel:`Created`});return}if(r[`issue-ids`]===void 0)throw Error(`--issue-ids is required (or pass --body with this field set).`);let f=d({issueIds:r[`issue-ids`]});a(await s(`Creating`,async()=>c.observability.issues.add({...f,account_id:u,groupId:r[`group-id`]})),{successLabel:`Created`})})};function E(e){return e.option(`after-inactivity-seconds`,{type:`number`,description:`The afterInactivitySeconds field`}).option(`after-occurrences`,{type:`number`,description:`The afterOccurrences field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy-id`,{type:`string`,description:`The policyId field`}).option(`service`,{type:`string`,description:`The service field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const D={command:`create`,describe:`Create an account or service issue automation.`,builder:E,handler:async r=>c({command:`observability issues automations create`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability issues automations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/automations`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({afterInactivitySeconds:r[`after-inactivity-seconds`],afterOccurrences:r[`after-occurrences`],enabled:r.enabled,name:f(r.name,`name`,`text`),policyId:f(r[`policy-id`],`policy-id`,`text`),service:f(r.service,`service`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.observability.issues.automations.create({...e,account_id:u})),{successLabel:`Created`});return}r[`policy-id`]===void 0&&(r[`policy-id`]=await p(`policy-id`,`The policyId field`));let m=d({afterInactivitySeconds:r[`after-inactivity-seconds`],afterOccurrences:r[`after-occurrences`],enabled:r.enabled,name:f(r.name,`name`,`text`),policyId:f(r[`policy-id`],`policy-id`,`text`),service:f(r.service,`service`,`text`)});a(await s(`Creating`,async()=>c.observability.issues.automations.create({...m,account_id:u})),{successLabel:`Created`})})};function O(e){return e.positional(`automation-id`,{type:`string`,description:`AutomationId`,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 k={command:`delete <automationId>`,describe:`Delete an issue automation while preserving its historical runs.`,builder:O,handler:async r=>c({command:`observability issues automations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf observability issues automations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/automations/${r[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(r[`automation-id`]))}`,pathParams:{"automation-id":String(r[`automation-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force,message:`This operation deletes the issue automation.`})){process.stderr.write(`Aborted.
4
+ `);return}a(await s(`Deleting`,async()=>c.observability.issues.automations.delete({account_id:l,automationId:r[`automation-id`]})),{successLabel:`Deleted`})})};function A(e){return e.positional(`automation-id`,{type:`string`,description:`AutomationId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <automationId>`,describe:`Retrieve an issue automation.`,builder:A,handler:async r=>c({command:`observability issues automations get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability issues automations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/automations/${r[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(r[`automation-id`]))}`,pathParams:{"automation-id":String(r[`automation-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.observability.issues.automations.get({account_id:l,automationId:r[`automation-id`]})),{successLabel:`Loaded`})})};function M(e){return e.option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List account and service issue automations.`,builder:M,handler:async r=>c({command:`observability issues automations list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={service:r.service};if(r.dryRun){o({command:`cf observability issues automations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/automations`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.observability.issues.automations.list({account_id:u,...c})),{successLabel:`Loaded`})})};function P(e){return e.positional(`automation-id`,{type:`string`,description:`AutomationId`,demandOption:!0}).option(`after-inactivity-seconds`,{type:`number`,description:`The afterInactivitySeconds field`}).option(`after-occurrences`,{type:`number`,description:`The afterOccurrences field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy-id`,{type:`string`,description:`The policyId field`}).option(`service`,{type:`string`,description:`The service field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`update <automationId>`,describe:`Replace an issue automation configuration.`,builder:P,handler:async r=>c({command:`observability issues automations update`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability issues automations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/automations/${r[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(r[`automation-id`]))}`,pathParams:{"automation-id":String(r[`automation-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({afterInactivitySeconds:r[`after-inactivity-seconds`],afterOccurrences:r[`after-occurrences`],enabled:r.enabled,name:f(r.name,`name`,`text`),policyId:f(r[`policy-id`],`policy-id`,`text`),service:f(r.service,`service`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.observability.issues.automations.update({...e,account_id:u,automationId:r[`automation-id`]})),{successLabel:`Updated`});return}r[`policy-id`]===void 0&&(r[`policy-id`]=await p(`policy-id`,`The policyId field`));let m=d({afterInactivitySeconds:r[`after-inactivity-seconds`],afterOccurrences:r[`after-occurrences`],enabled:r.enabled,name:f(r.name,`name`,`text`),policyId:f(r[`policy-id`],`policy-id`,`text`),service:f(r.service,`service`,`text`)});a(await s(`Updating`,async()=>c.observability.issues.automations.update({...m,account_id:u,automationId:r[`automation-id`]})),{successLabel:`Updated`})})},I={command:`automations`,describe:`Operations for issues.automations`,builder:e=>e.command(D).command(k).command(j).command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get <issueId>`,describe:`Retrieve an issue.`,builder:L,handler:async r=>c({command:`observability issues get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability issues get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/${r[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(r[`issue-id`]))}`,pathParams:{"issue-id":String(r[`issue-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.observability.issues.get({account_id:l,issueId:r[`issue-id`]})),{successLabel:`Loaded`})})};function z(e){return e.option(`issue-ids`,{type:`string`,array:!0,description:`The issueIds field`}).option(`title`,{type:`string`,description:`The title field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`group`,describe:`Group two or more issues under a new customer-defined identity.`,builder:z,handler:async r=>c({command:`observability issues group`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability issues group`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/groups`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({issueIds:r[`issue-ids`],title:f(r.title,`title`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.observability.issues.group({...e,account_id:u})),{successLabel:`Created`});return}if(r[`issue-ids`]===void 0)throw Error(`--issue-ids is required (or pass --body with this field set).`);r.title===void 0&&(r.title=await p(`title`,`The title field`));let m=d({issueIds:r[`issue-ids`],title:f(r.title,`title`,`text`)});a(await s(`Creating`,async()=>c.observability.issues.group({...m,account_id:u})),{successLabel:`Created`})})};function V(e){return e.option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`PerPage`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`order-by`,{type:`string`,description:`OrderBy`,choices:[`id`,`service`,`title`,`type`,`status`,`statusUpdated`,`count`,`firstObserved`,`lastObserved`,`created`,`updated`]}).option(`search`,{type:`string`,description:`Search`}).option(`service`,{type:`string`,description:`Service`}).option(`type`,{type:`string`,description:`Type`}).option(`status`,{type:`string`,description:`Status`,choices:[`active`,`resolved`,`ignored`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List detected issues.`,builder:g(V),handler:async r=>c({command:`observability issues list`,classification:{safeFlags:[`order`,`order-by`,`status`,`dry-run`]}},r,async()=>{let c={page:r.page,perPage:r[`per-page`],order:r.order,orderBy:r[`order-by`],search:r.search,service:r.service,type:r.type,status:r.status};if(r.dryRun){o({command:`cf observability issues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.observability.issues.list({account_id:u,...c})),{successLabel:`Loaded`})})};function U(e){return e.positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`policy-id`,{type:`string`,description:`The policyId field`}).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 W={command:`notify <issueId>`,describe:`Send the issue to one ANS policy, or every matching Real-Time Issue policy when no policy ID is provided.`,builder:U,handler:async r=>c({command:`observability issues notify`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf observability issues notify`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/${r[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(r[`issue-id`]))}/notification-runs`,pathParams:{"issue-id":String(r[`issue-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({policyId:f(r[`policy-id`],`policy-id`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,!await h({force:!!r.force,message:`This operation sends an issue notification.`})){process.stderr.write(`Aborted.
5
+ `);return}if(r.body){let e=l(r.body);a(await s(`Deleting`,async()=>c.observability.issues.notify({...e,account_id:u,issueId:r[`issue-id`]})),{successLabel:`Deleted`});return}let p=d({policyId:f(r[`policy-id`],`policy-id`,`text`)});a(await s(`Deleting`,async()=>c.observability.issues.notify({...p,account_id:u,issueId:r[`issue-id`]})),{successLabel:`Deleted`})})};function G(e){return e.positional(`issue-id`,{type:`string`,description:`Issue ID returned by the issues API.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Opaque cursor returned in result_info.cursors.after.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`occurrences <issueId>`,describe:`List the retained error occurrences grouped into an issue, newest first.`,builder:G,handler:async r=>c({command:`observability issues occurrences`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={cursor:r.cursor,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf observability issues occurrences`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/${r[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(r[`issue-id`]))}/occurrences`,pathParams:{"issue-id":String(r[`issue-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.observability.issues.occurrences({account_id:u,issueId:r[`issue-id`],...c})),{successLabel:`Loaded`})})};function q(e){return e.positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`group-id`,{type:`string`,description:`GroupId`,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:`remove <issueId>`,describe:`Remove an issue from a group, dissolving the group when fewer than two members remain.`,builder:q,handler:async r=>c({command:`observability issues remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf observability issues remove`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/groups/${r[`group-id`]==null?`<group-id>`:encodeURIComponent(String(r[`group-id`]))}/members/${r[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(r[`issue-id`]))}`,pathParams:{"group-id":String(r[`group-id`]??``),"issue-id":String(r[`issue-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
6
+ `);return}a(await s(`Deleting`,async()=>c.observability.issues.remove({account_id:l,groupId:r[`group-id`],issueId:r[`issue-id`]})),{successLabel:`Deleted`})})};function Y(e){return e.option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`summary`,describe:`Retrieve aggregate issue counts for the account.`,builder:Y,handler:async r=>c({command:`observability issues summary`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={service:r.service};if(r.dryRun){o({command:`cf observability issues summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/summary`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.observability.issues.summary({account_id:u,...c})),{successLabel:`Loaded`})})};function Z(e){return e.positional(`group-id`,{type:`string`,description:`GroupId`,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 Q={command:`ungroup <groupId>`,describe:`Dissolve an issue group and restore its members as standalone issues.`,builder:Z,handler:async r=>c({command:`observability issues ungroup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf observability issues ungroup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/groups/${r[`group-id`]==null?`<group-id>`:encodeURIComponent(String(r[`group-id`]))}`,pathParams:{"group-id":String(r[`group-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
7
+ `);return}a(await s(`Deleting`,async()=>c.observability.issues.ungroup({account_id:l,groupId:r[`group-id`]})),{successLabel:`Deleted`})})};function ne(e){return e.positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`active`,`resolved`,`ignored`]}).option(`title`,{type:`string`,description:`The title field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Modify an issue status or group title.`})}const re={command:`update <issueId>`,describe:`Modify an issue status or group title.`,builder:ne,handler:async r=>c({command:`observability issues update`,classification:{safeFlags:[`status`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability issues update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/issues/${r[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(r[`issue-id`]))}`,pathParams:{"issue-id":String(r[`issue-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({status:f(r.status,`status`,`text`),title:f(r.title,`title`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.observability.issues.update({...e,account_id:u,issueId:r[`issue-id`]})),{successLabel:`Updated`});return}let p=d({status:f(r.status,`status`,`text`),title:f(r.title,`title`,`text`)});a(await s(`Updating`,async()=>c.observability.issues.update({...p,account_id:u,issueId:r[`issue-id`]})),{successLabel:`Updated`})})},ie={command:`issues`,describe:`Operations for issues`,builder:e=>e.command(T).command(R).command(B).command(H).command(W).command(K).command(J).command(X).command(Q).command(re).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const oe={command:`create`,describe:`Persist query for later use.`,builder:ae,handler:async r=>c({command:`observability queries create`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/queries`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({description:f(r.description,`description`,`text`),name:f(r.name,`name`,`text`),parameters:{datasets:r[`parameters-datasets`],filterCombination:f(r[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:r[`parameters-limit`],needle:{isRegex:r[`parameters-needle-is-regex`],matchCase:r[`parameters-needle-match-case`]},orderBy:{order:f(r[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:f(r[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.observability.queries.create({...e,account_id:u})),{successLabel:`Created`});return}r.description===void 0&&(r.description=await p(`description`,`The description field`)),r.name===void 0&&(r.name=await p(`name`,`Query name`)),r[`parameters-order-by-value`]===void 0&&(r[`parameters-order-by-value`]=await p(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let m=d({description:f(r.description,`description`,`text`),name:f(r.name,`name`,`text`),parameters:{datasets:r[`parameters-datasets`],filterCombination:f(r[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:r[`parameters-limit`],needle:{isRegex:r[`parameters-needle-is-regex`],matchCase:r[`parameters-needle-match-case`]},orderBy:{order:f(r[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:f(r[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}});a(await s(`Creating`,async()=>c.observability.queries.create({...m,account_id:u})),{successLabel:`Created`})})};function se(e){return e.positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ce={command:`delete <queryId>`,describe:`Delete a saved query.`,builder:se,handler:async r=>c({command:`observability queries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf observability queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/queries/${r[`query-id`]==null?`<query-id>`:encodeURIComponent(String(r[`query-id`]))}`,pathParams:{"query-id":String(r[`query-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force,message:`This operation deletes the saved query.`})){process.stderr.write(`Aborted.
8
+ `);return}a(await s(`Deleting`,async()=>c.observability.queries.delete({account_id:l,queryId:r[`query-id`]})),{successLabel:`Deleted`})})};function le(e){return e.positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const ue={command:`edit <queryId>`,describe:`Update saved query.`,builder:le,handler:async r=>c({command:`observability queries edit`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability queries edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/queries/${r[`query-id`]==null?`<query-id>`:encodeURIComponent(String(r[`query-id`]))}`,pathParams:{"query-id":String(r[`query-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({description:f(r.description,`description`,`text`),name:f(r.name,`name`,`text`),parameters:{datasets:r[`parameters-datasets`],filterCombination:f(r[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:r[`parameters-limit`],needle:{isRegex:r[`parameters-needle-is-regex`],matchCase:r[`parameters-needle-match-case`]},orderBy:{order:f(r[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:f(r[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.observability.queries.edit({...e,account_id:u,queryId:r[`query-id`]})),{successLabel:`Updated`});return}r.description===void 0&&(r.description=await p(`description`,`The description field`)),r.name===void 0&&(r.name=await p(`name`,`Query name`)),r[`parameters-order-by-value`]===void 0&&(r[`parameters-order-by-value`]=await p(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let m=d({description:f(r.description,`description`,`text`),name:f(r.name,`name`,`text`),parameters:{datasets:r[`parameters-datasets`],filterCombination:f(r[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:r[`parameters-limit`],needle:{isRegex:r[`parameters-needle-is-regex`],matchCase:r[`parameters-needle-match-case`]},orderBy:{order:f(r[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:f(r[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}});a(await s(`Updating`,async()=>c.observability.queries.edit({...m,account_id:u,queryId:r[`query-id`]})),{successLabel:`Updated`})})};function de(e){return e.positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`get <queryId>`,describe:`Retrieve a saved query.`,builder:de,handler:async r=>c({command:`observability queries get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/queries/${r[`query-id`]==null?`<query-id>`:encodeURIComponent(String(r[`query-id`]))}`,pathParams:{"query-id":String(r[`query-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.observability.queries.get({account_id:l,queryId:r[`query-id`]})),{successLabel:`Loaded`})})};function pe(e){return e.option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`PerPage`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`order-by`,{type:`string`,description:`OrderBy`,choices:[`created`,`updated`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List saved queries.`,builder:g(pe),handler:async r=>c({command:`observability queries list`,classification:{safeFlags:[`order`,`order-by`,`dry-run`]}},r,async()=>{let c={page:r.page,perPage:r[`per-page`],order:r.order,orderBy:r[`order-by`]};if(r.dryRun){o({command:`cf observability queries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/queries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.observability.queries.list({account_id:u,...c})),{successLabel:`Loaded`})})},he={command:`queries`,describe:`Operations for queries`,builder:e=>e.command(oe).command(ce).command(ue).command(fe).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ge(e){return e.option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`chart-type`,{type:`string`,description:`Controls the SQL shape and response payload for the 'calculations' view. Omitted or 'timeseries_and_aggregate': current behaviour — both the time-series and aggregate queries. 'timeseries': time-series only. 'aggregate': aggregate only. 'distribution': a bucketed 2D histogram (time × value buckets) returned in 'distribution' instead of 'calculations'. 'distribution' is not compatible with 'compare' — combining them returns a 400.`,choices:[`timeseries_and_aggregate`,`timeseries`,`aggregate`,`distribution`]}).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).option(`dry`,{type:`boolean`,description:`When true, executes the query without persisting the results. Useful for validation or previewing.`,default:!1}).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a sharable link to a query result.`}).check(e=>{if([`parameters-datasets`,`parameters-filter-combination`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const _e={command:`create`,describe:`Shared queries store the results of a previously run query, allowing you to share the results with others.`,builder:ge,handler:async r=>c({command:`observability shared-queries create`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`dry`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability shared-queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/shared/query`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({chart:r.chart,chartType:f(r[`chart-type`],`chart-type`,`text`),compare:r.compare,distributionScale:f(r[`distribution-scale`],`distribution-scale`,`text`),dry:r.dry,granularity:r.granularity,ignoreSeries:r[`ignore-series`],limit:r.limit,offset:f(r.offset,`offset`,`text`),offsetBy:r[`offset-by`],offsetDirection:f(r[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:r[`parameters-datasets`],filterCombination:f(r[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:r[`parameters-limit`],needle:{isRegex:r[`parameters-needle-is-regex`],matchCase:r[`parameters-needle-match-case`]},orderBy:{order:f(r[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:f(r[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:f(r[`query-id`],`query-id`,`text`),timeframe:{from:r[`timeframe-from`],to:r[`timeframe-to`]},view:f(r.view,`view`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.observability.sharedQueries.create({...e,account_id:u})),{successLabel:`Created`});return}if(r[`query-id`]===void 0&&(r[`query-id`]=await p(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),r[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(r[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let m=d({chart:r.chart,chartType:f(r[`chart-type`],`chart-type`,`text`),compare:r.compare,distributionScale:f(r[`distribution-scale`],`distribution-scale`,`text`),dry:r.dry,granularity:r.granularity,ignoreSeries:r[`ignore-series`],limit:r.limit,offset:f(r.offset,`offset`,`text`),offsetBy:r[`offset-by`],offsetDirection:f(r[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:r[`parameters-datasets`],filterCombination:f(r[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:r[`parameters-limit`],needle:{isRegex:r[`parameters-needle-is-regex`],matchCase:r[`parameters-needle-match-case`]},orderBy:{order:f(r[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:f(r[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:f(r[`query-id`],`query-id`,`text`),timeframe:{from:r[`timeframe-from`],to:r[`timeframe-to`]},view:f(r.view,`view`,`text`)});a(await s(`Creating`,async()=>c.observability.sharedQueries.create({...m,account_id:u})),{successLabel:`Created`})})};function ve(e){return e.positional(`id`,{type:`string`,description:`Specify the ID of the shared query.`,demandOption:!0}).option(`view`,{type:`string`,description:`Select the view of the query result to return, defaults to events.`,choices:[`events`,`invocations`,`calculations`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`get <id>`,describe:`Shared queries store the results of a previously run query, allowing you to share the results with others.`,builder:g(ve),handler:async r=>c({command:`observability shared-queries get`,classification:{safeFlags:[`view`,`dry-run`]}},r,async()=>{let c={view:r.view};if(r.dryRun){o({command:`cf observability shared-queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/shared/query/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.observability.sharedQueries.get({account_id:u,id:r.id,...c})),{successLabel:`Loaded`})})},be={command:`shared-queries`,describe:`Operations for shared-queries`,builder:e=>e.command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xe(e){return e.option(`datasets`,{type:`string`,array:!0,description:`Leave this empty to use the default datasets`}).option(`filters`,{type:`string`,description:`Apply filters to narrow key discovery. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`number`,description:`The from field`}).option(`key-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`key-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`limit`,{type:`number`,description:`Advanced usage: set limit=1000+ to retrieve comprehensive key options without needing additional filtering.`}).option(`needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`to`,{type:`number`,description:`The to field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Find keys in your telemetry events matching a specific filter or needle.`})}const Se={command:`keys`,describe:`List all the keys in your telemetry events.`,builder:xe,handler:async r=>c({command:`observability telemetry keys`,classification:{safeFlags:[`key-needle-is-regex`,`key-needle-match-case`,`needle-is-regex`,`needle-match-case`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability telemetry keys`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/telemetry/keys`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({datasets:r.datasets,filters:u(r.filters,`filters`),from:r.from,keyNeedle:{isRegex:r[`key-needle-is-regex`],matchCase:r[`key-needle-match-case`]},limit:r.limit,needle:{isRegex:r[`needle-is-regex`],matchCase:r[`needle-match-case`]},to:r.to}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.observability.telemetry.keys({...e,account_id:f})),{successLabel:`Created`});return}let p=d({datasets:r.datasets,filters:u(r.filters,`filters`),from:r.from,keyNeedle:{isRegex:r[`key-needle-is-regex`],matchCase:r[`key-needle-match-case`]},limit:r.limit,needle:{isRegex:r[`needle-is-regex`],matchCase:r[`needle-match-case`]},to:r.to});a(await s(`Creating`,async()=>c.observability.telemetry.keys({...p,account_id:f})),{successLabel:`Created`})})};function Ce(e){return e.option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`chart-type`,{type:`string`,description:`Controls the SQL shape and response payload for the 'calculations' view. Omitted or 'timeseries_and_aggregate': current behaviour — both the time-series and aggregate queries. 'timeseries': time-series only. 'aggregate': aggregate only. 'distribution': a bucketed 2D histogram (time × value buckets) returned in 'distribution' instead of 'calculations'. 'distribution' is not compatible with 'compare' — combining them returns a 400.`,choices:[`timeseries_and_aggregate`,`timeseries`,`aggregate`,`distribution`]}).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).option(`dry`,{type:`boolean`,description:`When true, executes the query without persisting the results. Useful for validation or previewing.`,default:!1}).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query your observability events, requests, and traces to build visualizations and identify insights.`}).check(e=>{if([`parameters-datasets`,`parameters-filter-combination`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const we={command:`query`,describe:`Run a temporary or saved query.`,builder:Ce,handler:async r=>c({command:`observability telemetry query`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`dry`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability telemetry query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/telemetry/query`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({chart:r.chart,chartType:f(r[`chart-type`],`chart-type`,`text`),compare:r.compare,distributionScale:f(r[`distribution-scale`],`distribution-scale`,`text`),dry:r.dry,granularity:r.granularity,ignoreSeries:r[`ignore-series`],limit:r.limit,offset:f(r.offset,`offset`,`text`),offsetBy:r[`offset-by`],offsetDirection:f(r[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:r[`parameters-datasets`],filterCombination:f(r[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:r[`parameters-limit`],needle:{isRegex:r[`parameters-needle-is-regex`],matchCase:r[`parameters-needle-match-case`]},orderBy:{order:f(r[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:f(r[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:f(r[`query-id`],`query-id`,`text`),timeframe:{from:r[`timeframe-from`],to:r[`timeframe-to`]},view:f(r.view,`view`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Loading`,async()=>c.observability.telemetry.query({...e,account_id:u})),{successLabel:`Loaded`});return}if(r[`query-id`]===void 0&&(r[`query-id`]=await p(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),r[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(r[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let m=d({chart:r.chart,chartType:f(r[`chart-type`],`chart-type`,`text`),compare:r.compare,distributionScale:f(r[`distribution-scale`],`distribution-scale`,`text`),dry:r.dry,granularity:r.granularity,ignoreSeries:r[`ignore-series`],limit:r.limit,offset:f(r.offset,`offset`,`text`),offsetBy:r[`offset-by`],offsetDirection:f(r[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:r[`parameters-datasets`],filterCombination:f(r[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:r[`parameters-limit`],needle:{isRegex:r[`parameters-needle-is-regex`],matchCase:r[`parameters-needle-match-case`]},orderBy:{order:f(r[`parameters-order-by-order`],`parameters-order-by-order`,`text`),value:f(r[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:f(r[`query-id`],`query-id`,`text`),timeframe:{from:r[`timeframe-from`],to:r[`timeframe-to`]},view:f(r.view,`view`,`text`)});a(await s(`Loading`,async()=>c.observability.telemetry.query({...m,account_id:u})),{successLabel:`Loaded`})})};function Te(e){return e.option(`datasets`,{type:`string`,array:!0,description:`Leave this empty to use the default datasets`}).option(`filters`,{type:`string`,description:`Apply filters before listing values. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`key`,{type:`string`,description:`The key field`}).option(`limit`,{type:`number`,description:`The limit field`,default:50}).option(`needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`timeframe-from`,{type:`number`,description:`The timeframe.from field`}).option(`timeframe-to`,{type:`number`,description:`The timeframe.to field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`string`,`boolean`,`number`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Retrieve values from your telemetry events.`})}const Ee={command:`values`,describe:`List unique values found in your events.`,builder:Te,handler:async r=>c({command:`observability telemetry values`,classification:{safeFlags:[`needle-is-regex`,`needle-match-case`,`type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf observability telemetry values`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/observability/telemetry/values`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({datasets:r.datasets,filters:u(r.filters,`filters`),key:f(r.key,`key`,`text`),limit:r.limit,needle:{isRegex:r[`needle-is-regex`],matchCase:r[`needle-match-case`]},timeframe:{from:r[`timeframe-from`],to:r[`timeframe-to`]},type:f(r.type,`type`,`text`)}):l(r.body)});return}let c=await i(r),h=r.local?e:await t();if(r.accountId=h,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.observability.telemetry.values({...e,account_id:h})),{successLabel:`Created`});return}if(r.datasets===void 0)throw Error(`--datasets is required (or pass --body with this field set).`);if(r.key===void 0&&(r.key=await p(`key`,`The key field`)),r[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(r[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);r.type===void 0&&(r.type=await m(`type`,`The type field`,[`string`,`boolean`,`number`]));let g=d({datasets:r.datasets,filters:u(r.filters,`filters`),key:f(r.key,`key`,`text`),limit:r.limit,needle:{isRegex:r[`needle-is-regex`],matchCase:r[`needle-match-case`]},timeframe:{from:r[`timeframe-from`],to:r[`timeframe-to`]},type:f(r.type,`type`,`text`)});a(await s(`Creating`,async()=>c.observability.telemetry.values({...g,account_id:h})),{successLabel:`Created`})})},De={command:`telemetry`,describe:`Operations for telemetry`,builder:e=>e.command(Se).command(we).command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Oe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ke={command:`delete`,describe:`Delete every sampling override from a zone's managed Cloudflare Traces ruleset.`,builder:Oe,handler:async e=>c({command:`observability tracing rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf observability tracing rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
9
+ `);return}a(await s(`Deleting`,async()=>t.observability.tracing.rules.delete({zone_id:n})),{successLabel:`Deleted`})})};function Ae(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`get`,describe:`Retrieve the ordered sampling overrides for a zone's managed Cloudflare Traces ruleset.`,builder:Ae,handler:async e=>c({command:`observability tracing rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf observability tracing rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.observability.tracing.rules.get({zone_id:n})),{successLabel:`Loaded`})})};function Me(e){return e.option(`rules`,{type:`string`,description:`Trace rules in evaluation order. 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:`Replace the ordered trace rules`})}const Ne={command:`update`,describe:`Replace all sampling overrides in a zone's managed Cloudflare Traces ruleset. Rules are evaluated in the supplied order.`,builder:Me,handler:async e=>c({command:`observability tracing rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf observability tracing rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({rules:u(e.rules,`rules`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.observability.tracing.rules.update({...r,zone_id:n})),{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let c=d({rules:u(e.rules,`rules`)});a(await s(`Updating`,async()=>t.observability.tracing.rules.update({...c,zone_id:n})),{successLabel:`Updated`})})},Pe={command:`rules`,describe:`Operations for tracing.rules`,builder:e=>e.command(ke).command(je).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function $(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Fe={command:`delete`,describe:`Reset the zone-level Cloudflare Traces settings to their defaults while preserving the sampling rules.`,builder:$,handler:async e=>c({command:`observability tracing settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf observability tracing settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
10
+ `);return}a(await s(`Deleting`,async()=>t.observability.tracing.settings.delete({zone_id:n})),{successLabel:`Deleted`})})};function Ie(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`get`,describe:`Retrieve the zone-level Cloudflare Traces settings.`,builder:Ie,handler:async e=>c({command:`observability tracing settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf observability tracing settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.observability.tracing.settings.get({zone_id:n})),{successLabel:`Loaded`})})};function Re(e){return e.option(`destinations`,{type:`string`,array:!0,description:`Up to 100 OpenTelemetry destination identifiers that receive traces.`}).option(`enabled`,{type:`boolean`,description:`Whether Cloudflare Traces is enabled for the zone.`}).option(`forward-context`,{type:`boolean`,description:`Whether trace context is sent externally or across a zone boundary.`}).option(`persist`,{type:`boolean`,description:`Whether traces are persisted in Cloudflare.`}).option(`propagation-policy`,{type:`string`,description:`When inbound trace context may be continued. Authenticated propagation is not supported yet.`,choices:[`accept`,`authenticated`,`reject`]}).option(`sampling-ratio`,{type:`number`,description:`The ratio of requests sampled for tracing, from 0 to 1.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update zone tracing settings`})}const ze={command:`update`,describe:`Update the zone-level Cloudflare Traces settings.`,builder:Re,handler:async e=>c({command:`observability tracing settings update`,classification:{safeFlags:[`enabled`,`forward-context`,`persist`,`propagation-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf observability tracing settings update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({destinations:e.destinations,enabled:e.enabled,forward_context:e[`forward-context`],persist:e.persist,propagation_policy:f(e[`propagation-policy`],`propagation-policy`,`text`),sampling_ratio:e[`sampling-ratio`]}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.observability.tracing.settings.update({...r,zone_id:n})),{successLabel:`Updated`});return}let c=d({destinations:e.destinations,enabled:e.enabled,forward_context:e[`forward-context`],persist:e.persist,propagation_policy:f(e[`propagation-policy`],`propagation-policy`,`text`),sampling_ratio:e[`sampling-ratio`]});a(await s(`Updating`,async()=>t.observability.tracing.settings.update({...c,zone_id:n})),{successLabel:`Updated`})})},Be={command:`settings`,describe:`Operations for tracing.settings`,builder:e=>e.command(Fe).command(Le).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ve={command:`tracing`,describe:`Operations for tracing`,builder:e=>e.command(Pe).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},He={command:`observability`,describe:`observability`,builder:e=>e.command(C).command(ie).command(he).command(be).command(De).command(Ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{He as default};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./chunk-Q72B4Q5Z-DVMMVVEs.mjs";import t from"node:fs";import{promisify as n}from"node:util";import r from"node:path";import i from"node:os";import a from"node:process";import{fileURLToPath as o}from"node:url";import{Buffer as s}from"node:buffer";import c,{constants as l}from"node:fs/promises";import u,{execFile as d}from"node:child_process";var f;function p(){try{return t.statSync(`/.dockerenv`),!0}catch{return!1}}e(p,`hasDockerEnv`);function m(){try{return t.readFileSync(`/proc/self/cgroup`,`utf8`).includes(`docker`)}catch{return!1}}e(m,`hasDockerCGroup`);function h(){return f===void 0&&(f=p()||m()),f}e(h,`isDocker`);var g,_=e(()=>{try{return t.statSync(`/run/.containerenv`),!0}catch{return!1}},`hasContainerEnv`);function v(){return g===void 0&&(g=_()||h()),g}e(v,`isInsideContainer`);var y=e(()=>{if(a.platform!==`linux`)return!1;if(i.release().toLowerCase().includes(`microsoft`))return!v();try{return t.readFileSync(`/proc/version`,`utf8`).toLowerCase().includes(`microsoft`)?!v():!1}catch{return!1}},`isWsl`),b=a.env.__IS_WSL_TEST__?y:y(),ee=n(u.execFile),x=e(()=>`${a.env.SYSTEMROOT||a.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`,`powerShellPath`),S=e(async(e,t={})=>{let{powerShellPath:n,...r}=t,i=S.encodeCommand(e);return ee(n??x(),[...S.argumentsPrefix,i],{encoding:`utf8`,...r})},`executePowerShell`);S.argumentsPrefix=[`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Bypass`,`-EncodedCommand`],S.encodeCommand=e=>s.from(e,`utf16le`).toString(`base64`),S.escapeArgument=e=>`'${String(e).replaceAll(`'`,`''`)}'`;function C(e){for(let t of e.split(`
2
+ import{r as e}from"./chunk-Q72B4Q5Z-CPy_WJKU.mjs";import t from"node:fs";import{promisify as n}from"node:util";import r from"node:path";import i from"node:os";import a from"node:process";import{fileURLToPath as o}from"node:url";import{Buffer as s}from"node:buffer";import c,{constants as l}from"node:fs/promises";import u,{execFile as d}from"node:child_process";var f;function p(){try{return t.statSync(`/.dockerenv`),!0}catch{return!1}}e(p,`hasDockerEnv`);function m(){try{return t.readFileSync(`/proc/self/cgroup`,`utf8`).includes(`docker`)}catch{return!1}}e(m,`hasDockerCGroup`);function h(){return f===void 0&&(f=p()||m()),f}e(h,`isDocker`);var g,_=e(()=>{try{return t.statSync(`/run/.containerenv`),!0}catch{return!1}},`hasContainerEnv`);function v(){return g===void 0&&(g=_()||h()),g}e(v,`isInsideContainer`);var y=e(()=>{if(a.platform!==`linux`)return!1;if(i.release().toLowerCase().includes(`microsoft`))return!v();try{return t.readFileSync(`/proc/version`,`utf8`).toLowerCase().includes(`microsoft`)?!v():!1}catch{return!1}},`isWsl`),b=a.env.__IS_WSL_TEST__?y:y(),ee=n(u.execFile),x=e(()=>`${a.env.SYSTEMROOT||a.env.windir||String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`,`powerShellPath`),S=e(async(e,t={})=>{let{powerShellPath:n,...r}=t,i=S.encodeCommand(e);return ee(n??x(),[...S.argumentsPrefix,i],{encoding:`utf8`,...r})},`executePowerShell`);S.argumentsPrefix=[`-NoProfile`,`-NonInteractive`,`-ExecutionPolicy`,`Bypass`,`-EncodedCommand`],S.encodeCommand=e=>s.from(e,`utf16le`).toString(`base64`),S.escapeArgument=e=>`'${String(e).replaceAll(`'`,`''`)}'`;function C(e){for(let t of e.split(`
3
3
  `)){if(/^\s*#/.test(t))continue;let e=/^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(t);if(e)return e.groups.mountPoint.trim().replaceAll(/^["']|["']$/g,``)}}e(C,`parseMountPointFromConfig`);var te=n(u.execFile),ne=(()=>{let e=`/mnt/`,t;return async function(){if(t)return t;let n=`/etc/wsl.conf`,r=!1;try{await c.access(n,l.F_OK),r=!0}catch{}if(!r)return e;let i=C(await c.readFile(n,{encoding:`utf8`}));return i===void 0?e:(t=i,t=t.endsWith(`/`)?t:`${t}/`,t)}})(),w=b?e(async()=>`${await ne()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`,`powerShellPathFromWsl`):x,T,E=e(async()=>(T??=(async()=>{try{let e=await w();return await c.access(e,l.X_OK),!0}catch{return!1}})(),T),`canAccessPowerShell`),D=e(async()=>{let e=await w(),{stdout:t}=await S(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`,{powerShellPath:e});return t.trim()},`wslDefaultBrowser`),O=e(async e=>{if(/^[a-z]+:\/\//i.test(e))return e;try{let{stdout:t}=await te(`wslpath`,[`-aw`,e],{encoding:`utf8`});return t.trim()}catch{return e}},`convertWslPathToWindows`);function k(t,n,r){let i=e(e=>Object.defineProperty(t,n,{value:e,enumerable:!0,writable:!0}),`define`);return Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){let e=r();return i(e),e},set(e){i(e)}}),t}e(k,`defineLazyProperty`);var A=n(d);async function j(){if(a.platform!==`darwin`)throw Error(`macOS only`);let{stdout:e}=await A(`defaults`,[`read`,`com.apple.LaunchServices/com.apple.launchservices.secure`,`LSHandlers`]),t=/LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(e)?.groups.id??`com.apple.Safari`;return t===`com.apple.safari`?`com.apple.Safari`:t}e(j,`defaultBrowserId`);var M=n(d);async function N(e,{humanReadableOutput:t=!0,signal:n}={}){if(a.platform!==`darwin`)throw Error(`macOS only`);let r=t?[]:[`-ss`],i={};n&&(i.signal=n);let{stdout:o}=await M(`osascript`,[`-e`,e,r],i);return o.trim()}e(N,`runAppleScript`);async function P(e){return N(`tell application "Finder" to set app_path to application file id "${e}" as string
4
4
  tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`)}e(P,`bundleName`);var F=n(d),I={MSEdgeHTM:{name:`Edge`,id:`com.microsoft.edge`},MSEdgeBHTML:{name:`Edge Beta`,id:`com.microsoft.edge.beta`},MSEdgeDHTML:{name:`Edge Dev`,id:`com.microsoft.edge.dev`},AppXq0fevzme2pys62n3e0fbqa7peapykr8v:{name:`Edge`,id:`com.microsoft.edge.old`},ChromeHTML:{name:`Chrome`,id:`com.google.chrome`},ChromeBHTML:{name:`Chrome Beta`,id:`com.google.chrome.beta`},ChromeDHTML:{name:`Chrome Dev`,id:`com.google.chrome.dev`},ChromiumHTM:{name:`Chromium`,id:`org.chromium.Chromium`},BraveHTML:{name:`Brave`,id:`com.brave.Browser`},BraveBHTML:{name:`Brave Beta`,id:`com.brave.Browser.beta`},BraveDHTML:{name:`Brave Dev`,id:`com.brave.Browser.dev`},BraveSSHTM:{name:`Brave Nightly`,id:`com.brave.Browser.nightly`},FirefoxURL:{name:`Firefox`,id:`org.mozilla.firefox`},OperaStable:{name:`Opera`,id:`com.operasoftware.Opera`},VivaldiHTM:{name:`Vivaldi`,id:`com.vivaldi.Vivaldi`},"IE.HTTP":{name:`Internet Explorer`,id:`com.microsoft.ie`}},L=new Map(Object.entries(I)),R=class extends Error{static{e(this,`UnknownBrowserError`)}};async function z(e=F){let{stdout:t}=await e(`reg`,[`QUERY`,` HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice`,`/v`,`ProgId`]),n=/ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(t);if(!n)throw new R(`Cannot find Windows browser in stdout: ${JSON.stringify(t)}`);let{id:r}=n.groups,i=I[r];if(!i)throw new R(`Unknown browser ID: ${r}`);return i}e(z,`defaultBrowser`);var B=n(d),V=e(e=>e.toLowerCase().replaceAll(/(?:^|\s|-)\S/g,e=>e.toUpperCase()),`titleize`);async function H(){if(a.platform===`darwin`){let e=await j();return{name:await P(e),id:e}}if(a.platform===`linux`){let{stdout:e}=await B(`xdg-mime`,[`query`,`default`,`x-scheme-handler/http`]),t=e.trim();return{name:V(t.replace(/.desktop$/,``).replace(`-`,` `)),id:t}}if(a.platform===`win32`)return z();throw Error(`Only macOS, Linux, and Windows are supported`)}e(H,`defaultBrowser`);var U=!!(a.env.SSH_CONNECTION||a.env.SSH_CLIENT||a.env.SSH_TTY),W=Symbol(`fallbackAttempt`),G=import.meta.url?r.dirname(o(import.meta.url)):``,K=r.join(G,`xdg-open`),{platform:q,arch:J}=a,Y=e(async(e,t)=>{if(e.length===0)return;let n=[];for(let r of e)try{return await t(r)}catch(e){n.push(e)}throw AggregateError(n,`Failed to open in all supported apps`)},`tryEachApp`),X=e(async e=>{e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e};let t=e[W]===!0;if(delete e[W],Array.isArray(e.app))return Y(e.app,t=>X({...e,app:t,[W]:!0}));let{name:n,arguments:r=[]}=e.app??{};if(r=[...r],Array.isArray(n))return Y(n,t=>X({...e,app:{name:t,arguments:r},[W]:!0}));if(n===`browser`||n===`browserPrivate`){let t={"com.google.chrome":`chrome`,"google-chrome.desktop":`chrome`,"com.brave.browser":`brave`,"org.mozilla.firefox":`firefox`,"firefox.desktop":`firefox`,"com.microsoft.msedge":`edge`,"com.microsoft.edge":`edge`,"com.microsoft.edgemac":`edge`,"microsoft-edge.desktop":`edge`,"com.apple.safari":`safari`},i={chrome:`--incognito`,brave:`--incognito`,firefox:`--private-window`,edge:`--inPrivate`},a;if(b){let e=await D();a=L.get(e)??{}}else a=await H();if(a.id in t){let o=t[a.id.toLowerCase()];if(n===`browserPrivate`){if(o===`safari`)throw Error(`Safari doesn't support opening in private mode via command line`);r.push(i[o])}return X({...e,app:{name:$[o],arguments:r}})}throw Error(`${a.name} is not supported as a default browser`)}let i,o=[],s={},d=!1;if(b&&!v()&&!U&&!n&&(d=await E()),q===`darwin`)i=`open`,e.wait&&o.push(`--wait-apps`),e.background&&o.push(`--background`),e.newInstance&&o.push(`--new`),n&&o.push(`-a`,n);else if(q===`win32`||d){i=await w(),o.push(...S.argumentsPrefix),b||(s.windowsVerbatimArguments=!0),b&&e.target&&(e.target=await O(e.target));let t=[`$ProgressPreference = 'SilentlyContinue';`,`Start`];e.wait&&t.push(`-Wait`),n?(t.push(S.escapeArgument(n)),e.target&&r.push(e.target)):e.target&&t.push(S.escapeArgument(e.target)),r.length>0&&(r=r.map(e=>S.escapeArgument(e)),t.push(`-ArgumentList`,r.join(`,`))),e.target=S.encodeCommand(t.join(` `)),e.wait||(s.stdio=`ignore`)}else{if(n)i=n;else{let e=!G||G===`/`,t=!1;try{await c.access(K,l.X_OK),t=!0}catch{}i=a.versions.electron??(q===`android`||e||!t)?`xdg-open`:K}r.length>0&&o.push(...r),e.wait||(s.stdio=`ignore`,s.detached=!0)}q===`darwin`&&r.length>0&&o.push(`--args`,...r),e.target&&o.push(e.target);let f=u.spawn(i,o,s);return e.wait?new Promise((t,n)=>{f.once(`error`,n),f.once(`close`,r=>{if(!e.allowNonzeroExitCode&&r!==0){n(Error(`Exited with code ${r}`));return}t(f)})}):t?new Promise((e,t)=>{f.once(`error`,t),f.once(`spawn`,()=>{f.once(`close`,n=>{if(f.off(`error`,t),n!==0){t(Error(`Exited with code ${n}`));return}f.unref(),e(f)})})}):(f.unref(),new Promise((e,t)=>{f.once(`error`,t),f.once(`spawn`,()=>{f.off(`error`,t),e(f)})}))},`baseOpen`),re=e((e,t)=>{if(typeof e!=`string`)throw TypeError("Expected a `target`");return X({...t,target:e})},`open`);function Z(e){if(typeof e==`string`||Array.isArray(e))return e;let{[J]:t}=e;if(!t)throw Error(`${J} is not supported`);return t}e(Z,`detectArchBinary`);function Q({[q]:e},{wsl:t}={}){if(t&&b)return Z(t);if(!e)throw Error(`${q} is not supported`);return Z(e)}e(Q,`detectPlatformBinary`);var $={browser:`browser`,browserPrivate:`browserPrivate`};k($,`chrome`,()=>Q({darwin:`google chrome`,win32:`chrome`,linux:[`google-chrome`,`google-chrome-stable`,`chromium`,`chromium-browser`]},{wsl:{ia32:`/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`,x64:[`/mnt/c/Program Files/Google/Chrome/Application/chrome.exe`,`/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe`]}})),k($,`brave`,()=>Q({darwin:`brave browser`,win32:`brave`,linux:[`brave-browser`,`brave`]},{wsl:{ia32:`/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe`,x64:[`/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe`,`/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe`]}})),k($,`firefox`,()=>Q({darwin:`firefox`,win32:String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,linux:`firefox`},{wsl:`/mnt/c/Program Files/Mozilla Firefox/firefox.exe`})),k($,`edge`,()=>Q({darwin:`microsoft edge`,win32:`msedge`,linux:[`microsoft-edge`,`microsoft-edge-dev`]},{wsl:`/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe`})),k($,`safari`,()=>Q({darwin:`Safari`}));var ie=re;export{ie as default};
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./auth-tvDdC1J-.mjs";import{t}from"./output-COcSQsfn.mjs";import{t as n}from"./dry-run-DiVy1lVo.mjs";import{t as r}from"./progress-V6SZV3Ux.mjs";import{t as i}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as a,r as o,t as s}from"./body-parser-DIlfApuJ.mjs";import{n as c}from"./input-validation-BxchZ9jE.mjs";import{a as l,i as u,n as d}from"./prompt-DjRTpML4.mjs";import{t as f}from"./cli-types-CrSoSMPF.mjs";function p(e){return e.option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname is equal to
3
+ a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
4
+ a particular string.`}).option(`account-pubname-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname ends with
5
+ a particular string.`}).option(`account-pubname-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname contains
6
+ a particular string.`}).option(`name`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name is equal to a
7
+ particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name starts with a
8
+ particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name ends with a particular
9
+ string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the name contains a particular
10
+ string.`}).option(`order-by`,{type:`string`,description:"Field to order results by. Currently supported values: `account_name`.\nWhen not specified, results are ordered by internal account ID.",choices:[`account_name`]}).option(`direction`,{type:`string`,description:"Sort direction for the order_by field. Valid values: `asc`, `desc`.\nDefaults to `asc` when order_by is specified.",choices:[`asc`,`desc`]}).option(`include-tags`,{type:`boolean`,description:`Include Account tags from the resource tag mirror. Omit this parameter to preserve the existing Account response shape.`}).option(`include-total`,{type:`boolean`,description:`Whether to calculate and return the exact result_info.total_size for cursor
11
+ pagination. Defaults to true. When false, total_size is omitted. page_size and
12
+ include_total may change between pages; next_page_token remains the authoritative
13
+ continuation signal.
14
+ Legacy page/per_page requests always calculate total_count.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
15
+ provided will retrieve the next page.
16
+
17
+ Parameters used to filter the retrieved list must remain in subsequent
18
+ requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`Retrieve a list of accounts that belong to a specific organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:f(p),handler:async a=>i({command:`organization account list`,classification:{safeFlags:[`order-by`,`direction`,`include-tags`,`include-total`,`dry-run`]}},a,async()=>{let i={account_pubname:a[`account-pubname`],"account_pubname.startsWith":a[`account-pubname-starts-with`],"account_pubname.endsWith":a[`account-pubname-ends-with`],"account_pubname.contains":a[`account-pubname-contains`],name:a.name,"name.startsWith":a[`name-starts-with`],"name.endsWith":a[`name-ends-with`],"name.contains":a[`name-contains`],order_by:a[`order-by`],direction:a.direction,include_tags:a[`include-tags`],include_total:a[`include-total`],page_token:a[`page-token`],page_size:a[`page-size`]};if(a.dryRun){n({command:`cf organization account list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/accounts`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organization.account.list({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})},h={command:`account`,describe:`Operations for account`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.option(`name`,{type:`string`,description:`The name field`}).option(`parent-id`,{type:`string`,description:`The parent.id field`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`References an Organization in the Cloudflare data model.`}).check(e=>{if([`parent-id`].some(t=>e[t]!==void 0)){let t=[`parent-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parent-* flag is set`)}return!0}).check(e=>{if([`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].some(t=>e[t]!==void 0)){let t=[`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --profile-* flag is set`)}return!0})}const _={command:`create`,describe:`Create a new organization for a user. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:g,handler:async o=>i({command:`organization create`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf organization create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},bodyKind:`json`,body:o.body===void 0?s({name:c(o.name,`name`,`text`),parent:{id:c(o[`parent-id`],`parent-id`,`text`)},profile:{business_address:c(o[`profile-business-address`],`profile-business-address`,`text`),business_email:c(o[`profile-business-email`],`profile-business-email`,`text`),business_name:c(o[`profile-business-name`],`profile-business-name`,`text`),business_phone:c(o[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:c(o[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):a(o.body)});return}let i=await e(o);if(o.body){let e=a(o.body);t(await r(`Creating`,async()=>i.organization.create({...e})),{successLabel:`Created`});return}o.name===void 0&&(o.name=await l(`name`,`The name field`));let u=s({name:c(o.name,`name`,`text`),parent:{id:c(o[`parent-id`],`parent-id`,`text`)},profile:{business_address:c(o[`profile-business-address`],`profile-business-address`,`text`),business_email:c(o[`profile-business-email`],`profile-business-email`,`text`),business_name:c(o[`profile-business-name`],`profile-business-name`,`text`),business_phone:c(o[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:c(o[`profile-external-metadata`],`profile-external-metadata`,`text`)}});t(await r(`Creating`,async()=>i.organization.create({...u})),{successLabel:`Created`})})};function v(e){return e.positional(`organization-id`,{type:`string`,description:`The ID of the organization to delete.`,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 <organization-id>`,describe:`Delete an organization. The organization MUST be empty before deleting. It must not contain any sub-organizations, accounts, members or users. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/) **Access Control:** Restricted to enterprise organizations.`,builder:v,handler:async a=>i({command:`organization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},a,async()=>{if(a.dryRun){n({command:`cf organization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}`,pathParams:{"organization-id":String(a[`organization-id`]??``)},bodyKind:`none`});return}let i=await e(a);if(!await d({force:!!a.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
19
+ `);return}t(await r(`Deleting`,async()=>i.organization.delete({organization_id:a[`organization-id`]})),{successLabel:`Deleted`})})};function b(e){return e.positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <organization-id>`,describe:`Retrieve the details of a certain organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:b,handler:async a=>i({command:`organization get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf organization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}`,pathParams:{"organization-id":String(a[`organization-id`]??``)},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.organization.get({organization_id:a[`organization-id`]})),{successLabel:`Loaded`})})};function S(e){return e.positional(`member-code`,{type:`string`,description:`The invitation code to accept or reject.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The ID of the organization associated with the invitation.`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`accept`,`reject`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"The invitation action. Use `accept` to join the organization or `reject` to decline the invitation."})}const C={command:`update <member-code>`,describe:`Accept or reject an invitation to a specific organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:S,handler:async o=>i({command:`organization invite update`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf organization invite update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${o[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(o[`organization-id`]))}/invites/${o[`member-code`]==null?`<member-code>`:encodeURIComponent(String(o[`member-code`]))}`,pathParams:{"organization-id":String(o[`organization-id`]??``),"member-code":String(o[`member-code`]??``)},bodyKind:`json`,body:o.body===void 0?s({status:c(o.status,`status`,`text`)}):a(o.body)});return}let i=await e(o);if(o.body){let e=a(o.body);t(await r(`Updating`,async()=>i.organization.invite.update({...e,organization_id:o[`organization-id`],member_code:o[`member-code`]})),{successLabel:`Updated`});return}o.status===void 0&&(o.status=await u(`status`,`The status field`,[`accept`,`reject`]));let l=s({status:c(o.status,`status`,`text`)});t(await r(`Updating`,async()=>i.organization.invite.update({...l,organization_id:o[`organization-id`],member_code:o[`member-code`]})),{successLabel:`Updated`})})},w={command:`invite`,describe:`Operations for invite`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.option(`id`,{type:`string`,description:`Only return organizations with the specified IDs (ex. id=foo&id=bar). Send multiple elements
20
+ by repeating the query value.`}).option(`name`,{type:`string`,description:`(case-sensitive) Filter the list of organizations to where the name is equal to a
21
+ particular string.`}).option(`name-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name starts with a
22
+ particular string.`}).option(`name-ends-with`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name ends with a particular
23
+ string.`}).option(`name-contains`,{type:`string`,description:`(case-insensitive) Filter the list of organizations to where the name contains a particular
24
+ string.`}).option(`containing-account`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
25
+ account.`}).option(`containing-user`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
26
+ user.
27
+
28
+ IMPORTANT: Just because an organization "contains" a user is not a
29
+ representation of any authorization or privilege to manage any resources
30
+ therein. An organization "containing" a user simply means the user is managed by
31
+ that organization.`}).option(`containing-organization`,{type:`string`,description:`Filter the list of organizations to the ones that contain this particular
32
+ organization.`}).option(`parent-id`,{type:`string`,description:`Filter the list of organizations to the ones that are a sub-organization
33
+ of the specified organization.
34
+
35
+ "null" is a valid value to provide for this parameter. It means "where
36
+ an organization has no parent (i.e. it is a 'root' organization)."`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
37
+ provided will retrieve the next page.
38
+
39
+ Parameters used to filter the retrieved list must remain in subsequent
40
+ requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`Retrieve a list of organizations a particular user has access to. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:f(T),handler:async a=>i({command:`organization list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={id:a.id,name:a.name,"name.startsWith":a[`name-starts-with`],"name.endsWith":a[`name-ends-with`],"name.contains":a[`name-contains`],"containing.account":a[`containing-account`],"containing.user":a[`containing-user`],"containing.organization":a[`containing-organization`],"parent.id":a[`parent-id`],page_token:a[`page-token`],page_size:a[`page-size`]};if(a.dryRun){n({command:`cf organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations`,pathParams:{},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organization.list(i)),{successLabel:`Loaded`})})};function D(e){return e.positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`members`,{type:`string`,description:`The members 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 O={command:`create <organization-id>`,describe:`Batch create multiple memberships that grant access to a specific Organization.`,builder:D,handler:async c=>i({command:`organization member batch create`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){n({command:`cf organization member batch create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${c[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(c[`organization-id`]))}/members:batchCreate`,pathParams:{"organization-id":String(c[`organization-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({members:o(c.members,`members`)}):a(c.body)});return}let i=await e(c);if(c.body){let e=a(c.body);t(await r(`Creating`,async()=>i.organization.member.batch.create({...e,organization_id:c[`organization-id`]})),{successLabel:`Created`});return}if(c.members===void 0)throw Error(`--members is required (or pass --body with this field set).`);let l=s({members:o(c.members,`members`)});t(await r(`Creating`,async()=>i.organization.member.batch.create({...l,organization_id:c[`organization-id`]})),{successLabel:`Created`})})},k={command:`batch`,describe:`Operations for member.batch`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`member-status`,{type:`string`,description:`The member.status field`,choices:[`active`,`canceled`]}).option(`member-user-email`,{type:`string`,description:`The member.user.email field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`create <organization-id>`,describe:`Create a membership that grants access to a specific Organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:A,handler:async o=>i({command:`organization member create`,classification:{safeFlags:[`member-status`,`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf organization member create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/organizations/${o[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(o[`organization-id`]))}/members`,pathParams:{"organization-id":String(o[`organization-id`]??``)},bodyKind:`json`,body:o.body===void 0?s({member:{status:c(o[`member-status`],`member-status`,`text`),user:{email:c(o[`member-user-email`],`member-user-email`,`text`)}}}):a(o.body)});return}let i=await e(o);if(o.body){let e=a(o.body);t(await r(`Creating`,async()=>i.organization.member.create({...e,organization_id:o[`organization-id`]})),{successLabel:`Created`});return}o[`member-user-email`]===void 0&&(o[`member-user-email`]=await l(`member-user-email`,`The member.user.email field`));let u=s({member:{status:c(o[`member-status`],`member-status`,`text`),user:{email:c(o[`member-user-email`],`member-user-email`,`text`)}}});t(await r(`Creating`,async()=>i.organization.member.create({...u,organization_id:o[`organization-id`]})),{successLabel:`Created`})})};function M(e){return e.positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const N={command:`delete <member-id>`,describe:`Delete a membership to a particular Organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:M,handler:async a=>i({command:`organization member delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},a,async()=>{if(a.dryRun){n({command:`cf organization member delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/members/${a[`member-id`]==null?`<member-id>`:encodeURIComponent(String(a[`member-id`]))}`,pathParams:{"organization-id":String(a[`organization-id`]??``),"member-id":String(a[`member-id`]??``)},bodyKind:`none`});return}let i=await e(a);if(!await d({force:!!a.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
41
+ `);return}t(await r(`Deleting`,async()=>i.organization.member.delete({organization_id:a[`organization-id`],member_id:a[`member-id`]})),{successLabel:`Deleted`})})};function P(e){return e.positional(`member-id`,{type:`string`,description:`Organization Member ID`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <member-id>`,describe:`Retrieve a single membership from an Organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:P,handler:async a=>i({command:`organization member get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf organization member get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/members/${a[`member-id`]==null?`<member-id>`:encodeURIComponent(String(a[`member-id`]))}`,pathParams:{"organization-id":String(a[`organization-id`]??``),"member-id":String(a[`member-id`]??``)},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.organization.member.get({organization_id:a[`organization-id`],member_id:a[`member-id`]})),{successLabel:`Loaded`})})};function I(e){return e.option(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter the list of memberships by membership status.`}).option(`user-email`,{type:`string`,description:`Filter the list of memberships for a specific email.`}).option(`user-email-contains`,{type:`string`,description:`Filter the list of memberships for a specific email that contains a substring.`}).option(`user-email-starts-with`,{type:`string`,description:`Filter the list of memberships for a specific email that starts with a substring.`}).option(`user-email-ends-with`,{type:`string`,description:`Filter the list of memberships for a specific email that ends with a substring.`}).option(`page-token`,{type:`string`,description:`An opaque token returned from the last list response that when
42
+ provided will retrieve the next page.
43
+
44
+ Parameters used to filter the retrieved list must remain in subsequent
45
+ requests with a page token.`}).option(`page-size`,{type:`number`,description:`The amount of items to return. Defaults to 10.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List memberships for an Organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:f(I),handler:async a=>i({command:`organization member list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={status:a.status,"user.email":a[`user-email`],"user.email.contains":a[`user-email-contains`],"user.email.startsWith":a[`user-email-starts-with`],"user.email.endsWith":a[`user-email-ends-with`],page_token:a[`page-token`],page_size:a[`page-size`]};if(a.dryRun){n({command:`cf organization member list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/members`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organization.member.list({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})},R={command:`member`,describe:`Operations for member`,builder:e=>e.command(j).command(N).command(F).command(L).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.positional(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a profile for.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <organization-id>`,describe:`Get an organizations profile if it exists. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:z,handler:async a=>i({command:`organization profile get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf organization profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/profile`,pathParams:{"organization-id":String(a[`organization-id`]??``)},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.organization.profile.get({organization_id:a[`organization-id`]})),{successLabel:`Loaded`})})};function V(e){return e.positional(`organization-id`,{type:`string`,description:`Organization ID`,demandOption:!0}).option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`update <organization-id>`,describe:`Modify organization profile. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:V,handler:async o=>i({command:`organization profile update`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf organization profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${o[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(o[`organization-id`]))}/profile`,pathParams:{"organization-id":String(o[`organization-id`]??``)},bodyKind:`json`,body:o.body===void 0?s({business_address:c(o[`business-address`],`business-address`,`text`),business_email:c(o[`business-email`],`business-email`,`text`),business_name:c(o[`business-name`],`business-name`,`text`),business_phone:c(o[`business-phone`],`business-phone`,`text`),external_metadata:c(o[`external-metadata`],`external-metadata`,`text`)}):a(o.body)});return}let i=await e(o);if(o.body){let e=a(o.body);t(await r(`Updating`,async()=>i.organization.profile.update({...e,organization_id:o[`organization-id`]})),{successLabel:`Updated`});return}o[`business-address`]===void 0&&(o[`business-address`]=await l(`business-address`,`The business_address field`)),o[`business-email`]===void 0&&(o[`business-email`]=await l(`business-email`,`The business_email field`)),o[`business-name`]===void 0&&(o[`business-name`]=await l(`business-name`,`The business_name field`)),o[`business-phone`]===void 0&&(o[`business-phone`]=await l(`business-phone`,`The business_phone field`)),o[`external-metadata`]===void 0&&(o[`external-metadata`]=await l(`external-metadata`,`The external_metadata field`));let u=s({business_address:c(o[`business-address`],`business-address`,`text`),business_email:c(o[`business-email`],`business-email`,`text`),business_name:c(o[`business-name`],`business-name`,`text`),business_phone:c(o[`business-phone`],`business-phone`,`text`),external_metadata:c(o[`external-metadata`],`external-metadata`,`text`)});t(await r(`Updating`,async()=>i.organization.profile.update({...u,organization_id:o[`organization-id`]})),{successLabel:`Updated`})})},U={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.option(`organization-id`,{type:`string`,description:`Organization identifier.`,demandOption:!0}).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(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`Lists all organization shares.`,builder:f(W),handler:async a=>i({command:`organization share list`,classification:{safeFlags:[`status`,`kind`,`target-type`,`order`,`direction`,`dry-run`]}},a,async()=>{let i={status:a.status,kind:a.kind,target_type:a[`target-type`],resource_types:a[`resource-types`],order:a.order,direction:a.direction,page:a.page,per_page:a[`per-page`]};if(a.dryRun){n({command:`cf organization share list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/shares`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organization.share.list({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})},K={command:`share`,describe:`Operations for share`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.positional(`organization-id`,{type:`string`,description:`The ID of the organization to modify.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`parent-id`,{type:`string`,description:`The parent.id field`}).option(`profile-business-address`,{type:`string`,description:`The profile.business_address field`}).option(`profile-business-email`,{type:`string`,description:`The profile.business_email field`}).option(`profile-business-name`,{type:`string`,description:`The profile.business_name field`}).option(`profile-business-phone`,{type:`string`,description:`The profile.business_phone field`}).option(`profile-external-metadata`,{type:`string`,description:`The profile.external_metadata field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The new details of the organization. Only accepts updates to "name" currently.`}).check(e=>{if([`parent-id`].some(t=>e[t]!==void 0)){let t=[`parent-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parent-* flag is set`)}return!0}).check(e=>{if([`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].some(t=>e[t]!==void 0)){let t=[`profile-business-address`,`profile-business-email`,`profile-business-name`,`profile-business-phone`,`profile-external-metadata`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --profile-* flag is set`)}return!0})}const J={command:`update <organization-id>`,describe:`Modify organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:q,handler:async o=>i({command:`organization update`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf organization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/organizations/${o[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(o[`organization-id`]))}`,pathParams:{"organization-id":String(o[`organization-id`]??``)},bodyKind:`json`,body:o.body===void 0?s({name:c(o.name,`name`,`text`),parent:{id:c(o[`parent-id`],`parent-id`,`text`)},profile:{business_address:c(o[`profile-business-address`],`profile-business-address`,`text`),business_email:c(o[`profile-business-email`],`profile-business-email`,`text`),business_name:c(o[`profile-business-name`],`profile-business-name`,`text`),business_phone:c(o[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:c(o[`profile-external-metadata`],`profile-external-metadata`,`text`)}}):a(o.body)});return}let i=await e(o);if(o.body){let e=a(o.body);t(await r(`Updating`,async()=>i.organization.update({body:e,organization_id:o[`organization-id`]})),{successLabel:`Updated`});return}o.name===void 0&&(o.name=await l(`name`,`The name field`));let u=s({name:c(o.name,`name`,`text`),parent:{id:c(o[`parent-id`],`parent-id`,`text`)},profile:{business_address:c(o[`profile-business-address`],`profile-business-address`,`text`),business_email:c(o[`profile-business-email`],`profile-business-email`,`text`),business_name:c(o[`profile-business-name`],`profile-business-name`,`text`),business_phone:c(o[`profile-business-phone`],`profile-business-phone`,`text`),external_metadata:c(o[`profile-external-metadata`],`profile-external-metadata`,`text`)}});t(await r(`Updating`,async()=>i.organization.update({body:u,organization_id:o[`organization-id`]})),{successLabel:`Updated`})})},Y={command:`organization`,describe:`organization`,builder:e=>e.command(_).command(y).command(x).command(E).command(J).command(h).command(w).command(R).command(U).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Y as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./auth-tvDdC1J-.mjs";import{t}from"./output-COcSQsfn.mjs";import{t as n}from"./dry-run-DiVy1lVo.mjs";import{t as r}from"./progress-V6SZV3Ux.mjs";import{t as i}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{t as a}from"./cli-types-CrSoSMPF.mjs";function o(e){return e.positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get <organization-id>`,describe:"Returns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.",builder:o,handler:async a=>i({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={from:a.from,to:a.to};if(a.dryRun){n({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.billing.usage.get({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})},c={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.positional(`organization-id`,{type:`string`,description:`The unique id that identifies the organization.`,demandOption:!0}).option(`action-result`,{type:`string`,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,description:"Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email`,{type:`string`,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,description:`Filters by the actor's user ID.`}).option(`actor-ip-address`,{type:`string`,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,description:`Filters by the actor type.`}).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,description:`Filters by the resource scope, specifying whether the resource is associated with an organization.`}).option(`action-result-not`,{type:`string`,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,description:"Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email-not`,{type:`string`,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,description:`Filters out audit logs by the actor's user ID.`}).option(`actor-ip-address-not`,{type:`string`,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,description:`Filters out audit logs by the actor type.`}).option(`id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an organization.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get <organization-id>`,describe:`Gets a list of audit logs for an organization.`,builder:a(u),handler:async a=>i({command:`organizations logs audit get`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_result:a[`action-result`],action_type:a[`action-type`],actor_context:a[`actor-context`],actor_email:a[`actor-email`],actor_id:a[`actor-id`],actor_ip_address:a[`actor-ip-address`],actor_token_id:a[`actor-token-id`],actor_token_name:a[`actor-token-name`],actor_type:a[`actor-type`],id:a.id,raw_cf_ray_id:a[`raw-cf-ray-id`],raw_method:a[`raw-method`],raw_status_code:a[`raw-status-code`],raw_uri:a[`raw-uri`],resource_id:a[`resource-id`],resource_product:a[`resource-product`],resource_type:a[`resource-type`],resource_scope:a[`resource-scope`],"action_result.not":a[`action-result-not`],"action_type.not":a[`action-type-not`],"actor_context.not":a[`actor-context-not`],"actor_email.not":a[`actor-email-not`],"actor_id.not":a[`actor-id-not`],"actor_ip_address.not":a[`actor-ip-address-not`],"actor_token_id.not":a[`actor-token-id-not`],"actor_token_name.not":a[`actor-token-name-not`],"actor_type.not":a[`actor-type-not`],"id.not":a[`id-not`],"raw_cf_ray_id.not":a[`raw-cf-ray-id-not`],"raw_method.not":a[`raw-method-not`],"raw_status_code.not":a[`raw-status-code-not`],"raw_uri.not":a[`raw-uri-not`],"resource_id.not":a[`resource-id-not`],"resource_product.not":a[`resource-product-not`],"resource_type.not":a[`resource-type-not`],"resource_scope.not":a[`resource-scope-not`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.logs.audit.get({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})};function f(e){return e.positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The unique ID that identifies the organization.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`history <id>`,describe:"Returns the chronological change history for the resource identified by the given organization-scoped audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.",builder:a(f),handler:async a=>i({command:`organizations logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_time:a[`action-time`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit/${a.id==null?`<id>`:encodeURIComponent(String(a.id))}/history`,pathParams:{"organization-id":String(a[`organization-id`]??``),id:String(a.id??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.logs.audit.history({organization_id:a[`organization-id`],id:a.id,...i})),{successLabel:`Loaded`})})},m={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`organizations`,describe:`Multi-user organizations that group accounts, members, and shared settings under a single entity`,builder:e=>e.command(l).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./auth-tvDdC1J-.mjs";import{t}from"./output-COcSQsfn.mjs";import{t as n}from"./dry-run-DiVy1lVo.mjs";import{t as r}from"./progress-V6SZV3Ux.mjs";import{t as i}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as a,t as o}from"./body-parser-DIlfApuJ.mjs";import{n as s}from"./input-validation-BxchZ9jE.mjs";import{a as c,i as l,n as u}from"./prompt-DjRTpML4.mjs";import{t as d}from"./cli-types-CrSoSMPF.mjs";function f(e){return e.option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`hostnames`,{type:`string`,array:!0,description:"Array of hostnames or wildcard names bound to the certificate.\nHostnames must be fully qualified domain names (FQDNs) belonging to zones on your account (e.g., `example.com` or `sub.example.com`). Wildcards are supported only as a `*.` prefix for a single level (e.g., `*.example.com`). Double wildcards (`*.*.example.com`) and interior wildcards (`foo.*.example.com`) are not allowed. The wildcard suffix must be a multi-label domain (`*.example.com` is valid, but `*.com` is not). Unicode/IDN hostnames are accepted and automatically converted to punycode."}).option(`request-type`,{type:`string`,description:`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,choices:[`origin-rsa`,`origin-ecc`,`keyless-certificate`]}).option(`requested-validity`,{type:`number`,description:`The number of days for which the certificate should be valid.`,default:5475}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Create an Origin CA certificate. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`,builder:f,handler:async u=>i({command:`origin-ca-certificates create`,classification:{safeFlags:[`request-type`,`dry-run`]}},u,async()=>{if(u.dryRun){n({command:`cf origin-ca-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},bodyKind:`json`,body:u.body===void 0?o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]}):a(u.body)});return}let i=await e(u);if(u.body){let e=a(u.body);t(await r(`Creating`,async()=>i.originCaCertificates.create({...e})),{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await c(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u.hostnames===void 0)throw Error(`--hostnames is required (or pass --body with this field set).`);u[`request-type`]===void 0&&(u[`request-type`]=await l(`request-type`,`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,[`origin-rsa`,`origin-ecc`,`keyless-certificate`]));let d=o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]});t(await r(`Creating`,async()=>i.originCaCertificates.create({...d})),{successLabel:`Created`})})};function m(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,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 h={command:`delete <certificate-id>`,describe:`Revoke an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`,builder:m,handler:async a=>i({command:`origin-ca-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},a,async()=>{if(a.dryRun){n({command:`cf origin-ca-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/certificates/${a[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(a[`certificate-id`]))}`,pathParams:{"certificate-id":String(a[`certificate-id`]??``)},bodyKind:`none`});return}let i=await e(a);if(!await u({force:!!a.force})){process.stderr.write(`Aborted.
3
+ `);return}t(await r(`Deleting`,async()=>i.originCaCertificates.delete({certificate_id:a[`certificate-id`]})),{successLabel:`Deleted`})})};function g(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <certificate-id>`,describe:`Get an existing Origin CA certificate by its serial number. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`,builder:g,handler:async a=>i({command:`origin-ca-certificates get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf origin-ca-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/certificates/${a[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(a[`certificate-id`]))}`,pathParams:{"certificate-id":String(a[`certificate-id`]??``)},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.originCaCertificates.get({certificate_id:a[`certificate-id`]})),{successLabel:`Loaded`})})};function v(e){return e.option(`zone-id`,{type:`string`,description:`Identifier.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of records per page.`}).option(`limit`,{type:`number`,description:`Limit to the number of records returned.`}).option(`offset`,{type:`number`,description:`Offset the results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`list`,describe:`List all existing Origin CA certificates for a given zone. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`,builder:d(v),handler:async a=>i({command:`origin-ca-certificates list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={zone_id:a[`zone-id`],page:a.page,per_page:a[`per-page`],limit:a.limit,offset:a.offset};if(a.dryRun){n({command:`cf origin-ca-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.originCaCertificates.list(i)),{successLabel:`Loaded`})})},b={command:`origin-ca-certificates`,describe:`origin-ca-certificates`,builder:e=>e.command(p).command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{h as e}from"./oauth-DH3kMXSs.mjs";import{r as t}from"./auth-tvDdC1J-.mjs";import{t as n}from"./output-COcSQsfn.mjs";import{t as r}from"./dry-run-DiVy1lVo.mjs";import{t as i}from"./progress-V6SZV3Ux.mjs";import{t as a}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as o,t as s}from"./body-parser-DIlfApuJ.mjs";import{n as c}from"./input-validation-BxchZ9jE.mjs";import{i as l}from"./prompt-DjRTpML4.mjs";function u(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`,builder:u,handler:async o=>a({command:`origin-post-quantum-encryption get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-post-quantum-encryption get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originPostQuantumEncryption.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.option(`value`,{type:`string`,description:`Value of the Origin Post Quantum Encryption Setting.`,choices:[`preferred`,`supported`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`update`,describe:`Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`,builder:f,handler:async u=>a({command:`origin-post-quantum-encryption update`,classification:{safeFlags:[`value`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf origin-post-quantum-encryption update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({value:c(u.value,`value`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.originPostQuantumEncryption.update({...e,zone_id:d})),{successLabel:`Updated`});return}u.value===void 0&&(u.value=await l(`value`,`Value of the Origin Post Quantum Encryption Setting.`,[`preferred`,`supported`,`off`]));let f=s({value:c(u.value,`value`,`text`)});n(await i(`Updating`,async()=>a.originPostQuantumEncryption.update({...f,zone_id:d})),{successLabel:`Updated`})})},m={command:`origin-post-quantum-encryption`,describe:`Enable post-quantum key exchange for connections between Cloudflare and your origin server`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import{h as e}from"./oauth-DH3kMXSs.mjs";import{r as t}from"./auth-tvDdC1J-.mjs";import{t as n}from"./output-COcSQsfn.mjs";import{t as r}from"./dry-run-DiVy1lVo.mjs";import{t as i}from"./progress-V6SZV3Ux.mjs";import{t as a}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as o,r as s,t as c}from"./body-parser-DIlfApuJ.mjs";import{n as l}from"./input-validation-BxchZ9jE.mjs";import{a as u,n as d}from"./prompt-DjRTpML4.mjs";import{t as f}from"./cli-types-CrSoSMPF.mjs";function p(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of associations per page.`}).option(`status`,{type:`string`,description:`Filter associations by status. Use comma-separated values to filter by multiple statuses, or "all" to include every status. Defaults to "active" if not provided.`,choices:[`active`,`pending_deployment`,`pending_deletion`,`deleted`,`deployment_timed_out`,`deletion_timed_out`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List certificate ID - hostname associations for the given zone. Shows which hostnames are associated to which certificates for authenticated origin pulls.`,builder:f(p),handler:async o=>a({command:`origin-tls-client-auth hostname-associations list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],status:o.status};if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-associations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.originTlsClientAuth.hostnameAssociations.list({zone_id:c,...a})),{successLabel:`Loaded`})})},h={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.option(`certificate`,{type:`string`,description:`The hostname certificate.`}).option(`private-key`,{type:`string`,description:`The hostname certificate's private key.`}).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:`Upload a certificate to be used for client authentication on a hostname. 10 hostname certificates per zone are allowed.`,builder:g,handler:async s=>a({command:`origin-tls-client-auth hostname-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body)});return}let a=await t(s),d=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body);n(await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The hostname certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The hostname certificate's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)});n(await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function v(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,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 <certificate-id>`,describe:"Removes a client certificate used for authenticated origin pulls on a specific hostname. Note: Before deleting the certificate, you must first invalidate the hostname for client authentication by sending a PUT request with `enabled` set to null. After invalidating the association, the certificate can be safely deleted.",builder:v,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
3
+ `);return}n(await i(`Deleting`,async()=>a.originTlsClientAuth.hostnameCertificates.delete({zone_id:s,certificate_id:o[`certificate-id`]})),{successLabel:`Deleted`})})};function b(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <certificate-id>`,describe:`Get the certificate by ID to be used for client authentication on a hostname.`,builder:b,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.hostnameCertificates.get({zone_id:s,certificate_id:o[`certificate-id`]})),{successLabel:`Loaded`})})};function S(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`Lists all client certificates configured for per-hostname authenticated origin pulls on the zone.`,builder:S,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.hostnameCertificates.list({zone_id:s})),{successLabel:`Loaded`})})},w={command:`hostname-certificates`,describe:`Operations for hostname-certificates`,builder:e=>e.command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.positional(`hostname`,{type:`string`,description:`The hostname on the origin for which the client certificate uploaded will be used.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <hostname>`,describe:`Retrieves the client certificate authentication status for a specific hostname, showing whether authenticated origin pulls are enabled.`,builder:T,handler:async o=>a({command:`origin-tls-client-auth hostnames get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostnames get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/${o.hostname==null?`<hostname>`:encodeURIComponent(String(o.hostname))}`,pathParams:{hostname:String(o.hostname??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.hostnames.get({zone_id:s,hostname:o.hostname})),{successLabel:`Loaded`})})};function D(e){return e.option(`config`,{type:`string`,description:`The config 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 O={command:`update`,describe:`Associate a hostname to a certificate and enable, disable or invalidate the association. If disabled, client certificate will not be sent to the hostname even if activated at the zone level. 100 maximum associations on a single certificate are allowed. Note: Use a null value for parameter *enabled* to invalidate the association.`,builder:D,handler:async l=>a({command:`origin-tls-client-auth hostnames update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf origin-tls-client-auth hostnames update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({config:s(l.config,`config`)}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.originTlsClientAuth.hostnames.update({...e,zone_id:u})),{successLabel:`Updated`});return}if(l.config===void 0)throw Error(`--config is required (or pass --body with this field set).`);let d=c({config:s(l.config,`config`)});n(await i(`Updating`,async()=>a.originTlsClientAuth.hostnames.update({...d,zone_id:u})),{successLabel:`Updated`})})},k={command:`hostnames`,describe:`Operations for hostnames`,builder:e=>e.command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get`,describe:`Get whether zone-level authenticated origin pulls is enabled or not. It is false by default.`,builder:A,handler:async o=>a({command:`origin-tls-client-auth settings get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/settings`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.settings.get({zone_id:s})),{successLabel:`Loaded`})})};function M(e){return e.option(`enabled`,{type:`boolean`,description:`Indicates whether zone-level authenticated origin pulls is enabled.`}).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 N={command:`update`,describe:`Enable or disable zone-level authenticated origin pulls. 'enabled' should be set true either before/after the certificate is uploaded to see the certificate in use.`,builder:M,handler:async s=>a({command:`origin-tls-client-auth settings update`,classification:{safeFlags:[`enabled`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/settings`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({enabled:s.enabled}):o(s.body)});return}let a=await t(s),l=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.originTlsClientAuth.settings.update({...e,zone_id:l})),{successLabel:`Updated`});return}if(s.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=c({enabled:s.enabled});n(await i(`Updating`,async()=>a.originTlsClientAuth.settings.update({...u,zone_id:l})),{successLabel:`Updated`})})},P={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(j).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.option(`certificate`,{type:`string`,description:`The zone's leaf certificate.`}).option(`private-key`,{type:`string`,description:`The zone's private key.`}).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 I={command:`create`,describe:`Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is important to keep only one certificate active. Also, make sure to enable zone-level authenticated origin pulls by making a PUT call to settings endpoint to see the uploaded certificate in use.`,builder:F,handler:async s=>a({command:`origin-tls-client-auth zone-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth zone-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body)});return}let a=await t(s),d=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body);n(await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The zone's leaf certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The zone's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)});n(await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function L(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,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 R={command:`delete <certificate-id>`,describe:`Removes a client certificate used for zone-level authenticated origin pulls.`,builder:L,handler:async o=>a({command:`origin-tls-client-auth zone-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
4
+ `);return}n(await i(`Deleting`,async()=>a.originTlsClientAuth.zoneCertificates.delete({zone_id:s,certificate_id:o[`certificate-id`]})),{successLabel:`Deleted`})})};function z(e){return e.positional(`certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get <certificate-id>`,describe:`Retrieves details for a specific client certificate used in zone-level authenticated origin pulls.`,builder:z,handler:async o=>a({command:`origin-tls-client-auth zone-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.zoneCertificates.get({zone_id:s,certificate_id:o[`certificate-id`]})),{successLabel:`Loaded`})})};function V(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`Lists all client certificates configured for zone-level authenticated origin pulls.`,builder:V,handler:async o=>a({command:`origin-tls-client-auth zone-certificates list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originTlsClientAuth.zoneCertificates.list({zone_id:s})),{successLabel:`Loaded`})})},U={command:`zone-certificates`,describe:`Operations for zone-certificates`,builder:e=>e.command(I).command(R).command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},W={command:`origin-tls-client-auth`,describe:`origin-tls-client-auth`,builder:e=>e.command(h).command(w).command(k).command(P).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{W as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./Page-9ry_XAVC.mjs";import{n as t,r as n,t as r}from"./theme-CrIBazAF.mjs";function i(t){return t instanceof e?t.data:typeof t==`object`&&t&&`result`in t&&Array.isArray(t.result)&&`result_info`in t?t.result:t}function a(e,n={}){if(!n.quiet){if(e=i(e),e==null){if(n.successLabel&&process.stderr.isTTY){let e=t();process.stderr.write(`${e.hex(r.success)(`✓`)} ${n.successLabel}\n`)}return}console.log(o(e))}}function o(e){let r=JSON.stringify(e,null,2);if(!n()||r.length>5e4)return r;let i=t();return r.replace(/"([^"]+)":/g,(e,t)=>`${i.cyan(`"${t}"`)}:`).replace(/: "([^"]*)"/g,(e,t)=>`: ${i.green(`"${t}"`)}`).replace(/: (-?\d+\.?\d*)/g,(e,t)=>`: ${i.yellow(t)}`).replace(/: (true|false)/g,(e,t)=>`: ${i.magenta(t)}`).replace(/: (null)/g,(e,t)=>`: ${i.dim(t)}`)}export{a as t};
2
+ import{t as e}from"./Page-C-JHZnIy.mjs";import{n as t,r as n,t as r}from"./theme-CeVf-5qG.mjs";function i(t){return t instanceof e?t.data:typeof t==`object`&&t&&`result`in t&&Array.isArray(t.result)&&`result_info`in t?t.result:t}function a(e,n={}){if(!n.quiet){if(e=i(e),e==null){if(n.successLabel&&process.stderr.isTTY){let e=t();process.stderr.write(`${e.hex(r.success)(`✓`)} ${n.successLabel}\n`)}return}console.log(o(e))}}function o(e){let r=JSON.stringify(e,null,2);if(!n()||r.length>5e4)return r;let i=t();return r.replace(/"([^"]+)":/g,(e,t)=>`${i.cyan(`"${t}"`)}:`).replace(/: "([^"]*)"/g,(e,t)=>`: ${i.green(`"${t}"`)}`).replace(/: (-?\d+\.?\d*)/g,(e,t)=>`: ${i.yellow(t)}`).replace(/: (true|false)/g,(e,t)=>`: ${i.magenta(t)}`).replace(/: (null)/g,(e,t)=>`: ${i.dim(t)}`)}export{a as t};
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ import{h as e}from"./oauth-DH3kMXSs.mjs";import{r as t}from"./auth-tvDdC1J-.mjs";import{t as n}from"./output-COcSQsfn.mjs";import{t as r}from"./dry-run-DiVy1lVo.mjs";import{t as i}from"./progress-V6SZV3Ux.mjs";import{t as a}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as o,r as s,t as c}from"./body-parser-DIlfApuJ.mjs";import{n as l}from"./input-validation-BxchZ9jE.mjs";import{n as u}from"./prompt-DjRTpML4.mjs";import{t as d}from"./cli-types-CrSoSMPF.mjs";function f(e){return e.option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
3
+ request. Actions can redirect to another URL or override settings, but
4
+ not both.
5
+ . Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
6
+ over another. A higher number indicates a higher priority. For example,
7
+ if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
8
+ specific Page Rule to take precedence (rule B: \`/images/special/*\`),
9
+ specify a higher priority for rule B so it overrides rule A.
10
+ `,default:1}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`],default:`disabled`}).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. 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 p={command:`create`,describe:`Creates a new Page Rule.`,builder:f,handler:async u=>a({command:`page-rules create`,classification:{safeFlags:[`status`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf page-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.pageRules.create({...e,zone_id:d})),{successLabel:`Created`});return}if(u.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(u.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let f=c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)});n(await i(`Creating`,async()=>a.pageRules.create({...f,zone_id:d})),{successLabel:`Created`})})};function m(e){return e.positional(`pagerule-id`,{type:`string`,description:`Identifier.`,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 h={command:`delete <pagerule-id>`,describe:`Deletes an existing Page Rule.`,builder:m,handler:async o=>a({command:`page-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf page-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules/${o[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(o[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(o[`pagerule-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
11
+ `);return}n(await i(`Deleting`,async()=>a.pageRules.delete({zone_id:s,pagerule_id:o[`pagerule-id`]})),{successLabel:`Deleted`})})};function g(e){return e.positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
12
+ request. Actions can redirect to another URL or override settings, but
13
+ not both.
14
+ . Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
15
+ over another. A higher number indicates a higher priority. For example,
16
+ if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
17
+ specific Page Rule to take precedence (rule B: \`/images/special/*\`),
18
+ specify a higher priority for rule B so it overrides rule A.
19
+ `}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. 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:`edit <pagerule-id>`,describe:`Updates one or more fields of an existing Page Rule.`,builder:g,handler:async u=>a({command:`page-rules edit`,classification:{safeFlags:[`status`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf page-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/pagerules/${u[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(u[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(u[`pagerule-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.pageRules.edit({...e,zone_id:d,pagerule_id:u[`pagerule-id`]})),{successLabel:`Updated`});return}let f=c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)});n(await i(`Updating`,async()=>a.pageRules.edit({...f,zone_id:d,pagerule_id:u[`pagerule-id`]})),{successLabel:`Updated`})})};function v(e){return e.positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <pagerule-id>`,describe:`Fetches the details of a Page Rule.`,builder:v,handler:async o=>a({command:`page-rules get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf page-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules/${o[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(o[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(o[`pagerule-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.pageRules.get({zone_id:s,pagerule_id:o[`pagerule-id`]})),{successLabel:`Loaded`})})};function b(e){return e.option(`order`,{type:`string`,description:`The field used to sort returned Page Rules.`,choices:[`status`,`priority`]}).option(`direction`,{type:`string`,description:`The direction used to sort returned Page Rules.`,choices:[`asc`,`desc`]}).option(`match`,{type:`string`,description:"When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`Fetches Page Rules in a zone.`,builder:d(b),handler:async o=>a({command:`page-rules list`,classification:{safeFlags:[`order`,`direction`,`match`,`status`,`dry-run`]}},o,async()=>{let a={order:o.order,direction:o.direction,match:o.match,status:o.status};if(o.dryRun){r({command:`cf page-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/pagerules`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.pageRules.list({zone_id:c,...a})),{successLabel:`Loaded`})})};function S(e){return e.positional(`pagerule-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
20
+ request. Actions can redirect to another URL or override settings, but
21
+ not both.
22
+ . Provide as a JSON array of objects or @path/to/file.json.`}).option(`priority`,{type:`number`,description:`The priority of the rule, used to define which Page Rule is processed
23
+ over another. A higher number indicates a higher priority. For example,
24
+ if you have a catch-all Page Rule (rule A: \`/images/*\`) but want a more
25
+ specific Page Rule to take precedence (rule B: \`/images/special/*\`),
26
+ specify a higher priority for rule B so it overrides rule A.
27
+ `}).option(`status`,{type:`string`,description:`The status of the Page Rule.`,choices:[`active`,`disabled`]}).option(`targets`,{type:`string`,description:`The rule targets to evaluate on each request. 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 C={command:`update <pagerule-id>`,describe:`Replaces the configuration of an existing Page Rule. The configuration of the updated Page Rule will exactly match the data passed in the API request.`,builder:S,handler:async u=>a({command:`page-rules update`,classification:{safeFlags:[`status`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf page-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/pagerules/${u[`pagerule-id`]==null?`<pagerule-id>`:encodeURIComponent(String(u[`pagerule-id`]))}`,pathParams:{"pagerule-id":String(u[`pagerule-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.pageRules.update({...e,zone_id:d,pagerule_id:u[`pagerule-id`]})),{successLabel:`Updated`});return}if(u.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(u.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let f=c({actions:s(u.actions,`actions`),priority:u.priority,status:l(u.status,`status`,`text`),targets:s(u.targets,`targets`)});n(await i(`Updating`,async()=>a.pageRules.update({...f,zone_id:d,pagerule_id:u[`pagerule-id`]})),{successLabel:`Updated`})})},w={command:`page-rules`,describe:`page-rules`,builder:e=>e.command(p).command(h).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};