cf 1.0.0-beta.14 → 1.0.0-beta.15

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 (432) hide show
  1. package/README.md +10 -0
  2. package/dist/_meta/commands.json +3409 -621
  3. package/dist/_meta/hand-written-commands.json +33 -0
  4. package/dist/_meta/schemas.json +2160 -246
  5. package/dist/abuse-reports-CnQBtN1G.mjs +24 -0
  6. package/dist/{access-k1QjF5rE.mjs → access-BzmXSwzj.mjs} +1 -1
  7. package/dist/account-tags-2qPWbW17.mjs +15 -0
  8. package/dist/accounts-B0Byg-AV.mjs +132 -0
  9. package/dist/acm-DgAu0cnk.mjs +15 -0
  10. package/dist/addressing-J1oa0ML2.mjs +105 -0
  11. package/dist/agent-memory-4KGou-tm.mjs +34 -0
  12. package/dist/ai-WY7wVQfA.mjs +31 -0
  13. package/dist/ai-audit-D38HaEoZ.mjs +6 -0
  14. package/dist/ai-gateway-C0gIipT8.mjs +80 -0
  15. package/dist/ai-search-ClwnPU-9.mjs +79 -0
  16. package/dist/ai-security-BIsvFPYV.mjs +10 -0
  17. package/dist/alerting-MHhv28oO.mjs +56 -0
  18. package/dist/analytics-BfBz7bqB.mjs +17 -0
  19. package/dist/analytics_engine-CXVdBF1n.mjs +4 -0
  20. package/dist/api-eMuS5GI1.mjs +3 -0
  21. package/dist/api-security-DUCfcdC1.mjs +154 -0
  22. package/dist/argo-CUlzI4v3.mjs +14 -0
  23. package/dist/artifacts-BLfWGzBg.mjs +43 -0
  24. package/dist/audit-logs-CsfIm2QS.mjs +4 -0
  25. package/dist/auth-8Sm4uLGM.mjs +2 -0
  26. package/dist/auth-C6u9qIGO.mjs +2 -0
  27. package/dist/auth-CGRemu5W.mjs +2 -0
  28. package/dist/{auth-token-Dop0wLCw.mjs → auth-token-DkkYg4DP.mjs} +1 -1
  29. package/dist/{autoconfig-RQ3HS4m1.mjs → autoconfig-B0ESZ8DJ.mjs} +2 -2
  30. package/dist/basin-catalog-CrKRYJ0b.mjs +46 -0
  31. package/dist/billing-NxehgXrR.mjs +23 -0
  32. package/dist/blocks-Bat9A8V_.mjs +5 -0
  33. package/dist/bot-management-C993iQKL.mjs +9 -0
  34. package/dist/botnet-feed-CZ4vYk5y.mjs +11 -0
  35. package/dist/brand-protection-ADVgIi0l.mjs +27 -0
  36. package/dist/browser-run-CEptKZYl.mjs +42 -0
  37. package/dist/build-Bm6kGyzo.mjs +2 -0
  38. package/dist/{build-CCe7IrWT.mjs → build-sBpqm9ga.mjs} +1 -1
  39. package/dist/builds-DqtiTH7p.mjs +71 -0
  40. package/dist/cache-hX5QxmI0.mjs +45 -0
  41. package/dist/certificate-authorities-BOcybjc1.mjs +6 -0
  42. package/dist/cf-Bq4pA4n6.mjs +18 -0
  43. package/dist/{chunk-TAK63GWY-DdMktrgc.mjs → chunk-2HLTAS5V-D7COzUOd.mjs} +2 -2
  44. package/dist/chunk-2K52M2W5-CYxfQXUq.mjs +363 -0
  45. package/dist/{chunk-DSGVRFIS-CPI5cYtB.mjs → chunk-DSGVRFIS-C5SqiTOz.mjs} +1 -1
  46. package/dist/{cli-ht4q6i2y.mjs → cli-R8h3OKZI.mjs} +1 -1
  47. package/dist/client-certificates-Bez_ArKE.mjs +13 -0
  48. package/dist/client-side-security-CSmA50Bv.mjs +63 -0
  49. package/dist/cloud-connector-0Wivqi7S.mjs +6 -0
  50. package/dist/{cloudflared-D83U8Yn3.mjs → cloudflared-By8BzYXc.mjs} +1 -1
  51. package/dist/cloudforce-one-J-rU6k1U.mjs +405 -0
  52. package/dist/{command-9VAc7b30.mjs → command-0BOb1pgV.mjs} +1 -1
  53. package/dist/{command-CyJQ40fc.mjs → command-BCJN-ZM2.mjs} +1 -1
  54. package/dist/{command-OHov3PEc.mjs → command-BG-kLOnS.mjs} +1 -1
  55. package/dist/{command-B_Ixlz8Q.mjs → command-BIsI-mMX.mjs} +1 -1
  56. package/dist/{command-SmWD-MeI.mjs → command-BKDbbA-L.mjs} +1 -1
  57. package/dist/command-BWQIKu6I.mjs +2 -0
  58. package/dist/{command-Ckb9FufU.mjs → command-Bdy69UFU.mjs} +1 -1
  59. package/dist/{command-CtVUNm__.mjs → command-Bgb-3yPg.mjs} +1 -1
  60. package/dist/{command-DtgJilOK.mjs → command-C6w1OdoC.mjs} +1 -1
  61. package/dist/{command-BtDY_MKv.mjs → command-CKW6UhTh.mjs} +1 -1
  62. package/dist/{command-Bpzp8Mz2.mjs → command-DCQgsd2U.mjs} +1 -1
  63. package/dist/{command-DjEJaOwV.mjs → command-DIs-Nqtl.mjs} +1 -1
  64. package/dist/command-DPn5ANHs.mjs +2 -0
  65. package/dist/{command-CUNMrMou.mjs → command-DZfKHiru.mjs} +1 -1
  66. package/dist/{command-DXaRn1ls.mjs → command-DppVezAB.mjs} +1 -1
  67. package/dist/{completions-CuqAO3N_.mjs → completions-CpNGTlUX.mjs} +1 -1
  68. package/dist/config.mjs +0 -0
  69. package/dist/connector-interrupts-CH-DaLuo.mjs +6 -0
  70. package/dist/connector-telemetry-events-X3Fod9nl.mjs +6 -0
  71. package/dist/connector-telemetry-snapshots-D-WR4npQ.mjs +6 -0
  72. package/dist/connectors-CORKD31m.mjs +15 -0
  73. package/dist/containers-BboUbx3k.mjs +78 -0
  74. package/dist/containers-Di3_Vopq.mjs +376 -0
  75. package/dist/content-scan-DXGREAXa.mjs +14 -0
  76. package/dist/{context-BBLtgdR1.mjs → context-A6T-NKPI.mjs} +2 -2
  77. package/dist/{cps-C5phNoVU.mjs → cps-1BoOLtTq.mjs} +3 -3
  78. package/dist/create-OXylMu6m.mjs +2 -0
  79. package/dist/csamScanner-CHfbfeup.mjs +10 -0
  80. package/dist/ct-alerting-DlH4ILQo.mjs +5 -0
  81. package/dist/custom-certificates-zJqJZ2Th.mjs +17 -0
  82. package/dist/custom-csrs-DoLIGqYL.mjs +11 -0
  83. package/dist/custom-hostnames-YfV-aoAK.mjs +27 -0
  84. package/dist/custom-nameservers-BV43gmgt.mjs +9 -0
  85. package/dist/custom-pages-CoOU1Cdx.mjs +21 -0
  86. package/dist/{d1-EQMUlHTJ.mjs → d1-DujBmzLa.mjs} +31 -31
  87. package/dist/dcv-delegation-CPLsVYOl.mjs +4 -0
  88. package/dist/delegate.mjs +0 -0
  89. package/dist/deploy-context-tEhwEXnA.mjs +56 -0
  90. package/dist/{deploy-input-BCjcuP6u.mjs → deploy-input-BqJ7GVZ-.mjs} +1 -1
  91. package/dist/{deploy-B22sEVHd.mjs → deploy-wNujfGUJ.mjs} +1 -1
  92. package/dist/{dev-ClhhXuNU.mjs → dev-EtnMYA7K.mjs} +1 -1
  93. package/dist/diagnostics-B3TYPVRi.mjs +15 -0
  94. package/dist/{dist-DmRM6WSZ.mjs → dist-DZRTPMMA.mjs} +4 -4
  95. package/dist/dls-CWm1HRF0.mjs +17 -0
  96. package/dist/dns-CjAFU7Z9.mjs +144 -0
  97. package/dist/dns-firewall-BooBP9ap.mjs +71 -0
  98. package/dist/docs-C5XB7HdG.mjs +3 -0
  99. package/dist/{dotenv-DpXaxfho.mjs → dotenv-usOKkeW7.mjs} +3 -3
  100. package/dist/{dry-run-DRj2_uV3.mjs → dry-run-C2KjGX10.mjs} +1 -1
  101. package/dist/durable-objects-CSrMQDCE.mjs +6 -0
  102. package/dist/email-auth-Bp1Mui-n.mjs +6 -0
  103. package/dist/email-routing-CVF6SwQt.mjs +45 -0
  104. package/dist/email-security-mYZtazae.mjs +158 -0
  105. package/dist/email-sending-BqaKU_Xu.mjs +47 -0
  106. package/dist/error-sanitization-CIQOep3I.mjs +2 -0
  107. package/dist/error-sanitization-pOyzm2F1.mjs +2 -0
  108. package/dist/fieldExtractors-CAGZVmYg.mjs +9 -0
  109. package/dist/firewall-DgTDsYOt.mjs +36 -0
  110. package/dist/flagship-Db3PxxyZ.mjs +28 -0
  111. package/dist/fraud-BEOQczy8.mjs +22 -0
  112. package/dist/get-By1q8YlI.mjs +2 -0
  113. package/dist/get-CRKvqCu6.mjs +2 -0
  114. package/dist/get-iPUHxD1r.mjs +2 -0
  115. package/dist/google-tag-gateway-DjLQ9wo0.mjs +6 -0
  116. package/dist/healthchecks-C3ScnKss.mjs +22 -0
  117. package/dist/{hostnames-DvaUSzsj.mjs → hostnames-DU0k-xO9.mjs} +6 -6
  118. package/dist/hyperdrive-IpCCLCRd.mjs +37 -0
  119. package/dist/iam-96CYM8Vw.mjs +52 -0
  120. package/dist/images-AB9EgZgT.mjs +71 -0
  121. package/dist/index.mjs +1 -1
  122. package/dist/{init-Da8pe296.mjs → init-D2nPoW4f.mjs} +2 -2
  123. package/dist/intel-BKb4RLvS.mjs +76 -0
  124. package/dist/ips-z9APCV_b.mjs +4 -0
  125. package/dist/k2-Bv-HiJ29.mjs +11 -0
  126. package/dist/keyless-certificates-ChgSGHq4.mjs +13 -0
  127. package/dist/keys-BhngDsDa.mjs +4 -0
  128. package/dist/kv-CB5MQVGP.mjs +15 -0
  129. package/dist/{lazy-command-CDWwCsD2.mjs → lazy-command-CaZ1kdlW.mjs} +1 -1
  130. package/dist/leaked-credential-checks-Bsi2WpSU.mjs +18 -0
  131. package/dist/{load-balancers-Bu9pd2SV.mjs → load-balancers-0gXZNCeI.mjs} +40 -40
  132. package/dist/{local-BcPM4I0s.mjs → local-Dil4fTWX.mjs} +1 -1
  133. package/dist/local-DxWDQDnG.mjs +2 -0
  134. package/dist/{local-runtime-BHKyRlCP.mjs → local-runtime-B7TKFu6E.mjs} +1 -1
  135. package/dist/login-CiQGR8ha.mjs +5 -0
  136. package/dist/login-Ik98G4K6.mjs +2 -0
  137. package/dist/logo-matches-DmoF5Otu.mjs +6 -0
  138. package/dist/logos-BL6ohIMH.mjs +7 -0
  139. package/dist/logpush-UVopW68t.mjs +46 -0
  140. package/dist/logs-BVfxiEiM.mjs +36 -0
  141. package/dist/magic-cloud-networking-B5S3aM6f.mjs +71 -0
  142. package/dist/magic-network-monitoring-CDSJPP47.mjs +36 -0
  143. package/dist/magic-transit-TcDTKM43.mjs +386 -0
  144. package/dist/managed-defense-C88HL0pg.mjs +18 -0
  145. package/dist/managed-transforms-Ja41Tahl.mjs +9 -0
  146. package/dist/matches-BL_Y-9Yq.mjs +6 -0
  147. package/dist/mcp-BWp5Q09R.mjs +32 -0
  148. package/dist/mesh-lFPLRWhV.mjs +26 -0
  149. package/dist/{migrate-CZNq63Uj.mjs → migrate-6e5mJ79R.mjs} +1 -1
  150. package/dist/monetization-BIc4Bwo2.mjs +20 -0
  151. package/dist/mtls-certificates-CVBw-Jli.mjs +13 -0
  152. package/dist/network-Wig0qbaC.mjs +50 -0
  153. package/dist/network-interconnects-C16z1HuQ.mjs +72 -0
  154. package/dist/o11y-Bhy4qDRm.mjs +93 -0
  155. package/dist/oauth-CfEedDZi.mjs +4 -0
  156. package/dist/oauth-clients-eXjmK5yf.mjs +16 -0
  157. package/dist/{oauth-n8um6MFk.mjs → oauth-oWaW7ICv.mjs} +1 -1
  158. package/dist/oauth-scopes-DZWn50EA.mjs +4 -0
  159. package/dist/organization-QdAQTrKa.mjs +71 -0
  160. package/dist/organizations-CgAQYdK5.mjs +4 -0
  161. package/dist/origin-ca-certificates-BklXqp8X.mjs +11 -0
  162. package/dist/origin-post-quantum-encryption-Dg16ueT4.mjs +6 -0
  163. package/dist/origin-tls-client-auth-d8bDU5zU.mjs +30 -0
  164. package/dist/output-Co4xdFf6.mjs +2 -0
  165. package/dist/page-rules-CgMkC6YR.mjs +39 -0
  166. package/dist/{pages-Bn0Sg1ay.mjs → pages-CkBtOOf8.mjs} +29 -29
  167. package/dist/path-DRw6Y-nd.mjs +2 -0
  168. package/dist/pay-per-crawl-CnGXOWyz.mjs +38 -0
  169. package/dist/pay-per-use-HbfxpATr.mjs +33 -0
  170. package/dist/pipelines-CnO9CCs0.mjs +44 -0
  171. package/dist/precursor-Bc55XJdQ.mjs +4 -0
  172. package/dist/previews-C7vZrajd.mjs +7 -0
  173. package/dist/progress-D5po7ScB.mjs +2 -0
  174. package/dist/prompt-BAJpE3jV.mjs +4 -0
  175. package/dist/queries-BJAH4B74.mjs +9 -0
  176. package/dist/queues-D4G8vvwi.mjs +57 -0
  177. package/dist/r2-CJ8rD6Jb.mjs +128 -0
  178. package/dist/{radar-CdvQL4xm.mjs → radar-DgaxOdcd.mjs} +150 -150
  179. package/dist/raw-fetch-yY-wX5Xx.mjs +2 -0
  180. package/dist/realtime-DU09m7L7.mjs +172 -0
  181. package/dist/registrar-Cj7OfvGs.mjs +43 -0
  182. package/dist/registrar-sandbox-CA0Mua-j.mjs +56 -0
  183. package/dist/{registry-PI6sO95I.mjs → registry-CRnk93ur.mjs} +1 -1
  184. package/dist/reporting-3kDVF5c8.mjs +14 -0
  185. package/dist/{request-headers-D8L95bEQ.mjs → request-headers-D_eQn93b.mjs} +1 -1
  186. package/dist/request-tracers-VBD4R3s3.mjs +4 -0
  187. package/dist/resolve-BpgXeklt.mjs +2 -0
  188. package/dist/resolve-C3FmNlSO.mjs +2 -0
  189. package/dist/resource-sharing-BtUF3psS.mjs +40 -0
  190. package/dist/resource-tagging--90INP8_.mjs +4 -0
  191. package/dist/rules-CcwPngVo.mjs +18 -0
  192. package/dist/rulesets-CfdruY82.mjs +37 -0
  193. package/dist/rum-RLkdfSL7.mjs +30 -0
  194. package/dist/run-CUNhH5CQ.mjs +2 -0
  195. package/dist/{run-CW2Cgi0S.mjs → run-DASYqJsY.mjs} +1 -1
  196. package/dist/{schema-elj12WOx.mjs → schema-S3pUZwpI.mjs} +1 -1
  197. package/dist/{schema-flags-BTItUu1K.mjs → schema-flags-CShtn7ya.mjs} +1 -1
  198. package/dist/scim-BZYsTPIL.mjs +18 -0
  199. package/dist/secrets-store-C_-FkSH_.mjs +24 -0
  200. package/dist/security-insights-BVBEaZmD.mjs +40 -0
  201. package/dist/security-txt--IoHrHee.mjs +9 -0
  202. package/dist/session-Cq3YNLoI.mjs +2 -0
  203. package/dist/shared-zNQNv1im.mjs +2 -0
  204. package/dist/smart-shield-CByC4_60.mjs +24 -0
  205. package/dist/snippets-DB-jiZAV.mjs +20 -0
  206. package/dist/{spawn-D07wH-MH.mjs → spawn-DQttFH05.mjs} +1 -1
  207. package/dist/{spectrum-B6qkjR_Z.mjs → spectrum-Bs2g1BmK.mjs} +14 -14
  208. package/dist/speed-Bq4evEnJ.mjs +24 -0
  209. package/dist/sql-XGci7hZC.mjs +4 -0
  210. package/dist/src-GiuwAT55.mjs +125 -0
  211. package/dist/ssl-KJTLW1NR.mjs +45 -0
  212. package/dist/{startup-profile-CrtCP-6-.mjs → startup-profile-BOaseXnO.mjs} +1 -1
  213. package/dist/startup-profile-BwEZFVGS.mjs +2 -0
  214. package/dist/{state-DIiIGEtR.mjs → state-Boubf1X6.mjs} +1 -1
  215. package/dist/state-CODDG9Nx.mjs +2 -0
  216. package/dist/stream-BotgYspF.mjs +102 -0
  217. package/dist/submit-C5VytaHP.mjs +4 -0
  218. package/dist/{tags-CX23P4jg.mjs → tags-3Hq-B9qp.mjs} +2 -2
  219. package/dist/{telemetry-ZlCi5Xhc.mjs → telemetry-3FJOXl_C.mjs} +1 -1
  220. package/dist/telemetry-BhKfwxyh.mjs +2 -0
  221. package/dist/tenant-BgX5onPc.mjs +10 -0
  222. package/dist/tenant-custom-nameservers-BVG8v1Xo.mjs +9 -0
  223. package/dist/theme-BGHWSKCw.mjs +6 -0
  224. package/dist/{tools-CSc5DmFi.mjs → tools-BCCRUENY.mjs} +1 -1
  225. package/dist/{tunnels-NzYpsfi_.mjs → tunnels-CThOI3qH.mjs} +15 -15
  226. package/dist/turnstile-BgZaUx-g.mjs +33 -0
  227. package/dist/ui-BtIBQeaG.mjs +2 -0
  228. package/dist/update-check-Yy7Ivq2V.mjs +2 -0
  229. package/dist/{update-check-HFkPml6x.mjs → update-check-jb89ih_g.mjs} +1 -1
  230. package/dist/update-check-worker.mjs +1 -1
  231. package/dist/url-info-DQERN0Xq.mjs +4 -0
  232. package/dist/url-normalization-Cb1hofqv.mjs +9 -0
  233. package/dist/url-scanner-gHgx1bW7.mjs +16 -0
  234. package/dist/{user-rXca0J9M.mjs → user-CdKzIuSi.mjs} +58 -58
  235. package/dist/values-EwA8Sx0w.mjs +4 -0
  236. package/dist/vectorize-DejgIJIv.mjs +32 -0
  237. package/dist/version-B6MnUIqV.mjs +2 -0
  238. package/dist/{waiting-rooms-DrA3-0bw.mjs → waiting-rooms-BNR1HvAP.mjs} +25 -25
  239. package/dist/web-assets-iglnzkTV.mjs +64 -0
  240. package/dist/web3-JBUU6IVt.mjs +28 -0
  241. package/dist/workers-CDp4kLTJ.mjs +40 -0
  242. package/dist/workers-builds-CSb9Dglt.mjs +14 -0
  243. package/dist/workers-for-platforms-D4srNZvt.mjs +40 -0
  244. package/dist/workers-vpc-LPC8TadH.mjs +13 -0
  245. package/dist/workflows-DN_VqWJC.mjs +52 -0
  246. package/dist/{wrangler-migration-C6FKHER1.mjs → wrangler-migration-DxTB5yPT.mjs} +1 -1
  247. package/dist/zaraz-DDErl5yc.mjs +22 -0
  248. package/dist/zero-trust-M88XX3uD.mjs +957 -0
  249. package/dist/zone-BsGvedmN.mjs +4 -0
  250. package/dist/zones-l_sRKrVl.mjs +124 -0
  251. package/package.json +15 -18
  252. package/dist/Page-BShsqCXr.mjs +0 -2
  253. package/dist/abuse-reports-CVv52Q2w.mjs +0 -24
  254. package/dist/account-tags-RhvWOkOf.mjs +0 -15
  255. package/dist/accounts--3lrEkmu.mjs +0 -125
  256. package/dist/acm-BJxINEcu.mjs +0 -15
  257. package/dist/addressing-BqByG9JW.mjs +0 -105
  258. package/dist/agent-memory-D4dQMGbh.mjs +0 -34
  259. package/dist/ai-CRkQ4pjC.mjs +0 -31
  260. package/dist/ai-audit-fMSn4c5L.mjs +0 -6
  261. package/dist/ai-gateway-CbhvQK4L.mjs +0 -80
  262. package/dist/ai-search-CvVSnOA0.mjs +0 -79
  263. package/dist/ai-security-Z_qpI92I.mjs +0 -10
  264. package/dist/alerting-CpbCB8br.mjs +0 -56
  265. package/dist/analytics-DkY9dOP1.mjs +0 -17
  266. package/dist/analytics_engine-DE_jvlx_.mjs +0 -4
  267. package/dist/api-security-BHnOU5MM.mjs +0 -154
  268. package/dist/argo-DhC5L_aN.mjs +0 -14
  269. package/dist/args-CfbYkeXd.mjs +0 -2
  270. package/dist/artifacts-CrIupY7P.mjs +0 -43
  271. package/dist/audit-logs-BjeBxTox.mjs +0 -4
  272. package/dist/auth-BNYfOMl0.mjs +0 -2
  273. package/dist/auth-CAWalgW0.mjs +0 -2
  274. package/dist/auth-DOwC01PW.mjs +0 -2
  275. package/dist/banner-D03JEqRs.mjs +0 -2
  276. package/dist/basin-catalog-DZ7QV-_N.mjs +0 -46
  277. package/dist/billing-BFyte9fL.mjs +0 -23
  278. package/dist/bot-management-DXcbV3am.mjs +0 -9
  279. package/dist/botnet-feed-bGGp_cwX.mjs +0 -11
  280. package/dist/brand-protection-DN36XkxH.mjs +0 -27
  281. package/dist/browser-run-hHD1RT43.mjs +0 -42
  282. package/dist/build-BhpWYgNm.mjs +0 -2
  283. package/dist/builds-6aO61R9R.mjs +0 -71
  284. package/dist/cache-C5YJpMqi.mjs +0 -45
  285. package/dist/certificate-authorities-CbqDAktQ.mjs +0 -6
  286. package/dist/cf-oRSQKirD.mjs +0 -18
  287. package/dist/chunk-NDZDTP46-Civns3WA.mjs +0 -361
  288. package/dist/cli-types-9oYmRTHJ.mjs +0 -2
  289. package/dist/client-certificates-balaN_my.mjs +0 -13
  290. package/dist/client-side-security-3_4Ermmg.mjs +0 -63
  291. package/dist/cloud-connector-avx27sLw.mjs +0 -6
  292. package/dist/cloudforce-one-CXdeqJ9l.mjs +0 -405
  293. package/dist/command-DPX9sJVi.mjs +0 -2
  294. package/dist/command-OWe3v69l.mjs +0 -2
  295. package/dist/connector-interrupts-ftd10Du-.mjs +0 -6
  296. package/dist/connector-telemetry-events-TwDZYdEM.mjs +0 -6
  297. package/dist/connector-telemetry-snapshots-CZxkOuC3.mjs +0 -6
  298. package/dist/connectors-6lVSr-fd.mjs +0 -15
  299. package/dist/containers-Dqs_ZnO2.mjs +0 -78
  300. package/dist/containers-ncw3bd3a.mjs +0 -376
  301. package/dist/content-scan-BWFbqfQ0.mjs +0 -14
  302. package/dist/csamScanner-BwZNZu0A.mjs +0 -10
  303. package/dist/ct-alerting-DPp3qLqO.mjs +0 -5
  304. package/dist/custom-certificates-pfpZcr06.mjs +0 -17
  305. package/dist/custom-csrs-DrvGRAkl.mjs +0 -11
  306. package/dist/custom-hostnames-wGtmFbz1.mjs +0 -27
  307. package/dist/custom-nameservers-HTG6MPKv.mjs +0 -9
  308. package/dist/custom-pages-DqEHBSVt.mjs +0 -21
  309. package/dist/dcv-delegation-D6nj0Z5N.mjs +0 -4
  310. package/dist/deploy-context-DmG9rgPO.mjs +0 -56
  311. package/dist/diagnostics-tqHjq-Pl.mjs +0 -15
  312. package/dist/dls-BEHj4X9T.mjs +0 -17
  313. package/dist/dns-firewall-zwbkutyf.mjs +0 -71
  314. package/dist/dns-n4mfYBZg.mjs +0 -144
  315. package/dist/durable-objects-CQ2dHhho.mjs +0 -6
  316. package/dist/email-auth-DOi6yOt3.mjs +0 -6
  317. package/dist/email-routing-WcSPt22u.mjs +0 -45
  318. package/dist/email-security-BXu3OGay.mjs +0 -158
  319. package/dist/email-sending-B9zTlIjt.mjs +0 -47
  320. package/dist/error-sanitization-DE_zSrXw.mjs +0 -2
  321. package/dist/error-sanitization-DOCQ9Ykh.mjs +0 -2
  322. package/dist/errors-_sob7Ihu.mjs +0 -3
  323. package/dist/fieldExtractors-B37m2lKW.mjs +0 -9
  324. package/dist/firewall-CRtYO0Ha.mjs +0 -36
  325. package/dist/flagship-DvTFZSay.mjs +0 -28
  326. package/dist/fraud-uSyibsit.mjs +0 -22
  327. package/dist/google-tag-gateway-BFXiiokq.mjs +0 -6
  328. package/dist/healthchecks-27u7b7Jb.mjs +0 -22
  329. package/dist/hyperdrive-BzJvPdu6.mjs +0 -37
  330. package/dist/iam-Dl3cU9GI.mjs +0 -52
  331. package/dist/images-C2OkI1j7.mjs +0 -71
  332. package/dist/intel-DoB1g_K7.mjs +0 -76
  333. package/dist/ips-BRt68epr.mjs +0 -4
  334. package/dist/k2-_eq5ZY2t.mjs +0 -11
  335. package/dist/keyless-certificates-DaO2yqYu.mjs +0 -13
  336. package/dist/keys-7BQ3Zq6Y.mjs +0 -4
  337. package/dist/kv-BTYCXKML.mjs +0 -15
  338. package/dist/leaked-credential-checks-CPHOK_dE.mjs +0 -18
  339. package/dist/local-BundUuDT.mjs +0 -2
  340. package/dist/login-BBYC_BtH.mjs +0 -2
  341. package/dist/login-D2uoWhWh.mjs +0 -5
  342. package/dist/logo-matches-Bc1DQ4-g.mjs +0 -6
  343. package/dist/logos-X5B8z7Iv.mjs +0 -7
  344. package/dist/logpush-C2ENi1et.mjs +0 -46
  345. package/dist/logs-BKDz7kBW.mjs +0 -36
  346. package/dist/magic-cloud-networking-B60Gld8A.mjs +0 -71
  347. package/dist/magic-network-monitoring-CxXI3Y-H.mjs +0 -36
  348. package/dist/magic-transit-ZCSaCbl8.mjs +0 -386
  349. package/dist/managed-defense-DrxMb7xi.mjs +0 -18
  350. package/dist/managed-transforms-AI7KrRU1.mjs +0 -9
  351. package/dist/matches-rPMLS3Ip.mjs +0 -6
  352. package/dist/mcp-DXUMvEWt.mjs +0 -32
  353. package/dist/mesh-MmBCQ37q.mjs +0 -26
  354. package/dist/monetization-DQE5VtUO.mjs +0 -20
  355. package/dist/mtls-certificates-DwkEb-Hy.mjs +0 -13
  356. package/dist/network-BcfobxQY.mjs +0 -50
  357. package/dist/network-interconnects-BU3tN_Ab.mjs +0 -72
  358. package/dist/o11y-BBv7nedp.mjs +0 -93
  359. package/dist/oauth-BUr8bPwo.mjs +0 -9
  360. package/dist/oauth-clients-qWVImhHE.mjs +0 -16
  361. package/dist/oauth-scopes-CdeIgJIx.mjs +0 -4
  362. package/dist/organization-CJeOVWH7.mjs +0 -71
  363. package/dist/organizations-BpfoqZcG.mjs +0 -4
  364. package/dist/origin-ca-certificates-Bimf07RF.mjs +0 -11
  365. package/dist/origin-post-quantum-encryption-CM-If38w.mjs +0 -6
  366. package/dist/origin-tls-client-auth-BPwYPhc9.mjs +0 -30
  367. package/dist/output-BOe-3AQG.mjs +0 -2
  368. package/dist/page-rules-DOeekMrj.mjs +0 -39
  369. package/dist/pay-per-crawl-qJpseNNx.mjs +0 -38
  370. package/dist/pay-per-use-C1MWKJ4O.mjs +0 -33
  371. package/dist/pipelines-rCwXQw6S.mjs +0 -44
  372. package/dist/precursor-Bk8Pp6jT.mjs +0 -4
  373. package/dist/previews-BEheHO3T.mjs +0 -4
  374. package/dist/progress-CQqDtgmF.mjs +0 -2
  375. package/dist/prompt-C8FyienX.mjs +0 -3
  376. package/dist/queries-DJ8looyq.mjs +0 -9
  377. package/dist/queues-BBH9Q-Tt.mjs +0 -57
  378. package/dist/r2-CdJKpP2w.mjs +0 -128
  379. package/dist/raw-fetch-DbXN3SlE.mjs +0 -2
  380. package/dist/realtime-onrXppzh.mjs +0 -172
  381. package/dist/registrar-CbEBc5IE.mjs +0 -43
  382. package/dist/registrar-sandbox-BJhn1HFT.mjs +0 -56
  383. package/dist/reporting-bXZY6obP.mjs +0 -14
  384. package/dist/request-tracers-CihskC2A.mjs +0 -4
  385. package/dist/resolve-CaTBV-c6.mjs +0 -2
  386. package/dist/resolve-DCGSzUDQ.mjs +0 -2
  387. package/dist/resource-sharing-DDqcCHVs.mjs +0 -40
  388. package/dist/resource-tagging-D63RpBce.mjs +0 -4
  389. package/dist/rules-CAW0-Wde.mjs +0 -18
  390. package/dist/rulesets-CPir63Qc.mjs +0 -37
  391. package/dist/rum-BfwTcuup.mjs +0 -30
  392. package/dist/run-DEynXvCc.mjs +0 -2
  393. package/dist/scim-CtZ1FeQE.mjs +0 -18
  394. package/dist/secrets-store-BIuBYUJT.mjs +0 -24
  395. package/dist/security-insights-DfUus0bs.mjs +0 -40
  396. package/dist/security-txt-CgZOsAIZ.mjs +0 -9
  397. package/dist/session-BcM8Vyyx.mjs +0 -2
  398. package/dist/shared-CpS23WwR.mjs +0 -2
  399. package/dist/smart-shield-ClgB7r-9.mjs +0 -24
  400. package/dist/snippets-DLO3iFAg.mjs +0 -20
  401. package/dist/speed-DX5X2EIR.mjs +0 -24
  402. package/dist/sql-CF044HDW.mjs +0 -4
  403. package/dist/src-BMATTZU_.mjs +0 -125
  404. package/dist/ssl-CM-rChEC.mjs +0 -45
  405. package/dist/startup-profile-D662WI9s.mjs +0 -2
  406. package/dist/state-D7uNYnoi.mjs +0 -2
  407. package/dist/stream-5EmUOQvy.mjs +0 -102
  408. package/dist/submit-lEAaRSMR.mjs +0 -4
  409. package/dist/telemetry-0Y5hAtCX.mjs +0 -2
  410. package/dist/tenant-DnI7QziH.mjs +0 -10
  411. package/dist/tenant-custom-nameservers-MR0dlcGm.mjs +0 -9
  412. package/dist/theme-CQ_TYifs.mjs +0 -6
  413. package/dist/turnstile-M7sKCEz3.mjs +0 -33
  414. package/dist/ui-YmjF66Ct.mjs +0 -5
  415. package/dist/update-check-aTutXNRd.mjs +0 -2
  416. package/dist/url-info-Dos9VOXV.mjs +0 -4
  417. package/dist/url-normalization-CZbFOq_v.mjs +0 -9
  418. package/dist/url-scanner-B7quLPGW.mjs +0 -16
  419. package/dist/values-D-rrZrDa.mjs +0 -4
  420. package/dist/vectorize-D2tf_oA8.mjs +0 -32
  421. package/dist/version-BGnqDvNR.mjs +0 -2
  422. package/dist/web-assets-DQAfvPT9.mjs +0 -64
  423. package/dist/web3-MI0GQDnu.mjs +0 -28
  424. package/dist/workers-By6Pf8fv.mjs +0 -40
  425. package/dist/workers-builds-6YsWsCmC.mjs +0 -14
  426. package/dist/workers-for-platforms-DL8fC1qR.mjs +0 -40
  427. package/dist/workers-vpc-BYx6sbgd.mjs +0 -13
  428. package/dist/workflows-ByQLnV0E.mjs +0 -52
  429. package/dist/zaraz-CgbpmA85.mjs +0 -22
  430. package/dist/zero-trust-CpjTkkWt.mjs +0 -837
  431. package/dist/zone-DnKIe6po.mjs +0 -4
  432. package/dist/zones--5ZzsDmQ.mjs +0 -124
