cf 1.0.0-beta.27 → 1.0.0-beta.29

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 (370) hide show
  1. package/README.md +10 -3
  2. package/dist/_meta/commands.json +7966 -5034
  3. package/dist/_meta/hand-written-commands.json +40 -10
  4. package/dist/_meta/schemas.json +3153 -3736
  5. package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
  6. package/dist/{access-BxEprr2f.mjs → access-Cte4yyIz.mjs} +1 -1
  7. package/dist/{accounts-DU2ZNYqP.mjs → accounts-G-x-_cEx.mjs} +58 -57
  8. package/dist/{acm-CBCIKBJ4.mjs → acm-Bg3HqMGG.mjs} +7 -7
  9. package/dist/{addressing-BKxiLRHk.mjs → addressing-BwEofGEm.mjs} +46 -46
  10. package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
  11. package/dist/ai-DWWRIQIt.mjs +30 -0
  12. package/dist/ai-audit-CMEBz6ZP.mjs +6 -0
  13. package/dist/ai-gateway-D2s0isU-.mjs +76 -0
  14. package/dist/ai-search-a0uqr9yJ.mjs +74 -0
  15. package/dist/{ai-security-CvZfP2JC.mjs → ai-security-H_RqjRoL.mjs} +4 -4
  16. package/dist/alerting-Bgp9rE4I.mjs +52 -0
  17. package/dist/analytics-CFYM82FD.mjs +17 -0
  18. package/dist/analytics-engine-BLiEaLxb.mjs +4 -0
  19. package/dist/api-Dnt6lRJG.mjs +3 -0
  20. package/dist/{api-security-BbcvDtff.mjs → api-security-B0YtHglt.mjs} +63 -63
  21. package/dist/argo-BPwbzHY7.mjs +14 -0
  22. package/dist/{artifacts-2R2sxIKO.mjs → artifacts-B6UwC2PH.mjs} +20 -20
  23. package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-kG97iEnI.mjs} +2 -2
  24. package/dist/auth-Czr8ChBB.mjs +2 -0
  25. package/dist/auth-DA1PHaHi.mjs +2 -0
  26. package/dist/auth-Dwfa4S3h.mjs +7 -0
  27. package/dist/{auth-token-BwpERbnG.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
  28. package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-B4tFR6ua.mjs} +118 -114
  29. package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
  30. package/dist/billing-TERxOuLR.mjs +22 -0
  31. package/dist/{blocks-C8vyXIAT.mjs → blocks-C3Im7AT0.mjs} +1 -1
  32. package/dist/body-parser-HN91kAf0.mjs +2 -0
  33. package/dist/{body-unions-CjpNjwSW.mjs → body-unions-D9OSaf4M.mjs} +1 -1
  34. package/dist/{bot-management-fwxKIbaB.mjs → bot-management-SZw9jTOC.mjs} +4 -4
  35. package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
  36. package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
  37. package/dist/browser-run-BvjfMK3f.mjs +40 -0
  38. package/dist/build-CCwo_ydV.mjs +2 -0
  39. package/dist/build-yQOzZg6Z.mjs +2 -0
  40. package/dist/builds-tMa3sbQU.mjs +62 -0
  41. package/dist/cache-b_EPh6Is.mjs +36 -0
  42. package/dist/cf-DmvZ2L51.mjs +18 -0
  43. package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
  44. package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
  45. package/dist/cli-Cc7ujzAy.mjs +4 -0
  46. package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
  47. package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
  48. package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
  49. package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
  50. package/dist/{command-BxZBNPxG.mjs → command-BQbZw4Kx.mjs} +1 -1
  51. package/dist/command-BVct0Dvr.mjs +2 -0
  52. package/dist/{command-BiIVclNA.mjs → command-C4_lMRkw.mjs} +1 -1
  53. package/dist/command-CJ3ldWrA.mjs +2 -0
  54. package/dist/command-CyOdBNur.mjs +2 -0
  55. package/dist/command-D2XkyO1e.mjs +2 -0
  56. package/dist/command-DHODgfFZ.mjs +2 -0
  57. package/dist/command-DIIaZx_f.mjs +2 -0
  58. package/dist/command-DONwHpqZ.mjs +2 -0
  59. package/dist/command-DdYnSf-8.mjs +2 -0
  60. package/dist/command-DqOU7Ql2.mjs +2 -0
  61. package/dist/{command-pMoNdd22.mjs → command-HW7k43qu.mjs} +1 -1
  62. package/dist/command-NqM0lo4a.mjs +2 -0
  63. package/dist/command-bwVDyMv4.mjs +2 -0
  64. package/dist/command-yzqs4m83.mjs +2 -0
  65. package/dist/{completions-DRzBiqpv.mjs → completions-0YKvIyBT.mjs} +2 -2
  66. package/dist/connector-interrupts-CsunbRsr.mjs +6 -0
  67. package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
  68. package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
  69. package/dist/{connectors-D1WFLJoE.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
  70. package/dist/containers-BiA_bpPR.mjs +76 -0
  71. package/dist/{content-scan-D1GfPSL0.mjs → content-scan-4SA2nacB.mjs} +6 -6
  72. package/dist/{context-Dp4CXG22.mjs → context-BGm5_wTT.mjs} +1 -1
  73. package/dist/{cps-D4uhzg3k.mjs → cps-WDmD3V5I.mjs} +3 -3
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
  76. package/dist/custom-csrs-D-lvkyRV.mjs +18 -0
  77. package/dist/custom-hostnames-B5BQX5m6.mjs +24 -0
  78. package/dist/custom-nameservers-CZrRjcjx.mjs +12 -0
  79. package/dist/custom-pages-CWwjtfbj.mjs +38 -0
  80. package/dist/d1-N81q-FAr.mjs +50 -0
  81. package/dist/{delegate-B4bKqF7i.mjs → delegate-livNdiwK.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/deploy-Ok4ncy06.mjs +2 -0
  84. package/dist/deploy-context-B_lLfxt7.mjs +55 -0
  85. package/dist/deploy-input-JZlEJwKB.mjs +2 -0
  86. package/dist/dev-DxbkJkzc.mjs +4 -0
  87. package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
  88. package/dist/dialog-CD94-Kzw.mjs +2 -0
  89. package/dist/discover-D9FNaCDK.mjs +2 -0
  90. package/dist/discover-DGsMj9ZN.mjs +2 -0
  91. package/dist/{dist-D5qkmHhC.mjs → dist-BxhwE-W1.mjs} +202 -193
  92. package/dist/{dls-DWBiYzY1.mjs → dls-5OXuxLAB.mjs} +8 -8
  93. package/dist/dns-Burep9O7.mjs +142 -0
  94. package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
  95. package/dist/docs-BFVK88kB.mjs +3 -0
  96. package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-qsnRlRk6.mjs} +1 -1
  97. package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
  98. package/dist/email-auth--2KCzZNA.mjs +6 -0
  99. package/dist/email-routing-DzaExfVf.mjs +44 -0
  100. package/dist/{email-security-CnNa1YON.mjs → email-security-DwQJszzy.mjs} +71 -71
  101. package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-mQd2qB-o.mjs} +21 -21
  102. package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
  103. package/dist/error-sanitization-D069tpKk.mjs +2 -0
  104. package/dist/errors-C_bGcR0X.mjs +11 -0
  105. package/dist/field-extractors-MVOizTlB.mjs +8 -0
  106. package/dist/{firewall-CY_oem-d.mjs → firewall-DtSIlkfL.mjs} +19 -19
  107. package/dist/flagship-9E5gwNki.mjs +24 -0
  108. package/dist/{fraud-CSUKLh8X.mjs → fraud-DjqhVJdf.mjs} +3 -3
  109. package/dist/generate-BzOnRBij.mjs +2 -0
  110. package/dist/generate-DfxZtpn9.mjs +2 -0
  111. package/dist/get-3XNn0upb.mjs +2 -0
  112. package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
  113. package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
  114. package/dist/gt-BV-jij5q.mjs +4 -0
  115. package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
  116. package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
  117. package/dist/{iam-8T74DNhH.mjs → iam-BK6N7NdQ.mjs} +31 -31
  118. package/dist/{images-C3JUaf6b.mjs → images-3bCWE6Ml.mjs} +33 -33
  119. package/dist/index.mjs +1 -1
  120. package/dist/init-BgCF9K8h.mjs +43 -0
  121. package/dist/intel-BQ58CJLt.mjs +62 -0
  122. package/dist/{interactive-CKHdGvkh.mjs → interactive-JBA3qOUa.mjs} +9 -9
  123. package/dist/{internal-CamuESs0.mjs → internal-CWPz0sBF.mjs} +2 -2
  124. package/dist/{ips-DinCNnWj.mjs → ips-3WYegiVW.mjs} +2 -2
  125. package/dist/k2-Bc_hjmiv.mjs +10 -0
  126. package/dist/kv-DbShBhhg.mjs +12 -0
  127. package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
  128. package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
  129. package/dist/{live-B6AsI_E5.mjs → live-BTtMv1a6.mjs} +2 -2
  130. package/dist/load-balancers-C2hg52WA.mjs +84 -0
  131. package/dist/{local-CgBhtmON.mjs → local-B3zt9PXR.mjs} +1 -1
  132. package/dist/local-DRxctCh9.mjs +2 -0
  133. package/dist/local-runtime-BOnDiMDc.mjs +2 -0
  134. package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
  135. package/dist/log-DBAHla_W.mjs +2 -0
  136. package/dist/login-CK3nn9a5.mjs +2 -0
  137. package/dist/{login-BJHaTERg.mjs → login-DiR-buzS.mjs} +3 -3
  138. package/dist/{logpush-qhlxsioM.mjs → logpush-CitvUX-J.mjs} +22 -22
  139. package/dist/{logs-bI54CJ0w.mjs → logs-CfWHu4Ir.mjs} +14 -16
  140. package/dist/magic-network-monitoring-gU6yzzML.mjs +34 -0
  141. package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
  142. package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
  143. package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
  144. package/dist/{mcp-CyI0sDmL.mjs → mcp-DqhQJVaz.mjs} +15 -15
  145. package/dist/{mesh-Czr0UCP4.mjs → mesh-DXVZBNDC.mjs} +12 -12
  146. package/dist/{migrate-DKDWYrz2.mjs → migrate-CmXyk9vX.mjs} +1 -1
  147. package/dist/{monetization-NUgfDtSy.mjs → monetization-CWg-mySr.mjs} +9 -9
  148. package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
  149. package/dist/{network-B42zrBic.mjs → network-jtgq5eb4.mjs} +24 -24
  150. package/dist/o11y-eYYs59X9.mjs +88 -0
  151. package/dist/oauth-BgDZMd72.mjs +5 -0
  152. package/dist/{oauth-BLQ1-y3R.mjs → oauth-V37G-PaV.mjs} +1 -1
  153. package/dist/{observability-BxhJQCgZ.mjs → observability-CB72eC4T.mjs} +2 -2
  154. package/dist/ohttp-gateway-K9ToEft8.mjs +8 -0
  155. package/dist/organizations-BllV7l_c.mjs +70 -0
  156. package/dist/output-hFMAotFl.mjs +2 -0
  157. package/dist/package-oNVeacC9.mjs +2 -0
  158. package/dist/page-rules-BVmi-ZFW.mjs +35 -0
  159. package/dist/pages-5spcBpX1.mjs +48 -0
  160. package/dist/pay-per-crawl-BgsdGcBi.mjs +36 -0
  161. package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
  162. package/dist/pipelines-CbtmLRxt.mjs +40 -0
  163. package/dist/{precursor-D3VH2MXT.mjs → precursor-Dk8YOKf_.mjs} +2 -2
  164. package/dist/previews-Bv1HMMtO.mjs +6 -0
  165. package/dist/progress-DE_G09u2.mjs +2 -0
  166. package/dist/project-settings-D_S-UC8I.mjs +3 -0
  167. package/dist/prompt-D274Im1O.mjs +4 -0
  168. package/dist/queues-DGCYUr4g.mjs +52 -0
  169. package/dist/r2-DtCk-Nfi.mjs +112 -0
  170. package/dist/{radar-CvLtu-Vr.mjs → radar-1CwqOsMZ.mjs} +150 -150
  171. package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
  172. package/dist/{ready-gsGEaWLL.mjs → ready-CcoEA7M7.mjs} +2 -2
  173. package/dist/{realtime-DiCEgFTC.mjs → realtime-DFUxwIG5.mjs} +80 -81
  174. package/dist/registrar-Cl1snz8z.mjs +43 -0
  175. package/dist/registrar-sandbox-Cne9BVCZ.mjs +58 -0
  176. package/dist/{reporting-BiHgnT8L.mjs → reporting-D9FC-Z-3.mjs} +7 -7
  177. package/dist/request-headers-Bopp5lH_.mjs +2 -0
  178. package/dist/request-tracers-CSSB9_aW.mjs +4 -0
  179. package/dist/resource-sharing-D8yuzJm7.mjs +36 -0
  180. package/dist/{rules-CRhe_ca9.mjs → rules-DzmOQ3MB.mjs} +8 -8
  181. package/dist/rulesets-DsTGcgbc.mjs +42 -0
  182. package/dist/{rum-BfnWHW_d.mjs → rum-DrJLI93T.mjs} +14 -14
  183. package/dist/run-C5yPsiO2.mjs +2 -0
  184. package/dist/run-CXWkMU3x.mjs +2 -0
  185. package/dist/schema-CfZOW8Zw.mjs +2 -0
  186. package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
  187. package/dist/schema-flags-DO3kLYBu.mjs +4 -0
  188. package/dist/scim-0OufLKru.mjs +16 -0
  189. package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
  190. package/dist/{security-insights-SlUGW3F_.mjs → security-insights-D2pj8-O-.mjs} +20 -20
  191. package/dist/{security-txt-C3YS0REz.mjs → security-txt-SKtgW4n-.mjs} +4 -4
  192. package/dist/session-COdP8BXD.mjs +2 -0
  193. package/dist/shared-D_2KLpP3.mjs +2 -0
  194. package/dist/{signed-url-ClLk45_J.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
  195. package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
  196. package/dist/snippets-DrrdpLnS.mjs +18 -0
  197. package/dist/spawn-DNf-Ge8d.mjs +5 -0
  198. package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-CHBGZbZF.mjs} +11 -11
  199. package/dist/{speed-BrVeZRyX.mjs → speed-vOlHyG3v.mjs} +11 -11
  200. package/dist/sql-BCuLxGSf.mjs +4 -0
  201. package/dist/src-ByCoEqOw.mjs +133 -0
  202. package/dist/{ssl-Bx4LCutF.mjs → ssl-BA_dcVwF.mjs} +60 -62
  203. package/dist/startup-profile-CyQk_f_L.mjs +2 -0
  204. package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
  205. package/dist/state-B6r-b_-d.mjs +2 -0
  206. package/dist/{state-BmzOLELo.mjs → state-CTLznbVs.mjs} +1 -1
  207. package/dist/{containers-DINLx5_i.mjs → static-assets-DGDoaJf1.mjs} +216 -210
  208. package/dist/stream-CzlqY8hq.mjs +89 -0
  209. package/dist/{tags-xVzjZxdt.mjs → tags-BLeaslAb.mjs} +8 -8
  210. package/dist/telemetry-COlodX5Z.mjs +2 -0
  211. package/dist/{telemetry-CJ9URio3.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
  212. package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
  213. package/dist/tenants-CRirmhxS.mjs +13 -0
  214. package/dist/{tools-C-vmgYSv.mjs → tools-BRjRgZnj.mjs} +1 -1
  215. package/dist/tunnels-nLfIWPYT.mjs +27 -0
  216. package/dist/{turnstile-B_Ugzgom.mjs → turnstile-CZjXtBCr.mjs} +10 -10
  217. package/dist/ui-dWsVmFCG.mjs +2 -0
  218. package/dist/{update-check-DRr0eRhB.mjs → update-check-CXMdVBhW.mjs} +1 -1
  219. package/dist/{update-check-DHUo4FOJ.mjs → update-check-D_Oky9-u.mjs} +1 -1
  220. package/dist/update-check-worker.mjs +1 -1
  221. package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
  222. package/dist/url-scanner-9XW3zLaU.mjs +16 -0
  223. package/dist/user-Bk1BIqZ5.mjs +103 -0
  224. package/dist/vectorize-CgOfmWYq.mjs +30 -0
  225. package/dist/verify-B9ILCohg.mjs +2 -0
  226. package/dist/verify-BCuWaO-L.mjs +2 -0
  227. package/dist/version-CcuBNjqg.mjs +2 -0
  228. package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
  229. package/dist/{web-assets-CgQXsp8m.mjs → web-assets-CWU3jrit.mjs} +29 -29
  230. package/dist/web3-CRpQ5sl4.mjs +26 -0
  231. package/dist/workers-BZMvamn0.mjs +39 -0
  232. package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
  233. package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
  234. package/dist/workflows-Dd88_Nqc.mjs +48 -0
  235. package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-BzMTJPdI.mjs} +302 -293
  236. package/dist/zaraz-BFK0p28R.mjs +22 -0
  237. package/dist/zero-trust-Cdjfp0Ie.mjs +1008 -0
  238. package/dist/{zones-DTAcguf6.mjs → zones-DDn5jk6I.mjs} +51 -51
  239. package/package.json +20 -20
  240. package/dist/ai-DqEN_hhg.mjs +0 -30
  241. package/dist/ai-audit-BmzOgt6x.mjs +0 -6
  242. package/dist/ai-gateway-B0uiYVHq.mjs +0 -74
  243. package/dist/ai-search-DbZIxdio.mjs +0 -74
  244. package/dist/alerting-BjGwBxZT.mjs +0 -52
  245. package/dist/analytics-C7kT_H-W.mjs +0 -17
  246. package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
  247. package/dist/api-X3wKppsT.mjs +0 -3
  248. package/dist/argo-D1VONzu-.mjs +0 -14
  249. package/dist/auth-CspwoBlp.mjs +0 -2
  250. package/dist/auth-D499YE2n.mjs +0 -7
  251. package/dist/auth-FK2eLQ02.mjs +0 -2
  252. package/dist/billing-DRNww0iC.mjs +0 -24
  253. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  254. package/dist/brand-protection-BVICLzBc.mjs +0 -26
  255. package/dist/browser-run-CEk-NIgP.mjs +0 -40
  256. package/dist/build-CRm2TQq8.mjs +0 -2
  257. package/dist/build-DO_GNhRl.mjs +0 -2
  258. package/dist/builds-CoazxuN-.mjs +0 -64
  259. package/dist/cache-jlLJLSu7.mjs +0 -36
  260. package/dist/cf-hP0SOgC6.mjs +0 -18
  261. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +0 -363
  262. package/dist/cli-Nqf58-1c.mjs +0 -4
  263. package/dist/cloudforce-one-CCaIBOAo.mjs +0 -318
  264. package/dist/command-BASaTmJc.mjs +0 -2
  265. package/dist/command-Bih1HLr3.mjs +0 -2
  266. package/dist/command-ByYf12-8.mjs +0 -2
  267. package/dist/command-C0qCuw03.mjs +0 -2
  268. package/dist/command-C2FVMd1b.mjs +0 -2
  269. package/dist/command-C4OgtX_x.mjs +0 -2
  270. package/dist/command-C5Kqc5Km.mjs +0 -2
  271. package/dist/command-CFxyp8Uo.mjs +0 -2
  272. package/dist/command-CZAR85ba.mjs +0 -2
  273. package/dist/command-CelQVrZL.mjs +0 -2
  274. package/dist/command-CrAlzysj.mjs +0 -2
  275. package/dist/command-MxFFWqMg.mjs +0 -2
  276. package/dist/connector-interrupts-CrTeSyaM.mjs +0 -6
  277. package/dist/containers-BOBEs1Gk.mjs +0 -75
  278. package/dist/create-BtmuVqVL.mjs +0 -2
  279. package/dist/csam-scanner-DOOUBeBM.mjs +0 -8
  280. package/dist/custom-csrs-DtdFo5YZ.mjs +0 -18
  281. package/dist/custom-hostnames-ccdlELaD.mjs +0 -24
  282. package/dist/custom-nameservers-p3gDjfva.mjs +0 -12
  283. package/dist/custom-pages-DAkKVzgR.mjs +0 -38
  284. package/dist/d1-CDIyRdh4.mjs +0 -52
  285. package/dist/deploy-BaC5Ty7F.mjs +0 -2
  286. package/dist/deploy-context-DTTgNGro.mjs +0 -56
  287. package/dist/deploy-input-mAy06fAI.mjs +0 -2
  288. package/dist/dev-De-HszNT.mjs +0 -4
  289. package/dist/dialog-D5lus4M4.mjs +0 -2
  290. package/dist/discover-6kAmVMPp.mjs +0 -2
  291. package/dist/discover-C06Syc2B.mjs +0 -2
  292. package/dist/dns-wMjf1t6-.mjs +0 -152
  293. package/dist/docs-BA7qslb2.mjs +0 -3
  294. package/dist/email-auth-BShMFXn4.mjs +0 -6
  295. package/dist/email-domains-CDSbVclP.mjs +0 -14
  296. package/dist/email-routing-CBCkbg_F.mjs +0 -44
  297. package/dist/error-sanitization-B025CygB.mjs +0 -2
  298. package/dist/errors-DatLr-iR.mjs +0 -11
  299. package/dist/field-extractors-BwGdMnTr.mjs +0 -8
  300. package/dist/flagship-Bat5EZCk.mjs +0 -24
  301. package/dist/generate-CeeWW3eX.mjs +0 -3
  302. package/dist/generate-D6V4Q58z.mjs +0 -2
  303. package/dist/get-Be821dio.mjs +0 -2
  304. package/dist/gt-BQkaDQDq.mjs +0 -3
  305. package/dist/healthchecks-uC43QKQd.mjs +0 -20
  306. package/dist/init-BEVVz4_P.mjs +0 -43
  307. package/dist/intel-DRy4rHrt.mjs +0 -62
  308. package/dist/k2-wsanPL3y.mjs +0 -10
  309. package/dist/kv-BLSPcEnH.mjs +0 -12
  310. package/dist/leaked-credential-checks-CSZd9hBQ.mjs +0 -16
  311. package/dist/load-balancers-gap5u4b1.mjs +0 -84
  312. package/dist/local-CFsO9Tkg.mjs +0 -2
  313. package/dist/local-runtime-CmlJ20uJ.mjs +0 -2
  314. package/dist/log-DZfik9Jk.mjs +0 -2
  315. package/dist/login-BfuOf-Yi.mjs +0 -2
  316. package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
  317. package/dist/managed-transforms-CUC-uAbW.mjs +0 -8
  318. package/dist/o11y-oEUpMC3O.mjs +0 -86
  319. package/dist/oauth-BmSFLp_s.mjs +0 -4
  320. package/dist/organization-CEnlXwrl.mjs +0 -70
  321. package/dist/organizations-Dt86ToxE.mjs +0 -4
  322. package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
  323. package/dist/output-BJEgbI0G.mjs +0 -2
  324. package/dist/package-CiRJBRHO.mjs +0 -2
  325. package/dist/page-rules-J6LhwR-s.mjs +0 -38
  326. package/dist/pages-BksdnChs.mjs +0 -48
  327. package/dist/pay-per-crawl-BLcbHRoR.mjs +0 -36
  328. package/dist/pipelines-B5AoB3f3.mjs +0 -40
  329. package/dist/previews-DzJ85fsr.mjs +0 -6
  330. package/dist/progress-DLri-rA7.mjs +0 -2
  331. package/dist/project-settings-nBMEx1f-.mjs +0 -3
  332. package/dist/prompt-D0dXwuME.mjs +0 -4
  333. package/dist/queues-BsAck4To.mjs +0 -52
  334. package/dist/r2-BYjdHDEZ.mjs +0 -112
  335. package/dist/raw-fetch-DQeDx1wT.mjs +0 -2
  336. package/dist/registrar-D4wdgWpo.mjs +0 -43
  337. package/dist/registrar-sandbox-B6yopzdG.mjs +0 -58
  338. package/dist/request-headers-CoxHUNcB.mjs +0 -2
  339. package/dist/request-tracers-817HTytF.mjs +0 -4
  340. package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
  341. package/dist/rulesets-CKyc-Xlx.mjs +0 -42
  342. package/dist/run-Ciw_GIrC.mjs +0 -2
  343. package/dist/run-DD45EQTm.mjs +0 -2
  344. package/dist/schema-DuLIZRhA.mjs +0 -2
  345. package/dist/schema-flags-DrqvwQNw.mjs +0 -4
  346. package/dist/scim-C4iRWNYB.mjs +0 -16
  347. package/dist/session-D2yuwO4i.mjs +0 -2
  348. package/dist/shared--uVkAAd7.mjs +0 -2
  349. package/dist/smart-shield-Dn95hqUH.mjs +0 -22
  350. package/dist/snippets-BNUKOajz.mjs +0 -18
  351. package/dist/spawn-DuT4snxu.mjs +0 -5
  352. package/dist/sql-BX1pBqj3.mjs +0 -4
  353. package/dist/src-DPnUfK4c.mjs +0 -131
  354. package/dist/startup-profile-tZNb2HGz.mjs +0 -2
  355. package/dist/state-Uwfrmw5I.mjs +0 -2
  356. package/dist/stream-BRzr6yh0.mjs +0 -89
  357. package/dist/telemetry-Pt5GpCKD.mjs +0 -2
  358. package/dist/tunnels-DQVXKUKA.mjs +0 -27
  359. package/dist/ui-FYultowZ.mjs +0 -2
  360. package/dist/url-scanner-BH4PLy16.mjs +0 -16
  361. package/dist/user-Bn82Qw0Y.mjs +0 -103
  362. package/dist/vectorize-DoVVz_sh.mjs +0 -30
  363. package/dist/version-Zr2oF8mY.mjs +0 -2
  364. package/dist/waiting-rooms-QUW131o3.mjs +0 -52
  365. package/dist/web3-TY9s6Swn.mjs +0 -26
  366. package/dist/workers-B3uJqJKc.mjs +0 -39
  367. package/dist/workers-builds-BgGY0IGk.mjs +0 -14
  368. package/dist/workflows-6m85DdqF.mjs +0 -48
  369. package/dist/zaraz-8WSJ7l0L.mjs +0 -22
  370. package/dist/zero-trust-DK0cqDZv.mjs +0 -1022
