cf 1.0.0-beta.12 → 1.0.0-beta.13

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 (283) hide show
  1. package/dist/_meta/commands.json +3119 -2067
  2. package/dist/_meta/hand-written-commands.json +14 -1
  3. package/dist/_meta/schemas.json +1856 -1132
  4. package/dist/{abuse-reports-Cy9RcWPu.mjs → abuse-reports-BjU1s8cf.mjs} +10 -10
  5. package/dist/{access-DwJm1qet.mjs → access-C_G2MZnA.mjs} +1 -1
  6. package/dist/account-tags-CaXDDeZ4.mjs +15 -0
  7. package/dist/{accounts-BSd4b-1j.mjs → accounts-BALwxDQY.mjs} +70 -77
  8. package/dist/{acm-BfI0p2sX.mjs → acm-CP9EaXQN.mjs} +1 -1
  9. package/dist/{addressing-lfeJf7YB.mjs → addressing-DRlaxqrI.mjs} +1 -1
  10. package/dist/{agent-memory-CP1qpn-y.mjs → agent-memory-vGhlfZBx.mjs} +1 -1
  11. package/dist/{ai-jFzFBANM.mjs → ai-CJtbWfB9.mjs} +18 -16
  12. package/dist/{ai-audit-B_tSl78A.mjs → ai-audit-C0BJNqZZ.mjs} +1 -1
  13. package/dist/ai-gateway-BQtv3U3x.mjs +80 -0
  14. package/dist/ai-search-DGU1Y5By.mjs +79 -0
  15. package/dist/{ai-security-CKGE547U.mjs → ai-security-CFTaYk_X.mjs} +1 -1
  16. package/dist/{alerting-CuxoqG3S.mjs → alerting-1hun27JC.mjs} +3 -3
  17. package/dist/analytics-DXUSjvzT.mjs +17 -0
  18. package/dist/{analytics_engine-BoapM9wd.mjs → analytics_engine-CQsnL09C.mjs} +1 -1
  19. package/dist/{api-security-Nk_bg-Kg.mjs → api-security-BXhrfR6-.mjs} +4 -4
  20. package/dist/argo-LPUCTnee.mjs +14 -0
  21. package/dist/{artifacts-BS6cEqCB.mjs → artifacts-Dt6easua.mjs} +1 -1
  22. package/dist/{audit-logs-x5tLqeX2.mjs → audit-logs-CVznAM2Z.mjs} +1 -1
  23. package/dist/{auth-AobvBmz4.mjs → auth-CGLsxbc6.mjs} +1 -1
  24. package/dist/auth-CrmVwfpJ.mjs +2 -0
  25. package/dist/{auth-CKotxfap.mjs → auth-eQr-kQCH.mjs} +1 -1
  26. package/dist/{auth-token-CtguMdmF.mjs → auth-token-pNQrX_9O.mjs} +1 -1
  27. package/dist/{autoconfig-PfnbLuEO.mjs → autoconfig-sD7Frryg.mjs} +151 -151
  28. package/dist/{basin-catalog-Ddi-t3q9.mjs → basin-catalog-ZQICw-zF.mjs} +1 -1
  29. package/dist/{billing-CDMc4tvX.mjs → billing-Dy1-dV_B.mjs} +2 -2
  30. package/dist/{bot-management-UrCM3P8K.mjs → bot-management-DTgPwL7O.mjs} +1 -1
  31. package/dist/{botnet-feed-CVwRm42k.mjs → botnet-feed-xb98Cj3Y.mjs} +1 -1
  32. package/dist/{brand-protection-DfNf5REj.mjs → brand-protection-Ck3okE2k.mjs} +1 -1
  33. package/dist/browser-run-DJGJSzFX.mjs +42 -0
  34. package/dist/build-B1L6xrgC.mjs +2 -0
  35. package/dist/{build-BKPVP5ip.mjs → build-HmSXqjGn.mjs} +1 -1
  36. package/dist/{builds-BG5DHqU3.mjs → builds-CYxcZtkG.mjs} +3 -3
  37. package/dist/{cache-C05hHXUp.mjs → cache-D9tSfovH.mjs} +1 -1
  38. package/dist/{certificate-authorities-DyCFmZwR.mjs → certificate-authorities-CpiveTFC.mjs} +1 -1
  39. package/dist/cf-BxsXrVeh.mjs +18 -0
  40. package/dist/chunk-DSGVRFIS-C1_SEtRK.mjs +2 -0
  41. package/dist/{chunk-FT2NMTJB-DQ7s3x7Q.mjs → chunk-NDZDTP46-Bjx_wtJe.mjs} +3 -3
  42. package/dist/{chunk-AUSY7DKT-BJX6Fdc4.mjs → chunk-TAK63GWY-DdMktrgc.mjs} +9 -2
  43. package/dist/{cli-D9qlPB-6.mjs → cli-DeJc9U8z.mjs} +1 -1
  44. package/dist/{client-certificates-B-m8rfM9.mjs → client-certificates-CF6YZyvP.mjs} +1 -1
  45. package/dist/{client-side-security-M4oIUqID.mjs → client-side-security-BLoe9kS5.mjs} +1 -1
  46. package/dist/{cloud-connector-B63Dwn6n.mjs → cloud-connector-DXRUHsjt.mjs} +1 -1
  47. package/dist/cloudflared--1Ws1RJy.mjs +2 -0
  48. package/dist/{cloudforce-one-Dlc1GNFy.mjs → cloudforce-one-CBLxXi6v.mjs} +162 -162
  49. package/dist/{command-BQpXcGKV.mjs → command-83uVfXh9.mjs} +1 -1
  50. package/dist/{command-BWlpCtHe.mjs → command-BDe67N_n.mjs} +1 -1
  51. package/dist/{command-CXxh5Hce.mjs → command-BlIb6RR2.mjs} +1 -1
  52. package/dist/{command-ZBQ1WITj.mjs → command-Bpzp8Mz2.mjs} +1 -1
  53. package/dist/{command-CKQlxypn.mjs → command-BvfKhMl7.mjs} +1 -1
  54. package/dist/command-CG6RvZs0.mjs +2 -0
  55. package/dist/{command-CRl00uA2.mjs → command-CcuLC6CJ.mjs} +1 -1
  56. package/dist/{command-CUkXxZsc.mjs → command-Cu7dcaHT.mjs} +1 -1
  57. package/dist/{command-SS1z_t68.mjs → command-D3fyhdy-.mjs} +1 -1
  58. package/dist/{command-DyE8v4sd.mjs → command-DUhX8Dcr.mjs} +1 -1
  59. package/dist/{command-VuxpEvmH.mjs → command-Dh7RmjFu.mjs} +1 -1
  60. package/dist/{command-DEQSv-S1.mjs → command-DwXiDOeH.mjs} +1 -1
  61. package/dist/{command-BlGILcTA.mjs → command-UiHLJ8Ji.mjs} +1 -1
  62. package/dist/{command-Rv2MR-eh.mjs → command-_rqD0hXF.mjs} +1 -1
  63. package/dist/{command-DBaNgfA4.mjs → command-oNVwyjGB.mjs} +1 -1
  64. package/dist/{completions-lf50FBGm.mjs → completions-D06AO7A8.mjs} +11 -11
  65. package/dist/{connector-interrupts-DHN1KtUE.mjs → connector-interrupts-DelTmNyw.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-CHg7FmXh.mjs → connector-telemetry-events-BwxR3G8d.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-CSifYi9r.mjs → connector-telemetry-snapshots-Bqq-hrpJ.mjs} +1 -1
  68. package/dist/{connectors-0UwPUav-.mjs → connectors-D-m3rEpk.mjs} +1 -1
  69. package/dist/{containers-DuIsM7lM.mjs → containers-CVNfEjJs.mjs} +3 -3
  70. package/dist/{containers-DRzgE46U.mjs → containers-DeoZyeQe.mjs} +25 -25
  71. package/dist/{content-scan-COyTz0Wb.mjs → content-scan-W0BNzbQp.mjs} +1 -1
  72. package/dist/{context-Bwkz4Lm_.mjs → context-q7UaYK69.mjs} +2 -2
  73. package/dist/{cps-B7_BJaAU.mjs → cps-BZ6hqRb5.mjs} +1 -1
  74. package/dist/{csamScanner-jez2EYXC.mjs → csamScanner-Bo1t3CLh.mjs} +1 -1
  75. package/dist/{ct-alerting-CACDrY0E.mjs → ct-alerting-E03faC7p.mjs} +1 -1
  76. package/dist/{custom-certificates-BBd92YlF.mjs → custom-certificates-CUySSPzi.mjs} +3 -3
  77. package/dist/{custom-csrs-DTwBiNMX.mjs → custom-csrs-gNpWkJPQ.mjs} +1 -1
  78. package/dist/{custom-hostnames-DIWlqvN9.mjs → custom-hostnames-abGBAbx7.mjs} +4 -4
  79. package/dist/{custom-nameservers-DISy8v8u.mjs → custom-nameservers-BgNXol1P.mjs} +1 -1
  80. package/dist/{custom-pages-BHXO_NFv.mjs → custom-pages-DMKX3aoD.mjs} +1 -1
  81. package/dist/{d1-MvAQMvvo.mjs → d1-CE08YqYk.mjs} +26 -22
  82. package/dist/{dcv-delegation-Buq0hcm_.mjs → dcv-delegation-B5YUEWu0.mjs} +1 -1
  83. package/dist/deploy-CWNm1-5v.mjs +2 -0
  84. package/dist/deploy-context-Dr6bxNcB.mjs +56 -0
  85. package/dist/deploy-input-Cc0_2QlW.mjs +2 -0
  86. package/dist/{dev-D8FGPKRt.mjs → dev-ZA8itQE7.mjs} +1 -1
  87. package/dist/{diagnostics-ChDfJ-Gv.mjs → diagnostics-UMbG6m4n.mjs} +1 -1
  88. package/dist/dialog-D4Y9ocuF.mjs +2 -0
  89. package/dist/{dist-CYFkGHYv.mjs → dist-BHEmAAHr.mjs} +4 -4
  90. package/dist/dist-uRuGmkMB.mjs +60 -0
  91. package/dist/{dls-8D00tqvC.mjs → dls-DIl16mLp.mjs} +1 -1
  92. package/dist/{dns-C-A5pwf3.mjs → dns-QUpgljRG.mjs} +5 -5
  93. package/dist/{dns-firewall-DIiF4pro.mjs → dns-firewall-BZwJXHLj.mjs} +1 -1
  94. package/dist/dry-run-DRj2_uV3.mjs +2 -0
  95. package/dist/{durable-objects-CnIqbj84.mjs → durable-objects-BCj4ykpU.mjs} +1 -1
  96. package/dist/{email-auth-v97Md32E.mjs → email-auth-DlHIYhCk.mjs} +1 -1
  97. package/dist/{email-routing-I29RG4hb.mjs → email-routing-UKVS4DYy.mjs} +1 -1
  98. package/dist/{email-security-BCarmbky.mjs → email-security-CZjfRIg0.mjs} +8 -8
  99. package/dist/{email-sending-CsHk2HAJ.mjs → email-sending-Dquc880C.mjs} +1 -1
  100. package/dist/{error-sanitization-BWnGnB73.mjs → error-sanitization-DE_zSrXw.mjs} +1 -1
  101. package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
  102. package/dist/{fieldExtractors-GIVe9jZa.mjs → fieldExtractors-BbwDRquU.mjs} +1 -1
  103. package/dist/{firewall-DpgFqJr3.mjs → firewall--mTfDnCJ.mjs} +3 -3
  104. package/dist/{flagship-BVaXXlsX.mjs → flagship-cfoSwwM9.mjs} +1 -1
  105. package/dist/{fraud-B5GQdEF2.mjs → fraud-Dcsq3EYK.mjs} +1 -1
  106. package/dist/{google-tag-gateway-C4O61lp-.mjs → google-tag-gateway-DPKSkZQi.mjs} +1 -1
  107. package/dist/{healthchecks-BwYMnKSF.mjs → healthchecks-D78hIIBC.mjs} +1 -1
  108. package/dist/{hostnames-DhrGRFeI.mjs → hostnames-sF999-6H.mjs} +1 -1
  109. package/dist/{hyperdrive-DAA8Fazg.mjs → hyperdrive-qWACKfA4.mjs} +2 -2
  110. package/dist/{iam-sRKDU2Z3.mjs → iam-Bvg_PayW.mjs} +1 -1
  111. package/dist/{images-DXdekLVs.mjs → images-DI_lEZ4L.mjs} +1 -1
  112. package/dist/index.mjs +1 -1
  113. package/dist/init-1w_mcgk3.mjs +43 -0
  114. package/dist/{intel-CnVeSjIS.mjs → intel-BxElBUMP.mjs} +1 -1
  115. package/dist/interactive-BW9T1D1q.mjs +48 -0
  116. package/dist/interactive-DGUWZ2Gk.mjs +2 -0
  117. package/dist/{ips-COCUG8mk.mjs → ips-DWoaKxi7.mjs} +1 -1
  118. package/dist/k2-tFjaftl-.mjs +11 -0
  119. package/dist/{keyless-certificates-l2_S__h3.mjs → keyless-certificates-BrvxHU4J.mjs} +1 -1
  120. package/dist/{keys-CDZreums.mjs → keys-DcwTYKRf.mjs} +1 -1
  121. package/dist/{kv-DkpKVimq.mjs → kv-htXS-7uP.mjs} +2 -2
  122. package/dist/{lazy-command-_vZGz6mv.mjs → lazy-command-BDiIwpss.mjs} +1 -1
  123. package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-bvGrLOmQ.mjs} +1 -1
  124. package/dist/{load-balancers-C5YMvhXD.mjs → load-balancers-BNTUt4yG.mjs} +1 -1
  125. package/dist/local-DlDumOSC.mjs +2 -0
  126. package/dist/{local-C0lQ9sTg.mjs → local-DlT72Xpn.mjs} +1 -1
  127. package/dist/{local-runtime-DtnWXN0a.mjs → local-runtime-CokO6qaX.mjs} +1 -1
  128. package/dist/{login-BrjOuHKu.mjs → login-BGF_I_LT.mjs} +1 -1
  129. package/dist/{login-DeOM4v0L.mjs → login-Ccw-mYwT.mjs} +1 -1
  130. package/dist/{logo-matches-CF8321pb.mjs → logo-matches-tE8LTKgg.mjs} +1 -1
  131. package/dist/{logos-Bd8xNRKW.mjs → logos-Bj845Mcw.mjs} +1 -1
  132. package/dist/{logpush-BYk3qqwY.mjs → logpush-Cs8JdvKi.mjs} +7 -7
  133. package/dist/{logs-Jcj2NN8H.mjs → logs-C92XZvNu.mjs} +1 -1
  134. package/dist/{magic-cloud-networking-Dgdb9H0f.mjs → magic-cloud-networking-hNp5MMw-.mjs} +1 -1
  135. package/dist/{magic-network-monitoring-CxVU4MZB.mjs → magic-network-monitoring-68GuWAnv.mjs} +1 -1
  136. package/dist/{magic-transit-KDyfUgTv.mjs → magic-transit-DNd7gu4j.mjs} +6 -6
  137. package/dist/{managed-defense-CxaDeNUd.mjs → managed-defense-B_wCAuFD.mjs} +1 -1
  138. package/dist/{managed-transforms-C7rT5E-x.mjs → managed-transforms-DZdxHPOh.mjs} +1 -1
  139. package/dist/{matches-BtKqG8T9.mjs → matches-B65CkflD.mjs} +1 -1
  140. package/dist/{mcp-QDd1Iyc0.mjs → mcp-DrJW5ayK.mjs} +4 -4
  141. package/dist/mesh-DfVzYTn1.mjs +26 -0
  142. package/dist/{migrate-DHlfR_gZ.mjs → migrate-CZNq63Uj.mjs} +1 -1
  143. package/dist/{monetization-pLalYYMI.mjs → monetization-BGaI8CMO.mjs} +1 -1
  144. package/dist/{mtls-certificates-DYA9Wu-c.mjs → mtls-certificates-BsU2emDD.mjs} +2 -2
  145. package/dist/{network-DrJxPWXQ.mjs → network-BEMD8P0U.mjs} +1 -1
  146. package/dist/{network-interconnects-D73MlYG8.mjs → network-interconnects-DMu_fcbo.mjs} +2 -7
  147. package/dist/o11y-C1a4gDGF.mjs +93 -0
  148. package/dist/{oauth-B08YQ4xq.mjs → oauth-Bj5Ne1o8.mjs} +1 -1
  149. package/dist/{oauth-clients-CkPDLFd-.mjs → oauth-clients-p4Etdqy_.mjs} +1 -1
  150. package/dist/{oauth-TGbM1Q0V.mjs → oauth-mspHHU5U.mjs} +1 -1
  151. package/dist/{oauth-scopes-VgliqcQe.mjs → oauth-scopes-B2IabFza.mjs} +1 -1
  152. package/dist/{organization-DIwqRBBV.mjs → organization-CdXt7AVZ.mjs} +1 -1
  153. package/dist/{organizations-Dk0D9ukm.mjs → organizations-5S6xEp7T.mjs} +1 -1
  154. package/dist/{origin-ca-certificates-BSFqMTn-.mjs → origin-ca-certificates-_VJAoK1D.mjs} +1 -1
  155. package/dist/{origin-post-quantum-encryption-BOKWKDTY.mjs → origin-post-quantum-encryption-GcldDsT2.mjs} +1 -1
  156. package/dist/{origin-tls-client-auth-BzE3WpcN.mjs → origin-tls-client-auth-DZHld9fA.mjs} +3 -3
  157. package/dist/{output-BGqhvqe2.mjs → output-BOe-3AQG.mjs} +1 -1
  158. package/dist/{page-rules-BKaU37cM.mjs → page-rules-o1tAMMsD.mjs} +1 -1
  159. package/dist/{pages-2Xg-lrMf.mjs → pages-CmiOhjSl.mjs} +4 -4
  160. package/dist/pay-per-crawl-BsnOxGYU.mjs +38 -0
  161. package/dist/pay-per-use-BXWMCSyE.mjs +33 -0
  162. package/dist/{pipelines-BM-T7mMK.mjs → pipelines-DWLQC0F6.mjs} +2 -2
  163. package/dist/{precursor-DmQ32-Sp.mjs → precursor-B6DjBib6.mjs} +1 -1
  164. package/dist/{previews-DDQ9ACDJ.mjs → previews-dUKEBGSM.mjs} +1 -1
  165. package/dist/process-2wmDCy17.mjs +2 -0
  166. package/dist/{progress-BYVZuEcG.mjs → progress-BtkTVcHI.mjs} +1 -1
  167. package/dist/prompt-RlgRrmbm.mjs +3 -0
  168. package/dist/{queries-DPBkVynK.mjs → queries-yLwoJRHV.mjs} +1 -1
  169. package/dist/{queues-CCXRs98q.mjs → queues-CnJRaE1o.mjs} +1 -1
  170. package/dist/{r2-BKuBSW8h.mjs → r2-CuC6-zQX.mjs} +48 -45
  171. package/dist/{radar-Gv1yFoRX.mjs → radar-DrQLcbkq.mjs} +1 -1
  172. package/dist/{raw-fetch-DyYWa923.mjs → raw-fetch-B4NvWuZD.mjs} +1 -1
  173. package/dist/{realtime-CVl-rvgx.mjs → realtime-CjsnzHxD.mjs} +1 -1
  174. package/dist/{registrar-swlnh22i.mjs → registrar-BgOsxTnX.mjs} +1 -1
  175. package/dist/{registrar-sandbox-cmOYDnkp.mjs → registrar-sandbox-3ikBD9fB.mjs} +1 -1
  176. package/dist/{registry-C20J1MW0.mjs → registry-CHowrQsZ.mjs} +1 -1
  177. package/dist/{reporting-Bgwsvol1.mjs → reporting-hE127s5r.mjs} +1 -1
  178. package/dist/{request-headers-CUee83pa.mjs → request-headers-DiJeDAn1.mjs} +1 -1
  179. package/dist/{request-tracers-BBiJvVDz.mjs → request-tracers-BCwLxmPN.mjs} +1 -1
  180. package/dist/{resolve-DvxgnWjL.mjs → resolve-CaTBV-c6.mjs} +1 -1
  181. package/dist/resolve-DCGSzUDQ.mjs +2 -0
  182. package/dist/{resource-sharing-C1JiYLbl.mjs → resource-sharing-2qvWUuMa.mjs} +11 -11
  183. package/dist/{resource-tagging-C9VOSlDR.mjs → resource-tagging-Dwx7iL3v.mjs} +1 -1
  184. package/dist/{rules-BDunCGMj.mjs → rules-DxVQ6jIg.mjs} +1 -1
  185. package/dist/rulesets-Cdh8YjI9.mjs +37 -0
  186. package/dist/{rum-B7XiECe9.mjs → rum-a4CMq4Qu.mjs} +1 -1
  187. package/dist/{run-CrZgB8L_.mjs → run-BvHwWWUX.mjs} +1 -1
  188. package/dist/run-CkbrPJPx.mjs +2 -0
  189. package/dist/{schema-DC0kdqgV.mjs → schema-elj12WOx.mjs} +1 -1
  190. package/dist/{schema-flags-BUZR9SLd.mjs → schema-flags-BzoBGPWk.mjs} +1 -1
  191. package/dist/{scim-CORcs2wK.mjs → scim-B8XlXl8v.mjs} +1 -1
  192. package/dist/{secrets-store-BoZQaFey.mjs → secrets-store-Cqhedh_i.mjs} +2 -2
  193. package/dist/{security-insights-DblK_6sg.mjs → security-insights-le2-DteL.mjs} +1 -1
  194. package/dist/{security-txt-Dl7RPnRb.mjs → security-txt-cCArWXur.mjs} +1 -1
  195. package/dist/{session-BWe9et4K.mjs → session-C1BhT1ZJ.mjs} +1 -1
  196. package/dist/shared-BPjcpXuA.mjs +2 -0
  197. package/dist/{smart-shield-DX0-8ruu.mjs → smart-shield-Csyh8hwB.mjs} +1 -1
  198. package/dist/{snippets-BFN-Lg3K.mjs → snippets-DUWx25q6.mjs} +1 -1
  199. package/dist/spawn-IysxuTNW.mjs +10 -0
  200. package/dist/{spectrum-HYWLWB0X.mjs → spectrum-Da3UYSOR.mjs} +1 -1
  201. package/dist/{speed-Dj0YhfRe.mjs → speed-NxlMnB2e.mjs} +1 -1
  202. package/dist/sql-CNdHAlQ8.mjs +4 -0
  203. package/dist/src-JfLDUxFr.mjs +125 -0
  204. package/dist/{ssl-BQL1fNtD.mjs → ssl-BtaX2WEJ.mjs} +1 -1
  205. package/dist/startup-profile-B2l0ChVu.mjs +2 -0
  206. package/dist/{startup-profile-0X5ebbng.mjs → startup-profile-CdJWgNjd.mjs} +1 -1
  207. package/dist/{state-Dy6-rKNd.mjs → state-BDSvdSdP.mjs} +1 -1
  208. package/dist/state-JB4_BU1o.mjs +2 -0
  209. package/dist/{stream-DKv2TtZN.mjs → stream-C1Ijjzn4.mjs} +3 -3
  210. package/dist/{submit-Byt2KBGI.mjs → submit-MdkuU_Pt.mjs} +1 -1
  211. package/dist/{tags-BIBsdG68.mjs → tags-CA1xMM96.mjs} +1 -1
  212. package/dist/telemetry-BsYO3nxG.mjs +2 -0
  213. package/dist/{telemetry-bu3txnIR.mjs → telemetry-Cm39QJ-M.mjs} +1 -1
  214. package/dist/{tenant-Bs4Ac4n3.mjs → tenant-BB6Oszcl.mjs} +1 -1
  215. package/dist/{tenant-custom-nameservers-DcaELeCE.mjs → tenant-custom-nameservers-BsbgYAEo.mjs} +1 -1
  216. package/dist/{tools-BbTX7rlM.mjs → tools-CSc5DmFi.mjs} +1 -1
  217. package/dist/{tunnels-DWcrz9Sf.mjs → tunnels-CRFtyHWz.mjs} +4 -4
  218. package/dist/{turnstile-2MIGp2ce.mjs → turnstile-DBXWo_Xe.mjs} +1 -1
  219. package/dist/update-check-C2oVEbXx.mjs +2 -0
  220. package/dist/{update-check-CfB0PNTY.mjs → update-check-CMXSdres.mjs} +1 -1
  221. package/dist/update-check-worker.mjs +1 -1
  222. package/dist/{url-info-B8udoxlx.mjs → url-info-t-XAs0Mk.mjs} +1 -1
  223. package/dist/{url-normalization-C6AdWtaE.mjs → url-normalization-Cs4F8e0a.mjs} +1 -1
  224. package/dist/{url-scanner-Dg0c_yVb.mjs → url-scanner-CBIoDbTx.mjs} +1 -1
  225. package/dist/{user-BLZ-0Bgv.mjs → user-CevdOMoa.mjs} +3 -3
  226. package/dist/values-CjNlkbIh.mjs +4 -0
  227. package/dist/{vectorize-DEUSEQXY.mjs → vectorize-9d9tPmg5.mjs} +1 -1
  228. package/dist/version-BdVUXLnK.mjs +2 -0
  229. package/dist/{waiting-rooms-BycGk2Y0.mjs → waiting-rooms--5WmrWb3.mjs} +1 -1
  230. package/dist/{web-assets-CLZdWOmN.mjs → web-assets-BHot_MU8.mjs} +1 -1
  231. package/dist/{web3-DjeavuLg.mjs → web3-CYfWAF6b.mjs} +1 -1
  232. package/dist/{workers-C_SfyU-v.mjs → workers-S17M0n3h.mjs} +23 -21
  233. package/dist/{workers-builds-COn5Ne5G.mjs → workers-builds-Dw7ho3So.mjs} +2 -2
  234. package/dist/{workers-for-platforms-tchCXwNF.mjs → workers-for-platforms-A3yjyLh3.mjs} +4 -6
  235. package/dist/{workers-vpc-CKts8Av0.mjs → workers-vpc-BZ2xXtC3.mjs} +1 -1
  236. package/dist/{workflows-BibtWuOx.mjs → workflows-BgGrVpSR.mjs} +1 -1
  237. package/dist/{wrangler-migration-BpJqCFAa.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
  238. package/dist/{zaraz-BvQZB0YY.mjs → zaraz-BsD2dMI3.mjs} +1 -1
  239. package/dist/{zero-trust-FStq4uhn.mjs → zero-trust-CA3iGQbG.mjs} +413 -397
  240. package/dist/{zone-tymlghWb.mjs → zone-D2M4EZD0.mjs} +1 -1
  241. package/dist/{zones-Bz6dgT9_.mjs → zones-BoOC_JzC.mjs} +1 -1
  242. package/package.json +25 -26
  243. package/dist/account-tags-d0RkEw6s.mjs +0 -15
  244. package/dist/ai-gateway-CJaUlfGc.mjs +0 -82
  245. package/dist/ai-search-PTlpY1T9.mjs +0 -79
  246. package/dist/analytics-NPND7aHB.mjs +0 -20
  247. package/dist/argo-DYfLQhd2.mjs +0 -10
  248. package/dist/auth-CBtzZ3Sw.mjs +0 -2
  249. package/dist/browser-run-DVaiBLYX.mjs +0 -46
  250. package/dist/build-C4giET85.mjs +0 -2
  251. package/dist/cf-B9aqZZKD.mjs +0 -18
  252. package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +0 -2
  253. package/dist/cloudflared-B48cfu95.mjs +0 -2
  254. package/dist/command-CzvlHvov.mjs +0 -2
  255. package/dist/deploy-BS47vZvJ.mjs +0 -2
  256. package/dist/deploy-context-Cfushp8j.mjs +0 -56
  257. package/dist/deploy-input-BAhS5LYx.mjs +0 -2
  258. package/dist/dialog-CL1Zy4pn.mjs +0 -2
  259. package/dist/dist-8rP3V95o.mjs +0 -57
  260. package/dist/dry-run-DmsbOMF1.mjs +0 -2
  261. package/dist/error-sanitization-C_a2LxOK.mjs +0 -2
  262. package/dist/init-j47MT4Qe.mjs +0 -39
  263. package/dist/interactive-Dqv0RWVU.mjs +0 -42
  264. package/dist/interactive-Wpd3FcDc.mjs +0 -2
  265. package/dist/k2-CmHkArHL.mjs +0 -13
  266. package/dist/local-D5L5Bwju.mjs +0 -2
  267. package/dist/mesh-DtrIzl5z.mjs +0 -26
  268. package/dist/observability-CvN9oxAo.mjs +0 -80
  269. package/dist/pay-per-crawl-5-KTQXRr.mjs +0 -65
  270. package/dist/pay-per-use-sGebKzNK.mjs +0 -6
  271. package/dist/prompt-F5wxc8zq.mjs +0 -3
  272. package/dist/resolve-qwL1LmKN.mjs +0 -2
  273. package/dist/rulesets-BMGxrnv9.mjs +0 -37
  274. package/dist/run-nNxXb_Cv.mjs +0 -2
  275. package/dist/shared-0N31BXkY.mjs +0 -2
  276. package/dist/spawn-DZ9A-xXb.mjs +0 -10
  277. package/dist/src-CAiZlihY.mjs +0 -117
  278. package/dist/startup-profile-CXnsF4c7.mjs +0 -2
  279. package/dist/state-BA2CanJ_.mjs +0 -2
  280. package/dist/telemetry-DBXOMuLh.mjs +0 -2
  281. package/dist/update-check-B-CvDAUz.mjs +0 -2
  282. package/dist/values-BUK-m0Jg.mjs +0 -4
  283. package/dist/version-BZNc7Y3t.mjs +0 -2
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,i,t as a}from"./context-q7UaYK69.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-BtkTVcHI.mjs";import{t as l}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.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-RlgRrmbm.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`]}).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:m(t[`configuration-type`],`configuration-type`,`text`),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:m(t[`configuration-type`],`configuration-type`,`text`),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`]}).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:m(t[`configuration-type`],`configuration-type`,`text`),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:m(t[`configuration-type`],`configuration-type`,`text`),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`]}).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:m(t.status,`status`,`text`),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:m(t.status,`status`,`text`),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`]}).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:m(i[`requester-requester-type`],`requester-requester-type`,`text`)},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`],m(i[`requester-requester-type`],`requester-requester-type`,`text`)),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`]}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const 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:m(t[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:m(t[`parameters-order-by-order`],`parameters-order-by-order`,`text`),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:m(t[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:m(t[`parameters-order-by-order`],`parameters-order-by-order`,`text`),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`]}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const 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:m(t[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:m(t[`parameters-order-by-order`],`parameters-order-by-order`,`text`),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:m(t[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:m(t[`parameters-order-by-order`],`parameters-order-by-order`,`text`),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`]}).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a sharable link to a query result.`}).check(e=>{if([`parameters-datasets`,`parameters-filter-combination`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const 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:m(t[`chart-type`],`chart-type`,`text`),compare:t.compare,distributionScale:m(t[`distribution-scale`],`distribution-scale`,`text`),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:m(t[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:m(t[`parameters-order-by-order`],`parameters-order-by-order`,`text`),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:m(t.view,`view`,`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.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:m(t[`chart-type`],`chart-type`,`text`),compare:t.compare,distributionScale:m(t[`distribution-scale`],`distribution-scale`,`text`),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:m(t[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:m(t[`parameters-order-by-order`],`parameters-order-by-order`,`text`),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:m(t.view,`view`,`text`)}),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`}).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:m(i[`filter-combination`],`filter-combination`,`text`),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`],m(i[`filter-combination`],`filter-combination`,`text`)),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`]}).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query your observability events, requests, and traces to build visualizations and identify insights.`}).check(e=>{if([`parameters-datasets`,`parameters-filter-combination`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const 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:m(t[`chart-type`],`chart-type`,`text`),compare:t.compare,distributionScale:m(t[`distribution-scale`],`distribution-scale`,`text`),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:m(t[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:m(t[`parameters-order-by-order`],`parameters-order-by-order`,`text`),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:m(t.view,`view`,`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(`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:m(t[`chart-type`],`chart-type`,`text`),compare:t.compare,distributionScale:m(t[`distribution-scale`],`distribution-scale`,`text`),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:m(t[`parameters-filter-combination`],`parameters-filter-combination`,`text`),limit:t[`parameters-limit`],needle:{isRegex:t[`parameters-needle-is-regex`],matchCase:t[`parameters-needle-match-case`]},orderBy:{order:m(t[`parameters-order-by-order`],`parameters-order-by-order`,`text`),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:m(t.view,`view`,`text`)}),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`]}).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:m(t.type,`type`,`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.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:m(t.type,`type`,`text`)}),_=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`]}).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:m(e[`propagation-policy`],`propagation-policy`,`text`),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:m(e[`propagation-policy`],`propagation-policy`,`text`),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 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(`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};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,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{n as t,t as n}from"./version-BZNc7Y3t.mjs";import{t as r}from"./session-BWe9et4K.mjs";import{a as i,n as a,t as o}from"./cf-B9aqZZKD.mjs";import{j as s,n as c}from"./interactive-Dqv0RWVU.mjs";import{i as l,o as u}from"./dist-8rP3V95o.mjs";import{n as d}from"./context-Bwkz4Lm_.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(c())throw new p;r(t);let i=await u({message:n});if(s(i)||typeof i!=`string`)throw new e(130,{cancelled:!0});return i}async function h(n,i){if(c())throw new p;r(t);let a=await l({message:n,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(s(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\`:
2
+ import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{n as t,t as n}from"./version-BdVUXLnK.mjs";import{t as r}from"./session-C1BhT1ZJ.mjs";import{a as i,n as a,t as o}from"./cf-BxsXrVeh.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-q7UaYK69.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
3
 
4
4
  import { defineConfig } from "cf/config";
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.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-F5wxc8zq.mjs";function m(e){return e.usage(`$0 oauth-clients create
2
+ import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.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-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.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-RlgRrmbm.mjs";function m(e){return e.usage(`$0 oauth-clients create
3
3
 
4
4
  Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create OAuth Client`,builder:m,handler:async p=>s({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},p,async()=>{if(p.dryRun){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:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)}):c(p.body)});return}let s=await 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:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),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
5
 
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{a as e,f as t,n}from"./oauth-B08YQ4xq.mjs";export{n as getActiveAccountId,e as getOrSelectAccountId,t as resolveProfile};
2
+ import{a as e,f as t,n}from"./oauth-Bj5Ne1o8.mjs";export{n as getActiveAccountId,e as getOrSelectAccountId,t as resolveProfile};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{t}from"./output-BGqhvqe2.mjs";import{t as n}from"./dry-run-DmsbOMF1.mjs";import{t as r}from"./progress-BYVZuEcG.mjs";import{t as i}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";function a(e){return e.usage(`$0 oauth-scopes list
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-BtkTVcHI.mjs";import{t as i}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";function a(e){return e.usage(`$0 oauth-scopes list
3
3
 
4
4
  List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`List OAuth Scopes`,builder:a,handler:async a=>i({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let i=await e(a),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};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{t}from"./output-BGqhvqe2.mjs";import{t as n}from"./dry-run-DmsbOMF1.mjs";import{t as r}from"./progress-BYVZuEcG.mjs";import{t as i}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as a,r as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,i as u,n as d}from"./prompt-F5wxc8zq.mjs";import{t as f}from"./cli-types-9oYmRTHJ.mjs";function p(e){return e.usage(`$0 organization account list
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-BtkTVcHI.mjs";import{t as i}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as a,r as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,i as u,n as d}from"./prompt-RlgRrmbm.mjs";import{t as f}from"./cli-types-9oYmRTHJ.mjs";function p(e){return e.usage(`$0 organization account list
3
3
 
4
4
  Retrieve the accounts immediately attached to a specific organization. Accounts attached to sub-organizations are not included. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`).option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname is equal to
5
5
  a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{t}from"./output-BGqhvqe2.mjs";import{t as n}from"./dry-run-DmsbOMF1.mjs";import{t as r}from"./progress-BYVZuEcG.mjs";import{t as i}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{t as a}from"./cli-types-9oYmRTHJ.mjs";function o(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:o,handler:async a=>i({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={from:a.from,to:a.to};if(a.dryRun){n({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organizations.billing.usage.get({organization_id:a[`organization-id`],...i}));t(s,{successLabel:`Loaded`})})},c={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.usage(`$0 organizations logs audit get <organization-id>
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-BtkTVcHI.mjs";import{t as i}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{t as a}from"./cli-types-9oYmRTHJ.mjs";function o(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:o,handler:async a=>i({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={from:a.from,to:a.to};if(a.dryRun){n({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organizations.billing.usage.get({organization_id:a[`organization-id`],...i}));t(s,{successLabel:`Loaded`})})},c={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.usage(`$0 organizations logs audit get <organization-id>
3
3
 
4
4
  Gets a list of audit logs for an organization.`).positional(`organization-id`,{type:`string`,description:`The unique id that identifies the organization.`,demandOption:!0}).option(`action-result`,{type:`string`,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,description:"Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email`,{type:`string`,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,description:`Filters by the actor's user ID.`}).option(`actor-ip-address`,{type:`string`,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,description:`Filters by the actor type.`}).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,description:`Filters by the resource scope, specifying whether the resource is associated with an organization.`}).option(`action-result-not`,{type:`string`,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,description:"Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email-not`,{type:`string`,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,description:`Filters out audit logs by the actor's user ID.`}).option(`actor-ip-address-not`,{type:`string`,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,description:`Filters out audit logs by the actor type.`}).option(`id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an organization.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get <organization-id>`,describe:`Get organization audit logs (Version 2)`,builder:a(u),handler:async a=>i({command:`organizations logs audit get`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_result:a[`action-result`],action_type:a[`action-type`],actor_context:a[`actor-context`],actor_email:a[`actor-email`],actor_id:a[`actor-id`],actor_ip_address:a[`actor-ip-address`],actor_token_id:a[`actor-token-id`],actor_token_name:a[`actor-token-name`],actor_type:a[`actor-type`],id:a.id,raw_cf_ray_id:a[`raw-cf-ray-id`],raw_method:a[`raw-method`],raw_status_code:a[`raw-status-code`],raw_uri:a[`raw-uri`],resource_id:a[`resource-id`],resource_product:a[`resource-product`],resource_type:a[`resource-type`],resource_scope:a[`resource-scope`],"action_result.not":a[`action-result-not`],"action_type.not":a[`action-type-not`],"actor_context.not":a[`actor-context-not`],"actor_email.not":a[`actor-email-not`],"actor_id.not":a[`actor-id-not`],"actor_ip_address.not":a[`actor-ip-address-not`],"actor_token_id.not":a[`actor-token-id-not`],"actor_token_name.not":a[`actor-token-name-not`],"actor_type.not":a[`actor-type-not`],"id.not":a[`id-not`],"raw_cf_ray_id.not":a[`raw-cf-ray-id-not`],"raw_method.not":a[`raw-method-not`],"raw_status_code.not":a[`raw-status-code-not`],"raw_uri.not":a[`raw-uri-not`],"resource_id.not":a[`resource-id-not`],"resource_product.not":a[`resource-product-not`],"resource_type.not":a[`resource-type-not`],"resource_scope.not":a[`resource-scope-not`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organizations.logs.audit.get({organization_id:a[`organization-id`],...i}));t(s,{successLabel:`Loaded`})})};function f(e){return e.usage("$0 organizations logs audit history <id>\n\nReturns the chronological change history for the resource identified by the given organization-scoped audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.").positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The unique ID that identifies the organization.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`history <id>`,describe:`Get resource change history from an organization audit log entry (Version 2)`,builder:a(f),handler:async a=>i({command:`organizations logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_time:a[`action-time`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit/${a.id==null?`<id>`:encodeURIComponent(String(a.id))}/history`,pathParams:{"organization-id":String(a[`organization-id`]??``),id:String(a.id??``)},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.organizations.logs.audit.history({organization_id:a[`organization-id`],id:a.id,...i}));t(s,{successLabel:`Loaded`})})},m={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`organizations`,describe:`Multi-user organizations that group accounts, members, and shared settings under a single entity`,builder:e=>e.command(l).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{t}from"./output-BGqhvqe2.mjs";import{t as n}from"./dry-run-DmsbOMF1.mjs";import{t as r}from"./progress-BYVZuEcG.mjs";import{t as i}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as a,t as o}from"./body-parser-DkHKPkJ7.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{a as c,i as l,n as u}from"./prompt-F5wxc8zq.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 origin-ca-certificates create
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-BtkTVcHI.mjs";import{t as i}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as a,t as o}from"./body-parser-DkHKPkJ7.mjs";import{n as s}from"./input-validation-D7z60HJH.mjs";import{a as c,i as l,n as u}from"./prompt-RlgRrmbm.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 origin-ca-certificates create
3
3
 
4
4
  Create an Origin CA certificate. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`hostnames`,{type:`string`,array:!0,description:"Array of hostnames or wildcard names bound to the certificate.\nHostnames must be fully qualified domain names (FQDNs) belonging to zones on your account (e.g., `example.com` or `sub.example.com`). Wildcards are supported only as a `*.` prefix for a single level (e.g., `*.example.com`). Double wildcards (`*.*.example.com`) and interior wildcards (`foo.*.example.com`) are not allowed. The wildcard suffix must be a multi-label domain (`*.example.com` is valid, but `*.com` is not). Unicode/IDN hostnames are accepted and automatically converted to punycode."}).option(`request-type`,{type:`string`,description:`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,choices:[`origin-rsa`,`origin-ecc`,`keyless-certificate`]}).option(`requested-validity`,{type:`number`,description:`The number of days for which the certificate should be valid.`,default:5475}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Create Certificate`,builder:f,handler:async u=>i({command:`origin-ca-certificates create`,classification:{safeFlags:[`request-type`,`dry-run`]}},u,async()=>{if(u.dryRun){n({command:`cf origin-ca-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},bodyKind:`json`,body:u.body===void 0?o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]}):a(u.body)});return}let i=await e(u);if(u.body){let e=a(u.body),n=await r(`Creating`,async()=>i.originCaCertificates.create({...e}));t(n,{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await c(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u.hostnames===void 0)throw Error(`--hostnames is required (or pass --body with this field set).`);u[`request-type`]===void 0&&(u[`request-type`]=await l(`request-type`,`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,[`origin-rsa`,`origin-ecc`,`keyless-certificate`]));let d=o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]}),f=await r(`Creating`,async()=>i.originCaCertificates.create({...d}));t(f,{successLabel:`Created`})})};function m(e){return e.usage(`$0 origin-ca-certificates delete <certificate-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{i as l}from"./prompt-F5wxc8zq.mjs";function u(e){return e.usage(`$0 origin-post-quantum-encryption get
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{i as l}from"./prompt-RlgRrmbm.mjs";function u(e){return e.usage(`$0 origin-post-quantum-encryption get
3
3
 
4
4
  Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Origin Post-Quantum Encryption setting`,builder:u,handler:async o=>a({command:`origin-post-quantum-encryption get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-post-quantum-encryption get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.originPostQuantumEncryption.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 origin-post-quantum-encryption update
5
5
 
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,n as d}from"./prompt-F5wxc8zq.mjs";import{t as f}from"./cli-types-9oYmRTHJ.mjs";function p(e){return e.usage(`$0 origin-tls-client-auth hostname-associations list
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,n as d}from"./prompt-RlgRrmbm.mjs";import{t as f}from"./cli-types-9oYmRTHJ.mjs";function p(e){return e.usage(`$0 origin-tls-client-auth hostname-associations list
3
3
 
4
4
  List certificate ID - hostname associations for the given zone. Shows which hostnames are associated to which certificates for authenticated origin pulls.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of associations per page.`}).option(`status`,{type:`string`,description:`Filter associations by status. Use comma-separated values to filter by multiple statuses, or "all" to include every status. Defaults to "active" if not provided.`,choices:[`active`,`pending_deployment`,`pending_deletion`,`deleted`,`deployment_timed_out`,`deletion_timed_out`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List Hostname Associations`,builder:f(p),handler:async o=>a({command:`origin-tls-client-auth hostname-associations list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],status:o.status};if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-associations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.originTlsClientAuth.hostnameAssociations.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})},h={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates create
5
5
 
6
- Upload a certificate to be used for client authentication on a hostname. 10 hostname certificates per zone are allowed.`).option(`certificate`,{type:`string`,description:`The hostname certificate.`}).option(`private-key`,{type:`string`,description:`The hostname certificate's private key.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Upload a Hostname Client Certificate`,builder:g,handler:async s=>a({command:`origin-tls-client-auth hostname-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body)});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The hostname certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The hostname certificate's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}),p=await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function v(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates delete <certificate-id>
6
+ Upload a certificate to be used for client authentication on a hostname. 10 hostname certificates per zone are allowed.`).option(`certificate`,{type:`string`,description:`The hostname certificate.`}).option(`private-key`,{type:`string`,description:`The hostname certificate's private key.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Upload a Hostname Client Certificate`,builder:g,handler:async s=>a({command:`origin-tls-client-auth hostname-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body),sensitiveBodyPaths:[[`private_key`]]});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The hostname certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The hostname certificate's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}),p=await i(`Creating`,async()=>a.originTlsClientAuth.hostnameCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function v(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates delete <certificate-id>
7
7
 
8
8
  Removes a client certificate used for authenticated origin pulls on a specific hostname. Note: Before deleting the certificate, you must first invalidate the hostname for client authentication by sending a PUT request with \`enabled\` set to null. After invalidating the association, the certificate can be safely deleted.`).positional(`certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <certificate-id>`,describe:`Delete Hostname Client Certificate`,builder:v,handler:async o=>a({command:`origin-tls-client-auth hostname-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames/certificates/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
9
9
  `);return}let c=await i(`Deleting`,async()=>a.originTlsClientAuth.hostnameCertificates.delete({zone_id:s,certificate_id:o[`certificate-id`]}));n(c,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates get <certificate-id>
@@ -20,7 +20,7 @@ Get whether zone-level authenticated origin pulls is enabled or not. It is false
20
20
 
21
21
  Enable or disable zone-level authenticated origin pulls. 'enabled' should be set true either before/after the certificate is uploaded to see the certificate in use.`).option(`enabled`,{type:`boolean`,description:`Indicates whether zone-level authenticated origin pulls is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`update`,describe:`Set Enablement for Zone`,builder:M,handler:async s=>a({command:`origin-tls-client-auth settings update`,classification:{safeFlags:[`enabled`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth/settings`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({enabled:s.enabled}):o(s.body)});return}let a=await e(s),l=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body),t=await i(`Updating`,async()=>a.originTlsClientAuth.settings.update({...e,zone_id:l}));n(t,{successLabel:`Updated`});return}if(s.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let u=c({enabled:s.enabled}),d=await i(`Updating`,async()=>a.originTlsClientAuth.settings.update({...u,zone_id:l}));n(d,{successLabel:`Updated`})})},P={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(j).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 origin-tls-client-auth zone-certificates create
22
22
 
23
- Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is important to keep only one certificate active. Also, make sure to enable zone-level authenticated origin pulls by making a PUT call to settings endpoint to see the uploaded certificate in use.`).option(`certificate`,{type:`string`,description:`The zone's leaf certificate.`}).option(`private-key`,{type:`string`,description:`The zone's private key.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`create`,describe:`Upload Certificate`,builder:F,handler:async s=>a({command:`origin-tls-client-auth zone-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth zone-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body)});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The zone's leaf certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The zone's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}),p=await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function L(e){return e.usage(`$0 origin-tls-client-auth zone-certificates delete <certificate-id>
23
+ Upload your own certificate you want Cloudflare to use for edge-to-origin communication to override the shared certificate. Please note that it is important to keep only one certificate active. Also, make sure to enable zone-level authenticated origin pulls by making a PUT call to settings endpoint to see the uploaded certificate in use.`).option(`certificate`,{type:`string`,description:`The zone's leaf certificate.`}).option(`private-key`,{type:`string`,description:`The zone's private key.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`create`,describe:`Upload Certificate`,builder:F,handler:async s=>a({command:`origin-tls-client-auth zone-certificates create`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf origin-tls-client-auth zone-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/origin_tls_client_auth`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}):o(s.body),sensitiveBodyPaths:[[`private_key`]]});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}s.certificate===void 0&&(s.certificate=await u(`certificate`,`The zone's leaf certificate.`)),s[`private-key`]===void 0&&(s[`private-key`]=await u(`private-key`,`The zone's private key.`,{kind:`secret`}));let f=c({certificate:l(s.certificate,`certificate`,`text`),private_key:l(s[`private-key`],`private-key`,`text`)}),p=await i(`Creating`,async()=>a.originTlsClientAuth.zoneCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function L(e){return e.usage(`$0 origin-tls-client-auth zone-certificates delete <certificate-id>
24
24
 
25
25
  Removes a client certificate used for zone-level authenticated origin pulls.`).positional(`certificate-id`,{type:`string`,description:`Certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const R={command:`delete <certificate-id>`,describe:`Delete Certificate`,builder:L,handler:async o=>a({command:`origin-tls-client-auth zone-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf origin-tls-client-auth zone-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/${o[`certificate-id`]==null?`<certificate-id>`:encodeURIComponent(String(o[`certificate-id`]))}`,pathParams:{"certificate-id":String(o[`certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
26
26
  `);return}let c=await i(`Deleting`,async()=>a.originTlsClientAuth.zoneCertificates.delete({zone_id:s,certificate_id:o[`certificate-id`]}));n(c,{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 origin-tls-client-auth zone-certificates get <certificate-id>
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e,t}from"./theme-CQ_TYifs.mjs";import{n}from"./interactive-Dqv0RWVU.mjs";import{t as r}from"./Page-BShsqCXr.mjs";function i(e){return e instanceof r?e.data:typeof e==`object`&&e&&`result`in e&&Array.isArray(e.result)&&`result_info`in e?e.result:e}function a(t,n={}){if(!n.quiet){if(t=i(t),t==null){n.successLabel&&process.stderr.isTTY&&process.stderr.write(`${e.success(`✓`)} ${n.successLabel}\n`);return}console.log(o(t))}}function o(r){let i=JSON.stringify(r,null,2);return n()||!t()||i.length>5e4?i:i.replace(/"([^"]+)":/g,(t,n)=>`${e.jsonKey(`"${n}"`)}:`).replace(/: "([^"]*)"/g,(t,n)=>`: ${e.jsonString(`"${n}"`)}`).replace(/: (-?\d+\.?\d*)/g,(t,n)=>`: ${e.jsonNumber(n)}`).replace(/: (true|false)/g,(t,n)=>`: ${e.jsonBoolean(n)}`).replace(/: (null)/g,(t,n)=>`: ${e.muted(n)}`)}export{a as t};
2
+ import{r as e,t}from"./theme-CQ_TYifs.mjs";import{n}from"./interactive-BW9T1D1q.mjs";import{t as r}from"./Page-BShsqCXr.mjs";function i(e){return e instanceof r?e.data:typeof e==`object`&&e&&`result`in e&&Array.isArray(e.result)&&`result_info`in e?e.result:e}function a(t,n={}){if(!n.quiet){if(t=i(t),t==null){n.successLabel&&process.stderr.isTTY&&process.stderr.write(`${e.success(`✓`)} ${n.successLabel}\n`);return}console.log(o(t))}}function o(r){let i=JSON.stringify(r,null,2);return n()||!t()||i.length>5e4?i:i.replace(/"((?:[^"\\]|\\.)*)":/g,(t,n)=>`${e.jsonKey(`"${n}"`)}:`).replace(/: "((?:[^"\\]|\\.)*)"/g,(t,n)=>`: ${e.jsonString(`"${n}"`)}`).replace(/: (-?\d+\.?\d*)/g,(t,n)=>`: ${e.jsonNumber(n)}`).replace(/: (true|false)/g,(t,n)=>`: ${e.jsonBoolean(n)}`).replace(/: (null)/g,(t,n)=>`: ${e.muted(n)}`)}export{a as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-F5wxc8zq.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 page-rules create
2
+ import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-RlgRrmbm.mjs";import{t as d}from"./cli-types-9oYmRTHJ.mjs";function f(e){return e.usage(`$0 page-rules create
3
3
 
4
4
  Creates a new Page Rule.`).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
5
5
  request. Actions can redirect to another URL or override settings, but