cf 0.14.0 → 1.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/LICENSE-APACHE +176 -0
  2. package/LICENSE-MIT +25 -0
  3. package/README.md +6 -7
  4. package/dist/_meta/commands.json +4040 -1629
  5. package/dist/_meta/hand-written-commands.json +16 -43
  6. package/dist/_meta/schemas.json +445 -756
  7. package/dist/abuse-reports-BwsJLiPN.mjs +26 -0
  8. package/dist/access-BVbIajYr.mjs +27 -0
  9. package/dist/account-DBLarar2.mjs +12 -0
  10. package/dist/account-tags-BNrSShjj.mjs +15 -0
  11. package/dist/accounts-CCAnDjFk.mjs +132 -0
  12. package/dist/acm-ZPYQbZQr.mjs +15 -0
  13. package/dist/addressing-BFpzLfTn.mjs +93 -0
  14. package/dist/agent-memory-DEvy2dLU.mjs +34 -0
  15. package/dist/ai-BF0_0NtS.mjs +31 -0
  16. package/dist/ai-audit-Dn03zntn.mjs +6 -0
  17. package/dist/ai-gateway-CVABbCjv.mjs +147 -0
  18. package/dist/ai-search-g0tR8Cut.mjs +79 -0
  19. package/dist/ai-security-BXXA0Jnk.mjs +10 -0
  20. package/dist/alerting-Bst10SOG.mjs +56 -0
  21. package/dist/analytics-DgEaxta8.mjs +21 -0
  22. package/dist/analytics_engine-B4DvcYmB.mjs +4 -0
  23. package/dist/{lifecycle-CadF_i2n.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
  24. package/dist/api-security-Dkx1Codr.mjs +154 -0
  25. package/dist/argo-BvswWPlP.mjs +10 -0
  26. package/dist/artifacts-D8kZKJq0.mjs +43 -0
  27. package/dist/audit-logs-Bp_yQpXJ.mjs +4 -0
  28. package/dist/auth-B9w55oRg.mjs +2 -0
  29. package/dist/auth-C80y97yu.mjs +8 -0
  30. package/dist/billing-Cqj64fqz.mjs +23 -0
  31. package/dist/bot-management-CzZx_aml.mjs +9 -0
  32. package/dist/botnet-feed-Co0c8Xdj.mjs +11 -0
  33. package/dist/brand-protection-CDsGaPIl.mjs +27 -0
  34. package/dist/browser-extension-BRHJm3Qf.mjs +15 -0
  35. package/dist/browser-run-DFrohJ1p.mjs +46 -0
  36. package/dist/build-BbjcJxKq.mjs +2 -0
  37. package/dist/build-DQh5-KK4.mjs +2 -0
  38. package/dist/builds-CamhClyb.mjs +71 -0
  39. package/dist/cache-BiTk4-Zc.mjs +45 -0
  40. package/dist/certificate-authorities-Dal9DNjW.mjs +6 -0
  41. package/dist/cf-oadujOtC.mjs +18 -0
  42. package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
  43. package/dist/chunk-DL5FNmn1.mjs +2 -0
  44. package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
  45. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
  46. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
  47. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
  48. package/dist/client-certificates-DDisXoTE.mjs +13 -0
  49. package/dist/client-side-security-CIO_YPtN.mjs +63 -0
  50. package/dist/cloud-connector-vwdixea0.mjs +6 -0
  51. package/dist/cloudflared-DhItYrCq.mjs +2 -0
  52. package/dist/cloudforce-one-C1cFVBGK.mjs +456 -0
  53. package/dist/command-BP7ldws1.mjs +2 -0
  54. package/dist/command-BtNRBTP6.mjs +2 -0
  55. package/dist/{command-BL6weJf3.mjs → command-CF0giIIc.mjs} +1 -1
  56. package/dist/command-Ck9rbHA4.mjs +2 -0
  57. package/dist/{completions-Dn621okY.mjs → completions-xPLd1cvL.mjs} +3 -3
  58. package/dist/{config-BY6KpMZs.mjs → config-B4vIa0zp.mjs} +1 -1
  59. package/dist/connector-interrupts-DQ5T-HMN.mjs +6 -0
  60. package/dist/connector-telemetry-events-DWam38_9.mjs +6 -0
  61. package/dist/connector-telemetry-snapshots-DX6AJf9Q.mjs +6 -0
  62. package/dist/connectors-CBhLWVd-.mjs +15 -0
  63. package/dist/{dist-CFQREIRi.mjs → containers-Bx_44bmJ.mjs} +84 -83
  64. package/dist/containers-C7blN-pe.mjs +78 -0
  65. package/dist/content-scan-CC91dAlv.mjs +14 -0
  66. package/dist/cps-D9a4N_bH.mjs +6 -0
  67. package/dist/csamScanner-T7nbCnep.mjs +10 -0
  68. package/dist/ct-alerting-CkjNJlla.mjs +5 -0
  69. package/dist/custom-certificates-DnWnt9oJ.mjs +17 -0
  70. package/dist/custom-csrs-Db2pF9Ib.mjs +11 -0
  71. package/dist/custom-hostnames-B_N-uSIa.mjs +27 -0
  72. package/dist/custom-nameservers-DPA_sFY8.mjs +9 -0
  73. package/dist/custom-pages-D6fxEBoh.mjs +21 -0
  74. package/dist/d1-DXs1xVmH.mjs +45 -0
  75. package/dist/data-security-CVZAIzhe.mjs +71 -0
  76. package/dist/dcv-delegation-as1ue_wx.mjs +4 -0
  77. package/dist/delegate-GctF_lrq.mjs +2 -0
  78. package/dist/delegate.mjs +1 -1
  79. package/dist/{deploy-BtETDvDA.mjs → deploy-D2XXCkqk.mjs} +1 -1
  80. package/dist/{deploy-input-BoLTdQzS.mjs → deploy-input-BCYyKXpp.mjs} +1 -1
  81. package/dist/{dev-B5WcIpEr.mjs → dev-nsNxyg2D.mjs} +1 -1
  82. package/dist/diagnostics-BKH1Oh-C.mjs +15 -0
  83. package/dist/{dialog-Bud0hiYv.mjs → dialog-Dx4rRcKM.mjs} +1 -1
  84. package/dist/dist-BDOzKthe.mjs +48 -0
  85. package/dist/{dist-BRg_z9Ut.mjs → dist-BpadEMNY.mjs} +1 -1
  86. package/dist/dist-dc4E1u01.mjs +272 -0
  87. package/dist/dls-C5kAQsN6.mjs +17 -0
  88. package/dist/dns-CYwXrdJO.mjs +135 -0
  89. package/dist/dns-firewall-BEw4QcXj.mjs +71 -0
  90. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
  91. package/dist/dry-run-CLX6Pbtq.mjs +2 -0
  92. package/dist/durable-objects-3jvUgzKd.mjs +8 -0
  93. package/dist/email-auth-B3MD8FrJ.mjs +6 -0
  94. package/dist/email-routing-C4YhZGPw.mjs +45 -0
  95. package/dist/email-security-BcFyWNby.mjs +160 -0
  96. package/dist/email-sending-BO1GOAho.mjs +47 -0
  97. package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
  98. package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
  99. package/dist/fieldExtractors-BJDnzNCN.mjs +9 -0
  100. package/dist/firewall-BSMa9aH3.mjs +56 -0
  101. package/dist/flagship-BJYMb7hb.mjs +28 -0
  102. package/dist/fraud-C7kS7kP9.mjs +22 -0
  103. package/dist/google-tag-gateway-8VR-j0sa.mjs +6 -0
  104. package/dist/healthchecks-BJleItOD.mjs +22 -0
  105. package/dist/hostnames-CHajvoHa.mjs +11 -0
  106. package/dist/hyperdrive-DlxQrok-.mjs +37 -0
  107. package/dist/iam-B7oTr6vW.mjs +52 -0
  108. package/dist/images-xLAYe436.mjs +71 -0
  109. package/dist/index.mjs +1 -1
  110. package/dist/intel-DwZXY1YE.mjs +76 -0
  111. package/dist/{interactive-CGOh-aYq.mjs → interactive-B6woOLo-.mjs} +23 -23
  112. package/dist/interactive-DnUvQHjc.mjs +2 -0
  113. package/dist/ips-BC_9nKE7.mjs +4 -0
  114. package/dist/keyless-certificates-CtsCsbZ2.mjs +13 -0
  115. package/dist/keys-K-GFzhku.mjs +4 -0
  116. package/dist/kv-Bfwz_ULu.mjs +21 -0
  117. package/dist/leaked-credential-checks-D8UuxztO.mjs +18 -0
  118. package/dist/lifecycle-Ichnb2x1.mjs +2 -0
  119. package/dist/load-balancers-B0XeGLhT.mjs +76 -0
  120. package/dist/local-B6b2OIBW.mjs +2 -0
  121. package/dist/local-BrfySqnx.mjs +2 -0
  122. package/dist/{local-runtime-Dj8k-p62.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
  123. package/dist/login-CAsRUF4c.mjs +2 -0
  124. package/dist/login-DaglE6WA.mjs +5 -0
  125. package/dist/logo-matches-DWg5ezsM.mjs +6 -0
  126. package/dist/logos-6A6gJC5C.mjs +7 -0
  127. package/dist/logpush-DwehajAw.mjs +46 -0
  128. package/dist/logs-BWg7YymF.mjs +48 -0
  129. package/dist/magic-cloud-networking--14hNj2F.mjs +71 -0
  130. package/dist/magic-network-monitoring-Dzo4L6kd.mjs +36 -0
  131. package/dist/magic-transit-DDO0A5v4.mjs +387 -0
  132. package/dist/managed-defense-DQ0iwWdG.mjs +18 -0
  133. package/dist/managed-transforms-DDIdcPG0.mjs +9 -0
  134. package/dist/matches-D6ahHNaP.mjs +6 -0
  135. package/dist/mcp-BcIrLbRv.mjs +32 -0
  136. package/dist/mesh-wLiPcWyN.mjs +26 -0
  137. package/dist/mtls-certificates-AEuNOERQ.mjs +13 -0
  138. package/dist/network-DZsrs_sw.mjs +50 -0
  139. package/dist/network-interconnects-Cjbu4EMv.mjs +73 -0
  140. package/dist/oauth-C-QCVfWz.mjs +14 -0
  141. package/dist/oauth-Cu1twz9z.mjs +2 -0
  142. package/dist/oauth-clients-DR0hzakz.mjs +16 -0
  143. package/dist/oauth-scopes-BDNpJJ32.mjs +4 -0
  144. package/dist/observability-BnHy2M6p.mjs +80 -0
  145. package/dist/{open-PBXRGS4R-ClEt4E8F.mjs → open-PBXRGS4R-C4CKEADM.mjs} +1 -1
  146. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
  147. package/dist/organization-iasRm69J.mjs +75 -0
  148. package/dist/organizations-CUzCIKXV.mjs +4 -0
  149. package/dist/origin-ca-certificates-iQXSqBI0.mjs +11 -0
  150. package/dist/origin-post-quantum-encryption-DcMDK6Tz.mjs +6 -0
  151. package/dist/origin-tls-client-auth-D1X26X7y.mjs +30 -0
  152. package/dist/{output-Z2lQmPUW.mjs → output-Bia1u2k5.mjs} +1 -1
  153. package/dist/page-rules-CXa8EYcP.mjs +39 -0
  154. package/dist/pages-Cu0m9GSH.mjs +60 -0
  155. package/dist/pay-per-crawl-DmF8xlm_.mjs +65 -0
  156. package/dist/pay-per-use-DIp2fwJU.mjs +6 -0
  157. package/dist/pipelines-MmXlsxYO.mjs +44 -0
  158. package/dist/precursor-jqeEG_mJ.mjs +4 -0
  159. package/dist/previews-Cg6lc24N.mjs +4 -0
  160. package/dist/progress-Bpp73hIu.mjs +2 -0
  161. package/dist/{prompt-BP8XrQSj.mjs → prompt-CpZztV8c.mjs} +1 -1
  162. package/dist/queries-VzdcSR5H.mjs +9 -0
  163. package/dist/queues-BZYl2emH.mjs +63 -0
  164. package/dist/r2-data-catalog-DISnPFPY.mjs +44 -0
  165. package/dist/r2-omcKF8_A.mjs +127 -0
  166. package/dist/radar-JzBTD249.mjs +300 -0
  167. package/dist/{raw-fetch-DNH2V8qH.mjs → raw-fetch-DxGs_eRm.mjs} +1 -1
  168. package/dist/realtime-yIdAJ0Yf.mjs +172 -0
  169. package/dist/registrar-D-Li9gNk.mjs +43 -0
  170. package/dist/registrar-sandbox-CKSSHAyv.mjs +56 -0
  171. package/dist/{registry-BrtVdMrC.mjs → registry-vreNkX6u.mjs} +1 -1
  172. package/dist/reporting-Cf-pnw6h.mjs +14 -0
  173. package/dist/request-headers-DaXBfmVn.mjs +2 -0
  174. package/dist/request-tracers-BegIQTzt.mjs +4 -0
  175. package/dist/resolve-BXemCSyA.mjs +2 -0
  176. package/dist/resolve-CUDKxUrW.mjs +2 -0
  177. package/dist/resource-sharing-DEVgiYzM.mjs +40 -0
  178. package/dist/resource-tagging-Cm2yJkU9.mjs +4 -0
  179. package/dist/rules-DDCa7cYF.mjs +18 -0
  180. package/dist/rulesets-BhS7Hvtu.mjs +37 -0
  181. package/dist/rum-EIj9ViSn.mjs +30 -0
  182. package/dist/run-CSFE1qVX.mjs +2 -0
  183. package/dist/run-ChM_YpZ0.mjs +2 -0
  184. package/dist/{schema-DmuJtMN5.mjs → schema-DCBb3Fcs.mjs} +1 -1
  185. package/dist/{schema-flags-CUGxFeZe.mjs → schema-flags--GosoCMU.mjs} +1 -1
  186. package/dist/scim-DA83eNe-.mjs +18 -0
  187. package/dist/{sdk-Bvqx-_3z.mjs → sdk-CvIO3tWS.mjs} +1 -1
  188. package/dist/secrets-store-BTd3eGIB.mjs +24 -0
  189. package/dist/security-center-DbH_7h-T.mjs +30 -0
  190. package/dist/security-txt-DSrHhVEN.mjs +9 -0
  191. package/dist/shared-CtBkOWGN.mjs +2 -0
  192. package/dist/smart-shield-DnSTo-OI.mjs +24 -0
  193. package/dist/snippets-An5kQs33.mjs +20 -0
  194. package/dist/source-BR4_k2ad.mjs +6 -0
  195. package/dist/spawn-7IW1UyoH.mjs +523 -0
  196. package/dist/spectrum-Ci79n7fd.mjs +83 -0
  197. package/dist/speed-BBL7LrLn.mjs +24 -0
  198. package/dist/src-CNHNCZpy.mjs +108 -0
  199. package/dist/ssl-B2psFIRm.mjs +45 -0
  200. package/dist/startup-profile-CYEokTVe.mjs +2 -0
  201. package/dist/startup-profile-CgWHy4rE.mjs +17 -0
  202. package/dist/state-BxCejn42.mjs +2 -0
  203. package/dist/state-DSzkxXML.mjs +2 -0
  204. package/dist/stream-Du0Q7UOh.mjs +102 -0
  205. package/dist/submit-CU8S2jBT.mjs +4 -0
  206. package/dist/tags-C3l5aZSi.mjs +4 -0
  207. package/dist/telemetry-CNt8H3aA.mjs +2 -0
  208. package/dist/{telemetry-2s9Y3FaN.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
  209. package/dist/telemetry-PHe8XxA2.mjs +2 -0
  210. package/dist/tenant-BZ0ysR9L.mjs +12 -0
  211. package/dist/tenant-custom-nameservers-DtKeyM5J.mjs +9 -0
  212. package/dist/{tools-Dz1JCrHd.mjs → tools-BMKpYraQ.mjs} +1 -1
  213. package/dist/tunnels-D1tRWQQi.mjs +29 -0
  214. package/dist/turnstile-DBa4_Vyz.mjs +33 -0
  215. package/dist/ui-DH95w1Qk.mjs +5 -0
  216. package/dist/undici-DTSBJHNS.mjs +96 -0
  217. package/dist/update-check-AAn7EXw8.mjs +2 -0
  218. package/dist/update-check-BbIXBq1o.mjs +2 -0
  219. package/dist/update-check-worker.mjs +2 -0
  220. package/dist/url-info-BRA0XGT2.mjs +4 -0
  221. package/dist/url-normalization-B6N2m5s6.mjs +9 -0
  222. package/dist/url-scanner-CeKkzkhe.mjs +16 -0
  223. package/dist/user-CftksgmF.mjs +112 -0
  224. package/dist/values-m7w9PX3o.mjs +4 -0
  225. package/dist/vectorize-BWBEtsgZ.mjs +32 -0
  226. package/dist/version-cPq-WKL8.mjs +2 -0
  227. package/dist/waiting-rooms-BVZSYTNJ.mjs +53 -0
  228. package/dist/web-assets-CLU5vAgP.mjs +64 -0
  229. package/dist/web3-Dkd4XRNH.mjs +28 -0
  230. package/dist/workers-BQi4_SBS.mjs +36 -0
  231. package/dist/workers-builds-BgtPSDYJ.mjs +14 -0
  232. package/dist/workers-for-platforms-actLCM6Q.mjs +25 -0
  233. package/dist/workers-vpc-DjGfJgQn.mjs +13 -0
  234. package/dist/workflows-Cm7WsAgB.mjs +43 -0
  235. package/dist/zaraz-DurWe32F.mjs +22 -0
  236. package/dist/zero-trust-D8SVU8YZ.mjs +795 -0
  237. package/dist/zone-B3AEAfcd.mjs +4 -0
  238. package/dist/zones-DiX5LoSU.mjs +124 -0
  239. package/package.json +26 -11
  240. package/dist/_meta/agent-context.json +0 -195
  241. package/dist/abuse-reports-CDFjJ2e8.mjs +0 -8
  242. package/dist/access-BoT1waG4.mjs +0 -11
  243. package/dist/account-agnMUKWj.mjs +0 -2
  244. package/dist/account-tags-BRMMHCee.mjs +0 -9
  245. package/dist/accounts-Cut77dAt.mjs +0 -30
  246. package/dist/acm-C8WgXNCl.mjs +0 -3
  247. package/dist/addressing-CR8EV42x.mjs +0 -13
  248. package/dist/agent-context-Wj5TRRbW.mjs +0 -8
  249. package/dist/agent-memory-CVJpKKZy.mjs +0 -6
  250. package/dist/ai-BbNYt-yI.mjs +0 -5
  251. package/dist/ai-audit-mVajM-2i.mjs +0 -2
  252. package/dist/ai-gateway-BsepSA_v.mjs +0 -13
  253. package/dist/ai-search-DbEJqm5-.mjs +0 -7
  254. package/dist/ai-security-DmyB5EYk.mjs +0 -4
  255. package/dist/alerting-dmy3hd8O.mjs +0 -6
  256. package/dist/analytics-B1xBMla0.mjs +0 -5
  257. package/dist/analytics_engine-DazCn3iC.mjs +0 -2
  258. package/dist/api-security-0HXCzfHk.mjs +0 -50
  259. package/dist/argo-DSHsE8zv.mjs +0 -2
  260. package/dist/artifacts-CwiU9Mxu.mjs +0 -5
  261. package/dist/audit-logs-DwFtMDwH.mjs +0 -2
  262. package/dist/auth-B0ZyXc3y.mjs +0 -5
  263. package/dist/auth-DWxtJ918.mjs +0 -8
  264. package/dist/billing-Cbpadkgu.mjs +0 -3
  265. package/dist/bot-management-B6M2Vyyn.mjs +0 -5
  266. package/dist/botnet-feed-Dn8UuE4h.mjs +0 -3
  267. package/dist/brand-protection-B5R0b3pu.mjs +0 -3
  268. package/dist/browser-extension-D55pYZf_.mjs +0 -3
  269. package/dist/browser-run-C1b2VkGB.mjs +0 -4
  270. package/dist/build-CP2JUfV1.mjs +0 -2
  271. package/dist/builds-CVEXO_4a.mjs +0 -9
  272. package/dist/cache-BU5xX82E.mjs +0 -9
  273. package/dist/certificate-authorities--tZTWJWD.mjs +0 -2
  274. package/dist/cf-BV2HLCQm.mjs +0 -18
  275. package/dist/chunk-QBZBEHZB-BcCMlc8C.mjs +0 -2
  276. package/dist/chunk-XLADBZ7F-DgFrtUhW.mjs +0 -103
  277. package/dist/chunk-vbHwaUoU.mjs +0 -2
  278. package/dist/client-certificates-DX84qeYG.mjs +0 -3
  279. package/dist/client-side-security-DsSO2rZQ.mjs +0 -37
  280. package/dist/cloud-connector-cf8qlxap.mjs +0 -2
  281. package/dist/cloudforce-one-DzVXorbu.mjs +0 -32
  282. package/dist/command-DYrspBc0.mjs +0 -2
  283. package/dist/connector-interrupts-DqpqPPkp.mjs +0 -2
  284. package/dist/connector-telemetry-events-CCD-_B-8.mjs +0 -2
  285. package/dist/connector-telemetry-snapshots-D3CeGGhk.mjs +0 -2
  286. package/dist/connectors-aPQspZdg.mjs +0 -3
  287. package/dist/containers-D0Kjl8h-.mjs +0 -58
  288. package/dist/content-scan-BVx18XmS.mjs +0 -4
  289. package/dist/cps-ByazyM0x.mjs +0 -2
  290. package/dist/csamScanner-OG5lQxBC.mjs +0 -6
  291. package/dist/ct-alerting-BJx5n8Zf.mjs +0 -3
  292. package/dist/custom-certificates-BuJ2e9TA.mjs +0 -5
  293. package/dist/custom-csrs-CR_5qbST.mjs +0 -3
  294. package/dist/custom-hostnames-BzDTsQXb.mjs +0 -5
  295. package/dist/custom-nameservers-OfMPRGkD.mjs +0 -3
  296. package/dist/custom-pages-BmGXoTIo.mjs +0 -3
  297. package/dist/d1-DedC8N0N.mjs +0 -21
  298. package/dist/data-security-B2UB26ry.mjs +0 -7
  299. package/dist/dcv-delegation-C11vmzbG.mjs +0 -2
  300. package/dist/diagnostics-Cf6BLpAo.mjs +0 -3
  301. package/dist/dist-CyisSore.mjs +0 -371
  302. package/dist/dist-Dr4Hg_Up.mjs +0 -48
  303. package/dist/dls-R6PvHbhj.mjs +0 -3
  304. package/dist/dns-Cl8se64c.mjs +0 -29
  305. package/dist/dns-firewall-WtmKilDT.mjs +0 -57
  306. package/dist/dry-run-YSQndLvt.mjs +0 -2
  307. package/dist/durable-objects-jfVU6yp_.mjs +0 -2
  308. package/dist/email-auth-DPmZ85eW.mjs +0 -2
  309. package/dist/email-routing-Bf6DbNTr.mjs +0 -6
  310. package/dist/email-security-DTifjSxM.mjs +0 -18
  311. package/dist/email-sending-Dm3WkFHV.mjs +0 -7
  312. package/dist/error-sanitization-D8zuyPj_.mjs +0 -2
  313. package/dist/fieldExtractors-CeXZL0-I.mjs +0 -3
  314. package/dist/firewall-D5N2APXO.mjs +0 -8
  315. package/dist/flagship-sUOy9jei.mjs +0 -4
  316. package/dist/fraud-WLW2Ep1Z.mjs +0 -20
  317. package/dist/google-tag-gateway-lbww1FaJ.mjs +0 -2
  318. package/dist/healthchecks-0ih8Qjiw.mjs +0 -4
  319. package/dist/hostnames-Ba6FuL8K.mjs +0 -3
  320. package/dist/hyperdrive-DMqcU639.mjs +0 -21
  321. package/dist/iam-CXlYm0uC.mjs +0 -6
  322. package/dist/images-D_g1oli6.mjs +0 -8
  323. package/dist/intel-B8bS0ARd.mjs +0 -8
  324. package/dist/ips-68fzniN4.mjs +0 -2
  325. package/dist/keyless-certificates-CeLnqBvX.mjs +0 -3
  326. package/dist/keys-DkVdS2lF.mjs +0 -2
  327. package/dist/kv-gDAN50BQ.mjs +0 -5
  328. package/dist/leaked-credential-checks-DfnvHpvg.mjs +0 -4
  329. package/dist/load-balancers-m0HqyXPZ.mjs +0 -6
  330. package/dist/local-BwL_gesw.mjs +0 -2
  331. package/dist/logo-matches-DPbHlsKQ.mjs +0 -2
  332. package/dist/logos-DFBJFAYJ.mjs +0 -3
  333. package/dist/logpush-gzmlZayc.mjs +0 -4
  334. package/dist/logs-BuzwQgt5.mjs +0 -18
  335. package/dist/magic-cloud-networking-BbHCi1Vp.mjs +0 -5
  336. package/dist/magic-network-monitoring-kWMmnPTG.mjs +0 -4
  337. package/dist/magic-transit-ClSmJDKw.mjs +0 -111
  338. package/dist/managed-defense-EOihg1UR.mjs +0 -2
  339. package/dist/managed-transforms-BZ_XdGE2.mjs +0 -3
  340. package/dist/matches-B6sG0_fr.mjs +0 -2
  341. package/dist/mcp--kK0vS5i.mjs +0 -4
  342. package/dist/mesh-DfXYUHOO.mjs +0 -4
  343. package/dist/mtls-certificates-DZd-0X7l.mjs +0 -3
  344. package/dist/network-U6f_5ihp.mjs +0 -6
  345. package/dist/network-interconnects-DKZGTiYM.mjs +0 -41
  346. package/dist/oauth-BdVr2hJp.mjs +0 -14
  347. package/dist/oauth-clients-CY3OkPhC.mjs +0 -4
  348. package/dist/oauth-scopes-BTY7_5L-.mjs +0 -2
  349. package/dist/observability-Bsp-LdmJ.mjs +0 -10
  350. package/dist/organization-BSeMdj-7.mjs +0 -45
  351. package/dist/organizations-BroR48Nv.mjs +0 -2
  352. package/dist/origin-ca-certificates-jC-EMn6W.mjs +0 -3
  353. package/dist/origin-post-quantum-encryption-DIspLvA0.mjs +0 -2
  354. package/dist/origin-tls-client-auth-CZ_nUEcM.mjs +0 -4
  355. package/dist/page-rules-ZcdjPohY.mjs +0 -27
  356. package/dist/pages-W4tKa7xk.mjs +0 -14
  357. package/dist/pay-per-crawl-BNM1mJmP.mjs +0 -5
  358. package/dist/pay-per-use-DKxlnkH3.mjs +0 -2
  359. package/dist/pipelines-Dug0BR-c.mjs +0 -6
  360. package/dist/precursor-D-11DkRU.mjs +0 -4
  361. package/dist/previews-D_Nv4dR6.mjs +0 -4
  362. package/dist/progress-a5IKeKni.mjs +0 -2
  363. package/dist/queries-BdA2vJoe.mjs +0 -3
  364. package/dist/queues-Bu06ZqUE.mjs +0 -7
  365. package/dist/r2-COC9wMKb.mjs +0 -25
  366. package/dist/r2-data-catalog-CX5Rl5Qx.mjs +0 -16
  367. package/dist/radar-L-yoLIHF.mjs +0 -2
  368. package/dist/realtime-JKIiXfzi.mjs +0 -20
  369. package/dist/registrar-_dYUZrK0.mjs +0 -43
  370. package/dist/registrar-sandbox-D1yfW_Q_.mjs +0 -56
  371. package/dist/reporting-3fyoMcmb.mjs +0 -2
  372. package/dist/request-headers-BhQQAfJt.mjs +0 -2
  373. package/dist/request-tracers-TisEth2p.mjs +0 -2
  374. package/dist/resolve-CYUp6YgC.mjs +0 -2
  375. package/dist/resource-sharing-C4-dnohU.mjs +0 -6
  376. package/dist/resource-tagging-BRDifKqM.mjs +0 -2
  377. package/dist/rules-BCF3gIkw.mjs +0 -4
  378. package/dist/rulesets-wp6rllt3.mjs +0 -5
  379. package/dist/rum-B77awgoB.mjs +0 -4
  380. package/dist/run-BS8otL3u.mjs +0 -2
  381. package/dist/scim-C9BmUYil.mjs +0 -4
  382. package/dist/secrets-store-ckkZR2dM.mjs +0 -7
  383. package/dist/security-center-BCahKT57.mjs +0 -2
  384. package/dist/security-txt-0SI5du7I.mjs +0 -3
  385. package/dist/shared-D0B-7q-D.mjs +0 -2
  386. package/dist/smart-shield-BDPbrZa4.mjs +0 -4
  387. package/dist/snippets-CVRR_h0i.mjs +0 -4
  388. package/dist/spawn-DP4T92ss.mjs +0 -519
  389. package/dist/spectrum-CjNXQIQE.mjs +0 -63
  390. package/dist/speed-CrXCHk3h.mjs +0 -4
  391. package/dist/src-BbnV77C4.mjs +0 -108
  392. package/dist/ssl-DKORhHkh.mjs +0 -15
  393. package/dist/startup-profile-CBIH6yZy.mjs +0 -17
  394. package/dist/state-QUu6HfxC.mjs +0 -2
  395. package/dist/stream-wY3zi3FK.mjs +0 -16
  396. package/dist/submit-B-4oCBSk.mjs +0 -2
  397. package/dist/tags-5uJEkYJZ.mjs +0 -2
  398. package/dist/telemetry-n3NJourL.mjs +0 -2
  399. package/dist/tenant-BkFvv2o3.mjs +0 -2
  400. package/dist/tenant-custom-nameservers-DcjC1q0r.mjs +0 -3
  401. package/dist/tunnel-Cd4ipbvJ.mjs +0 -2
  402. package/dist/tunnels-9Zg3ePwD.mjs +0 -5
  403. package/dist/turnstile-BTwKYpzD.mjs +0 -23
  404. package/dist/ui-DQSZeaG5.mjs +0 -5
  405. package/dist/url-info-D7Y61BFd.mjs +0 -2
  406. package/dist/url-normalization-B4n8HiNQ.mjs +0 -3
  407. package/dist/url-scanner-CiCIltSQ.mjs +0 -2
  408. package/dist/user-DDFDGJ0Y.mjs +0 -12
  409. package/dist/values-DRznB_Cl.mjs +0 -2
  410. package/dist/vectorize-CbznPhzq.mjs +0 -4
  411. package/dist/waiting-rooms-CKP5hYBK.mjs +0 -11
  412. package/dist/web-assets-C-ZoSkkh.mjs +0 -8
  413. package/dist/web3-DwlN4dOw.mjs +0 -4
  414. package/dist/workers-builds-ECw_x_kp.mjs +0 -2
  415. package/dist/workers-for-platforms-BYGy46R6.mjs +0 -5
  416. package/dist/workers-vpc-CCosFcxz.mjs +0 -3
  417. package/dist/workers-zFMrbUkg.mjs +0 -6
  418. package/dist/workflows-C8GXGDRW.mjs +0 -5
  419. package/dist/zaraz-B5UIREaz.mjs +0 -2
  420. package/dist/zero-trust-DUp0XoIo.mjs +0 -91
  421. package/dist/zone-BGLkk-mL.mjs +0 -2
  422. package/dist/zones-CwYjNXMH.mjs +0 -44
  423. /package/dist/{alerts-CarPLL8k.mjs → alerts-CstOk8n0.mjs} +0 -0
  424. /package/dist/{autorag-zK-3harf.mjs → autorag-PRTwXGgn.mjs} +0 -0
  425. /package/dist/{body-parser-Cmw7PZ7a.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
  426. /package/dist/{brands-CpgTsX8h.mjs → brands-BHRXlWDm.mjs} +0 -0
  427. /package/dist/{clear-C5gzBA8G.mjs → clear-UvKESVx3.mjs} +0 -0
  428. /package/dist/{cli-types-abvWQN3T.mjs → cli-types-tt_LZMbn.mjs} +0 -0
  429. /package/dist/{connector-telemetry-events-latest-BY-dbhQZ.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
  430. /package/dist/{connector-telemetry-snapshots-latest-DoMvHvCO.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
  431. /package/dist/{domain-info-Cw3G4nap.mjs → domain-info-BqTDXNBo.mjs} +0 -0
  432. /package/dist/{health-DkEXPkS6.mjs → health-CwPzzrV6.mjs} +0 -0
  433. /package/dist/{input-validation-nF-0Ze2h.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
  434. /package/dist/{internal-4fU2r5en.mjs → internal-WLHfxX64.mjs} +0 -0
  435. /package/dist/{live-B4iGrwY2.mjs → live-D_k7eHdv.mjs} +0 -0
  436. /package/dist/{metadata-C5fJJr-k.mjs → metadata-APBiectA.mjs} +0 -0
  437. /package/dist/{project-settings-Bc3wYHo8.mjs → project-settings-DSXevRvj.mjs} +0 -0
  438. /package/dist/{rate-limit-analytics-DNsAFIeM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
  439. /package/dist/{rate-limits-CsOim7bm.mjs → rate-limits-C3K9smdl.mjs} +0 -0
  440. /package/dist/{ready-tTe-zcIw.mjs → ready-CvwvbdTX.mjs} +0 -0
  441. /package/dist/{recent-submissions-B3eTV5yC.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
  442. /package/dist/{refute-BY76YVrT.mjs → refute-CIAFMj00.mjs} +0 -0
  443. /package/dist/{scan-logo-DdoF_a5y.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
  444. /package/dist/{scan-page-sSgLwwZN.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
  445. /package/dist/{search-BFvQr-sl.mjs → search-12jA1b4l.mjs} +0 -0
  446. /package/dist/{signed-url-Cr8hiZPJ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
  447. /package/dist/{submission-info-DT2mLnu1.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
  448. /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
  449. /package/dist/{total-queries-6gs5iy9T.mjs → total-queries-CJTc9Pde.mjs} +0 -0
  450. /package/dist/{tracked-domains-D6XKO2EV.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
  451. /package/dist/{verify-CM1NakP0.mjs → verify-CZW5Fo1q.mjs} +0 -0
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ import{m as e,o as t}from"./chunk-XLADBZ7F-BXKOjWbx.mjs";import{a as n}from"./theme-BiIYWOed.mjs";import{a as r,i,r as a}from"./ui-DH95w1Qk.mjs";import{c as o,d as s,i as c,l,o as u,p as d,r as f,s as p,u as m}from"./oauth-C-QCVfWz.mjs";import"./auth-C80y97yu.mjs";import{t as h}from"./output-Bia1u2k5.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(t({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async t=>{_(t,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),e(t.name);let r=u().configs.exists(t.name);await l({browser:t.browser,device:t.device,scopes:t.scopes,profile:t.name}),console.log(i(r?`Profile "${t.name}" re-authenticated.`:`Profile "${t.name}" created.`)),console.log(a(`Run ${n.code(`cf auth activate ${t.name}`)} to use this profile in a directory.`))}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async t=>{_(t,`delete`),v(),e(t.name);let r=u();if(!r.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist.`);let o=r.bindings.removeAllBindingsForProfile(t.name);if(o.length>0){console.log(i(`Removed directory bindings:`));for(let e of o)console.log(` ${e}`)}await m(t.name),r.configs.delete(t.name),console.log(i(`Profile "${t.name}" deleted.`));let s=r.bindings.getProfileForDirectory(process.cwd());s?console.log(i(`Active profile for this directory: ${s}.`)):r.configs.exists(`default`)?console.log(i(`This directory now uses the default profile.`)):console.log(a(`No active profile for this directory. Run ${n.code(`cf auth login`)} to set up the default profile, or ${n.code(`cf auth create <name>`)} to create a named profile.`))}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:t=>{_(t,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),e(t.name);let n=u();if(!n.configs.exists(t.name))throw Error(`Profile "${t.name}" does not exist. Run \`cf auth create ${t.name}\` first.`);let r=t.dir??process.cwd();n.bindings.activate(t.name,r),console.log(i(`Profile "${t.name}" activated for "${g.resolve(r)}".`))}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:e=>{_(e,`deactivate`),v();let t=u(),r=e.dir??process.cwd(),{removedProfile:o,newResolution:s}=t.bindings.deactivate(r);console.log(i(`Profile "${o}" deactivated from "${g.resolve(r)}".`)),s.profile===void 0?console.log(a(`Run ${n.code(`cf auth login`)} to set up the default profile, or ${n.code(`cf auth create <name>`)} to create a named profile.`)):s.profile===`default`?console.log(i(`This directory now uses the default profile.`)):console.log(i(`Now using: ${s.profile} (${s.source}).`))}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async e=>{_(e,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let t=f();if(t!==`default`&&console.log(r(`This directory has profile "${t}" active. \`cf auth login\` updates the default profile, not "${t}".\nTo re-authenticate "${t}", run \`cf auth create ${t}\`.`)),d(`default`),!e.force&&o()){if(await p()){let e=s();console.log(i(`You are already logged in.`)),console.log(`${n.info(`Config file:`)} ${n.muted(c())}`),e?.expiration_time&&console.log(`${n.info(`Token expires:`)} ${new Date(e.expiration_time).toLocaleString()}`),console.log(a(`Run ${n.code(`cf auth login --force`)} to re-authenticate, or ${n.code(`cf auth logout`)} to log out.`));return}console.log(r(`Existing tokens are invalid or expired. Starting fresh login...
3
+ `))}else e.force&&o()&&console.log(i(`Re-authenticating...
4
+ `));if(console.log(i(`Starting OAuth login flow...
5
+ `)),!await l({browser:e.browser,device:e.device,scopes:e.scopes,profile:`default`})){console.log(r(`CLOUDFLARE_API_TOKEN is set and takes precedence. Unset it to log in via OAuth.`));return}let u=s();console.log(`${n.info(`Config file:`)} ${n.muted(c())}`),u?.scopes&&console.log(`${n.info(`Scopes:`)} ${u.scopes.join(`, `)}`),u?.expiration_time&&console.log(`${n.info(`Token expires:`)} ${new Date(u.expiration_time).toLocaleString()}`)}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";function c(e){return e.usage(`$0 logo-matches download get
3
+
4
+ Return matches as CSV for logo queries based on ID`).option(`logo-id`,{type:`string`,description:`Logo ID`}).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Download matches for logo queries by ID`,builder:c,handler:async c=>s({command:`logo-matches download get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){a({command:`cf logo-matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/logo-matches/download`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.logoMatches.download.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 logo-matches get
5
+
6
+ Return matches for logo queries based on ID`).option(`logo-id`,{type:`string`,description:`Logo ID`}).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Read matches for logo queries by ID`,builder:d,handler:async c=>s({command:`logo-matches get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){a({command:`cf logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/logo-matches`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.logoMatches.get({account_id:u,...s})),{successLabel:`Loaded`})})},p={command:`logo-matches`,describe:`logo-matches`,builder:e=>e.command(f).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,t as u}from"./input-validation-Ch4Vllrm.mjs";import{n as d}from"./prompt-CpZztV8c.mjs";function f(e){return e.usage(`$0 logos create
3
+
4
+ Return new saved logo queries created from image files`).option(`tag`,{type:`string`,description:`Tag`}).option(`match-type`,{type:`string`,description:`Match type`}).option(`threshold`,{type:`number`,description:`Threshold`}).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 p={command:`create`,describe:`Create new saved logo queries from image files`,builder:f,handler:async d=>c({command:`logos create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{let c={tag:d.tag,match_type:d[`match-type`],threshold:d.threshold};if(d.dryRun){o({command:`cf logos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/logos`,pathParams:{},query:c,bodyKind:`octet-stream`,body:d.body});return}let f=await i(d),p=d.local?e:await t();if(d.accountId=p,d.file){let e=u(d.file);a(await s(`Creating`,async()=>r(f,`POST`,`/accounts/${p}/brand-protection/logos`,{body:e,headers:{"Content-Type":`application/x-www-form-urlencoded`}})),{successLabel:`Created`});return}if(d.body){let e=l(d.body,`body`,`binary`),t=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Creating`,async()=>r(f,`POST`,`/accounts/${p}/brand-protection/logos${t?`?`+t:``}`,{body:e,headers:{"Content-Type":`application/x-www-form-urlencoded`}})),{successLabel:`Created`});return}if(d.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function m(e){return e.usage(`$0 logos delete <logo-id>
5
+
6
+ Return a success message after deleting saved logo queries by ID`).positional(`logo-id`,{type:`string`,description:`Logo 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 h={command:`delete <logo-id>`,describe:`Delete saved logo queries by ID`,builder:m,handler:async r=>c({command:`logos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf logos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/logos/${r[`logo-id`]==null?`<logo-id>`:encodeURIComponent(String(r[`logo-id`]))}`,pathParams:{"logo-id":String(r[`logo-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await d({force:!!r.force})){process.stderr.write(`Aborted.
7
+ `);return}a(await s(`Deleting`,async()=>c.logos.delete({account_id:l,logo_id:r[`logo-id`]})),{successLabel:`Deleted`})})},g={command:`logos`,describe:`logos`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-C-QCVfWz.mjs";import{r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-CpZztV8c.mjs";function m(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
3
+
4
+ Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <dataset-id>`,describe:`List fields`,builder:m,handler:async l=>c({command:`logpush account-datasets fields get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf logpush account-datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/datasets/${l[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(l[`dataset-id`]))}/fields`,pathParams:{"account-or-zone":String(t),"dataset-id":String(l[`dataset-id`]??``),"account-or-zone-id":String(n)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await n();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.logpush.accountDatasets.fields.get({account_or_zone:u,account_or_zone_id:d,dataset_id:l[`dataset-id`]})),{successLabel:`Loaded`})})},g={command:`fields`,describe:`Operations for account-datasets.fields`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ee(e){return e.usage(`$0 logpush account-datasets jobs get <dataset-id>
5
+
6
+ Lists Logpush jobs for an account or zone for a dataset.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get <dataset-id>`,describe:`List Logpush jobs for a dataset`,builder:ee,handler:async l=>c({command:`logpush account-datasets jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf logpush account-datasets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/datasets/${l[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(l[`dataset-id`]))}/jobs`,pathParams:{"account-or-zone":String(t),"dataset-id":String(l[`dataset-id`]??``),"account-or-zone-id":String(n)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await n();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.logpush.accountDatasets.jobs.get({account_or_zone:u,account_or_zone_id:d,dataset_id:l[`dataset-id`]})),{successLabel:`Loaded`})})},v={command:`jobs`,describe:`Operations for account-datasets.jobs`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`account-datasets`,describe:`Operations for account-datasets`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 logpush account-jobs create
7
+
8
+ Creates a new Logpush job for an account or zone.`).option(`dataset`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,choices:`access_requests.account_abuse_protection_events.audit_logs.audit_logs_v2.biso_user_actions.casb_findings.device_posture_results.dex_application_tests.dex_device_state_events.dlp_forensic_copies.dns_firewall_logs.dns_logs.email_security_alerts.email_security_post_delivery_events.firewall_events.gateway_dns.gateway_http.gateway_network.http_requests.ipsec_logs.magic_bgp_logs.magic_ids_detections.mcp_portal_logs.mnm_flow_logs.nel_reports.network_analytics_logs.page_shield_events.sinkhole_http_logs.spectrum_events.ssh_logs.turnstile_events.warp_config_changes.warp_toggle_changes.websocket_analytics.workers_trace_events.zaraz_events.zero_trust_network_sessions`.split(`.`),default:`http_requests`}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`,default:!1}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets.",default:!1}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`],default:`high`}).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`],default:``}).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create`,describe:`Create Logpush job`,builder:b,handler:async p=>c({command:`logpush account-jobs create`,classification:{safeFlags:[`dataset`,`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf logpush account-jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/jobs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:p.body===void 0?u({dataset:d(p.dataset,`dataset`,`text`),destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:d(p.frequency,`frequency`,`text`),kind:d(p.kind,`kind`,`text`),logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:d(p[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:d(p[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await n();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountJobs.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({dataset:d(p.dataset,`dataset`,`text`),destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:d(p.frequency,`frequency`,`text`),kind:d(p.kind,`kind`,`text`),logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:d(p[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:d(p[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountJobs.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function S(e){return e.usage(`$0 logpush account-jobs delete <job-id>
9
+
10
+ Deletes a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <job-id>`,describe:`Delete Logpush job`,builder:S,handler:async l=>c({command:`logpush account-jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"account-or-zone":String(t),"job-id":String(l[`job-id`]??``),"account-or-zone-id":String(n)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await n();if(u===`zones`?l.zoneId=d:l.accountId=d,!await p({force:!!l.force,message:`This operation deletes the Logpush job.`})){process.stderr.write(`Aborted.
11
+ `);return}a(await s(`Deleting`,async()=>c.logpush.accountJobs.delete({account_or_zone:u,account_or_zone_id:d,job_id:l[`job-id`]})),{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 logpush account-jobs get <job-id>
12
+
13
+ Gets the details of a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <job-id>`,describe:`Get Logpush job details`,builder:w,handler:async l=>c({command:`logpush account-jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"account-or-zone":String(t),"job-id":String(l[`job-id`]??``),"account-or-zone-id":String(n)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await n();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.logpush.accountJobs.get({account_or_zone:u,account_or_zone_id:d,job_id:l[`job-id`]})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 logpush account-jobs list
14
+
15
+ Lists Logpush jobs for an account or zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List Logpush jobs`,builder:E,handler:async l=>c({command:`logpush account-jobs list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/jobs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await n();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.logpush.accountJobs.list({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 logpush account-jobs update <job-id>
16
+
17
+ Updates a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets."}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`]}).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`]}).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`update <job-id>`,describe:`Update Logpush job`,builder:O,handler:async f=>c({command:`logpush account-jobs update`,classification:{safeFlags:[`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await r():void 0,t=f.zone===void 0?`accounts`:`zones`,n=f.zone??e??`<account-id>`;o({command:`cf logpush account-jobs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/jobs/${f[`job-id`]==null?`<job-id>`:encodeURIComponent(String(f[`job-id`]))}`,pathParams:{"account-or-zone":String(t),"job-id":String(f[`job-id`]??``),"account-or-zone-id":String(n)},bodyKind:`json`,body:f.body===void 0?u({destination_conf:d(f[`destination-conf`],`destination-conf`,`text`),enabled:f.enabled,filter:d(f.filter,`filter`,`text`),filter_attack_traffic:f[`filter-attack-traffic`],frequency:d(f.frequency,`frequency`,`text`),kind:d(f.kind,`kind`,`text`),logpull_options:d(f[`logpull-options`],`logpull-options`,`text`),name:d(f.name,`name`,`text`),output_options:{"CVE-2021-44228":f[`output-options-cve-2021-44228`],batch_prefix:d(f[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(f[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(f[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:f[`output-options-field-names`],merge_subrequests:f[`output-options-merge-subrequests`],output_type:d(f[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(f[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(f[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(f[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(f[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:f[`output-options-sample-rate`],timestamp_format:d(f[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(f[`ownership-challenge`],`ownership-challenge`,`text`)}):l(f.body)});return}let c=await i(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await t({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await n();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body);a(await s(`Updating`,async()=>c.logpush.accountJobs.update({...e,account_or_zone:p,account_or_zone_id:m,job_id:f[`job-id`]})),{successLabel:`Updated`});return}let h=u({destination_conf:d(f[`destination-conf`],`destination-conf`,`text`),enabled:f.enabled,filter:d(f.filter,`filter`,`text`),filter_attack_traffic:f[`filter-attack-traffic`],frequency:d(f.frequency,`frequency`,`text`),kind:d(f.kind,`kind`,`text`),logpull_options:d(f[`logpull-options`],`logpull-options`,`text`),name:d(f.name,`name`,`text`),output_options:{"CVE-2021-44228":f[`output-options-cve-2021-44228`],batch_prefix:d(f[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(f[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(f[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:f[`output-options-field-names`],merge_subrequests:f[`output-options-merge-subrequests`],output_type:d(f[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(f[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(f[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(f[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(f[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:f[`output-options-sample-rate`],timestamp_format:d(f[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(f[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Updating`,async()=>c.logpush.accountJobs.update({...h,account_or_zone:p,account_or_zone_id:m,job_id:f[`job-id`]})),{successLabel:`Updated`})})},A={command:`account-jobs`,describe:`Operations for account-jobs`,builder:e=>e.command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 logpush account-ownership create
18
+
19
+ Gets a new ownership challenge sent to your destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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:`create`,describe:`Get ownership challenge`,builder:j,handler:async p=>c({command:`logpush account-ownership create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf logpush account-ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/ownership`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await n();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountOwnership.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountOwnership.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function N(e){return e.usage(`$0 logpush account-ownership validate create
20
+
21
+ Validates ownership challenge of the destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`create`,describe:`Validate ownership challenge`,builder:N,handler:async p=>c({command:`logpush account-ownership validate create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf logpush account-ownership validate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/ownership/validate`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await n();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountOwnership.validate.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`})),p[`ownership-challenge`]===void 0&&(p[`ownership-challenge`]=await f(`ownership-challenge`,`Ownership challenge token to prove destination ownership.`,{kind:`secret`}));let g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountOwnership.validate.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},F={command:`validate`,describe:`Operations for account-ownership.validate`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`account-ownership`,describe:`Operations for account-ownership`,builder:e=>e.command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 logpush account-validate destination-exists-delete
22
+
23
+ Checks if there is an existing job with a destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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 R={command:`destination-exists-delete`,describe:`Check destination exists`,builder:L,handler:async p=>c({command:`logpush account-validate destination-exists-delete`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf logpush account-validate destination-exists-delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/validate/destination/exists`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await n();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountValidate.destinationExistsDelete({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountValidate.destinationExistsDelete({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 logpush account-validate destination delete
24
+
25
+ Validates destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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:`delete`,describe:`Validate destination`,builder:z,handler:async p=>c({command:`logpush account-validate destination delete`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf logpush account-validate destination delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/validate/destination`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await n();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountValidate.destination.delete({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountValidate.destination.delete({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},te={command:`destination`,describe:`Operations for account-validate.destination`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 logpush account-validate origin create
26
+
27
+ Validates logpull origin with logpull_options.`).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`create`,describe:`Validate origin`,builder:V,handler:async p=>c({command:`logpush account-validate origin create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf logpush account-validate origin create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/validate/origin`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:p.body===void 0?u({logpull_options:d(p[`logpull-options`],`logpull-options`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await n();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountValidate.origin.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`logpull-options`]===void 0&&(p[`logpull-options`]=await f(`logpull-options`,"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."));let g=u({logpull_options:d(p[`logpull-options`],`logpull-options`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountValidate.origin.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},U={command:`origin`,describe:`Operations for account-validate.origin`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},W={command:`account-validate`,describe:`Operations for account-validate`,builder:e=>e.command(R).command(te).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 logpush edge create
28
+
29
+ Creates a new Instant Logs job for a zone.`).option(`fields`,{type:`string`,description:`Comma-separated list of fields.`}).option(`filter`,{type:`string`,description:`Filters to drill down into specific events.`}).option(`sample`,{type:`number`,description:`The sample parameter is the sample rate of the records set by the client: "sample": 1 is 100% of records "sample": 10 is 10% and so on.`}).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 Instant Logs job`,builder:G,handler:async e=>c({command:`logpush edge create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf logpush edge create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/edge/jobs`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({fields:d(e.fields,`fields`,`text`),filter:d(e.filter,`filter`,`text`),sample:e.sample}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.logpush.edge.create({...t,zone_id:r})),{successLabel:`Created`});return}let c=u({fields:d(e.fields,`fields`,`text`),filter:d(e.filter,`filter`,`text`),sample:e.sample});a(await s(`Creating`,async()=>n.logpush.edge.create({...c,zone_id:r})),{successLabel:`Created`})})};function q(e){return e.usage(`$0 logpush edge get
30
+
31
+ Lists Instant Logs jobs for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get`,describe:`List Instant Logs jobs`,builder:q,handler:async e=>c({command:`logpush edge get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf logpush edge get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/edge/jobs`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.logpush.edge.get({zone_id:r})),{successLabel:`Loaded`})})},Y={command:`edge`,describe:`Operations for edge`,builder:e=>e.command(K).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return e.usage(`$0 logpush transformers content get <transformer-id>
32
+
33
+ Returns the SQL query content for a transformer. Without query params, returns the latest version. With \`version_id\`, returns the specified version.`).positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`version-id`,{type:`number`,description:`Specific version ID to retrieve. When omitted, the latest version is returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get <transformer-id>`,describe:`Get transformer content`,builder:X,handler:async t=>c({command:`logpush transformers content get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={version_id:t[`version-id`]};if(t.dryRun){o({command:`cf logpush transformers content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logpush/transformers/${t[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(t[`transformer-id`]))}/content`,pathParams:{"transformer-id":String(t[`transformer-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(t),u=t.local?e:await n();t.accountId=u,a(await s(`Loading`,async()=>l.logpush.transformers.content.get({account_id:u,transformer_id:t[`transformer-id`],...c})),{successLabel:`Loaded`})})},Q={command:`content`,describe:`Operations for transformers.content`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 logpush transformers create
34
+
35
+ Creates a new custom log transformer for an account.`).option(`code`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).option(`description`,{type:`string`,description:`Optional customer-provided description.`}).option(`name`,{type:`string`,description:`Customer-provided name for identification.`}).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:`create`,describe:`Create transformer`,builder:ne,handler:async t=>c({command:`logpush transformers create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf logpush transformers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`json`,body:t.body===void 0?u({code:d(t.code,`code`,`text`),description:d(t.description,`description`,`text`),name:d(t.name,`name`,`text`)}):l(t.body)});return}let c=await i(t),p=t.local?e:await n();if(t.accountId=p,t.body){let e=l(t.body);a(await s(`Creating`,async()=>c.logpush.transformers.create({...e,account_id:p})),{successLabel:`Created`});return}t.code===void 0&&(t.code=await f(`code`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`)),t.name===void 0&&(t.name=await f(`name`,`Customer-provided name for identification.`));let m=u({code:d(t.code,`code`,`text`),description:d(t.description,`description`,`text`),name:d(t.name,`name`,`text`)});a(await s(`Creating`,async()=>c.logpush.transformers.create({...m,account_id:p})),{successLabel:`Created`})})};function ie(e){return e.usage(`$0 logpush transformers delete <transformer-id>
36
+
37
+ Deletes a custom log transformer. Returns 409 Conflict if any active logpush jobs reference the transformer.`).positional(`transformer-id`,{type:`string`,description:`The transformer 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 ae={command:`delete <transformer-id>`,describe:`Delete transformer`,builder:ie,handler:async t=>c({command:`logpush transformers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf logpush transformers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logpush/transformers/${t[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(t[`transformer-id`]))}`,pathParams:{"transformer-id":String(t[`transformer-id`]??``)},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();if(t.accountId=l,!await p({force:!!t.force})){process.stderr.write(`Aborted.
38
+ `);return}a(await s(`Deleting`,async()=>c.logpush.transformers.delete({account_id:l,transformer_id:t[`transformer-id`]})),{successLabel:`Deleted`})})};function oe(e){return e.usage(`$0 logpush transformers get <transformer-id>
39
+
40
+ Gets a single custom log transformer by ID.`).positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <transformer-id>`,describe:`Get transformer`,builder:oe,handler:async t=>c({command:`logpush transformers get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf logpush transformers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logpush/transformers/${t[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(t[`transformer-id`]))}`,pathParams:{"transformer-id":String(t[`transformer-id`]??``)},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.logpush.transformers.get({account_id:l,transformer_id:t[`transformer-id`]})),{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 logpush transformers list
41
+
42
+ Lists all custom log transformers for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List transformers`,builder:ce,handler:async t=>c({command:`logpush transformers list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf logpush transformers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.logpush.transformers.list({account_id:l})),{successLabel:`Loaded`})})};function ue(e){return e.usage(`$0 logpush transformers preview
43
+
44
+ Executes a SQL transformer against a single input record and returns the transformed output. This is a stateless endpoint — nothing is persisted.`).option(`sql`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).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:`preview`,describe:`Preview transformer`,builder:ue,handler:async t=>c({command:`logpush transformers preview`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf logpush transformers preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logpush/transformers/preview`,pathParams:{},bodyKind:`json`,body:t.body===void 0?u({sql:d(t.sql,`sql`,`text`)}):l(t.body)});return}let c=await i(t),p=t.local?e:await n();if(t.accountId=p,t.body){let e=l(t.body);a(await s(`Loading`,async()=>c.logpush.transformers.preview({...e,account_id:p})),{successLabel:`Loaded`});return}t.sql===void 0&&(t.sql=await f(`sql`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`));let m=u({sql:d(t.sql,`sql`,`text`)});a(await s(`Loading`,async()=>c.logpush.transformers.preview({...m,account_id:p})),{successLabel:`Loaded`})})};function fe(e){return e.usage("$0 logpush transformers update <transformer-id>\n\nUpdates an existing custom log transformer. When `code` is provided, the SQL query is validated and a new version is created. When `code` is omitted, only the name and description are updated. Omitting `description` clears the existing description.").positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`code`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).option(`description`,{type:`string`,description:`Optional customer-provided description.`}).option(`name`,{type:`string`,description:`Customer-provided name for identification.`}).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 pe={command:`update <transformer-id>`,describe:`Update transformer`,builder:fe,handler:async t=>c({command:`logpush transformers update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf logpush transformers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logpush/transformers/${t[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(t[`transformer-id`]))}`,pathParams:{"transformer-id":String(t[`transformer-id`]??``)},bodyKind:`json`,body:t.body===void 0?u({code:d(t.code,`code`,`text`),description:d(t.description,`description`,`text`),name:d(t.name,`name`,`text`)}):l(t.body)});return}let c=await i(t),p=t.local?e:await n();if(t.accountId=p,t.body){let e=l(t.body);a(await s(`Updating`,async()=>c.logpush.transformers.update({...e,account_id:p,transformer_id:t[`transformer-id`]})),{successLabel:`Updated`});return}t.name===void 0&&(t.name=await f(`name`,`Customer-provided name for identification.`));let m=u({code:d(t.code,`code`,`text`),description:d(t.description,`description`,`text`),name:d(t.name,`name`,`text`)});a(await s(`Updating`,async()=>c.logpush.transformers.update({...m,account_id:p,transformer_id:t[`transformer-id`]})),{successLabel:`Updated`})})};function $(e){return e.usage(`$0 logpush transformers versions list
45
+
46
+ Returns version metadata for a transformer, newest first. Each version corresponds to a SQL query update.`).option(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Maximum number of versions to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List transformer versions`,builder:$,handler:async t=>c({command:`logpush transformers versions list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={limit:t.limit};if(t.dryRun){o({command:`cf logpush transformers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logpush/transformers/${t[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(t[`transformer-id`]))}/versions`,pathParams:{"transformer-id":String(t[`transformer-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(t),u=t.local?e:await n();t.accountId=u,a(await s(`Loading`,async()=>l.logpush.transformers.versions.list({account_id:u,transformer_id:t[`transformer-id`],...c})),{successLabel:`Loaded`})})},he={command:`versions`,describe:`Operations for transformers.versions`,builder:e=>e.command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ge={command:`transformers`,describe:`Operations for transformers`,builder:e=>e.command(re).command(ae).command(se).command(le).command(de).command(pe).command(Q).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_e={command:`logpush`,describe:`logpush`,builder:e=>e.command(y).command(A).command(I).command(W).command(Y).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_e as default};
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-C-QCVfWz.mjs";import{a as i,r as a}from"./auth-C80y97yu.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-Bpp73hIu.mjs";import{t as l}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p,t as m}from"./input-validation-Ch4Vllrm.mjs";import{a as h,n as g}from"./prompt-CpZztV8c.mjs";import{t as _}from"./cli-types-tt_LZMbn.mjs";function v(e){return e.usage(`$0 logs control cmb config create
3
+
4
+ Updates CMB config.`).option(`allow-out-of-region-access`,{type:`boolean`,description:`Allow out of region access`}).option(`regions`,{type:`string`,description:`Name of the region.`}).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 y={command:`create`,describe:`Update CMB config`,builder:v,handler:async t=>l({command:`logs control cmb config create`,classification:{safeFlags:[`allow-out-of-region-access`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf logs control cmb config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logs/control/cmb/config`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({allow_out_of_region_access:t[`allow-out-of-region-access`],regions:p(t.regions,`regions`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.logs.control.cmb.config.create({body:e,account_id:l})),{successLabel:`Created`});return}let d=f({allow_out_of_region_access:t[`allow-out-of-region-access`],regions:p(t.regions,`regions`,`text`)});o(await c(`Creating`,async()=>i.logs.control.cmb.config.create({body:d,account_id:l})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 logs control cmb config delete
5
+
6
+ Deletes CMB config.`).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 CMB config`,builder:b,handler:async t=>l({command:`logs control cmb config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf logs control cmb config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logs/control/cmb/config`,pathParams:{},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,!await g({force:!!t.force,message:`This operation deletes the CMB config.`})){process.stderr.write(`Aborted.
7
+ `);return}o(await c(`Deleting`,async()=>i.logs.control.cmb.config.delete({account_id:l})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 logs control cmb config get
8
+
9
+ Gets CMB config.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`Get CMB config`,builder:S,handler:async t=>l({command:`logs control cmb config get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf logs control cmb config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logs/control/cmb/config`,pathParams:{},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.logs.control.cmb.config.get({account_id:l})),{successLabel:`Loaded`})})},w={command:`config`,describe:`Operations for control.cmb.config`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},T={command:`cmb`,describe:`Operations for control.cmb`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 logs control retention create
10
+
11
+ Updates log retention flag for Logpull API.`).option(`flag`,{type:`boolean`,description:`The log retention flag for Logpull API.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const D={command:`create`,describe:`Update log retention flag`,builder:E,handler:async e=>l({command:`logs control retention create`,classification:{safeFlags:[`flag`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf logs control retention create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/control/retention/flag`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({flag:e.flag}):u(e.body)});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=u(e.body);o(await c(`Creating`,async()=>n.logs.control.retention.create({body:t,zone_id:r})),{successLabel:`Created`});return}let i=f({flag:e.flag});o(await c(`Creating`,async()=>n.logs.control.retention.create({body:i,zone_id:r})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 logs control retention get
12
+
13
+ Gets log retention flag for Logpull API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`Get log retention flag`,builder:O,handler:async e=>l({command:`logs control retention get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf logs control retention get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/control/retention/flag`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>n.logs.control.retention.get({zone_id:r})),{successLabel:`Loaded`})})},A={command:`retention`,describe:`Operations for control.retention`,builder:e=>e.command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`control`,describe:`Log control operations`,builder:e=>e.command(T).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 logs datasets available
14
+
15
+ 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.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`available`,describe:`List available account or zone datasets`,builder:M,handler:async i=>l({command:`logs datasets available`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await r():void 0,t=i.zone===void 0?`accounts`:`zones`,n=i.zone??e??`<account-id>`;s({command:`cf logs datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await n();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.logs.datasets.available({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 logs datasets create
16
+
17
+ 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/`).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
18
+ fields when absent.
19
+ . 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.
20
+ If provided, replaces the dataset's default filter entirely.
21
+ See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
22
+ for syntax and examples.
23
+ `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`create`,describe:`Create an account or zone dataset`,builder:P,handler:async i=>l({command:`logs datasets create`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await r():void 0,t=i.zone===void 0?`accounts`:`zones`,n=i.zone??e??`<account-id>`;s({command:`cf logs datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:i.body===void 0?f({dataset:p(i.dataset,`dataset`,`text`),fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`)}):u(i.body)});return}let l=await a(i),m=i.zone===void 0?`accounts`:`zones`,g=m===`zones`?await t({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await n();if(m===`zones`?i.zoneId=g:i.accountId=g,i.body){let e=u(i.body);o(await c(`Creating`,async()=>l.logs.datasets.create({...e,account_or_zone:m,account_or_zone_id:g})),{successLabel:`Created`});return}i.dataset===void 0&&(i.dataset=await h(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let _=f({dataset:p(i.dataset,`dataset`,`text`),fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`)});o(await c(`Creating`,async()=>l.logs.datasets.create({..._,account_or_zone:m,account_or_zone_id:g})),{successLabel:`Created`})})};function I(e){return e.usage(`$0 logs datasets delete <dataset-id>
24
+
25
+ Deletes a Log Explorer dataset for the account or zone. Dataset deletion must not be protected.`).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 L={command:`delete <dataset-id>`,describe:`Delete an account or zone dataset`,builder:I,handler:async i=>l({command:`logs datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await r():void 0,t=i.zone===void 0?`accounts`:`zones`,n=i.zone??e??`<account-id>`;s({command:`cf logs datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n),"dataset-id":String(i[`dataset-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await n();if(u===`zones`?i.zoneId=d:i.accountId=d,!await g({force:!!i.force,message:`This operation deletes a Log Explorer dataset for the account.`})){process.stderr.write(`Aborted.
26
+ `);return}o(await c(`Deleting`,async()=>l.logs.datasets.delete({account_or_zone:u,account_or_zone_id:d,dataset_id:i[`dataset-id`]})),{successLabel:`Deleted`})})};function R(e){return e.usage(`$0 logs datasets get <dataset-id>
27
+
28
+ Retrieve a single Log Explorer dataset by ID for the account or zone.`).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 ee={command:`get <dataset-id>`,describe:`Get an account or zone dataset`,builder:R,handler:async i=>l({command:`logs datasets get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await r():void 0,t=i.zone===void 0?`accounts`:`zones`,n=i.zone??e??`<account-id>`;s({command:`cf logs datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n),"dataset-id":String(i[`dataset-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await n();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.logs.datasets.get({account_or_zone:u,account_or_zone_id:d,dataset_id:i[`dataset-id`]})),{successLabel:`Loaded`})})};function z(e){return e.usage("$0 logs datasets list\n\nReturns 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.").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 B={command:`list`,describe:`List account or zone datasets`,builder:z,handler:async i=>l({command:`logs datasets list`,classification:{safeFlags:[`include-zones`,`dry-run`]}},i,async()=>{let l={include_zones:i[`include-zones`]};if(i.dryRun){let e=i.zone===void 0?await r():void 0,t=i.zone===void 0?`accounts`:`zones`,n=i.zone??e??`<account-id>`;s({command:`cf logs datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},query:l,bodyKind:`none`});return}let u=await a(i),d=i.zone===void 0?`accounts`:`zones`,f=d===`zones`?await t({zone:i.zone},u,{quiet:i.quiet}):i.local?e:await n();d===`zones`?i.zoneId=f:i.accountId=f,o(await c(`Loading`,async()=>u.logs.datasets.list({account_or_zone:d,account_or_zone_id:f,...l})),{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 logs datasets update <dataset-id>
29
+
30
+ Updates the enabled state and/or field configuration of an account or zone dataset.`).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
31
+ to all available fields when absent.
32
+ . 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
33
+ ingested. If omitted, the existing filter is left unchanged. Set
34
+ to an empty string (\`""\`) to clear the filter. Otherwise,
35
+ replaces the dataset's filter entirely.
36
+ See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
37
+ for syntax and examples.
38
+ `}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`update <dataset-id>`,describe:`Update an account or zone dataset`,builder:V,handler:async i=>l({command:`logs datasets update`,classification:{safeFlags:[`deletion-protection`,`enabled`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await r():void 0,t=i.zone===void 0?`accounts`:`zones`,n=i.zone??e??`<account-id>`;s({command:`cf logs datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n),"dataset-id":String(i[`dataset-id`]??``)},bodyKind:`json`,body:i.body===void 0?f({deletion_protection:i[`deletion-protection`],enabled:i.enabled,fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`)}):u(i.body)});return}let l=await a(i),m=i.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await n();if(m===`zones`?i.zoneId=h:i.accountId=h,i.body){let e=u(i.body);o(await c(`Updating`,async()=>l.logs.datasets.update({...e,account_or_zone:m,account_or_zone_id:h,dataset_id:i[`dataset-id`]})),{successLabel:`Updated`});return}if(i.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let g=f({deletion_protection:i[`deletion-protection`],enabled:i.enabled,fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`)});o(await c(`Updating`,async()=>l.logs.datasets.update({...g,account_or_zone:m,account_or_zone_id:h,dataset_id:i[`dataset-id`]})),{successLabel:`Updated`})})},U={command:`datasets`,describe:`Operations for datasets`,builder:e=>e.command(N).command(F).command(L).command(ee).command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 logs list get
39
+
40
+ 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 G={command:`get`,describe:`List log files`,builder:W,handler:async t=>l({command:`logs list get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let l={start:t.start,end:t.end,bucket:t.bucket,prefix:t.prefix,limit:t.limit},u={};if(t[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(t[`r2-access-key-id`])),t[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(t[`r2-secret-access-key`])),t.dryRun){s({command:`cf logs list get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logs/list`,pathParams:{},query:l,bodyKind:`none`});return}let d=await a(t),f=t.local?e:await n();t.accountId=f,o(await c(`Loading`,async()=>i(d,`GET`,`/accounts/${f}/logs/list`,{query:l,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})},K={command:`list`,describe:`Operations for list`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.usage(`$0 logs query
41
+
42
+ 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/`).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 J={command:`query`,describe:`Run a log query`,builder:q,handler:async u=>l({command:`logs query`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await r():void 0,t=u.zone===void 0?`accounts`:`zones`,n=u.zone??e??`<account-id>`;s({command:`cf logs query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logs/explorer/query/sql`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`octet-stream`,body:u.body});return}let l=await a(u),d=u.zone===void 0?`accounts`:`zones`,f=d===`zones`?await t({zone:u.zone},l,{quiet:u.quiet}):u.local?e:await n();if(d===`zones`?u.zoneId=f:u.accountId=f,u.file){let e=m(u.file);o(await c(`Loading`,async()=>i(l,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(u.body){let e=p(u.body,`body`,`binary`);o(await c(`Loading`,async()=>i(l,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}o(await c(`Loading`,async()=>l.logs.query({account_or_zone:d,account_or_zone_id:f})),{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 logs rayid get <ray-id>
43
+
44
+ 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 X={command:`get <ray-id>`,describe:`Get logs RayIDs`,builder:_(Y),handler:async e=>l({command:`logs rayid get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let n={fields:e.fields,timestamps:e.timestamps};if(e.dryRun){s({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:n,bodyKind:`none`});return}let r=await a(e),i=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>r.logs.rayid.get({zone_id:i,ray_id:e[`ray-id`],...n})),{successLabel:`Loaded`})})},Z={command:`rayid`,describe:`Operations for rayid`,builder:e=>e.command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.usage(`$0 logs received fields get
45
+
46
+ 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 $={command:`get`,describe:`List fields`,builder:Q,handler:async e=>l({command:`logs received fields get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({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 n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>n.logs.received.fields.get({zone_id:r})),{successLabel:`Loaded`})})},te={command:`fields`,describe:`Operations for received.fields`,builder:e=>e.command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(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 re={command:`get`,describe:`Get logs received`,builder:_(ne),handler:async e=>l({command:`logs received get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let n={start:e.start,end:e.end,fields:e.fields,sample:e.sample,count:e.count,timestamps:e.timestamps};if(e.dryRun){s({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:n,bodyKind:`none`});return}let r=await a(e),i=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>r.logs.received.get({zone_id:i,...n})),{successLabel:`Loaded`})})},ie={command:`received`,describe:`Received log operations`,builder:e=>e.command(re).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.usage(`$0 logs retrieve get
47
+
48
+ 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 oe={command:`get`,describe:`Retrieve logs`,builder:ae,handler:async t=>l({command:`logs retrieve get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let l={start:t.start,end:t.end,bucket:t.bucket,prefix:t.prefix},u={};if(t[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(t[`r2-access-key-id`])),t[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(t[`r2-secret-access-key`])),t.dryRun){s({command:`cf logs retrieve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/logs/retrieve`,pathParams:{},query:l,bodyKind:`none`});return}let d=await a(t),f=t.local?e:await n();t.accountId=f,o(await c(`Loading`,async()=>i(d,`GET`,`/accounts/${f}/logs/retrieve`,{query:l,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})},se={command:`retrieve`,describe:`Operations for retrieve`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ce={command:`logs`,describe:`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,builder:e=>e.command(J).command(j).command(U).command(K).command(Z).command(ie).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ce as default};
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{i as l,n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-CpZztV8c.mjs";import{t as g}from"./cli-types-tt_LZMbn.mjs";import{n as _,t as v}from"./raw-fetch-DxGs_eRm.mjs";function ee(e){return e.usage(`$0 magic-cloud-networking catalog-syncs create
3
+
4
+ Create a new Catalog Sync (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`description`,{type:`string`,description:`The description field`}).option(`destination-type`,{type:`string`,description:`The destination_type field`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Create Catalog Sync`,builder:ee,handler:async h=>c({command:`magic-cloud-networking catalog-syncs create`,classification:{safeFlags:[`destination-type`,`update-mode`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){o({command:`cf magic-cloud-networking catalog-syncs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({description:f(h.description,`description`,`text`),destination_type:f(h[`destination-type`],`destination-type`,`text`),name:f(h.name,`name`,`text`),policy:f(h.policy,`policy`,`text`),update_mode:f(h[`update-mode`],`update-mode`,`text`)}):u(h.body)});return}let g=await i(h),_=h.local?e:await t();if(h.accountId=_,h.body){let e=u(h.body);a(await s(`Creating`,async()=>r(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}h[`destination-type`]===void 0&&(h[`destination-type`]=await m(`destination-type`,`The destination_type field`,[`NONE`,`ZERO_TRUST_LIST`])),h.name===void 0&&(h.name=await p(`name`,`The name field`)),h[`update-mode`]===void 0&&(h[`update-mode`]=await m(`update-mode`,`The update_mode field`,[`AUTO`,`MANUAL`]));let v={};h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`destination-type`]!==void 0&&l(v,[`destination_type`],f(h[`destination-type`],`destination-type`,`text`)),h.name!==void 0&&l(v,[`name`],f(h.name,`name`,`text`)),h.policy!==void 0&&l(v,[`policy`],f(h.policy,`policy`,`text`)),h[`update-mode`]!==void 0&&l(v,[`update_mode`],f(h[`update-mode`],`update-mode`,`text`)),a(await s(`Creating`,async()=>r(g,`POST`,`/accounts/${_}/magic/cloud/catalog-syncs`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 magic-cloud-networking catalog-syncs delete <sync-id>
5
+
6
+ Delete a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`delete-destination`,{type:`boolean`,description:`Delete destination`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <sync-id>`,describe:`Delete Catalog Sync`,builder:y,handler:async r=>c({command:`magic-cloud-networking catalog-syncs delete`,classification:{safeFlags:[`delete-destination`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{let c={delete_destination:r[`delete-destination`]};if(r.dryRun){o({command:`cf magic-cloud-networking catalog-syncs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/catalog-syncs/${r[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(r[`sync-id`]))}`,pathParams:{"sync-id":String(r[`sync-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();if(r.accountId=u,!await h({force:!!r.force})){process.stderr.write(`Aborted.
7
+ `);return}a(await s(`Deleting`,async()=>l.magicCloudNetworking.catalogSyncs.delete({account_id:u,sync_id:r[`sync-id`],...c})),{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 magic-cloud-networking catalog-syncs edit <sync-id>
8
+
9
+ Update a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`edit <sync-id>`,describe:`Patch Catalog Sync`,builder:x,handler:async r=>c({command:`magic-cloud-networking catalog-syncs edit`,classification:{safeFlags:[`update-mode`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking catalog-syncs edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/catalog-syncs/${r[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(r[`sync-id`]))}`,pathParams:{"sync-id":String(r[`sync-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({description:f(r.description,`description`,`text`),name:f(r.name,`name`,`text`),policy:f(r.policy,`policy`,`text`),update_mode:f(r[`update-mode`],`update-mode`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.edit({body:e,account_id:l,sync_id:r[`sync-id`]})),{successLabel:`Updated`});return}let p=d({description:f(r.description,`description`,`text`),name:f(r.name,`name`,`text`),policy:f(r.policy,`policy`,`text`),update_mode:f(r[`update-mode`],`update-mode`,`text`)});a(await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.edit({body:p,account_id:l,sync_id:r[`sync-id`]})),{successLabel:`Updated`})})};function C(e){return e.usage(`$0 magic-cloud-networking catalog-syncs get <sync-id>
10
+
11
+ Read a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <sync-id>`,describe:`Read Catalog Sync`,builder:C,handler:async r=>c({command:`magic-cloud-networking catalog-syncs get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking catalog-syncs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/catalog-syncs/${r[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(r[`sync-id`]))}`,pathParams:{"sync-id":String(r[`sync-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.magicCloudNetworking.catalogSyncs.get({account_id:l,sync_id:r[`sync-id`]})),{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 magic-cloud-networking catalog-syncs list
12
+
13
+ List Catalog Syncs (Closed Beta).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Catalog Syncs`,builder:T,handler:async r=>c({command:`magic-cloud-networking catalog-syncs list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking catalog-syncs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/catalog-syncs`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.magicCloudNetworking.catalogSyncs.list({account_id:l})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 magic-cloud-networking catalog-syncs prebuilt-policies list
14
+
15
+ List prebuilt catalog sync policies (Closed Beta).`).option(`destination-type`,{type:`string`,description:`Specify type of destination, omit to return all.`,choices:[`NONE`,`ZERO_TRUST_LIST`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List Prebuilt Policies`,builder:g(D),handler:async r=>c({command:`magic-cloud-networking catalog-syncs prebuilt-policies list`,classification:{safeFlags:[`destination-type`,`dry-run`]}},r,async()=>{let c={destination_type:r[`destination-type`]};if(r.dryRun){o({command:`cf magic-cloud-networking catalog-syncs prebuilt-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/catalog-syncs/prebuilt-policies`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.magicCloudNetworking.catalogSyncs.prebuiltPolicies.list({account_id:u,...c})),{successLabel:`Loaded`})})},k={command:`prebuilt-policies`,describe:`Operations for catalog-syncs.prebuilt-policies`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 magic-cloud-networking catalog-syncs refresh <sync-id>
16
+
17
+ Refresh a Catalog Sync's destination by running the sync policy against latest resource catalog (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`refresh <sync-id>`,describe:`Run Catalog Sync`,builder:A,handler:async r=>c({command:`magic-cloud-networking catalog-syncs refresh`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking catalog-syncs refresh`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/catalog-syncs/${r[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(r[`sync-id`]))}/refresh`,pathParams:{"sync-id":String(r[`sync-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.magicCloudNetworking.catalogSyncs.refresh({account_id:l,sync_id:r[`sync-id`]})),{successLabel:`Created`})})};function M(e){return e.usage(`$0 magic-cloud-networking catalog-syncs update <sync-id>
18
+
19
+ Update a Catalog Sync (Closed Beta).`).positional(`sync-id`,{type:`string`,description:`Sync ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy`,{type:`string`,description:`The policy field`}).option(`update-mode`,{type:`string`,description:`The update_mode field`,choices:[`AUTO`,`MANUAL`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`update <sync-id>`,describe:`Update Catalog Sync`,builder:M,handler:async r=>c({command:`magic-cloud-networking catalog-syncs update`,classification:{safeFlags:[`update-mode`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking catalog-syncs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/catalog-syncs/${r[`sync-id`]==null?`<sync-id>`:encodeURIComponent(String(r[`sync-id`]))}`,pathParams:{"sync-id":String(r[`sync-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({description:f(r.description,`description`,`text`),name:f(r.name,`name`,`text`),policy:f(r.policy,`policy`,`text`),update_mode:f(r[`update-mode`],`update-mode`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.update({body:e,account_id:l,sync_id:r[`sync-id`]})),{successLabel:`Updated`});return}let p=d({description:f(r.description,`description`,`text`),name:f(r.name,`name`,`text`),policy:f(r.policy,`policy`,`text`),update_mode:f(r[`update-mode`],`update-mode`,`text`)});a(await s(`Updating`,async()=>c.magicCloudNetworking.catalogSyncs.update({body:p,account_id:l,sync_id:r[`sync-id`]})),{successLabel:`Updated`})})},P={command:`catalog-syncs`,describe:`Operations for catalog-syncs`,builder:e=>e.command(te).command(b).command(S).command(w).command(E).command(j).command(N).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 magic-cloud-networking cloud-integrations create
20
+
21
+ Create a new Cloud Integration (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`cloud-type`,{type:`string`,description:`The cloud_type field`,choices:[`AWS`,`AZURE`,`GOOGLE`,`CLOUDFLARE`]}).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const I={command:`create`,describe:`Create Cloud Integration`,builder:F,handler:async h=>c({command:`magic-cloud-networking cloud-integrations create`,classification:{safeFlags:[`cloud-type`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){o({command:`cf magic-cloud-networking cloud-integrations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/providers`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({cloud_type:f(h[`cloud-type`],`cloud-type`,`text`),description:f(h.description,`description`,`text`),friendly_name:f(h[`friendly-name`],`friendly-name`,`text`)}):u(h.body)});return}let g=await i(h),_=h.local?e:await t();if(h.accountId=_,h.body){let e=u(h.body);a(await s(`Creating`,async()=>r(g,`POST`,`/accounts/${_}/magic/cloud/providers`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}h[`cloud-type`]===void 0&&(h[`cloud-type`]=await m(`cloud-type`,`The cloud_type field`,[`AWS`,`AZURE`,`GOOGLE`,`CLOUDFLARE`])),h[`friendly-name`]===void 0&&(h[`friendly-name`]=await p(`friendly-name`,`The friendly_name field`));let v={};h[`cloud-type`]!==void 0&&l(v,[`cloud_type`],f(h[`cloud-type`],`cloud-type`,`text`)),h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`friendly-name`]!==void 0&&l(v,[`friendly_name`],f(h[`friendly-name`],`friendly-name`,`text`)),a(await s(`Creating`,async()=>r(g,`POST`,`/accounts/${_}/magic/cloud/providers`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function L(e){return e.usage(`$0 magic-cloud-networking cloud-integrations delete <provider-id>
22
+
23
+ Delete a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider 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 R={command:`delete <provider-id>`,describe:`Delete Cloud Integration`,builder:L,handler:async r=>c({command:`magic-cloud-networking cloud-integrations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking cloud-integrations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/providers/${r[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(r[`provider-id`]))}`,pathParams:{"provider-id":String(r[`provider-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
24
+ `);return}a(await s(`Deleting`,async()=>c.magicCloudNetworking.cloudIntegrations.delete({account_id:l,provider_id:r[`provider-id`]})),{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 magic-cloud-networking cloud-integrations discover-all
25
+
26
+ Run discovery for all Cloud Integrations in an account (Closed Beta).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`discover-all`,describe:`Run Discovery for All Integrations`,builder:z,handler:async r=>c({command:`magic-cloud-networking cloud-integrations discover-all`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking cloud-integrations discover-all`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/providers/discover`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.magicCloudNetworking.cloudIntegrations.discoverAll({account_id:l})),{successLabel:`Created`})})};function V(e){return e.usage(`$0 magic-cloud-networking cloud-integrations discover <provider-id>
27
+
28
+ Run discovery for a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`discover <provider-id>`,describe:`Run Discovery`,builder:V,handler:async r=>c({command:`magic-cloud-networking cloud-integrations discover`,classification:{safeFlags:[`v2`,`dry-run`]}},r,async()=>{let c={v2:r.v2};if(r.dryRun){o({command:`cf magic-cloud-networking cloud-integrations discover`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/providers/${r[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(r[`provider-id`]))}/discover`,pathParams:{"provider-id":String(r[`provider-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Creating`,async()=>l.magicCloudNetworking.cloudIntegrations.discover({account_id:u,provider_id:r[`provider-id`],...c})),{successLabel:`Created`})})};function U(e){return e.usage(`$0 magic-cloud-networking cloud-integrations edit <provider-id>
29
+
30
+ Update a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`aws-arn`,{type:`string`,description:`The aws_arn field`}).option(`azure-subscription-id`,{type:`string`,description:`The azure_subscription_id field`}).option(`azure-tenant-id`,{type:`string`,description:`The azure_tenant_id field`}).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).option(`gcp-project-id`,{type:`string`,description:`The gcp_project_id field`}).option(`gcp-service-account-email`,{type:`string`,description:`The gcp_service_account_email field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const W={command:`edit <provider-id>`,describe:`Patch Cloud Integration`,builder:U,handler:async r=>c({command:`magic-cloud-networking cloud-integrations edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking cloud-integrations edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/providers/${r[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(r[`provider-id`]))}`,pathParams:{"provider-id":String(r[`provider-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({aws_arn:f(r[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:f(r[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:f(r[`azure-tenant-id`],`azure-tenant-id`,`text`),description:f(r.description,`description`,`text`),friendly_name:f(r[`friendly-name`],`friendly-name`,`text`),gcp_project_id:f(r[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:f(r[`gcp-service-account-email`],`gcp-service-account-email`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicCloudNetworking.cloudIntegrations.edit({body:e,account_id:l,provider_id:r[`provider-id`]})),{successLabel:`Updated`});return}let p=d({aws_arn:f(r[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:f(r[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:f(r[`azure-tenant-id`],`azure-tenant-id`,`text`),description:f(r.description,`description`,`text`),friendly_name:f(r[`friendly-name`],`friendly-name`,`text`),gcp_project_id:f(r[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:f(r[`gcp-service-account-email`],`gcp-service-account-email`,`text`)});a(await s(`Updating`,async()=>c.magicCloudNetworking.cloudIntegrations.edit({body:p,account_id:l,provider_id:r[`provider-id`]})),{successLabel:`Updated`})})};function G(e){return e.usage(`$0 magic-cloud-networking cloud-integrations get <provider-id>
31
+
32
+ Read a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`status`,{type:`boolean`,description:`Status`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <provider-id>`,describe:`Read Cloud Integration`,builder:G,handler:async r=>c({command:`magic-cloud-networking cloud-integrations get`,classification:{safeFlags:[`status`,`dry-run`]}},r,async()=>{let c={status:r.status};if(r.dryRun){o({command:`cf magic-cloud-networking cloud-integrations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/providers/${r[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(r[`provider-id`]))}`,pathParams:{"provider-id":String(r[`provider-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.magicCloudNetworking.cloudIntegrations.get({account_id:u,provider_id:r[`provider-id`],...c})),{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 magic-cloud-networking cloud-integrations initial-setup <provider-id>
33
+
34
+ Get initial configuration to complete Cloud Integration setup (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`initial-setup <provider-id>`,describe:`Get Cloud Integration Setup Config`,builder:q,handler:async r=>c({command:`magic-cloud-networking cloud-integrations initial-setup`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking cloud-integrations initial-setup`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/providers/${r[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(r[`provider-id`]))}/initial_setup`,pathParams:{"provider-id":String(r[`provider-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.magicCloudNetworking.cloudIntegrations.initialSetup({account_id:l,provider_id:r[`provider-id`]})),{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 magic-cloud-networking cloud-integrations list
35
+
36
+ List Cloud Integrations (Closed Beta).`).option(`status`,{type:`boolean`,description:`Status`}).option(`order-by`,{type:`string`,description:`One of ["updated_at", "id", "cloud_type", "name"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`cloudflare`,{type:`boolean`,description:`Cloudflare`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`list`,describe:`List Cloud Integrations`,builder:Y,handler:async r=>c({command:`magic-cloud-networking cloud-integrations list`,classification:{safeFlags:[`status`,`desc`,`cloudflare`,`dry-run`]}},r,async()=>{let c={status:r.status,order_by:r[`order-by`],desc:r.desc,cloudflare:r.cloudflare};if(r.dryRun){o({command:`cf magic-cloud-networking cloud-integrations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/providers`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.magicCloudNetworking.cloudIntegrations.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Z(e){return e.usage(`$0 magic-cloud-networking cloud-integrations update <provider-id>
37
+
38
+ Update a Cloud Integration (Closed Beta).`).positional(`provider-id`,{type:`string`,description:`Provider ID`,demandOption:!0}).option(`aws-arn`,{type:`string`,description:`The aws_arn field`}).option(`azure-subscription-id`,{type:`string`,description:`The azure_subscription_id field`}).option(`azure-tenant-id`,{type:`string`,description:`The azure_tenant_id field`}).option(`description`,{type:`string`,description:`The description field`}).option(`friendly-name`,{type:`string`,description:`The friendly_name field`}).option(`gcp-project-id`,{type:`string`,description:`The gcp_project_id field`}).option(`gcp-service-account-email`,{type:`string`,description:`The gcp_service_account_email field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Q={command:`update <provider-id>`,describe:`Update Cloud Integration`,builder:Z,handler:async r=>c({command:`magic-cloud-networking cloud-integrations update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking cloud-integrations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/providers/${r[`provider-id`]==null?`<provider-id>`:encodeURIComponent(String(r[`provider-id`]))}`,pathParams:{"provider-id":String(r[`provider-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({aws_arn:f(r[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:f(r[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:f(r[`azure-tenant-id`],`azure-tenant-id`,`text`),description:f(r.description,`description`,`text`),friendly_name:f(r[`friendly-name`],`friendly-name`,`text`),gcp_project_id:f(r[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:f(r[`gcp-service-account-email`],`gcp-service-account-email`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicCloudNetworking.cloudIntegrations.update({body:e,account_id:l,provider_id:r[`provider-id`]})),{successLabel:`Updated`});return}let p=d({aws_arn:f(r[`aws-arn`],`aws-arn`,`text`),azure_subscription_id:f(r[`azure-subscription-id`],`azure-subscription-id`,`text`),azure_tenant_id:f(r[`azure-tenant-id`],`azure-tenant-id`,`text`),description:f(r.description,`description`,`text`),friendly_name:f(r[`friendly-name`],`friendly-name`,`text`),gcp_project_id:f(r[`gcp-project-id`],`gcp-project-id`,`text`),gcp_service_account_email:f(r[`gcp-service-account-email`],`gcp-service-account-email`,`text`)});a(await s(`Updating`,async()=>c.magicCloudNetworking.cloudIntegrations.update({body:p,account_id:l,provider_id:r[`provider-id`]})),{successLabel:`Updated`})})},ne={command:`cloud-integrations`,describe:`Operations for cloud-integrations`,builder:e=>e.command(I).command(R).command(H).command(B).command(W).command(K).command(J).command(X).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.usage(`$0 magic-cloud-networking on-ramps address-spaces edit
39
+
40
+ Update the Magic WAN Address Space (Closed Beta).`).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`edit`,describe:`Patch Magic WAN Address Space`,builder:re,handler:async r=>c({command:`magic-cloud-networking on-ramps address-spaces edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps address-spaces edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps/magic_wan_address_space`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({prefixes:r.prefixes}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicCloudNetworking.onRamps.addressSpaces.edit({body:e,account_id:l})),{successLabel:`Updated`});return}if(r.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);let f=d({prefixes:r.prefixes});a(await s(`Updating`,async()=>c.magicCloudNetworking.onRamps.addressSpaces.edit({body:f,account_id:l})),{successLabel:`Updated`})})};function ae(e){return e.usage(`$0 magic-cloud-networking on-ramps address-spaces list
41
+
42
+ Read the Magic WAN Address Space (Closed Beta).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`Read Magic WAN Address Space`,builder:ae,handler:async r=>c({command:`magic-cloud-networking on-ramps address-spaces list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps address-spaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps/magic_wan_address_space`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.magicCloudNetworking.onRamps.addressSpaces.list({account_id:l})),{successLabel:`Loaded`})})};function se(e){return e.usage(`$0 magic-cloud-networking on-ramps address-spaces update
43
+
44
+ Update the Magic WAN Address Space (Closed Beta).`).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ce={command:`update`,describe:`Update Magic WAN Address Space`,builder:se,handler:async r=>c({command:`magic-cloud-networking on-ramps address-spaces update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps address-spaces update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps/magic_wan_address_space`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({prefixes:r.prefixes}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicCloudNetworking.onRamps.addressSpaces.update({body:e,account_id:l})),{successLabel:`Updated`});return}if(r.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);let f=d({prefixes:r.prefixes});a(await s(`Updating`,async()=>c.magicCloudNetworking.onRamps.addressSpaces.update({body:f,account_id:l})),{successLabel:`Updated`})})},le={command:`address-spaces`,describe:`Operations for on-ramps.address-spaces`,builder:e=>e.command(ie).command(oe).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ue(e){return e.usage(`$0 magic-cloud-networking on-ramps apply <onramp-id>
45
+
46
+ Apply an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`apply <onramp-id>`,describe:`Apply On-ramp`,builder:ue,handler:async r=>c({command:`magic-cloud-networking on-ramps apply`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps apply`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps/${r[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(r[`onramp-id`]))}/apply`,pathParams:{"onramp-id":String(r[`onramp-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.magicCloudNetworking.onRamps.apply({account_id:l,onramp_id:r[`onramp-id`]})),{successLabel:`Created`})})};function fe(e){return e.usage(`$0 magic-cloud-networking on-ramps create
47
+
48
+ Create a new On-ramp (Closed Beta).`).option(`forwarded`,{type:`string`,description:`The forwarded header`}).option(`adopted-hub-id`,{type:`string`,description:`The adopted_hub_id field`}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`cloud-asn`,{type:`number`,description:`Sets the cloud-side ASN. If unset or zero, the cloud's default ASN takes effect.`}).option(`cloud-type`,{type:`string`,description:`The cloud_type field`,choices:[`AWS`,`AZURE`,`GOOGLE`]}).option(`description`,{type:`string`,description:`The description field`}).option(`dynamic-routing`,{type:`boolean`,description:`Enables BGP routing. When enabling this feature, set both install_routes_in_cloud and install_routes_in_magic_wan to false.`}).option(`hub-provider-id`,{type:`string`,description:`The hub_provider_id field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`region`,{type:`string`,description:`The region field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`OnrampTypeSingle`,`OnrampTypeHub`]}).option(`vpc`,{type:`string`,description:`The vpc field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pe={command:`create`,describe:`Create On-ramp`,builder:fe,handler:async h=>c({command:`magic-cloud-networking on-ramps create`,classification:{safeFlags:[`cloud-type`,`dynamic-routing`,`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`type`,`dry-run`]}},h,async()=>{let c={};if(h.forwarded!==void 0&&(c.forwarded=String(h.forwarded)),h.dryRun){o({command:`cf magic-cloud-networking on-ramps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps`,pathParams:{},bodyKind:`json`,body:h.body===void 0?d({adopted_hub_id:f(h[`adopted-hub-id`],`adopted-hub-id`,`text`),attached_hubs:h[`attached-hubs`],attached_vpcs:h[`attached-vpcs`],cloud_asn:h[`cloud-asn`],cloud_type:f(h[`cloud-type`],`cloud-type`,`text`),description:f(h.description,`description`,`text`),dynamic_routing:h[`dynamic-routing`],hub_provider_id:f(h[`hub-provider-id`],`hub-provider-id`,`text`),install_routes_in_cloud:h[`install-routes-in-cloud`],install_routes_in_magic_wan:h[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:h[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:h[`manage-vpc-to-hub-attachments`],name:f(h.name,`name`,`text`),region:f(h.region,`region`,`text`),type:f(h.type,`type`,`text`),vpc:f(h.vpc,`vpc`,`text`)}):u(h.body)});return}let g=await i(h),_=h.local?e:await t();if(h.accountId=_,h.body){let e=u(h.body);a(await s(`Creating`,async()=>r(g,`POST`,`/accounts/${_}/magic/cloud/onramps`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}if(h[`cloud-type`]===void 0&&(h[`cloud-type`]=await m(`cloud-type`,`The cloud_type field`,[`AWS`,`AZURE`,`GOOGLE`])),h[`dynamic-routing`]===void 0)throw Error(`--dynamic-routing is required (or pass --body with this field set).`);if(h[`install-routes-in-cloud`]===void 0)throw Error(`--install-routes-in-cloud is required (or pass --body with this field set).`);if(h[`install-routes-in-magic-wan`]===void 0)throw Error(`--install-routes-in-magic-wan is required (or pass --body with this field set).`);h.name===void 0&&(h.name=await p(`name`,`The name field`)),h.type===void 0&&(h.type=await m(`type`,`The type field`,[`OnrampTypeSingle`,`OnrampTypeHub`]));let v={};h[`adopted-hub-id`]!==void 0&&l(v,[`adopted_hub_id`],f(h[`adopted-hub-id`],`adopted-hub-id`,`text`)),h[`attached-hubs`]!==void 0&&l(v,[`attached_hubs`],h[`attached-hubs`]),h[`attached-vpcs`]!==void 0&&l(v,[`attached_vpcs`],h[`attached-vpcs`]),h[`cloud-asn`]!==void 0&&l(v,[`cloud_asn`],h[`cloud-asn`]),h[`cloud-type`]!==void 0&&l(v,[`cloud_type`],f(h[`cloud-type`],`cloud-type`,`text`)),h.description!==void 0&&l(v,[`description`],f(h.description,`description`,`text`)),h[`dynamic-routing`]!==void 0&&l(v,[`dynamic_routing`],h[`dynamic-routing`]),h[`hub-provider-id`]!==void 0&&l(v,[`hub_provider_id`],f(h[`hub-provider-id`],`hub-provider-id`,`text`)),h[`install-routes-in-cloud`]!==void 0&&l(v,[`install_routes_in_cloud`],h[`install-routes-in-cloud`]),h[`install-routes-in-magic-wan`]!==void 0&&l(v,[`install_routes_in_magic_wan`],h[`install-routes-in-magic-wan`]),h[`manage-hub-to-hub-attachments`]!==void 0&&l(v,[`manage_hub_to_hub_attachments`],h[`manage-hub-to-hub-attachments`]),h[`manage-vpc-to-hub-attachments`]!==void 0&&l(v,[`manage_vpc_to_hub_attachments`],h[`manage-vpc-to-hub-attachments`]),h.name!==void 0&&l(v,[`name`],f(h.name,`name`,`text`)),h.region!==void 0&&l(v,[`region`],f(h.region,`region`,`text`)),h.type!==void 0&&l(v,[`type`],f(h.type,`type`,`text`)),h.vpc!==void 0&&l(v,[`vpc`],f(h.vpc,`vpc`,`text`)),a(await s(`Creating`,async()=>r(g,`POST`,`/accounts/${_}/magic/cloud/onramps`,{body:Object.keys(v).length>0?v:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function me(e){return e.usage(`$0 magic-cloud-networking on-ramps delete <onramp-id>
49
+
50
+ Delete an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`destroy`,{type:`boolean`,description:`Destroy`}).option(`force`,{type:`boolean`,description:`Force`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`delete <onramp-id>`,describe:`Delete On-ramp`,builder:me,handler:async r=>c({command:`magic-cloud-networking on-ramps delete`,classification:{safeFlags:[`destroy`,`force`,`dry-run`]}},r,async()=>{let c={destroy:r.destroy,force:r.force};if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps/${r[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(r[`onramp-id`]))}`,pathParams:{"onramp-id":String(r[`onramp-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();if(r.accountId=u,!await h({force:!!r.force})){process.stderr.write(`Aborted.
51
+ `);return}a(await s(`Deleting`,async()=>l.magicCloudNetworking.onRamps.delete({account_id:u,onramp_id:r[`onramp-id`],...c})),{successLabel:`Deleted`})})};function ge(e){return e.usage(`$0 magic-cloud-networking on-ramps edit <onramp-id>
52
+
53
+ Update an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`description`,{type:`string`,description:`The description field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`vpc`,{type:`string`,description:`The vpc field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _e={command:`edit <onramp-id>`,describe:`Patch On-ramp`,builder:ge,handler:async r=>c({command:`magic-cloud-networking on-ramps edit`,classification:{safeFlags:[`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps/${r[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(r[`onramp-id`]))}`,pathParams:{"onramp-id":String(r[`onramp-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({attached_hubs:r[`attached-hubs`],attached_vpcs:r[`attached-vpcs`],description:f(r.description,`description`,`text`),install_routes_in_cloud:r[`install-routes-in-cloud`],install_routes_in_magic_wan:r[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:r[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:r[`manage-vpc-to-hub-attachments`],name:f(r.name,`name`,`text`),vpc:f(r.vpc,`vpc`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicCloudNetworking.onRamps.edit({body:e,account_id:l,onramp_id:r[`onramp-id`]})),{successLabel:`Updated`});return}let p=d({attached_hubs:r[`attached-hubs`],attached_vpcs:r[`attached-vpcs`],description:f(r.description,`description`,`text`),install_routes_in_cloud:r[`install-routes-in-cloud`],install_routes_in_magic_wan:r[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:r[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:r[`manage-vpc-to-hub-attachments`],name:f(r.name,`name`,`text`),vpc:f(r.vpc,`vpc`,`text`)});a(await s(`Updating`,async()=>c.magicCloudNetworking.onRamps.edit({body:p,account_id:l,onramp_id:r[`onramp-id`]})),{successLabel:`Updated`})})};function ve(e){return e.usage(`$0 magic-cloud-networking on-ramps export <onramp-id>
54
+
55
+ Export an On-ramp to terraform ready file(s) (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const ye={command:`export <onramp-id>`,describe:`Export as Terraform`,builder:ve,handler:async r=>c({command:`magic-cloud-networking on-ramps export`,classification:{safeFlags:[`dry-run`,`text`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps export`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps/${r[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(r[`onramp-id`]))}/export`,pathParams:{"onramp-id":String(r[`onramp-id`]??``)},bodyKind:`none`});return}await i(r);let a=r.local?e:await t();r.accountId=a;let c=await s(`Loading`,async()=>v(`/accounts/${a}/magic/cloud/onramps/${encodeURIComponent(String(r[`onramp-id`]))}/export`,{method:`POST`,local:r.local===!0,persistTo:r.persistTo}));_(r.text===!0?c.toString(`utf-8`):c)})};function be(e){return e.usage(`$0 magic-cloud-networking on-ramps get <onramp-id>
56
+
57
+ Read an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`status`,{type:`boolean`,description:`Status`}).option(`vpcs`,{type:`boolean`,description:`Vpcs`}).option(`post-apply-resources`,{type:`boolean`,description:`Post apply resources`}).option(`planned-resources`,{type:`boolean`,description:`Planned resources`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xe={command:`get <onramp-id>`,describe:`Read On-ramp`,builder:be,handler:async r=>c({command:`magic-cloud-networking on-ramps get`,classification:{safeFlags:[`status`,`vpcs`,`post-apply-resources`,`planned-resources`,`dry-run`]}},r,async()=>{let c={status:r.status,vpcs:r.vpcs,post_apply_resources:r[`post-apply-resources`],planned_resources:r[`planned-resources`]};if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps/${r[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(r[`onramp-id`]))}`,pathParams:{"onramp-id":String(r[`onramp-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.magicCloudNetworking.onRamps.get({account_id:u,onramp_id:r[`onramp-id`],...c})),{successLabel:`Loaded`})})};function Se(e){return e.usage(`$0 magic-cloud-networking on-ramps list
58
+
59
+ List On-ramps (Closed Beta).`).option(`order-by`,{type:`string`,description:`One of ["updated_at", "id", "cloud_type", "name"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`status`,{type:`boolean`,description:`Status`}).option(`vpcs`,{type:`boolean`,description:`Vpcs`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`list`,describe:`List On-ramps`,builder:Se,handler:async r=>c({command:`magic-cloud-networking on-ramps list`,classification:{safeFlags:[`desc`,`status`,`vpcs`,`dry-run`]}},r,async()=>{let c={order_by:r[`order-by`],desc:r.desc,status:r.status,vpcs:r.vpcs};if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.magicCloudNetworking.onRamps.list({account_id:u,...c})),{successLabel:`Loaded`})})};function we(e){return e.usage(`$0 magic-cloud-networking on-ramps plan <onramp-id>
60
+
61
+ Plan an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`plan <onramp-id>`,describe:`Plan On-ramp`,builder:we,handler:async r=>c({command:`magic-cloud-networking on-ramps plan`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps plan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps/${r[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(r[`onramp-id`]))}/plan`,pathParams:{"onramp-id":String(r[`onramp-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.magicCloudNetworking.onRamps.plan({account_id:l,onramp_id:r[`onramp-id`]})),{successLabel:`Created`})})};function Ee(e){return e.usage(`$0 magic-cloud-networking on-ramps update <onramp-id>
62
+
63
+ Update an On-ramp (Closed Beta).`).positional(`onramp-id`,{type:`string`,description:`Onramp ID`,demandOption:!0}).option(`attached-hubs`,{type:`string`,array:!0,description:`The attached_hubs field`}).option(`attached-vpcs`,{type:`string`,array:!0,description:`The attached_vpcs field`}).option(`description`,{type:`string`,description:`The description field`}).option(`install-routes-in-cloud`,{type:`boolean`,description:`The install_routes_in_cloud field`}).option(`install-routes-in-magic-wan`,{type:`boolean`,description:`The install_routes_in_magic_wan field`}).option(`manage-hub-to-hub-attachments`,{type:`boolean`,description:`The manage_hub_to_hub_attachments field`}).option(`manage-vpc-to-hub-attachments`,{type:`boolean`,description:`The manage_vpc_to_hub_attachments field`}).option(`name`,{type:`string`,description:`The name field`}).option(`vpc`,{type:`string`,description:`The vpc field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const De={command:`update <onramp-id>`,describe:`Update On-ramp`,builder:Ee,handler:async r=>c({command:`magic-cloud-networking on-ramps update`,classification:{safeFlags:[`install-routes-in-cloud`,`install-routes-in-magic-wan`,`manage-hub-to-hub-attachments`,`manage-vpc-to-hub-attachments`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking on-ramps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/onramps/${r[`onramp-id`]==null?`<onramp-id>`:encodeURIComponent(String(r[`onramp-id`]))}`,pathParams:{"onramp-id":String(r[`onramp-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({attached_hubs:r[`attached-hubs`],attached_vpcs:r[`attached-vpcs`],description:f(r.description,`description`,`text`),install_routes_in_cloud:r[`install-routes-in-cloud`],install_routes_in_magic_wan:r[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:r[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:r[`manage-vpc-to-hub-attachments`],name:f(r.name,`name`,`text`),vpc:f(r.vpc,`vpc`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.magicCloudNetworking.onRamps.update({body:e,account_id:l,onramp_id:r[`onramp-id`]})),{successLabel:`Updated`});return}let p=d({attached_hubs:r[`attached-hubs`],attached_vpcs:r[`attached-vpcs`],description:f(r.description,`description`,`text`),install_routes_in_cloud:r[`install-routes-in-cloud`],install_routes_in_magic_wan:r[`install-routes-in-magic-wan`],manage_hub_to_hub_attachments:r[`manage-hub-to-hub-attachments`],manage_vpc_to_hub_attachments:r[`manage-vpc-to-hub-attachments`],name:f(r.name,`name`,`text`),vpc:f(r.vpc,`vpc`,`text`)});a(await s(`Updating`,async()=>c.magicCloudNetworking.onRamps.update({body:p,account_id:l,onramp_id:r[`onramp-id`]})),{successLabel:`Updated`})})},$={command:`on-ramps`,describe:`Operations for on-ramps`,builder:e=>e.command(de).command(pe).command(he).command(_e).command(ye).command(xe).command(Ce).command(Te).command(De).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Oe(e){return e.usage(`$0 magic-cloud-networking resources export
64
+
65
+ Export resources in the Resource Catalog as a JSON file (Closed Beta).`).option(`provider-id`,{type:`string`,description:`Provider ID`}).option(`resource-type`,{type:`string`,description:`Resource type`}).option(`resource-id`,{type:`string`,description:`Resource ID`}).option(`region`,{type:`string`,description:`Region`}).option(`resource-group`,{type:`string`,description:`Resource group`}).option(`search`,{type:`string`,description:`Search`}).option(`order-by`,{type:`string`,description:`One of ["id", "resource_type", "region"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const ke={command:`export`,describe:`Export Resources`,builder:Oe,handler:async r=>c({command:`magic-cloud-networking resources export`,classification:{safeFlags:[`desc`,`v2`,`dry-run`,`text`]}},r,async()=>{let a={provider_id:r[`provider-id`],resource_type:r[`resource-type`],resource_id:r[`resource-id`],region:r.region,resource_group:r[`resource-group`],search:r.search,order_by:r[`order-by`],desc:r.desc,v2:r.v2};if(r.dryRun){o({command:`cf magic-cloud-networking resources export`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/resources/export`,pathParams:{},query:a,bodyKind:`none`});return}await i(r);let c=r.local?e:await t();r.accountId=c;let l=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await s(`Loading`,async()=>v(`/accounts/${c}/magic/cloud/resources/export${l?`?`+l:``}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));_(r.text===!0?u.toString(`utf-8`):u)})};function Ae(e){return e.usage(`$0 magic-cloud-networking resources get <resource-id>
66
+
67
+ Read an resource from the Resource Catalog (Closed Beta).`).positional(`resource-id`,{type:`string`,description:`Resource ID`,demandOption:!0}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`get <resource-id>`,describe:`Read Resource`,builder:Ae,handler:async r=>c({command:`magic-cloud-networking resources get`,classification:{safeFlags:[`v2`,`dry-run`]}},r,async()=>{let c={v2:r.v2};if(r.dryRun){o({command:`cf magic-cloud-networking resources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/resources/${r[`resource-id`]==null?`<resource-id>`:encodeURIComponent(String(r[`resource-id`]))}`,pathParams:{"resource-id":String(r[`resource-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.magicCloudNetworking.resources.get({account_id:u,resource_id:r[`resource-id`],...c})),{successLabel:`Loaded`})})};function Me(e){return e.usage(`$0 magic-cloud-networking resources list
68
+
69
+ List resources in the Resource Catalog (Closed Beta).`).option(`provider-id`,{type:`string`,description:`Provider ID`}).option(`resource-type`,{type:`string`,description:`Resource type`}).option(`resource-id`,{type:`string`,description:`Resource ID`}).option(`region`,{type:`string`,description:`Region`}).option(`resource-group`,{type:`string`,description:`Resource group`}).option(`managed`,{type:`boolean`,description:`Managed`}).option(`search`,{type:`string`,description:`Search`}).option(`order-by`,{type:`string`,description:`One of ["id", "resource_type", "region"].`}).option(`desc`,{type:`boolean`,description:`Desc`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`page`,{type:`number`,description:`Page`}).option(`cloudflare`,{type:`boolean`,description:`Cloudflare`}).option(`v2`,{type:`boolean`,description:`V2`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ne={command:`list`,describe:`List Resources`,builder:g(Me),handler:async r=>c({command:`magic-cloud-networking resources list`,classification:{safeFlags:[`managed`,`desc`,`cloudflare`,`v2`,`dry-run`]}},r,async()=>{let c={provider_id:r[`provider-id`],resource_type:r[`resource-type`],resource_id:r[`resource-id`],region:r.region,resource_group:r[`resource-group`],managed:r.managed,search:r.search,order_by:r[`order-by`],desc:r.desc,per_page:r[`per-page`],page:r.page,cloudflare:r.cloudflare,v2:r.v2};if(r.dryRun){o({command:`cf magic-cloud-networking resources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/resources`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.magicCloudNetworking.resources.list({account_id:u,...c})),{successLabel:`Loaded`})})};function Pe(e){return e.usage(`$0 magic-cloud-networking resources policy-preview
70
+
71
+ Preview Rego query result against the latest resource catalog (Closed Beta).`).option(`policy`,{type:`string`,description:`The policy field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fe={command:`policy-preview`,describe:`Preview Rego Query`,builder:Pe,handler:async r=>c({command:`magic-cloud-networking resources policy-preview`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf magic-cloud-networking resources policy-preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/cloud/resources/policy-preview`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({policy:f(r.policy,`policy`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.magicCloudNetworking.resources.policyPreview({...e,account_id:l})),{successLabel:`Created`});return}r.policy===void 0&&(r.policy=await p(`policy`,`The policy field`));let m=d({policy:f(r.policy,`policy`,`text`)});a(await s(`Creating`,async()=>c.magicCloudNetworking.resources.policyPreview({...m,account_id:l})),{successLabel:`Created`})})},Ie={command:`resources`,describe:`Operations for resources`,builder:e=>e.command(ke).command(je).command(Ne).command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Le={command:`magic-cloud-networking`,describe:`magic-cloud-networking`,builder:e=>e.command(P).command(ne).command($).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Le as default};