@@ -1,51 +1,49 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,i as a,t as o}from"./context-Dp4CXG22.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-DLri-rA7.mjs";import{t as u}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as d,n as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-D0dXwuME.mjs";var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/available`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 logs datasets available
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,i as a,t as o}from"./context-BGm5_wTT.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-hFMAotFl.mjs";import{t as l}from"./progress-DE_G09u2.mjs";import{t as u}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-D274Im1O.mjs";var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/available`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function y(e){return e.usage(`$0 logs datasets available
3
3
 
4
4
  Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.
5
5
 
6
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`available`,describe:`List available account or zone datasets`,builder:y,handler:async e=>u({command:`logs datasets available`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(v,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var x={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function S(e){return e.usage(`$0 logs datasets create
6
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`available`,describe:`List available account or zone datasets`,builder:y,handler:async e=>u({command:`logs datasets available`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;r({command:`cf logs datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${a}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(a)},bodyKind:`none`});return}let t=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},t,{quiet:e.quiet}):e.local?s:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>t.send(v,{account_or_zone:u,account_or_zone_id:d}));c(f,{successLabel:`Loaded`})})};var x={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function S(e){return e.usage(`$0 logs datasets create
7
7
 
8
8
  Create a new Log Explorer dataset for the account or zone. List available account or zone datasets to see the dataset types and fields you can use. The \`fields\` property is optional. If not specified, all available fields will be enabled. For dataset field definitions, see: https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/
9
9
 
10
10
  Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dataset`,{type:`string`,description:"Dataset type name to create (e.g. `http_requests`)."}).option(`fields`,{type:`string`,description:`Controls which fields the API ingests. Defaults to all available
11
- fields when absent.
12
- . Provide as a JSON array of objects or @path/to/file.json.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are ingested.
11
+ fields when absent. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"enabled": boolean, "name": string}].`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are ingested.
13
12
  See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
14
13
  for syntax and examples.
15
- `}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. Defaults to\n`true` for supported datasets when omitted. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`create`,describe:`Create an account or zone dataset`,builder:S,handler:async e=>u({command:`logs datasets create`,classification:{safeFlags:[`filter-attack-traffic`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?p({dataset:m(e.dataset,`dataset`,`text`),fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,h=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(x,{body:t,account_or_zone:u,account_or_zone_id:h}));s(r,{successLabel:`Created`});return}e.dataset===void 0&&(e.dataset=await g(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let _=p({dataset:m(e.dataset,`dataset`,`text`),fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}),v=await l(`Creating`,async()=>n.send(x,{body:_,account_or_zone:u,account_or_zone_id:h}));s(v,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function T(e){return e.usage(`$0 logs datasets delete <dataset-id>
14
+ `}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. Defaults to\n`true` for supported datasets when omitted. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`create`,describe:`Create an account or zone dataset`,builder:S,handler:async e=>u({command:`logs datasets create`,classification:{safeFlags:[`filter-attack-traffic`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;r({command:`cf logs datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${a}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(a)},bodyKind:`json`,body:e.body===void 0?p({dataset:m(e.dataset,`dataset`,`text`),fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),u=await n(e),h=e.zone===void 0?`accounts`:`zones`,_=h===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?s:await o();if(h===`zones`?e.zoneId=_:e.accountId=_,e.body!==void 0){let e=t,n=await l(`Creating`,async()=>u.send(x,{body:e,account_or_zone:h,account_or_zone_id:_}));c(n,{successLabel:`Created`});return}e.dataset===void 0&&(e.dataset=await g(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let v=p({dataset:m(e.dataset,`dataset`,`text`),fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}),y=await l(`Creating`,async()=>u.send(x,{body:v,account_or_zone:h,account_or_zone_id:_}));c(y,{successLabel:`Created`})})};var w={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function T(e){return e.usage(`$0 logs datasets delete <dataset-id>
16
15
 
17
16
  Deletes a Log Explorer dataset for the account or zone. Dataset deletion must not be protected.
18
17
 
19
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`delete <dataset-id>`,describe:`Delete an account or zone dataset`,builder:T,handler:async e=>u({command:`logs datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,!await _({force:!!e.force,message:`This operation deletes a Log Explorer dataset for the account.`}))return;let f=await l(`Deleting`,async()=>n.send(w,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));s(f,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function O(e){return e.usage(`$0 logs datasets get <dataset-id>
18
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`delete <dataset-id>`,describe:`Delete an account or zone dataset`,builder:T,handler:async e=>u({command:`logs datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;r({command:`cf logs datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${a}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(a),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let t=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},t,{quiet:e.quiet}):e.local?s:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,!await _({force:!!e.force,message:`This operation deletes a Log Explorer dataset for the account.`}))return;let f=await l(`Deleting`,async()=>t.send(w,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));c(f,{successLabel:`Deleted`})})};var D={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function O(e){return e.usage(`$0 logs datasets get <dataset-id>
20
19
 
21
20
  Retrieve a single Log Explorer dataset by ID for the account or zone.
22
21
 
23
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <dataset-id>`,describe:`Get an account or zone dataset`,builder:O,handler:async e=>u({command:`logs datasets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(D,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));s(f,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets`,query:[`include_zones`],errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function j(e){return e.usage(`$0 logs datasets list
22
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <dataset-id>`,describe:`Get an account or zone dataset`,builder:O,handler:async e=>u({command:`logs datasets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;r({command:`cf logs datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${a}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(a),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let t=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},t,{quiet:e.quiet}):e.local?s:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>t.send(D,{account_or_zone:u,account_or_zone_id:d,dataset_id:e[`dataset-id`]}));c(f,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets`,query:[`include_zones`],errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function j(e){return e.usage(`$0 logs datasets list
24
23
 
25
24
  Returns all Log Explorer datasets configured for the account or zone. Pass \`include_zones=true\` to also include zone-level datasets that belong to this account or zone. List responses omit the \`fields\` property; use the single-dataset endpoint to retrieve field configuration.
26
25
 
27
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`include-zones`,{type:`boolean`,description:`Set to true to include zone-scoped datasets belonging to this account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List account or zone datasets`,builder:j,handler:async e=>u({command:`logs datasets list`,classification:{safeFlags:[`include-zones`,`dry-run`]}},e,async()=>{let n={include_zones:e[`include-zones`]};if(e.dryRun){let t=e.zone===void 0?await i():void 0,r=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;c({command:`cf logs datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${r}/${a}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(r),"account-or-zone-id":String(a)},query:n,bodyKind:`none`});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(A,{account_or_zone:d,account_or_zone_id:f,...n}));s(p,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 logs datasets update <dataset-id>
26
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`include-zones`,{type:`boolean`,description:`Set to true to include zone-scoped datasets belonging to this account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List account or zone datasets`,builder:j,handler:async e=>u({command:`logs datasets list`,classification:{safeFlags:[`include-zones`,`dry-run`]}},e,async()=>{let t={include_zones:e[`include-zones`]};if(e.dryRun){let n=e.zone===void 0?await i():void 0,a=e.zone===void 0?`accounts`:`zones`,o=e.zone??n??`<account-id>`;r({command:`cf logs datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${a}/${o}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(a),"account-or-zone-id":String(o)},query:t,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?s:await o();d===`zones`?e.zoneId=f:e.accountId=f;let p=await l(`Loading`,async()=>u.send(A,{account_or_zone:d,account_or_zone_id:f,...t}));c(p,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/datasets/${t.dataset_id}`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 logs datasets update <dataset-id>
28
27
 
29
28
  Updates the enabled state and/or field configuration of an account or zone dataset.
30
29
 
31
30
  Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`deletion-protection`,{type:`boolean`,description:"Set to `false` to allow deletion of this dataset."}).option(`enabled`,{type:`boolean`,description:`Whether to enable or disable log ingest for this dataset.`}).option(`fields`,{type:`string`,description:`Controls which fields the API ingests after the update. Defaults
32
- to all available fields when absent.
33
- . Provide as a JSON array of objects or @path/to/file.json.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are
31
+ to all available fields when absent. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"enabled": boolean, "name": string}].`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are
34
32
  ingested. If omitted, the existing filter is left unchanged. Set
35
33
  to an empty string (\`""\`) to clear the filter. Otherwise,
36
34
  replaces the dataset's filter entirely.
37
35
  See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
38
36
  for syntax and examples.
39
- `}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. If omitted,\nthe existing setting is left unchanged. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`update <dataset-id>`,describe:`Update an account or zone dataset`,builder:P,handler:async e=>u({command:`logs datasets update`,classification:{safeFlags:[`deletion-protection`,`enabled`,`filter-attack-traffic`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({deletion_protection:e[`deletion-protection`],enabled:e.enabled,fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,h=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(N,{body:t,account_or_zone:u,account_or_zone_id:h,dataset_id:e[`dataset-id`]}));s(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let g=p({deletion_protection:e[`deletion-protection`],enabled:e.enabled,fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}),_=await l(`Updating`,async()=>n.send(N,{body:g,account_or_zone:u,account_or_zone_id:h,dataset_id:e[`dataset-id`]}));s(_,{successLabel:`Updated`})})},I={command:`datasets`,describe:`Operations for datasets`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 logs list get
37
+ `}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. If omitted,\nthe existing setting is left unchanged. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`update <dataset-id>`,describe:`Update an account or zone dataset`,builder:P,handler:async e=>u({command:`logs datasets update`,classification:{safeFlags:[`deletion-protection`,`enabled`,`filter-attack-traffic`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;r({command:`cf logs datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${a}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(a),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({deletion_protection:e[`deletion-protection`],enabled:e.enabled,fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),u=await n(e),h=e.zone===void 0?`accounts`:`zones`,g=h===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?s:await o();if(h===`zones`?e.zoneId=g:e.accountId=g,e.body!==void 0){let n=t,r=await l(`Updating`,async()=>u.send(N,{body:n,account_or_zone:h,account_or_zone_id:g,dataset_id:e[`dataset-id`]}));c(r,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let _=p({deletion_protection:e[`deletion-protection`],enabled:e.enabled,fields:d(e.fields,`fields`),filter:m(e.filter,`filter`,`text`),filter_attack_traffic:e[`filter-attack-traffic`]}),v=await l(`Updating`,async()=>u.send(N,{body:_,account_or_zone:h,account_or_zone_id:g,dataset_id:e[`dataset-id`]}));c(v,{successLabel:`Updated`})})},I={command:`datasets`,describe:`Operations for datasets`,builder:e=>e.command(b).command(C).command(E).command(k).command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 logs list get
40
38
 
41
- Lists R2 objects containing logs matching the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`limit`,{type:`number`,description:`Maximum number of results to return.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get`,describe:`List log files`,builder:L,handler:async e=>u({command:`logs list get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={start:e.start,end:e.end,bucket:e.bucket,prefix:e.prefix,limit:e.limit},u={};if(e[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(e[`r2-access-key-id`])),e[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(e[`r2-secret-access-key`])),e.dryRun){let e=await i();c({command:`cf logs list get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/list`,pathParams:{},query:a,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await o();e.accountId=f;let p=await l(`Loading`,async()=>n(d,`GET`,`/accounts/${f}/logs/list`,{query:a,headers:Object.keys(u).length>0?u:void 0}));s(p,{successLabel:`Loaded`})})},R={command:`list`,describe:`Operations for list`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/logs/explorer/query/sql`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,507:`InsufficientStorageError`}};function B(e){return e.usage(`$0 logs query
39
+ Lists R2 objects containing logs matching the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`limit`,{type:`number`,description:`Maximum number of results to return.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get`,describe:`List log files`,builder:L,handler:async e=>u({command:`logs list get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={start:e.start,end:e.end,bucket:e.bucket,prefix:e.prefix,limit:e.limit},u={};if(e[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(e[`r2-access-key-id`])),e[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(e[`r2-secret-access-key`])),e.dryRun){let e=await i();r({command:`cf logs list get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/list`,pathParams:{},query:a,bodyKind:`none`});return}let d=await n(e),f=e.local?s:await o();e.accountId=f;let p=await l(`Loading`,async()=>t(d,`GET`,`/accounts/${f}/logs/list`,{query:a,headers:Object.keys(u).length>0?u:void 0}));c(p,{successLabel:`Loaded`})})},ee={command:`list`,describe:`Operations for list`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 logs query
42
40
 
43
41
  Run a SQL query against account or zone-level datasets. Timestamp fields are RFC3339 strings. Filter with: WHERE {timestamp_field} >= now() - INTERVAL '30' DAY WHERE {timestamp_field} >= '2026-04-01T00:00:00Z' WHERE {timestamp_field} BETWEEN '2026-04-01T00:00:00Z' AND '2026-04-30T23:59:59Z' List configured account or zone datasets to see enabled account or zone-level datasets. Zone-level datasets will not appear here. List available account or zone datasets to inspect their schemas and timestamp fields. For more information about the datasets, and the meaning of each field, check out https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/
44
42
 
45
- Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const V={command:`query`,describe:`Run a log query`,builder:B,handler:async e=>u({command:`logs query`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf logs query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/query/sql`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`octet-stream`,body:e.body});return}let u=await r(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await a({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await o();if(d===`zones`?e.zoneId=f:e.accountId=f,e.file){let t=h(e.file),r=await l(`Loading`,async()=>n(u,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));s(r,{successLabel:`Loaded`});return}if(e.body){let t=m(e.body,`body`,`binary`),r=await l(`Loading`,async()=>n(u,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));s(r,{successLabel:`Loaded`});return}let p=await l(`Loading`,async()=>u.send(z,{account_or_zone:d,account_or_zone_id:f}));s(p,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/zones/${t.zone_id}/logs/rayids/${t.ray_id}`,query:[`fields`,`timestamps`]};function U(e){return e.usage(`$0 logs rayid get <ray-id>
43
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Plain-text request body (without JSON quotes)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const B={command:`query`,describe:`Run a log query`,builder:z,handler:async e=>u({command:`logs query`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,a=e.zone??t??`<account-id>`;r({command:`cf logs query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${a}/logs/explorer/query/sql`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(a)},bodyKind:`octet-stream`,body:e.file===void 0?e.body:{file:e.file}});return}if(e.body===void 0&&e.file===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let u=e.file===void 0?m(e.body,`body`,`binary`):void 0,d=await n(e),f=e.zone===void 0?`accounts`:`zones`,p=f===`zones`?await a({zone:e.zone},d,{quiet:e.quiet}):e.local?s:await o();if(f===`zones`?e.zoneId=p:e.accountId=p,e.file!==void 0){let n=h(e.file),r=await l(`Loading`,async()=>t(d,`POST`,`/${f}/${p}/logs/explorer/query/sql`,{body:n,headers:{"Content-Type":`text/plain`}}));c(r,{successLabel:`Loaded`})}else if(e.body!==void 0){let e=u,n=await l(`Loading`,async()=>t(d,`POST`,`/${f}/${p}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}}));c(n,{successLabel:`Loaded`})}})};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/logs/rayids/${t.ray_id}`,query:[`fields`,`timestamps`]};function H(e){return e.usage(`$0 logs rayid get <ray-id>
46
44
 
47
- The \`/rayids\` api route allows lookups by specific rayid. The rayids route will return zero, one, or more records (ray ids are not unique).`).positional(`ray-id`,{type:`string`,description:`Ray identifier.`,demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <ray-id>`,describe:`Get logs RayIDs`,builder:U,handler:async e=>u({command:`logs rayid get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={fields:e.fields,timestamps:e.timestamps};if(e.dryRun){c({command:`cf logs rayid get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/rayids/${e[`ray-id`]==null?`<ray-id>`:encodeURIComponent(String(e[`ray-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ray-id":String(e[`ray-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e),i=await a({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let o=await l(`Loading`,async()=>n.send(H,{zone_id:i,ray_id:e[`ray-id`],...t}));s(o,{successLabel:`Loaded`})})},G={command:`rayid`,describe:`Operations for rayid`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`GET`,path:t=>e`/zones/${t.zone_id}/logs/received/fields`};function q(e){return e.usage(`$0 logs received fields get
45
+ The \`/rayids\` api route allows lookups by specific rayid. The rayids route will return zero, one, or more records (ray ids are not unique).`).positional(`ray-id`,{type:`string`,description:`Ray identifier.`,demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <ray-id>`,describe:`Get logs RayIDs`,builder:H,handler:async e=>u({command:`logs rayid get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={fields:e.fields,timestamps:e.timestamps};if(e.dryRun){r({command:`cf logs rayid get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/rayids/${e[`ray-id`]==null?`<ray-id>`:encodeURIComponent(String(e[`ray-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ray-id":String(e[`ray-id`]??``)},query:t,bodyKind:`none`});return}let i=await n(e),o=await a({zone:e.zone},i,{quiet:e.quiet});e.zoneId=o;let s=await l(`Loading`,async()=>i.send(V,{zone_id:o,ray_id:e[`ray-id`],...t}));c(s,{successLabel:`Loaded`})})},W={command:`rayid`,describe:`Operations for rayid`,builder:e=>e.command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`GET`,path:t=>e`/zones/${t.zone_id}/logs/received/fields`};function K(e){return e.usage(`$0 logs received fields get
48
46
 
49
- Lists all fields available. The response is json object with key-value pairs, where keys are field names, and values are descriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get`,describe:`List fields`,builder:q,handler:async e=>u({command:`logs received fields get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf logs received fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received/fields`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n;let i=await l(`Loading`,async()=>t.send(K,{zone_id:n}));s(i,{successLabel:`Loaded`})})},Y={command:`fields`,describe:`Operations for received.fields`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`GET`,path:t=>e`/zones/${t.zone_id}/logs/received`,query:[`start`,`end`,`fields`,`sample`,`count`,`timestamps`]};function Z(e){return e.usage('$0 logs received get\n\nThe `/received` api route allows customers to retrieve their edge HTTP logs. The basic access pattern is "give me all the logs for zone Z for minute M", where the minute M refers to the time records were received at Cloudflare\'s central data center. `start` is inclusive, and `end` is exclusive. Because of that, to get all data, at minutely cadence, starting at 10AM, the proper values are: `start=2018-05-20T10:00:00Z&end=2018-05-20T10:01:00Z`, then `start=2018-05-20T10:01:00Z&end=2018-05-20T10:02:00Z` and so on; the overlap will be handled properly.').option(`start`,{type:`string`,description:`Sets the (inclusive) beginning of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than seven days.`}).option(`end`,{type:`string`,description:"Sets the (exclusive) end of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. `end` must be at least five minutes earlier than now and must be later than `start`. Difference between `start` and `end` must be not greater than one hour.",demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`sample`,{type:`number`,description:"When `?sample=` is provided, a sample of matching records is returned. If `sample=0.1` then 10% of records will be returned. Sampling is random: repeated calls will not only return different records, but likely will also vary slightly in number of returned records. When `?count=` is also specified, `count` is applied to the number of returned records, not the sampled records. So, with `sample=0.05` and `count=7`, when there is a total of 100 records available, approximately five will be returned. When there are 1000 records, seven will be returned. When there are 10,000 records, seven will be returned."}).option(`count`,{type:`number`,description:"When `?count=` is provided, the response will contain up to `count` results. Since results are not sorted, you are likely to get different data for repeated requests. `count` must be an integer > 0."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get`,describe:`Get logs received`,builder:Z,handler:async e=>u({command:`logs received get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={start:e.start,end:e.end,fields:e.fields,sample:e.sample,count:e.count,timestamps:e.timestamps};if(e.dryRun){c({command:`cf logs received get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e),i=await a({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let o=await l(`Loading`,async()=>n.send(X,{zone_id:i,...t}));s(o,{successLabel:`Loaded`})})},$={command:`received`,describe:`Received log operations`,builder:e=>e.command(Q).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.usage(`$0 logs retrieve get
47
+ Lists all fields available. The response is json object with key-value pairs, where keys are field names, and values are descriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get`,describe:`List fields`,builder:K,handler:async e=>u({command:`logs received fields get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf logs received fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received/fields`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),i=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=i;let o=await l(`Loading`,async()=>t.send(G,{zone_id:i}));c(o,{successLabel:`Loaded`})})},J={command:`fields`,describe:`Operations for received.fields`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`GET`,path:t=>e`/zones/${t.zone_id}/logs/received`,query:[`start`,`end`,`fields`,`sample`,`count`,`timestamps`]};function X(e){return e.usage('$0 logs received get\n\nThe `/received` api route allows customers to retrieve their edge HTTP logs. The basic access pattern is "give me all the logs for zone Z for minute M", where the minute M refers to the time records were received at Cloudflare\'s central data center. `start` is inclusive, and `end` is exclusive. Because of that, to get all data, at minutely cadence, starting at 10AM, the proper values are: `start=2018-05-20T10:00:00Z&end=2018-05-20T10:01:00Z`, then `start=2018-05-20T10:01:00Z&end=2018-05-20T10:02:00Z` and so on; the overlap will be handled properly.').option(`start`,{type:`string`,description:`Sets the (inclusive) beginning of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than seven days.`}).option(`end`,{type:`string`,description:"Sets the (exclusive) end of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. `end` must be at least five minutes earlier than now and must be later than `start`. Difference between `start` and `end` must be not greater than one hour.",demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`sample`,{type:`number`,description:"When `?sample=` is provided, a sample of matching records is returned. If `sample=0.1` then 10% of records will be returned. Sampling is random: repeated calls will not only return different records, but likely will also vary slightly in number of returned records. When `?count=` is also specified, `count` is applied to the number of returned records, not the sampled records. So, with `sample=0.05` and `count=7`, when there is a total of 100 records available, approximately five will be returned. When there are 1000 records, seven will be returned. When there are 10,000 records, seven will be returned."}).option(`count`,{type:`number`,description:"When `?count=` is provided, the response will contain up to `count` results. Since results are not sorted, you are likely to get different data for repeated requests. `count` must be an integer > 0."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get`,describe:`Get logs received`,builder:X,handler:async e=>u({command:`logs received get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={start:e.start,end:e.end,fields:e.fields,sample:e.sample,count:e.count,timestamps:e.timestamps};if(e.dryRun){r({command:`cf logs received get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let i=await n(e),o=await a({zone:e.zone},i,{quiet:e.quiet});e.zoneId=o;let s=await l(`Loading`,async()=>i.send(Y,{zone_id:o,...t}));c(s,{successLabel:`Loaded`})})},Q={command:`received`,describe:`Received log operations`,builder:e=>e.command(Z).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function $(e){return e.usage(`$0 logs retrieve get
50
48
 
51
- Returns logs stored in R2 that match the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get`,describe:`Retrieve logs`,builder:te,handler:async e=>u({command:`logs retrieve get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={start:e.start,end:e.end,bucket:e.bucket,prefix:e.prefix},u={};if(e[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(e[`r2-access-key-id`])),e[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(e[`r2-secret-access-key`])),e.dryRun){let e=await i();c({command:`cf logs retrieve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/retrieve`,pathParams:{},query:a,bodyKind:`none`});return}let d=await r(e),f=e.local?t:await o();e.accountId=f;let p=await l(`Loading`,async()=>n(d,`GET`,`/accounts/${f}/logs/retrieve`,{query:a,headers:Object.keys(u).length>0?u:void 0}));s(p,{successLabel:`Loaded`})})},re={command:`retrieve`,describe:`Operations for retrieve`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ie={command:`logs`,describe:`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,builder:e=>e.command(V).command(I).command(R).command(G).command($).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ie as default};
49
+ Returns logs stored in R2 that match the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`get`,describe:`Retrieve logs`,builder:$,handler:async e=>u({command:`logs retrieve get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={start:e.start,end:e.end,bucket:e.bucket,prefix:e.prefix},u={};if(e[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(e[`r2-access-key-id`])),e[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(e[`r2-secret-access-key`])),e.dryRun){let e=await i();r({command:`cf logs retrieve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/retrieve`,pathParams:{},query:a,bodyKind:`none`});return}let d=await n(e),f=e.local?s:await o();e.accountId=f;let p=await l(`Loading`,async()=>t(d,`GET`,`/accounts/${f}/logs/retrieve`,{query:a,headers:Object.keys(u).length>0?u:void 0}));c(p,{successLabel:`Loaded`})})},ne={command:`retrieve`,describe:`Operations for retrieve`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},re={command:`logs`,describe:`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,builder:e=>e.command(B).command(I).command(ee).command(W).command(Q).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{re as default};
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-BGm5_wTT.mjs";import{t as s}from"./dry-run-qsnRlRk6.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./run-CXWkMU3x.mjs";import{t as d}from"./output-hFMAotFl.mjs";import{t as f}from"./progress-DE_G09u2.mjs";import{a as p,i as m,n as h}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function _(e){return e.usage(`$0 magic-network-monitoring configs create
3
+
4
+ Create a new network monitoring configuration.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`,default:1}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id": string, "name": string, "router_ip": string}].`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create account configuration`,builder:_,handler:async e=>u({command:`magic-network-monitoring configs create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring configs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({default_sampling:e[`default-sampling`],name:c(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:n(e[`warp-devices`],`warp-devices`)}):r(e.body)});return}let u=e.body===void 0?void 0:r(e.body),m=await t(e),h=e.local?l:await o();if(e.accountId=h,e.body!==void 0){let e=u,t=await f(`Creating`,async()=>m.send(g,{body:e,account_id:h}));d(t,{successLabel:`Created`});return}if(e[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await p(`name`,`The account name.`));let _=i({default_sampling:e[`default-sampling`],name:c(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:n(e[`warp-devices`],`warp-devices`)}),v=await f(`Creating`,async()=>m.send(g,{body:_,account_id:h}));d(v,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/mnm/config`};function b(e){return e.usage(`$0 magic-network-monitoring configs delete
5
+
6
+ Delete an existing network monitoring configuration.`).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 x={command:`delete`,describe:`Delete account configuration`,builder:b,handler:async e=>u({command:`magic-network-monitoring configs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await a();s({command:`cf magic-network-monitoring configs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();if(e.accountId=r,!await h({force:!!e.force}))return;let i=await f(`Deleting`,async()=>n.send(y,{account_id:r}));d(i,{successLabel:`Deleted`})})};var S={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function ee(e){return e.usage(`$0 magic-network-monitoring configs edit
7
+
8
+ Update fields in an existing network monitoring configuration.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id": string, "name": string, "router_ip": string}].`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`edit`,describe:`Update account configuration fields`,builder:ee,handler:async e=>u({command:`magic-network-monitoring configs edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring configs edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({default_sampling:e[`default-sampling`],name:c(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:n(e[`warp-devices`],`warp-devices`)}):r(e.body)});return}let u=e.body===void 0?void 0:r(e.body),p=await t(e),m=e.local?l:await o();if(e.accountId=m,e.body!==void 0){let e=u,t=await f(`Updating`,async()=>p.send(S,{body:e,account_id:m}));d(t,{successLabel:`Updated`});return}let h=i({default_sampling:e[`default-sampling`],name:c(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:n(e[`warp-devices`],`warp-devices`)}),g=await f(`Updating`,async()=>p.send(S,{body:h,account_id:m}));d(g,{successLabel:`Updated`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/mnm/config/full`};function w(e){return e.usage(`$0 magic-network-monitoring configs full get
9
+
10
+ Lists default sampling, router IPs, warp devices, and rules for account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get`,describe:`List rules and account configuration`,builder:w,handler:async e=>u({command:`magic-network-monitoring configs full get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();s({command:`cf magic-network-monitoring configs full get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/config/full`,pathParams:{},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();e.accountId=r;let i=await f(`Loading`,async()=>n.send(C,{account_id:r}));d(i,{successLabel:`Loaded`})})},E={command:`full`,describe:`Operations for configs.full`,builder:e=>e.command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/mnm/config`};function O(e){return e.usage(`$0 magic-network-monitoring configs get
11
+
12
+ Lists default sampling, router IPs and warp devices for account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`List account configuration`,builder:O,handler:async e=>u({command:`magic-network-monitoring configs get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();s({command:`cf magic-network-monitoring configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();e.accountId=r;let i=await f(`Loading`,async()=>n.send(D,{account_id:r}));d(i,{successLabel:`Loaded`})})};var A={method:`PUT`,path:t=>e`/accounts/${t.account_id}/mnm/config`,body:`json`};function j(e){return e.usage(`$0 magic-network-monitoring configs update
13
+
14
+ Update an existing network monitoring configuration, requires the entire configuration to be updated at once.`).option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`warp-devices`,{type:`string`,description:`The warp_devices field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"id": string, "name": string, "router_ip": string}].`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`update`,describe:`Update an entire account configuration`,builder:j,handler:async e=>u({command:`magic-network-monitoring configs update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring configs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({default_sampling:e[`default-sampling`],name:c(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:n(e[`warp-devices`],`warp-devices`)}):r(e.body)});return}let u=e.body===void 0?void 0:r(e.body),m=await t(e),h=e.local?l:await o();if(e.accountId=h,e.body!==void 0){let e=u,t=await f(`Updating`,async()=>m.send(A,{body:e,account_id:h}));d(t,{successLabel:`Updated`});return}if(e[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await p(`name`,`The account name.`));let g=i({default_sampling:e[`default-sampling`],name:c(e.name,`name`,`text`),router_ips:e[`router-ips`],warp_devices:n(e[`warp-devices`],`warp-devices`)}),_=await f(`Updating`,async()=>m.send(A,{body:g,account_id:h}));d(_,{successLabel:`Updated`})})},N={command:`configs`,describe:`Account-level monitoring configuration — sampling rates, thresholds, and notification settings`,builder:e=>e.command(v).command(x).command(te).command(k).command(M).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/mnm/rules/${t.rule_id}/advertisement`};function F(e){return e.usage(`$0 magic-network-monitoring rules advertisements edit <rule-id>
15
+
16
+ Update advertisement for rule.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`edit <rule-id>`,describe:`Update advertisement for rule`,builder:F,handler:async e=>u({command:`magic-network-monitoring rules advertisements edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring rules advertisements edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}/advertisement`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();e.accountId=r;let i=await f(`Updating`,async()=>n.send(P,{account_id:r,rule_id:e[`rule-id`]}));d(i,{successLabel:`Updated`})})},L={command:`advertisements`,describe:`Operations for rules.advertisements`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/rules/bulk`,body:`json`};function z(e){return e.usage(`$0 magic-network-monitoring rules bulk create
17
+
18
+ Create multiple network monitoring rules for account in a single request. Supports up to 100 rules per request. All rules in a single request must be of the same type.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`create`,describe:`Create rules in bulk`,builder:z,handler:async e=>u({command:`magic-network-monitoring rules bulk create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring rules bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:r(e.body,[],100)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let n=e.body===void 0?void 0:r(e.body,[],100),i=await t(e),c=e.local?l:await o();if(e.accountId=c,e.body!==void 0){let e=n,t=await f(`Creating`,async()=>i.send(R,{body:e,account_id:c}));d(t,{successLabel:`Created`})}})};var V={method:`PUT`,path:t=>e`/accounts/${t.account_id}/mnm/rules/bulk`,body:`json`};function H(e){return e.usage(`$0 magic-network-monitoring rules bulk update
19
+
20
+ Update multiple network monitoring rules for account in a single request. Supports up to 100 rules per request. All rules in a single request must be of the same type.`).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 ne={command:`update`,describe:`Update rules in bulk`,builder:H,handler:async e=>u({command:`magic-network-monitoring rules bulk update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring rules bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:r(e.body,[],100)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let n=e.body===void 0?void 0:r(e.body,[],100),i=await t(e),c=e.local?l:await o();if(e.accountId=c,e.body!==void 0){let e=n,t=await f(`Updating`,async()=>i.send(V,{body:e,account_id:c}));d(t,{successLabel:`Updated`})}})},U={command:`bulk`,describe:`Operations for rules.bulk`,builder:e=>e.command(B).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var W={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/rules`,body:`json`};function G(e){return e.usage(`$0 magic-network-monitoring rules create
21
+
22
+ Create network monitoring rules for account. Currently only supports creating a single rule per API request.`).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`],default:`1m`}).coerce(`duration`,e=>c(e,`duration`,`text`)).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).coerce(`prefix-match`,e=>c(e,`prefix-match`,`text`)).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).coerce(`type`,e=>c(e,`type`,`text`)).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).coerce(`zscore-sensitivity`,e=>c(e,`zscore-sensitivity`,`text`)).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).coerce(`zscore-target`,e=>c(e,`zscore-target`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`create`,describe:`Create rules`,builder:G,handler:async e=>u({command:`magic-network-monitoring rules create`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:c(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),u=await t(e),h=e.local?l:await o();if(e.accountId=h,e.body!==void 0){let e=n,t=await f(`Creating`,async()=>u.send(W,{body:e,account_id:h}));d(t,{successLabel:`Created`});return}if(e[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await p(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),e.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await m(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let g=i({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:c(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}),_=await f(`Creating`,async()=>u.send(W,{body:g,account_id:h}));d(_,{successLabel:`Created`})})};var q={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/mnm/rules/${t.rule_id}`};function J(e){return e.usage(`$0 magic-network-monitoring rules delete <rule-id>
23
+
24
+ Delete a network monitoring rule for account.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,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 <rule-id>`,describe:`Delete rule`,builder:J,handler:async e=>u({command:`magic-network-monitoring rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();if(e.accountId=r,!await h({force:!!e.force}))return;let i=await f(`Deleting`,async()=>n.send(q,{account_id:r,rule_id:e[`rule-id`]}));d(i,{successLabel:`Deleted`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/mnm/rules/${t.rule_id}`,body:`json`};function Z(e){return e.usage(`$0 magic-network-monitoring rules edit <rule-id>
25
+
26
+ Update a network monitoring rule for account.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`]}).coerce(`duration`,e=>c(e,`duration`,`text`)).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).coerce(`prefix-match`,e=>c(e,`prefix-match`,`text`)).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).coerce(`type`,e=>c(e,`type`,`text`)).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).coerce(`zscore-sensitivity`,e=>c(e,`zscore-sensitivity`,`text`)).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).coerce(`zscore-target`,e=>c(e,`zscore-target`,`text`)).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 re={command:`edit <rule-id>`,describe:`Update rule`,builder:Z,handler:async e=>u({command:`magic-network-monitoring rules edit`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:c(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),u=await t(e),h=e.local?l:await o();if(e.accountId=h,e.body!==void 0){let t=n,r=await f(`Updating`,async()=>u.send(X,{body:t,account_id:h,rule_id:e[`rule-id`]}));d(r,{successLabel:`Updated`});return}if(e[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await p(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),e.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await m(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let g=i({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:c(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}),_=await f(`Updating`,async()=>u.send(X,{body:g,account_id:h,rule_id:e[`rule-id`]}));d(_,{successLabel:`Updated`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/mnm/rules/${t.rule_id}`};function ae(e){return e.usage(`$0 magic-network-monitoring rules get <rule-id>
27
+
28
+ List a single network monitoring rule for account.`).positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <rule-id>`,describe:`Get rule`,builder:ae,handler:async e=>u({command:`magic-network-monitoring rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();e.accountId=r;let i=await f(`Loading`,async()=>n.send(ie,{account_id:r,rule_id:e[`rule-id`]}));d(i,{successLabel:`Loaded`})})};var se={method:`GET`,path:t=>e`/accounts/${t.account_id}/mnm/rules`};function ce(e){return e.usage(`$0 magic-network-monitoring rules list
29
+
30
+ Lists network monitoring rules for account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List rules`,builder:ce,handler:async e=>u({command:`magic-network-monitoring rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();s({command:`cf magic-network-monitoring rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();e.accountId=r;let i=await f(`Loading`,async()=>n.send(se,{account_id:r}));d(i,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/mnm/rules`,body:`json`};function ue(e){return e.usage(`$0 magic-network-monitoring rules update
31
+
32
+ Update network monitoring rules for account.`).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`]}).coerce(`duration`,e=>c(e,`duration`,`text`)).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).coerce(`prefix-match`,e=>c(e,`prefix-match`,`text`)).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).coerce(`type`,e=>c(e,`type`,`text`)).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).coerce(`zscore-sensitivity`,e=>c(e,`zscore-sensitivity`,`text`)).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).coerce(`zscore-target`,e=>c(e,`zscore-target`,`text`)).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 de={command:`update`,describe:`Update rules`,builder:ue,handler:async e=>u({command:`magic-network-monitoring rules update`,classification:{safeFlags:[`automatic-advertisement`,`duration`,`prefix-match`,`type`,`zscore-sensitivity`,`zscore-target`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf magic-network-monitoring rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:c(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),u=await t(e),h=e.local?l:await o();if(e.accountId=h,e.body!==void 0){let e=n,t=await f(`Updating`,async()=>u.send(Q,{body:e,account_id:h}));d(t,{successLabel:`Updated`});return}if(e[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await p(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),e.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await m(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let g=i({automatic_advertisement:e[`automatic-advertisement`],bandwidth_threshold:e[`bandwidth-threshold`],duration:e.duration,name:c(e.name,`name`,`text`),packet_threshold:e[`packet-threshold`],prefix_match:e[`prefix-match`],prefixes:e.prefixes,type:e.type,zscore_sensitivity:e[`zscore-sensitivity`],zscore_target:e[`zscore-target`]}),_=await f(`Updating`,async()=>u.send(Q,{body:g,account_id:h}));d(_,{successLabel:`Updated`})})},fe={command:`rules`,describe:`Monitoring rules that define traffic thresholds and trigger alerts or prefix advertisements`,builder:e=>e.command(K).command(Y).command(re).command(oe).command(le).command(de).command(L).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var pe={method:`POST`,path:t=>e`/accounts/${t.account_id}/mnm/vpc-flows/token`};function $(e){return e.usage(`$0 magic-network-monitoring vpc-flows tokens create
33
+
34
+ Generate authentication token for VPC flow logs export.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`create`,describe:`Generate authentication token for VPC flow logs export.`,builder:$,handler:async e=>u({command:`magic-network-monitoring vpc-flows tokens create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await a();s({command:`cf magic-network-monitoring vpc-flows tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/mnm/vpc-flows/token`,pathParams:{},bodyKind:`none`});return}let n=await t(e),r=e.local?l:await o();e.accountId=r;let i=await f(`Creating`,async()=>n.send(pe,{account_id:r}));d(i,{successLabel:`Created`})})},he={command:`tokens`,describe:`Operations for vpc-flows.tokens`,builder:e=>e.command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ge={command:`vpc-flows`,describe:`Ingest VPC flow logs from cloud providers for network visibility and anomaly detection`,builder:e=>e.command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_e={command:`magic-network-monitoring`,describe:`Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion`,builder:e=>e.command(N).command(fe).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_e as default};