@@ -1,72 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-C8FyienX.mjs";function p(e){return e.usage(`$0 network-interconnects cnis create
3
-
4
- Creates a new Cloud Network Interconnect (CNI) for private network connectivity between Cloudflare and your infrastructure. CNIs enable dedicated, high-performance network links.`).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session
5
- Prefixes containing host bits will be normalized to contain network bits only.
6
- Duplicates are not allowed.`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
7
-
8
- Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the
9
- key is not treated as a secret value. This is *only* supported for preventing
10
- misconfiguration, not for defending against malicious attacks.
11
-
12
- The MD5 key, if set, must be of non-zero length and consist only of the following types of
13
- character:
14
-
15
- * ASCII alphanumerics: \`[a-zA-Z0-9]\`
16
- * Special characters in the set \`'!@#$%^&*()+[]{}<>/.,;:_-~\`= \\|\`
17
-
18
- In other words, MD5 keys may contain any printable ASCII character aside from newline
19
- (0x0A), quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09),
20
- form feed (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one
21
- or more of these disallowed characters will be rejected.`}).option(`interconnect`,{type:`string`,description:`The interconnect field`}).option(`magic-conduit-name`,{type:`string`,description:`The magic.conduit_name field`}).option(`magic-description`,{type:`string`,description:`The magic.description field`}).option(`magic-mtu`,{type:`number`,description:`The magic.mtu 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)`}).check(e=>{if([`bgp-customer-asn`,`bgp-extra-prefixes`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`,`bgp-extra-prefixes`].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 --bgp-* flag is set`)}return!0})}const m={command:`create`,describe:`Create a new CNI object`,builder:p,handler:async f=>s({command:`network-interconnects cnis create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){let e=await n();a({command:`cf network-interconnects cnis create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/cnis`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({account:u(f.account,`account`,`text`),bgp:{customer_asn:f[`bgp-customer-asn`],extra_prefixes:f[`bgp-extra-prefixes`],md5_key:u(f[`bgp-md5-key`],`bgp-md5-key`,`text`)},interconnect:u(f.interconnect,`interconnect`,`text`),magic:{conduit_name:u(f[`magic-conduit-name`],`magic-conduit-name`,`text`),description:u(f[`magic-description`],`magic-description`,`text`),mtu:f[`magic-mtu`]}}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.networkInterconnects.cnis.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}if(f.account===void 0&&(f.account=await d(`account`,`Customer account tag`)),f.interconnect===void 0&&(f.interconnect=await d(`interconnect`,`The interconnect field`)),f[`magic-conduit-name`]===void 0&&(f[`magic-conduit-name`]=await d(`magic-conduit-name`,`The magic.conduit_name field`)),f[`magic-description`]===void 0&&(f[`magic-description`]=await d(`magic-description`,`The magic.description field`)),f[`magic-mtu`]===void 0)throw Error(`--magic-mtu is required (or pass --body with this field set).`);let m=l({account:u(f.account,`account`,`text`),bgp:{customer_asn:f[`bgp-customer-asn`],extra_prefixes:f[`bgp-extra-prefixes`],md5_key:u(f[`bgp-md5-key`],`bgp-md5-key`,`text`)},interconnect:u(f.interconnect,`interconnect`,`text`),magic:{conduit_name:u(f[`magic-conduit-name`],`magic-conduit-name`,`text`),description:u(f[`magic-description`],`magic-description`,`text`),mtu:f[`magic-mtu`]}}),h=await o(`Creating`,async()=>s.networkInterconnects.cnis.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function h(e){return e.usage(`$0 network-interconnects cnis delete <cni>
22
-
23
- Permanently removes a Cloud Network Interconnect (CNI) configuration. The private network connection will be terminated.`).positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,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 g={command:`delete <cni>`,describe:`Delete a specified CNI object`,builder:h,handler:async c=>s({command:`network-interconnects cnis delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf network-interconnects cnis delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/cnis/${c.cni==null?`<cni>`:encodeURIComponent(String(c.cni))}`,pathParams:{cni:String(c.cni??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
24
- `);return}let u=await o(`Deleting`,async()=>s.networkInterconnects.cnis.delete({account_id:l,cni:c.cni}));i(u,{successLabel:`Deleted`})})};function _(e){return e.usage(`$0 network-interconnects cnis get <cni>
25
-
26
- Retrieves configuration details for a specific Cloud Network Interconnect (CNI), including connection status and parameters.`).positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <cni>`,describe:`Get information about a CNI object`,builder:_,handler:async c=>s({command:`network-interconnects cnis get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf network-interconnects cnis get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/cnis/${c.cni==null?`<cni>`:encodeURIComponent(String(c.cni))}`,pathParams:{cni:String(c.cni??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.cnis.get({account_id:l,cni:c.cni}));i(u,{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 network-interconnects cnis list
27
-
28
- Lists all Cloud Network Interconnects (CNIs) configured for the account, showing connection status and parameters.`).option(`slot`,{type:`string`,description:`If specified, only show CNIs associated with the specified slot`}).option(`tunnel-id`,{type:`string`,description:`If specified, only show cnis associated with the specified tunnel id`}).option(`cursor`,{type:`number`,description:`Cursor`}).option(`limit`,{type:`number`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List existing CNI objects`,builder:y,handler:async c=>s({command:`network-interconnects cnis list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={slot:c.slot,tunnel_id:c[`tunnel-id`],cursor:c.cursor,limit:c.limit};if(c.dryRun){let e=await n();a({command:`cf network-interconnects cnis list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/cnis`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.networkInterconnects.cnis.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 network-interconnects cnis update <cni>
29
-
30
- Updates the configuration of an existing Cloud Network Interconnect (CNI), including connection parameters and routing settings.`).positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,demandOption:!0}).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session
31
- Prefixes containing host bits will be normalized to contain network bits only.
32
- Duplicates are not allowed.`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
33
-
34
- Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the
35
- key is not treated as a secret value. This is *only* supported for preventing
36
- misconfiguration, not for defending against malicious attacks.
37
-
38
- The MD5 key, if set, must be of non-zero length and consist only of the following types of
39
- character:
40
-
41
- * ASCII alphanumerics: \`[a-zA-Z0-9]\`
42
- * Special characters in the set \`'!@#$%^&*()+[]{}<>/.,;:_-~\`= \\|\`
43
-
44
- In other words, MD5 keys may contain any printable ASCII character aside from newline
45
- (0x0A), quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09),
46
- form feed (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one
47
- or more of these disallowed characters will be rejected.`}).option(`bgp-mode`,{type:`string`,description:"The BGP mode for a CNI.\nOne of the following:\n* `dynamic_route_exchange`\n* `advertise_only`",choices:[`dynamic_route_exchange`,`advertise_only`]}).coerce(`bgp-mode`,e=>u(e,`bgp-mode`,`text`)).option(`cust-ip`,{type:`string`,description:`Customer end of the point-to-point link
48
-
49
- This should always be inside the same prefix as \`p2p_ip\`.`}).option(`id`,{type:`string`,description:`The id field`}).option(`interconnect`,{type:`string`,description:`Interconnect identifier hosting this CNI`}).option(`magic-conduit-name`,{type:`string`,description:`The magic.conduit_name field`}).option(`magic-description`,{type:`string`,description:`The magic.description field`}).option(`magic-mtu`,{type:`number`,description:`The magic.mtu field`}).option(`p2p-ip`,{type:`string`,description:`Cloudflare end of the point-to-point link`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`bgp-customer-asn`,`bgp-extra-prefixes`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`,`bgp-extra-prefixes`].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 --bgp-* flag is set`)}return!0})}const S={command:`update <cni>`,describe:`Modify stored information about a CNI object`,builder:x,handler:async f=>s({command:`network-interconnects cnis update`,classification:{safeFlags:[`bgp-mode`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=await n();a({command:`cf network-interconnects cnis update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/cnis/${f.cni==null?`<cni>`:encodeURIComponent(String(f.cni))}`,pathParams:{cni:String(f.cni??``)},bodyKind:`json`,body:f.body===void 0?l({account:u(f.account,`account`,`text`),bgp:{customer_asn:f[`bgp-customer-asn`],extra_prefixes:f[`bgp-extra-prefixes`],md5_key:u(f[`bgp-md5-key`],`bgp-md5-key`,`text`)},bgp_mode:f[`bgp-mode`],cust_ip:u(f[`cust-ip`],`cust-ip`,`text`),id:u(f.id,`id`,`text`),interconnect:u(f.interconnect,`interconnect`,`text`),magic:{conduit_name:u(f[`magic-conduit-name`],`magic-conduit-name`,`text`),description:u(f[`magic-description`],`magic-description`,`text`),mtu:f[`magic-mtu`]},p2p_ip:u(f[`p2p-ip`],`p2p-ip`,`text`)}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Updating`,async()=>s.networkInterconnects.cnis.update({body:e,account_id:p,cni:f.cni}));i(t,{successLabel:`Updated`});return}if(f.account===void 0&&(f.account=await d(`account`,`Customer account tag`)),f[`cust-ip`]===void 0&&(f[`cust-ip`]=await d(`cust-ip`,"Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`.")),f.id===void 0&&(f.id=await d(`id`,`The id field`)),f.interconnect===void 0&&(f.interconnect=await d(`interconnect`,`Interconnect identifier hosting this CNI`)),f[`magic-conduit-name`]===void 0&&(f[`magic-conduit-name`]=await d(`magic-conduit-name`,`The magic.conduit_name field`)),f[`magic-description`]===void 0&&(f[`magic-description`]=await d(`magic-description`,`The magic.description field`)),f[`magic-mtu`]===void 0)throw Error(`--magic-mtu is required (or pass --body with this field set).`);f[`p2p-ip`]===void 0&&(f[`p2p-ip`]=await d(`p2p-ip`,`Cloudflare end of the point-to-point link`));let m=l({account:u(f.account,`account`,`text`),bgp:{customer_asn:f[`bgp-customer-asn`],extra_prefixes:f[`bgp-extra-prefixes`],md5_key:u(f[`bgp-md5-key`],`bgp-md5-key`,`text`)},bgp_mode:f[`bgp-mode`],cust_ip:u(f[`cust-ip`],`cust-ip`,`text`),id:u(f.id,`id`,`text`),interconnect:u(f.interconnect,`interconnect`,`text`),magic:{conduit_name:u(f[`magic-conduit-name`],`magic-conduit-name`,`text`),description:u(f[`magic-description`],`magic-description`,`text`),mtu:f[`magic-mtu`]},p2p_ip:u(f[`p2p-ip`],`p2p-ip`,`text`)}),h=await o(`Updating`,async()=>s.networkInterconnects.cnis.update({body:m,account_id:p,cni:f.cni}));i(h,{successLabel:`Updated`})})},C={command:`cnis`,describe:`Cloud Network Interconnect (CNI) connections — private links from cloud providers to Cloudflare`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 network-interconnects interconnects create
50
-
51
- Creates a new network interconnect for connecting Cloudflare's network to external networks. Interconnects provide dedicated bandwidth and reduced latency for traffic exchange.`).option(`account`,{type:`string`,description:`The account field`}).option(`type`,{type:`string`,description:`The type field`}).option(`slot-id`,{type:`string`,description:`The slot_id field`}).option(`speed`,{type:`string`,description:`The speed field`}).option(`bandwidth`,{type:`string`,description:`Bandwidth structure as visible through the customer-facing API.`,choices:[`50M`,`100M`,`200M`,`300M`,`400M`,`500M`,`1G`,`2G`,`5G`,`10G`,`20G`,`50G`]}).coerce(`bandwidth`,e=>u(e,`bandwidth`,`text`)).option(`pairing-key`,{type:`string`,description:`Pairing key provided by GCP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`slot-id`,[`bandwidth`,`pairing-key`]).conflicts(`speed`,[`bandwidth`,`pairing-key`]).conflicts(`bandwidth`,[`slot-id`,`speed`]).implies(`bandwidth`,[`pairing-key`]).conflicts(`pairing-key`,[`slot-id`,`speed`]).implies(`pairing-key`,[`bandwidth`])}const T={command:`create`,describe:`Create a new interconnect`,builder:w,handler:async f=>s({command:`network-interconnects interconnects create`,classification:{safeFlags:[`bandwidth`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=await n();a({command:`cf network-interconnects interconnects create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({account:u(f.account,`account`,`text`),type:u(f.type,`type`,`text`),slot_id:u(f[`slot-id`],`slot-id`,`text`),speed:u(f.speed,`speed`,`text`),bandwidth:f.bandwidth,pairing_key:u(f[`pairing-key`],`pairing-key`,`text`)}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.networkInterconnects.interconnects.create({body:e,account_id:p}));i(t,{successLabel:`Created`});return}f.account===void 0&&(f.account=await d(`account`,`The account field`)),f.type===void 0&&(f.type=await d(`type`,`The type field`));let m=l({account:u(f.account,`account`,`text`),type:u(f.type,`type`,`text`),slot_id:u(f[`slot-id`],`slot-id`,`text`),speed:u(f.speed,`speed`,`text`),bandwidth:f.bandwidth,pairing_key:u(f[`pairing-key`],`pairing-key`,`text`)}),h=await o(`Creating`,async()=>s.networkInterconnects.interconnects.create({body:m,account_id:p}));i(h,{successLabel:`Created`})})};function E(e){return e.usage(`$0 network-interconnects interconnects delete <icon>
52
-
53
- Permanently removes a network interconnect configuration. The physical or virtual connection will be terminated.`).positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,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 D={command:`delete <icon>`,describe:`Delete an interconnect object`,builder:E,handler:async c=>s({command:`network-interconnects interconnects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf network-interconnects interconnects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}`,pathParams:{icon:String(c.icon??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
54
- `);return}let u=await o(`Deleting`,async()=>s.networkInterconnects.interconnects.delete({account_id:l,icon:c.icon}));i(u,{successLabel:`Deleted`})})};function O(e){return e.usage(`$0 network-interconnects interconnects get <icon>
55
-
56
- Retrieves configuration and status details for a specific network interconnect.`).positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <icon>`,describe:`Get information about an interconnect object`,builder:O,handler:async c=>s({command:`network-interconnects interconnects get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf network-interconnects interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}`,pathParams:{icon:String(c.icon??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.interconnects.get({account_id:l,icon:c.icon}));i(u,{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 network-interconnects interconnects list
57
-
58
- Lists all network interconnects configured for the account, including physical and virtual connections.`).option(`site`,{type:`string`,description:`If specified, only show interconnects located at the given site`}).option(`type`,{type:`string`,description:`If specified, only show interconnects of the given type`}).option(`cursor`,{type:`number`,description:`Cursor`}).option(`limit`,{type:`number`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List existing interconnects`,builder:A,handler:async c=>s({command:`network-interconnects interconnects list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={site:c.site,type:c.type,cursor:c.cursor,limit:c.limit};if(c.dryRun){let e=await n();a({command:`cf network-interconnects interconnects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.networkInterconnects.interconnects.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 network-interconnects interconnects loa-default-name <icon>
59
-
60
- Retrieves the default customer name that will be used in the LOA if no name is provided to the \`/accounts/{account_id}/cni/interconnects/{icon}/loa\` endpoint.`).positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`loa-default-name <icon>`,describe:`Get the default customer name for LOA generation`,builder:M,handler:async c=>s({command:`network-interconnects interconnects loa-default-name`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf network-interconnects interconnects loa-default-name`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}/loa/default`,pathParams:{icon:String(c.icon??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.interconnects.loaDefaultName({account_id:l,icon:c.icon}));i(u,{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 network-interconnects interconnects loa <icon>
61
-
62
- Downloads the Letter of Authorization (LOA) for a network interconnect, required for physical cross-connect provisioning.`).positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`name`,{type:`string`,description:`Custom name to use in the LOA instead of the account name (200 Character limit)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`loa <icon>`,describe:`Generate the Letter of Authorization (LOA) for a given interconnect`,builder:P,handler:async c=>s({command:`network-interconnects interconnects loa`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={name:c.name};if(c.dryRun){let e=await n();a({command:`cf network-interconnects interconnects loa`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}/loa`,pathParams:{icon:String(c.icon??``)},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.networkInterconnects.interconnects.loa({account_id:u,icon:c.icon,...s}));i(d,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 network-interconnects interconnects status <icon>
63
-
64
- Gets the current operational status of a network interconnect, including link state and traffic metrics.`).positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`status <icon>`,describe:`Get the current status of an interconnect object`,builder:I,handler:async c=>s({command:`network-interconnects interconnects status`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf network-interconnects interconnects status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}/status`,pathParams:{icon:String(c.icon??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.interconnects.status({account_id:l,icon:c.icon}));i(u,{successLabel:`Loaded`})})},R={command:`interconnects`,describe:`Physical cross-connect and partner interconnect sessions with LOA and status tracking`,builder:e=>e.command(T).command(D).command(k).command(j).command(F).command(N).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 network-interconnects settings get
65
-
66
- Retrieves current settings configuration for the specified resource or service.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get`,describe:`Get the current settings for the active account`,builder:z,handler:async c=>s({command:`network-interconnects settings get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf network-interconnects settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/settings`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.settings.get({account_id:l}));i(u,{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 network-interconnects settings update
67
-
68
- Updates configuration settings for the specified resource or service.`).option(`default-asn`,{type:`number`,description:`The default_asn 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`,describe:`Update the current settings for the active account`,builder:V,handler:async u=>s({command:`network-interconnects settings update`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){let e=await n();a({command:`cf network-interconnects settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/settings`,pathParams:{},bodyKind:`json`,body:u.body===void 0?l({default_asn:u[`default-asn`]}):c(u.body)});return}let s=await t(u),d=u.local?e:await r();if(u.accountId=d,u.body){let e=c(u.body),t=await o(`Updating`,async()=>s.networkInterconnects.settings.update({...e,account_id:d}));i(t,{successLabel:`Updated`});return}let f=l({default_asn:u[`default-asn`]}),p=await o(`Updating`,async()=>s.networkInterconnects.settings.update({...f,account_id:d}));i(p,{successLabel:`Updated`})})},U={command:`settings`,describe:`Account-level interconnect settings and default configurations`,builder:e=>e.command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 network-interconnects slots get <slot>
69
-
70
- Gets information about a specific infrastructure slot allocation.`).positional(`slot`,{type:`string`,description:`Slot`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <slot>`,describe:`Get information about the specified slot`,builder:W,handler:async c=>s({command:`network-interconnects slots get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf network-interconnects slots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/slots/${c.slot==null?`<slot>`:encodeURIComponent(String(c.slot))}`,pathParams:{slot:String(c.slot??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.slots.get({account_id:l,slot:c.slot}));i(u,{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 network-interconnects slots list
71
-
72
- Lists all available infrastructure slots for the account, showing allocation status and capacity.`).option(`address-contains`,{type:`string`,description:`If specified, only show slots with the given text in their address field`}).option(`site`,{type:`string`,description:`If specified, only show slots located at the given site`}).option(`speed`,{type:`string`,description:`If specified, only show slots that support the given speed`}).option(`occupied`,{type:`boolean`,description:`If specified, only show slots with a specific occupied/unoccupied state`}).option(`cursor`,{type:`number`,description:`Cursor`}).option(`limit`,{type:`number`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`list`,describe:`Retrieve a list of all slots matching the specified parameters`,builder:K,handler:async c=>s({command:`network-interconnects slots list`,classification:{safeFlags:[`occupied`,`dry-run`]}},c,async()=>{let s={address_contains:c[`address-contains`],site:c.site,speed:c.speed,occupied:c.occupied,cursor:c.cursor,limit:c.limit};if(c.dryRun){let e=await n();a({command:`cf network-interconnects slots list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/slots`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.networkInterconnects.slots.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},J={command:`slots`,describe:`Available interconnect facility slots showing port capacity at Cloudflare data centers`,builder:e=>e.command(G).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`network-interconnects`,describe:`Physical and virtual private interconnects between your infrastructure and Cloudflare's network`,builder:e=>e.command(C).command(R).command(U).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Y as default};
@@ -1,93 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,i,t as a}from"./context-BBLtgdR1.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-CQqDtgmF.mjs";import{t as l}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-DkHKPkJ7.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-C8FyienX.mjs";import{t as v}from"./cli-types-9oYmRTHJ.mjs";function y(e){return e.usage(`$0 o11y agents sessions list
3
-
4
- List the Sessions of one Agent in one Worker service observed in the window, most recently active first. A Session groups the Traces containing an invocation of the Agent with the same gen_ai.conversation.id. Results describe observed activity in the window, not complete history.`).option(`service`,{type:`string`,description:`Worker service that emitted the Agent invocations.`,demandOption:!0}).option(`agent`,{type:`string`,description:`Agent name reported by the invocations (gen_ai.agent.name).`,demandOption:!0}).option(`from`,{type:`number`,description:`Start of the window, as Unix epoch milliseconds. Clamped to the 7-day retention period.`,demandOption:!0}).option(`to`,{type:`number`,description:`End of the window, as Unix epoch milliseconds. Must be later than from.`,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 ee={command:`list`,describe:`List Agent sessions`,builder:y,handler:async t=>l({command:`o11y agents sessions list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={service:t.service,agent:t.agent,from:t.from,to:t.to,cursor:t.cursor,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({command:`cf o11y agents sessions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/agents/sessions`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.observability.agents.sessions.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function te(e){return e.usage(`$0 o11y agents sessions runs <conversationId>
5
-
6
- List the Trace-level runs of one Session, newest invocation first. A run is a Trace containing an invocation of the Agent in the Conversation; the Agent need not own the Trace.`).positional(`conversation-id`,{type:`string`,description:`GenAI conversation identifier (gen_ai.conversation.id) of the Session.`,demandOption:!0}).option(`service`,{type:`string`,description:`Worker service that emitted the Agent invocations.`,demandOption:!0}).option(`agent`,{type:`string`,description:`Agent name reported by the invocations (gen_ai.agent.name).`,demandOption:!0}).option(`from`,{type:`number`,description:`Start of the window, as Unix epoch milliseconds. Clamped to the 7-day retention period.`,demandOption:!0}).option(`to`,{type:`number`,description:`End of the window, as Unix epoch milliseconds. Must be later than from.`,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 b={command:`runs <conversationId>`,describe:`List Agent session runs`,builder:te,handler:async t=>l({command:`o11y agents sessions runs`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={service:t.service,agent:t.agent,from:t.from,to:t.to,cursor:t.cursor,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({command:`cf o11y agents sessions runs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/agents/sessions/${t[`conversation-id`]==null?`<conversation-id>`:encodeURIComponent(String(t[`conversation-id`]))}/runs`,pathParams:{"conversation-id":String(t[`conversation-id`]??``)},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.observability.agents.sessions.runs({account_id:u,conversationId:t[`conversation-id`],...i}));o(d,{successLabel:`Loaded`})})},x={command:`sessions`,describe:`Operations for agents.sessions`,builder:e=>e.command(ee).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},S={command:`agents`,describe:`Operations for agents`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.usage(`$0 o11y destinations create
7
-
8
- Create a new Workers Observability Telemetry Destination.`).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).coerce(`configuration-type`,e=>m(e,`configuration-type`,`text`)).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 w={command:`create`,describe:`Create Destination`,builder:C,handler:async t=>l({command:`o11y destinations create`,classification:{safeFlags:[`configuration-type`,`enabled`,`skip-preflight-check`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({configuration:{type:t[`configuration-type`],url:m(t[`configuration-url`],`configuration-url`,`text`)},enabled:t.enabled,name:m(t.name,`name`,`text`),skipPreflightCheck:t[`skip-preflight-check`]}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.observability.destinations.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}if(t[`configuration-type`]===void 0&&(t[`configuration-type`]=await g(`configuration-type`,`The configuration.type field`,[`logpush`])),t[`configuration-url`]===void 0&&(t[`configuration-url`]=await h(`configuration-url`,`The configuration.url field`)),t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await h(`name`,`The name field`));let u=p({configuration:{type:t[`configuration-type`],url:m(t[`configuration-url`],`configuration-url`,`text`)},enabled:t.enabled,name:m(t.name,`name`,`text`),skipPreflightCheck:t[`skip-preflight-check`]}),f=await c(`Creating`,async()=>i.observability.destinations.create({...u,account_id:l}));o(f,{successLabel:`Created`})})};function T(e){return e.usage(`$0 o11y destinations delete <slug>
9
-
10
- Delete a Workers Observability Telemetry Destination.`).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 E={command:`delete <slug>`,describe:`Delete Destination`,builder:T,handler:async t=>l({command:`o11y destinations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y destinations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/destinations/${t.slug==null?`<slug>`:encodeURIComponent(String(t.slug))}`,pathParams:{slug:String(t.slug??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
11
- `);return}let u=await c(`Deleting`,async()=>i.observability.destinations.delete({account_id:l,slug:t.slug}));o(u,{successLabel:`Deleted`})})};function D(e){return e.usage(`$0 o11y destinations list
12
-
13
- List your Workers Observability Telemetry Destinations.`).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 O={command:`list`,describe:`Get Destinations`,builder:v(D),handler:async t=>l({command:`o11y destinations list`,classification:{safeFlags:[`order`,`order-by`,`dry-run`]}},t,async()=>{let i={page:t.page,perPage:t[`per-page`],order:t.order,orderBy:t[`order-by`]};if(t.dryRun){let e=await r();s({command:`cf o11y destinations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/destinations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.observability.destinations.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 o11y destinations update <slug>
14
-
15
- Update an existing Workers Observability Telemetry Destination.`).positional(`slug`,{type:`string`,description:`Slug`,demandOption:!0}).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).coerce(`configuration-type`,e=>m(e,`configuration-type`,`text`)).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 A={command:`update <slug>`,describe:`Update Destination`,builder:k,handler:async t=>l({command:`o11y destinations update`,classification:{safeFlags:[`configuration-type`,`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y destinations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/destinations/${t.slug==null?`<slug>`:encodeURIComponent(String(t.slug))}`,pathParams:{slug:String(t.slug??``)},bodyKind:`json`,body:t.body===void 0?p({configuration:{type:t[`configuration-type`],url:m(t[`configuration-url`],`configuration-url`,`text`)},enabled:t.enabled}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.observability.destinations.update({...e,account_id:l,slug:t.slug}));o(n,{successLabel:`Updated`});return}if(t[`configuration-type`]===void 0&&(t[`configuration-type`]=await g(`configuration-type`,`The configuration.type field`,[`logpush`])),t[`configuration-url`]===void 0&&(t[`configuration-url`]=await h(`configuration-url`,`The configuration.url field`)),t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=p({configuration:{type:t[`configuration-type`],url:m(t[`configuration-url`],`configuration-url`,`text`)},enabled:t.enabled}),f=await c(`Updating`,async()=>i.observability.destinations.update({...u,account_id:l,slug:t.slug}));o(f,{successLabel:`Updated`})})},j={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(w).command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 o11y issues add <groupId>
16
-
17
- Add one or more ungrouped issues to an existing issue group.`).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 N={command:`add <groupId>`,describe:`Add issue group members`,builder:M,handler:async t=>l({command:`o11y issues add`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues add`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/groups/${t[`group-id`]==null?`<group-id>`:encodeURIComponent(String(t[`group-id`]))}/members`,pathParams:{"group-id":String(t[`group-id`]??``)},bodyKind:`json`,body:t.body===void 0?p({issueIds:t[`issue-ids`]}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.observability.issues.add({...e,account_id:l,groupId:t[`group-id`]}));o(n,{successLabel:`Created`});return}if(t[`issue-ids`]===void 0)throw Error(`--issue-ids is required (or pass --body with this field set).`);let u=p({issueIds:t[`issue-ids`]}),f=await c(`Creating`,async()=>i.observability.issues.add({...u,account_id:l,groupId:t[`group-id`]}));o(f,{successLabel:`Created`})})};function P(e){return e.usage(`$0 o11y issues automations create
18
-
19
- Create an account or service issue automation.`).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:`create`,describe:`Create an issue automation`,builder:P,handler:async t=>l({command:`o11y issues automations create`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues automations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/automations`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({afterInactivitySeconds:t[`after-inactivity-seconds`],afterOccurrences:t[`after-occurrences`],enabled:t.enabled,name:m(t.name,`name`,`text`),policyId:m(t[`policy-id`],`policy-id`,`text`),service:m(t.service,`service`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.observability.issues.automations.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}t[`policy-id`]===void 0&&(t[`policy-id`]=await h(`policy-id`,`The policyId field`));let u=p({afterInactivitySeconds:t[`after-inactivity-seconds`],afterOccurrences:t[`after-occurrences`],enabled:t.enabled,name:m(t.name,`name`,`text`),policyId:m(t[`policy-id`],`policy-id`,`text`),service:m(t.service,`service`,`text`)}),f=await c(`Creating`,async()=>i.observability.issues.automations.create({...u,account_id:l}));o(f,{successLabel:`Created`})})};function I(e){return e.usage(`$0 o11y issues automations delete <automationId>
20
-
21
- Delete an issue automation while preserving its historical runs.`).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 L={command:`delete <automationId>`,describe:`Delete an issue automation`,builder:I,handler:async t=>l({command:`o11y issues automations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues automations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/automations/${t[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(t[`automation-id`]))}`,pathParams:{"automation-id":String(t[`automation-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
22
- `);return}let u=await c(`Deleting`,async()=>i.observability.issues.automations.delete({account_id:l,automationId:t[`automation-id`]}));o(u,{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 o11y issues automations get <automationId>
23
-
24
- Retrieve an issue automation.`).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 z={command:`get <automationId>`,describe:`Get an issue automation`,builder:R,handler:async t=>l({command:`o11y issues automations get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues automations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/automations/${t[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(t[`automation-id`]))}`,pathParams:{"automation-id":String(t[`automation-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.observability.issues.automations.get({account_id:l,automationId:t[`automation-id`]}));o(u,{successLabel:`Loaded`})})};function B(e){return e.usage(`$0 o11y issues automations list
25
-
26
- List account and service issue automations.`).option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List issue automations`,builder:B,handler:async t=>l({command:`o11y issues automations list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={service:t.service};if(t.dryRun){let e=await r();s({command:`cf o11y issues automations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/automations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.observability.issues.automations.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 o11y issues automations update <automationId>
27
-
28
- Replace an issue automation configuration.`).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 U={command:`update <automationId>`,describe:`Update an issue automation`,builder:H,handler:async t=>l({command:`o11y issues automations update`,classification:{safeFlags:[`enabled`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues automations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/automations/${t[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(t[`automation-id`]))}`,pathParams:{"automation-id":String(t[`automation-id`]??``)},bodyKind:`json`,body:t.body===void 0?p({afterInactivitySeconds:t[`after-inactivity-seconds`],afterOccurrences:t[`after-occurrences`],enabled:t.enabled,name:m(t.name,`name`,`text`),policyId:m(t[`policy-id`],`policy-id`,`text`),service:m(t.service,`service`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.observability.issues.automations.update({...e,account_id:l,automationId:t[`automation-id`]}));o(n,{successLabel:`Updated`});return}t[`policy-id`]===void 0&&(t[`policy-id`]=await h(`policy-id`,`The policyId field`));let u=p({afterInactivitySeconds:t[`after-inactivity-seconds`],afterOccurrences:t[`after-occurrences`],enabled:t.enabled,name:m(t.name,`name`,`text`),policyId:m(t[`policy-id`],`policy-id`,`text`),service:m(t.service,`service`,`text`)}),f=await c(`Updating`,async()=>i.observability.issues.automations.update({...u,account_id:l,automationId:t[`automation-id`]}));o(f,{successLabel:`Updated`})})},W={command:`automations`,describe:`Operations for issues.automations`,builder:e=>e.command(F).command(L).command(z).command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 o11y issues get <issueId>
29
-
30
- Retrieve an issue.`).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 K={command:`get <issueId>`,describe:`Get an issue`,builder:G,handler:async t=>l({command:`o11y issues get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/${t[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(t[`issue-id`]))}`,pathParams:{"issue-id":String(t[`issue-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.observability.issues.get({account_id:l,issueId:t[`issue-id`]}));o(u,{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 o11y issues group
31
-
32
- Group two or more issues under a new customer-defined identity.`).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 J={command:`group`,describe:`Create an issue group`,builder:q,handler:async t=>l({command:`o11y issues group`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues group`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/groups`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({issueIds:t[`issue-ids`],title:m(t.title,`title`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.observability.issues.group({...e,account_id:l}));o(n,{successLabel:`Created`});return}if(t[`issue-ids`]===void 0)throw Error(`--issue-ids is required (or pass --body with this field set).`);t.title===void 0&&(t.title=await h(`title`,`The title field`));let u=p({issueIds:t[`issue-ids`],title:m(t.title,`title`,`text`)}),f=await c(`Creating`,async()=>i.observability.issues.group({...u,account_id:l}));o(f,{successLabel:`Created`})})};function Y(e){return e.usage(`$0 o11y issues list
33
-
34
- List detected issues.`).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 X={command:`list`,describe:`List detected issues`,builder:v(Y),handler:async t=>l({command:`o11y issues list`,classification:{safeFlags:[`order`,`order-by`,`status`,`dry-run`]}},t,async()=>{let i={page:t.page,perPage:t[`per-page`],order:t.order,orderBy:t[`order-by`],search:t.search,service:t.service,type:t.type,status:t.status};if(t.dryRun){let e=await r();s({command:`cf o11y issues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.observability.issues.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function Z(e){return e.usage(`$0 o11y issues notify <issueId>
35
-
36
- Send the issue to one ANS policy, or every matching Real-Time Issue policy when no policy ID is provided.`).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(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Q={command:`notify <issueId>`,describe:`Notify about an issue`,builder:Z,handler:async t=>l({command:`o11y issues notify`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues notify`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/${t[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(t[`issue-id`]))}/notification-runs`,pathParams:{"issue-id":String(t[`issue-id`]??``)},bodyKind:`json`,body:t.body===void 0?p({policyId:m(t[`policy-id`],`policy-id`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.observability.issues.notify({...e,account_id:l,issueId:t[`issue-id`]}));o(n,{successLabel:`Created`});return}let u=p({policyId:m(t[`policy-id`],`policy-id`,`text`)}),f=await c(`Creating`,async()=>i.observability.issues.notify({...u,account_id:l,issueId:t[`issue-id`]}));o(f,{successLabel:`Created`})})};function ne(e){return e.usage(`$0 o11y issues occurrences <issueId>
37
-
38
- List the retained error occurrences grouped into an issue, newest first.`).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 re={command:`occurrences <issueId>`,describe:`List issue occurrences`,builder:ne,handler:async t=>l({command:`o11y issues occurrences`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={cursor:t.cursor,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({command:`cf o11y issues occurrences`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/${t[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(t[`issue-id`]))}/occurrences`,pathParams:{"issue-id":String(t[`issue-id`]??``)},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.observability.issues.occurrences({account_id:u,issueId:t[`issue-id`],...i}));o(d,{successLabel:`Loaded`})})};function ie(e){return e.usage(`$0 o11y issues remove <issueId>
39
-
40
- Remove an issue from a group, dissolving the group when fewer than two members remain.`).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 ae={command:`remove <issueId>`,describe:`Remove an issue group member`,builder:ie,handler:async t=>l({command:`o11y issues remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues remove`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/groups/${t[`group-id`]==null?`<group-id>`:encodeURIComponent(String(t[`group-id`]))}/members/${t[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(t[`issue-id`]))}`,pathParams:{"group-id":String(t[`group-id`]??``),"issue-id":String(t[`issue-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
41
- `);return}let u=await c(`Deleting`,async()=>i.observability.issues.remove({account_id:l,groupId:t[`group-id`],issueId:t[`issue-id`]}));o(u,{successLabel:`Deleted`})})};function oe(e){return e.usage(`$0 o11y issues summary
42
-
43
- Retrieve aggregate issue counts for the account.`).option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`summary`,describe:`Summarize detected issues`,builder:oe,handler:async t=>l({command:`o11y issues summary`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={service:t.service};if(t.dryRun){let e=await r();s({command:`cf o11y issues summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/summary`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.observability.issues.summary({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 o11y issues ungroup <groupId>
44
-
45
- Dissolve an issue group and restore its members as standalone issues.`).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 le={command:`ungroup <groupId>`,describe:`Dissolve an issue group`,builder:ce,handler:async t=>l({command:`o11y issues ungroup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues ungroup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/groups/${t[`group-id`]==null?`<group-id>`:encodeURIComponent(String(t[`group-id`]))}`,pathParams:{"group-id":String(t[`group-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
46
- `);return}let u=await c(`Deleting`,async()=>i.observability.issues.ungroup({account_id:l,groupId:t[`group-id`]}));o(u,{successLabel:`Deleted`})})};function ue(e){return e.usage(`$0 o11y issues update <issueId>
47
-
48
- Modify an issue status or group title.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`active`,`resolved`,`ignored`]}).coerce(`status`,e=>m(e,`status`,`text`)).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 de={command:`update <issueId>`,describe:`Modify an issue`,builder:ue,handler:async t=>l({command:`o11y issues update`,classification:{safeFlags:[`status`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y issues update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/${t[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(t[`issue-id`]))}`,pathParams:{"issue-id":String(t[`issue-id`]??``)},bodyKind:`json`,body:t.body===void 0?p({status:t.status,title:m(t.title,`title`,`text`)}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.observability.issues.update({...e,account_id:l,issueId:t[`issue-id`]}));o(n,{successLabel:`Updated`});return}let u=p({status:t.status,title:m(t.title,`title`,`text`)}),f=await c(`Updating`,async()=>i.observability.issues.update({...u,account_id:l,issueId:t[`issue-id`]}));o(f,{successLabel:`Updated`})})},fe={command:`issues`,describe:`Operations for issues`,builder:e=>e.command(N).command(K).command(J).command(X).command(Q).command(re).command(ae).command(se).command(le).command(de).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function pe(e){return e.usage(`$0 o11y metrics-export list
49
-
50
- List resources configured for Workers Observability metrics export.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List Metrics Exports`,builder:pe,handler:async i=>l({command:`o11y metrics-export list`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=await r();s({command:`cf o11y metrics-export list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/metricsexport`,pathParams:{},bodyKind:`none`});return}let l=await n(i),u=i.local?e:await a();i.accountId=u;let d=await c(`Loading`,async()=>t(l,`GET`,`/accounts/${u}/workers/observability/metricsexport`));o(d,{successLabel:`Loaded`})})};function he(e){return e.usage(`$0 o11y metrics-export upsert
51
-
52
- Create or replace resources configured for Workers Observability metrics export.`).option(`requester-requester-id`,{type:`string`,description:`The requester.requesterId field`}).option(`requester-requester-type`,{type:`string`,description:`The requester.requesterType field`,choices:[`workers`]}).coerce(`requester-requester-type`,e=>m(e,`requester-requester-type`,`text`)).option(`resources`,{type:`string`,description:`The resources field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ge={command:`upsert`,describe:`Upsert Metrics Exports`,builder:he,handler:async i=>l({command:`o11y metrics-export upsert`,classification:{safeFlags:[`requester-requester-type`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=await r();s({command:`cf o11y metrics-export upsert`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/metricsexport`,pathParams:{},bodyKind:`json`,body:i.body===void 0?p({requester:{requesterId:m(i[`requester-requester-id`],`requester-requester-id`,`text`),requesterType:i[`requester-requester-type`]},resources:f(i.resources,`resources`)}):d(i.body)});return}let l=await n(i),_=i.local?e:await a();if(i.accountId=_,i.body){let e=d(i.body),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${_}/workers/observability/metricsexport`,{body:e}));o(n,{successLabel:`Created`});return}if(i[`requester-requester-id`]===void 0&&(i[`requester-requester-id`]=await h(`requester-requester-id`,`The requester.requesterId field`)),i[`requester-requester-type`]===void 0&&(i[`requester-requester-type`]=await g(`requester-requester-type`,`The requester.requesterType field`,[`workers`])),i.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let v={};i[`requester-requester-id`]!==void 0&&u(v,[`requester`,`requesterId`],m(i[`requester-requester-id`],`requester-requester-id`,`text`)),i[`requester-requester-type`]!==void 0&&u(v,[`requester`,`requesterType`],i[`requester-requester-type`]),i.resources!==void 0&&u(v,[`resources`],f(i.resources,`resources`));let y=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${_}/workers/observability/metricsexport`,{body:Object.keys(v).length>0?v:void 0}));o(y,{successLabel:`Created`})})},_e={command:`metrics-export`,describe:`Operations for metrics-export`,builder:e=>e.command(me).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ve(e){return e.usage(`$0 o11y queries create
53
-
54
- Persist query for later use.`).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`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).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`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).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 ye={command:`create`,describe:`Save query`,builder:ve,handler:async t=>l({command:`o11y queries create`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/queries`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({description:m(t.description,`description`,`text`),name:m(t.name,`name`,`text`),parameters:{datasets:t[`parameters-datasets`],filterCombination:t[`parameters-filter-combination`],limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:t[`parameters-order-by-order`],value:m(t[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.observability.queries.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}t.description===void 0&&(t.description=await h(`description`,`The description field`)),t.name===void 0&&(t.name=await h(`name`,`Query name`)),t[`parameters-order-by-value`]===void 0&&(t[`parameters-order-by-value`]=await h(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let u=p({description:m(t.description,`description`,`text`),name:m(t.name,`name`,`text`),parameters:{datasets:t[`parameters-datasets`],filterCombination:t[`parameters-filter-combination`],limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:t[`parameters-order-by-order`],value:m(t[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}),f=await c(`Creating`,async()=>i.observability.queries.create({...u,account_id:l}));o(f,{successLabel:`Created`})})};function be(e){return e.usage(`$0 o11y queries delete <queryId>
55
-
56
- Delete a saved query.`).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 xe={command:`delete <queryId>`,describe:`Delete query`,builder:be,handler:async t=>l({command:`o11y queries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/queries/${t[`query-id`]==null?`<query-id>`:encodeURIComponent(String(t[`query-id`]))}`,pathParams:{"query-id":String(t[`query-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force})){process.stderr.write(`Aborted.
57
- `);return}let u=await c(`Deleting`,async()=>i.observability.queries.delete({account_id:l,queryId:t[`query-id`]}));o(u,{successLabel:`Deleted`})})};function Se(e){return e.usage(`$0 o11y queries edit <queryId>
58
-
59
- Update saved query.`).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`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).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`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).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 Ce={command:`edit <queryId>`,describe:`Update query`,builder:Se,handler:async t=>l({command:`o11y queries edit`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y queries edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/queries/${t[`query-id`]==null?`<query-id>`:encodeURIComponent(String(t[`query-id`]))}`,pathParams:{"query-id":String(t[`query-id`]??``)},bodyKind:`json`,body:t.body===void 0?p({description:m(t.description,`description`,`text`),name:m(t.name,`name`,`text`),parameters:{datasets:t[`parameters-datasets`],filterCombination:t[`parameters-filter-combination`],limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:t[`parameters-order-by-order`],value:m(t[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Updating`,async()=>i.observability.queries.edit({...e,account_id:l,queryId:t[`query-id`]}));o(n,{successLabel:`Updated`});return}t.description===void 0&&(t.description=await h(`description`,`The description field`)),t.name===void 0&&(t.name=await h(`name`,`Query name`)),t[`parameters-order-by-value`]===void 0&&(t[`parameters-order-by-value`]=await h(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let u=p({description:m(t.description,`description`,`text`),name:m(t.name,`name`,`text`),parameters:{datasets:t[`parameters-datasets`],filterCombination:t[`parameters-filter-combination`],limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:t[`parameters-order-by-order`],value:m(t[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}),f=await c(`Updating`,async()=>i.observability.queries.edit({...u,account_id:l,queryId:t[`query-id`]}));o(f,{successLabel:`Updated`})})};function we(e){return e.usage(`$0 o11y queries get <queryId>
60
-
61
- Retrieve a saved query.`).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 Te={command:`get <queryId>`,describe:`Get query`,builder:we,handler:async t=>l({command:`o11y queries get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/queries/${t[`query-id`]==null?`<query-id>`:encodeURIComponent(String(t[`query-id`]))}`,pathParams:{"query-id":String(t[`query-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.observability.queries.get({account_id:l,queryId:t[`query-id`]}));o(u,{successLabel:`Loaded`})})};function Ee(e){return e.usage(`$0 o11y queries list
62
-
63
- List saved queries.`).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 De={command:`list`,describe:`List queries`,builder:v(Ee),handler:async t=>l({command:`o11y queries list`,classification:{safeFlags:[`order`,`order-by`,`dry-run`]}},t,async()=>{let i={page:t.page,perPage:t[`per-page`],order:t.order,orderBy:t[`order-by`]};if(t.dryRun){let e=await r();s({command:`cf o11y queries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/queries`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.observability.queries.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},Oe={command:`queries`,describe:`Operations for queries`,builder:e=>e.command(ye).command(xe).command(Ce).command(Te).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ke(e){return e.usage(`$0 o11y shared-queries create
64
-
65
- Shared queries store the results of a previously run query, allowing you to share the results with others.`).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`]}).coerce(`chart-type`,e=>m(e,`chart-type`,`text`)).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`]}).coerce(`distribution-scale`,e=>m(e,`distribution-scale`,`text`)).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`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).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`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).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`}).coerce(`view`,e=>m(e,`view`,`text`)).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 Ae={command:`create`,describe:`Create a sharable link to a query result`,builder:ke,handler:async t=>l({command:`o11y shared-queries create`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y shared-queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/shared/query`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({chart:t.chart,chartType:t[`chart-type`],compare:t.compare,distributionScale:t[`distribution-scale`],granularity:t.granularity,ignoreSeries:t[`ignore-series`],limit:t.limit,offset:m(t.offset,`offset`,`text`),offsetBy:t[`offset-by`],offsetDirection:m(t[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:t[`parameters-datasets`],filterCombination:t[`parameters-filter-combination`],limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:t[`parameters-order-by-order`],value:m(t[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(t[`query-id`],`query-id`,`text`),timeframe:{from:t[`timeframe-from`],to:t[`timeframe-to`]},view:t.view}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.observability.sharedQueries.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}if(t[`query-id`]===void 0&&(t[`query-id`]=await h(`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).`)),t[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(t[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let u=p({chart:t.chart,chartType:t[`chart-type`],compare:t.compare,distributionScale:t[`distribution-scale`],granularity:t.granularity,ignoreSeries:t[`ignore-series`],limit:t.limit,offset:m(t.offset,`offset`,`text`),offsetBy:t[`offset-by`],offsetDirection:m(t[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:t[`parameters-datasets`],filterCombination:t[`parameters-filter-combination`],limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:t[`parameters-order-by-order`],value:m(t[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(t[`query-id`],`query-id`,`text`),timeframe:{from:t[`timeframe-from`],to:t[`timeframe-to`]},view:t.view}),f=await c(`Creating`,async()=>i.observability.sharedQueries.create({...u,account_id:l}));o(f,{successLabel:`Created`})})};function je(e){return e.usage(`$0 o11y shared-queries get <id>
66
-
67
- Shared queries store the results of a previously run query, allowing you to share the results with others.`).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 Me={command:`get <id>`,describe:`View a query that has been shared`,builder:v(je),handler:async t=>l({command:`o11y shared-queries get`,classification:{safeFlags:[`view`,`dry-run`]}},t,async()=>{let i={view:t.view};if(t.dryRun){let e=await r();s({command:`cf o11y shared-queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/shared/query/${t.id==null?`<id>`:encodeURIComponent(String(t.id))}`,pathParams:{id:String(t.id??``)},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.observability.sharedQueries.get({account_id:u,id:t.id,...i}));o(d,{successLabel:`Loaded`})})},Ne={command:`shared-queries`,describe:`Operations for shared-queries`,builder:e=>e.command(Ae).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pe(e){return e.usage(`$0 o11y telemetry heartbeat
68
-
69
- Notify live tail that user is still eligible to receive live events.`).option(`script-id`,{type:`string`,description:`The scriptId field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Keep your live tail connection alive.`})}const Fe={command:`heartbeat`,describe:`Live tail heartbeat`,builder:Pe,handler:async i=>l({command:`o11y telemetry heartbeat`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=await r();s({command:`cf o11y telemetry heartbeat`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/telemetry/live-tail/heartbeat`,pathParams:{},bodyKind:`json`,body:i.body===void 0?p({scriptId:m(i[`script-id`],`script-id`,`text`)}):d(i.body)});return}let l=await n(i),f=i.local?e:await a();if(i.accountId=f,i.body){let e=d(i.body),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${f}/workers/observability/telemetry/live-tail/heartbeat`,{body:e}));o(n,{successLabel:`Created`});return}let h={};i[`script-id`]!==void 0&&u(h,[`scriptId`],m(i[`script-id`],`script-id`,`text`));let g=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${f}/workers/observability/telemetry/live-tail/heartbeat`,{body:Object.keys(h).length>0?h:void 0}));o(g,{successLabel:`Created`})})};function Ie(e){return e.usage(`$0 o11y telemetry keys
70
-
71
- List all the keys in your telemetry events.`).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 Le={command:`keys`,describe:`List keys`,builder:Ie,handler:async t=>l({command:`o11y telemetry keys`,classification:{safeFlags:[`key-needle-is-regex`,`key-needle-match-case`,`needle-is-regex`,`needle-match-case`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y telemetry keys`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/telemetry/keys`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({datasets:t.datasets,filters:f(t.filters,`filters`),from:t.from,keyNeedle:{isRegex:t[`key-needle-is-regex`],matchCase:t[`key-needle-match-case`]},limit:t.limit,needle:{isRegex:t[`needle-is-regex`],matchCase:t[`needle-match-case`]},to:t.to}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.observability.telemetry.keys({...e,account_id:l}));o(n,{successLabel:`Created`});return}let u=p({datasets:t.datasets,filters:f(t.filters,`filters`),from:t.from,keyNeedle:{isRegex:t[`key-needle-is-regex`],matchCase:t[`key-needle-match-case`]},limit:t.limit,needle:{isRegex:t[`needle-is-regex`],matchCase:t[`needle-match-case`]},to:t.to}),m=await c(`Creating`,async()=>i.observability.telemetry.keys({...u,account_id:l}));o(m,{successLabel:`Created`})})};function Re(e){return e.usage(`$0 o11y telemetry live-tail
72
-
73
- Prepare websocket server for live tail.`).option(`filter-combination`,{type:`string`,description:`Set a flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`],default:`and`}).coerce(`filter-combination`,e=>m(e,`filter-combination`,`text`)).option(`filters`,{type:`string`,description:`Apply filters to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`script-id`,{type:`string`,description:`The scriptId field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create websocket server for live tail.`})}const ze={command:`live-tail`,describe:`Prepare live tail`,builder:Re,handler:async i=>l({command:`o11y telemetry live-tail`,classification:{safeFlags:[`filter-combination`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=await r();s({command:`cf o11y telemetry live-tail`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/telemetry/live-tail`,pathParams:{},bodyKind:`json`,body:i.body===void 0?p({filterCombination:i[`filter-combination`],filters:f(i.filters,`filters`),scriptId:m(i[`script-id`],`script-id`,`text`)}):d(i.body)});return}let l=await n(i),h=i.local?e:await a();if(i.accountId=h,i.body){let e=d(i.body),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${h}/workers/observability/telemetry/live-tail`,{body:e}));o(n,{successLabel:`Created`});return}let g={};i[`filter-combination`]!==void 0&&u(g,[`filterCombination`],i[`filter-combination`]),i.filters!==void 0&&u(g,[`filters`],f(i.filters,`filters`)),i[`script-id`]!==void 0&&u(g,[`scriptId`],m(i[`script-id`],`script-id`,`text`));let _=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${h}/workers/observability/telemetry/live-tail`,{body:Object.keys(g).length>0?g:void 0}));o(_,{successLabel:`Created`})})};function Be(e){return e.usage(`$0 o11y telemetry query
74
-
75
- Run a temporary or saved query.`).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`]}).coerce(`chart-type`,e=>m(e,`chart-type`,`text`)).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`]}).coerce(`distribution-scale`,e=>m(e,`distribution-scale`,`text`)).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`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).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`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).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`}).coerce(`view`,e=>m(e,`view`,`text`)).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 Ve={command:`query`,describe:`Run a query`,builder:Be,handler:async t=>l({command:`o11y telemetry query`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y telemetry query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/telemetry/query`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({chart:t.chart,chartType:t[`chart-type`],compare:t.compare,distributionScale:t[`distribution-scale`],granularity:t.granularity,ignoreSeries:t[`ignore-series`],limit:t.limit,offset:m(t.offset,`offset`,`text`),offsetBy:t[`offset-by`],offsetDirection:m(t[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:t[`parameters-datasets`],filterCombination:t[`parameters-filter-combination`],limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:t[`parameters-order-by-order`],value:m(t[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(t[`query-id`],`query-id`,`text`),timeframe:{from:t[`timeframe-from`],to:t[`timeframe-to`]},view:t.view}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Loading`,async()=>i.observability.telemetry.query({...e,account_id:l}));o(n,{successLabel:`Loaded`});return}if(t[`query-id`]===void 0&&(t[`query-id`]=await h(`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).`)),t[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(t[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let u=p({chart:t.chart,chartType:t[`chart-type`],compare:t.compare,distributionScale:t[`distribution-scale`],granularity:t.granularity,ignoreSeries:t[`ignore-series`],limit:t.limit,offset:m(t.offset,`offset`,`text`),offsetBy:t[`offset-by`],offsetDirection:m(t[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:t[`parameters-datasets`],filterCombination:t[`parameters-filter-combination`],limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:t[`parameters-order-by-order`],value:m(t[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(t[`query-id`],`query-id`,`text`),timeframe:{from:t[`timeframe-from`],to:t[`timeframe-to`]},view:t.view}),f=await c(`Loading`,async()=>i.observability.telemetry.query({...u,account_id:l}));o(f,{successLabel:`Loaded`})})};function He(e){return e.usage(`$0 o11y telemetry values
76
-
77
- List unique values found in your events.`).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`]}).coerce(`type`,e=>m(e,`type`,`text`)).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 Ue={command:`values`,describe:`List values`,builder:He,handler:async t=>l({command:`o11y telemetry values`,classification:{safeFlags:[`needle-is-regex`,`needle-match-case`,`type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf o11y telemetry values`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/telemetry/values`,pathParams:{},bodyKind:`json`,body:t.body===void 0?p({datasets:t.datasets,filters:f(t.filters,`filters`),key:m(t.key,`key`,`text`),limit:t.limit,needle:{isRegex:t[`needle-is-regex`],matchCase:t[`needle-match-case`]},timeframe:{from:t[`timeframe-from`],to:t[`timeframe-to`]},type:t.type}):d(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=d(t.body),n=await c(`Creating`,async()=>i.observability.telemetry.values({...e,account_id:l}));o(n,{successLabel:`Created`});return}if(t.datasets===void 0)throw Error(`--datasets is required (or pass --body with this field set).`);if(t.key===void 0&&(t.key=await h(`key`,`The key field`)),t[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(t[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);t.type===void 0&&(t.type=await g(`type`,`The type field`,[`string`,`boolean`,`number`]));let u=p({datasets:t.datasets,filters:f(t.filters,`filters`),key:m(t.key,`key`,`text`),limit:t.limit,needle:{isRegex:t[`needle-is-regex`],matchCase:t[`needle-match-case`]},timeframe:{from:t[`timeframe-from`],to:t[`timeframe-to`]},type:t.type}),_=await c(`Creating`,async()=>i.observability.telemetry.values({...u,account_id:l}));o(_,{successLabel:`Created`})})},We={command:`telemetry`,describe:`Operations for telemetry`,builder:e=>e.command(Fe).command(Le).command(ze).command(Ve).command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ge(e){return e.usage(`$0 o11y tracing rules delete
78
-
79
- Delete every sampling override from a zone's managed Cloudflare Traces ruleset.`).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 zone trace rules`,builder:Ge,handler:async e=>l({command:`o11y tracing rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf o11y 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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
80
- `);return}let a=await c(`Deleting`,async()=>t.observability.tracing.rules.delete({zone_id:r}));o(a,{successLabel:`Deleted`})})};function qe(e){return e.usage(`$0 o11y tracing rules get
81
-
82
- Retrieve the ordered sampling overrides for a zone's managed Cloudflare Traces ruleset.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Je={command:`get`,describe:`View zone trace rules`,builder:qe,handler:async e=>l({command:`o11y tracing rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y 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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.observability.tracing.rules.get({zone_id:r}));o(a,{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 o11y tracing rules update
83
-
84
- Replace all sampling overrides in a zone's managed Cloudflare Traces ruleset. Rules are evaluated in the supplied order.`).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 Ye={command:`update`,describe:`Replace zone trace rules`,builder:$,handler:async e=>l({command:`o11y tracing rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y 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?p({rules:f(e.rules,`rules`)}):d(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body),i=await c(`Updating`,async()=>t.observability.tracing.rules.update({...n,zone_id:r}));o(i,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let a=p({rules:f(e.rules,`rules`)}),l=await c(`Updating`,async()=>t.observability.tracing.rules.update({...a,zone_id:r}));o(l,{successLabel:`Updated`})})},Xe={command:`rules`,describe:`Operations for tracing.rules`,builder:e=>e.command(Ke).command(Je).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ze(e){return e.usage(`$0 o11y tracing settings delete
85
-
86
- Reset the zone-level Cloudflare Traces settings to their defaults while preserving the sampling rules.`).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 Qe={command:`delete`,describe:`Reset zone tracing settings`,builder:Ze,handler:async e=>l({command:`o11y tracing settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf o11y 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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await _({force:!!e.force})){process.stderr.write(`Aborted.
87
- `);return}let a=await c(`Deleting`,async()=>t.observability.tracing.settings.delete({zone_id:r}));o(a,{successLabel:`Deleted`})})};function $e(e){return e.usage(`$0 o11y tracing settings get
88
-
89
- Retrieve the zone-level Cloudflare Traces settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const et={command:`get`,describe:`View zone tracing settings`,builder:$e,handler:async e=>l({command:`o11y tracing settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y 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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.observability.tracing.settings.get({zone_id:r}));o(a,{successLabel:`Loaded`})})};function tt(e){return e.usage(`$0 o11y tracing settings update
90
-
91
- Update the zone-level Cloudflare Traces settings.`).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`]}).coerce(`propagation-policy`,e=>m(e,`propagation-policy`,`text`)).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 nt={command:`update`,describe:`Update zone tracing settings`,builder:tt,handler:async e=>l({command:`o11y tracing settings update`,classification:{safeFlags:[`enabled`,`forward-context`,`persist`,`propagation-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf o11y 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?p({destinations:e.destinations,enabled:e.enabled,forward_context:e[`forward-context`],persist:e.persist,propagation_policy:e[`propagation-policy`],sampling_ratio:e[`sampling-ratio`]}):d(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body),i=await c(`Updating`,async()=>t.observability.tracing.settings.update({...n,zone_id:r}));o(i,{successLabel:`Updated`});return}let a=p({destinations:e.destinations,enabled:e.enabled,forward_context:e[`forward-context`],persist:e.persist,propagation_policy:e[`propagation-policy`],sampling_ratio:e[`sampling-ratio`]}),l=await c(`Updating`,async()=>t.observability.tracing.settings.update({...a,zone_id:r}));o(l,{successLabel:`Updated`})})},rt={command:`settings`,describe:`Operations for tracing.settings`,builder:e=>e.command(Qe).command(et).command(nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},it={command:`tracing`,describe:`Operations for tracing`,builder:e=>e.command(Xe).command(rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function at(e){return e.usage(`$0 o11y usage
92
-
93
- Event counts and sizes broken down by dataset and service, bucketed by day, for up to 90 days. The top-level events field is the sum of all breakdown counts.`).option(`from`,{type:`string`,description:`Unix timestamp in milliseconds for the start of the range.`,demandOption:!0}).option(`to`,{type:`string`,description:`Unix timestamp in milliseconds for the end of the range.`,demandOption:!0}).option(`tz`,{type:`string`,description:`IANA timezone used to align daily bins to local midnight (e.g. 'America/Chicago'). Defaults to UTC.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ot={command:`usage`,describe:`Get event count`,builder:at,handler:async i=>l({command:`o11y usage`,classification:{safeFlags:[`dry-run`]}},i,async()=>{let l={from:i.from,to:i.to,tz:i.tz};if(i.dryRun){let e=await r();s({command:`cf o11y usage`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/usage`,pathParams:{},query:l,bodyKind:`none`});return}let u=await n(i),d=i.local?e:await a();i.accountId=d;let f=await c(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/workers/observability/usage`,{query:l}));o(f,{successLabel:`Loaded`})})},st={command:`o11y`,describe:`o11y`,builder:e=>e.command(ot).command(S).command(j).command(fe).command(_e).command(Oe).command(Ne).command(We).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{st as default};
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{n as t,t as n}from"./version-BGnqDvNR.mjs";import{t as r}from"./session-BcM8Vyyx.mjs";import{a as i,n as a,t as o}from"./cf-oRSQKirD.mjs";import{i as s,o as c,s as l}from"./dist-uRuGmkMB.mjs";import{n as u}from"./interactive-BW9T1D1q.mjs";import{n as d}from"./context-BBLtgdR1.mjs";const f={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var p=class extends Error{};async function m(n){if(u())throw new p;r(t);let i=await c({message:n});if(l(i)||typeof i!=`string`)throw new e(130,{cancelled:!0});return i}async function h(n,i){if(u())throw new p;r(t);let a=await s({message:n,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(l(a)||typeof a!=`string`)throw new e(130,{cancelled:!0});return f.log(`To have cf automatically use this account for future commands in this project, you can update your \`cloudflare.config.ts\`:
3
-
4
- import { defineConfig } from "cf/config";
5
-
6
- export default defineConfig({
7
- accountId: "${a}",
8
- });
9
- `),a}const g=o({logger:f,userAgent:n,prompt:m,select:h,isNoDefaultValueProvidedError:e=>e instanceof p});async function _(e,t){return g.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await d(t)})}function v(){return g.getActiveAccountId({})}async function y(){return g.fetchAllAccounts({compliance_region:await d()},{throwOnEmpty:!1})}async function b(e){if(e?.scopes&&!i(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return g.login({compliance_region:await d()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function x(e){return g.logout(e)}function S(e){g.setProfile(e)}function C(){return g.getActiveProfile()}function w(){return a({logger:f})}function T(e,t=process.cwd()){let n=w().resolve({profile:e,cwd:t});return S(n),n}function E(){return g.getOAuthTokenFromLocalState()}function D(){return g.readAuthCredentials()?.oauth_token!==void 0}function O(){return g.readAuthCredentials()}function k(){return g.getCredentialStore().path()}export{_ as a,D as c,O as d,T as f,k as i,b as l,v as n,w as o,S as p,C as r,E as s,y as t,x as u};
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-C8FyienX.mjs";function m(e){return e.usage(`$0 oauth-clients create
3
-
4
- Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>u(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create OAuth Client`,builder:m,handler:async p=>s({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=await n();a({command:`cf oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:p[`token-endpoint-auth-method`],tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)}):c(p.body)});return}let s=await t(p),m=p.local?e:await r();if(p.accountId=m,p.body){let e=c(p.body),t=await o(`Creating`,async()=>s.oauthClients.create({...e,account_id:m}));i(t,{successLabel:`Created`});return}if(p[`client-name`]===void 0&&(p[`client-name`]=await d(`client-name`,`Human-readable name of the OAuth client.`)),p[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(p[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(p[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(p.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);p[`token-endpoint-auth-method`]===void 0&&(p[`token-endpoint-auth-method`]=await f(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let h=l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:p[`token-endpoint-auth-method`],tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)}),g=await o(`Creating`,async()=>s.oauthClients.create({...h,account_id:m}));i(g,{successLabel:`Created`})})};function g(e){return e.usage(`$0 oauth-clients delete-rotated-secret <oauth-client-id>
5
-
6
- Removes the old client secret after a rotation, keeping only the new one. Use this after you have updated your client configuration to use the new secret. The \`has_rotated_secret\` field on the client indicates whether there is an old secret to delete.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,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 _={command:`delete-rotated-secret <oauth-client-id>`,describe:`Delete Rotated OAuth Client Secret`,builder:g,handler:async c=>s({command:`oauth-clients delete-rotated-secret`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf oauth-clients delete-rotated-secret`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients/${c[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(c[`oauth-client-id`]))}/rotate_secret`,pathParams:{"oauth-client-id":String(c[`oauth-client-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
7
- `);return}let u=await o(`Deleting`,async()=>s.oauthClients.deleteRotatedSecret({account_id:l,oauth_client_id:c[`oauth-client-id`]}));i(u,{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 oauth-clients delete <oauth-client-id>
8
-
9
- Delete an OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,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 <oauth-client-id>`,describe:`Delete OAuth Client`,builder:v,handler:async c=>s({command:`oauth-clients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf oauth-clients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients/${c[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(c[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(c[`oauth-client-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
10
- `);return}let u=await o(`Deleting`,async()=>s.oauthClients.delete({account_id:l,oauth_client_id:c[`oauth-client-id`]}));i(u,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 oauth-clients get <oauth-client-id>
11
-
12
- Get details of a specific OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <oauth-client-id>`,describe:`OAuth Client Details`,builder:b,handler:async c=>s({command:`oauth-clients get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf oauth-clients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients/${c[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(c[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(c[`oauth-client-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.oauthClients.get({account_id:l,oauth_client_id:c[`oauth-client-id`]}));i(u,{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 oauth-clients list
13
-
14
- List all OAuth clients for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List OAuth Clients`,builder:S,handler:async c=>s({command:`oauth-clients list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf oauth-clients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.oauthClients.list({account_id:l}));i(u,{successLabel:`Loaded`})})};function w(e){return e.usage("$0 oauth-clients rotate-secret <oauth-client-id>\n\nCreates a second client secret so you can update your client configuration before deleting the old one. The `has_rotated_secret` field on the client will be set to `true`.").positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`rotate-secret <oauth-client-id>`,describe:`Rotate OAuth Client Secret`,builder:w,handler:async c=>s({command:`oauth-clients rotate-secret`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf oauth-clients rotate-secret`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients/${c[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(c[`oauth-client-id`]))}/rotate_secret`,pathParams:{"oauth-client-id":String(c[`oauth-client-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Creating`,async()=>s.oauthClients.rotateSecret({account_id:l,oauth_client_id:c[`oauth-client-id`]}));i(u,{successLabel:`Created`})})};function E(e){return e.usage(`$0 oauth-clients update <oauth-client-id>
15
-
16
- Update an existing OAuth client. Only include fields you want to update.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>u(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`visibility`,{type:`string`,description:"Promote the OAuth client from private to public visibility. Only `public` is accepted; demotion to `private` is not supported. Promotion requires a non-empty client name, logo URI, verified client URI host, and at least one non-identity scope.",choices:[`public`]}).coerce(`visibility`,e=>u(e,`visibility`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update request for an OAuth client. Only include fields you want to update.`})}const D={command:`update <oauth-client-id>`,describe:`Update OAuth Client`,builder:E,handler:async d=>s({command:`oauth-clients update`,classification:{safeFlags:[`token-endpoint-auth-method`,`visibility`,`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf oauth-clients update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients/${d[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(d[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(d[`oauth-client-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({allowed_cors_origins:d[`allowed-cors-origins`],client_name:u(d[`client-name`],`client-name`,`text`),client_uri:u(d[`client-uri`],`client-uri`,`text`),grant_types:d[`grant-types`],logo_uri:u(d[`logo-uri`],`logo-uri`,`text`),optional_scopes:d[`optional-scopes`],policy_uri:u(d[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:d[`post-logout-redirect-uris`],redirect_uris:d[`redirect-uris`],response_types:d[`response-types`],scopes:d.scopes,token_endpoint_auth_method:d[`token-endpoint-auth-method`],tos_uri:u(d[`tos-uri`],`tos-uri`,`text`),visibility:d.visibility}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Updating`,async()=>s.oauthClients.update({...e,account_id:f,oauth_client_id:d[`oauth-client-id`]}));i(t,{successLabel:`Updated`});return}let p=l({allowed_cors_origins:d[`allowed-cors-origins`],client_name:u(d[`client-name`],`client-name`,`text`),client_uri:u(d[`client-uri`],`client-uri`,`text`),grant_types:d[`grant-types`],logo_uri:u(d[`logo-uri`],`logo-uri`,`text`),optional_scopes:d[`optional-scopes`],policy_uri:u(d[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:d[`post-logout-redirect-uris`],redirect_uris:d[`redirect-uris`],response_types:d[`response-types`],scopes:d.scopes,token_endpoint_auth_method:d[`token-endpoint-auth-method`],tos_uri:u(d[`tos-uri`],`tos-uri`,`text`),visibility:d.visibility}),m=await o(`Updating`,async()=>s.oauthClients.update({...p,account_id:f,oauth_client_id:d[`oauth-client-id`]}));i(m,{successLabel:`Updated`})})},O={command:`oauth-clients`,describe:`oauth-clients`,builder:e=>e.command(h).command(y).command(_).command(x).command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{O as default};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{n as e}from"./auth-CAWalgW0.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-CQqDtgmF.mjs";import{t as i}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";function a(e){return e.usage(`$0 oauth-scopes list
3
-
4
- List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`List OAuth Scopes`,builder:a,handler:async a=>i({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let i=await e(a),o=await r(`Loading`,async()=>i.oauthScopes.list());t(o,{successLabel:`Loaded`})})},s={command:`oauth-scopes`,describe:`oauth-scopes`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};