cf 1.0.0-beta.11 → 1.0.0-beta.12

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 (427) hide show
  1. package/bin/cf +1 -1
  2. package/dist/abuse-reports-Cy9RcWPu.mjs +24 -0
  3. package/dist/{access-DuHs0Mii.mjs → access-DwJm1qet.mjs} +1 -1
  4. package/dist/account-tags-d0RkEw6s.mjs +15 -0
  5. package/dist/{accounts-DfXSHrkF.mjs → accounts-BSd4b-1j.mjs} +63 -63
  6. package/dist/{acm-BgSr3Ig4.mjs → acm-BfI0p2sX.mjs} +7 -7
  7. package/dist/addressing-lfeJf7YB.mjs +93 -0
  8. package/dist/agent-context-DFEgYjEQ.mjs +2 -0
  9. package/dist/agent-memory-CP1qpn-y.mjs +34 -0
  10. package/dist/{ai-audit-Bn_BfMFS.mjs → ai-audit-B_tSl78A.mjs} +3 -3
  11. package/dist/ai-gateway-CJaUlfGc.mjs +82 -0
  12. package/dist/ai-jFzFBANM.mjs +29 -0
  13. package/dist/{ai-search-C4YWVTCa.mjs → ai-search-PTlpY1T9.mjs} +42 -42
  14. package/dist/ai-security-CKGE547U.mjs +10 -0
  15. package/dist/alerting-CuxoqG3S.mjs +56 -0
  16. package/dist/analytics-NPND7aHB.mjs +20 -0
  17. package/dist/analytics_engine-BoapM9wd.mjs +4 -0
  18. package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
  19. package/dist/{api-security-gB1FHrHq.mjs → api-security-Nk_bg-Kg.mjs} +57 -57
  20. package/dist/{argo-wFCAsYx7.mjs → argo-DYfLQhd2.mjs} +5 -5
  21. package/dist/artifacts-BS6cEqCB.mjs +43 -0
  22. package/dist/{audit-logs-CpPUjMUP.mjs → audit-logs-x5tLqeX2.mjs} +2 -2
  23. package/dist/auth-AobvBmz4.mjs +2 -0
  24. package/dist/auth-CBtzZ3Sw.mjs +2 -0
  25. package/dist/{auth-7Fk7PVIC.mjs → auth-CKotxfap.mjs} +1 -1
  26. package/dist/{auth-token-DeG33BMQ.mjs → auth-token-CtguMdmF.mjs} +1 -1
  27. package/dist/autoconfig-PfnbLuEO.mjs +532 -0
  28. package/dist/{banner-Xk4xBN8U.mjs → banner-D03JEqRs.mjs} +1 -1
  29. package/dist/basin-catalog-Ddi-t3q9.mjs +46 -0
  30. package/dist/billing-CDMc4tvX.mjs +23 -0
  31. package/dist/bot-management-UrCM3P8K.mjs +9 -0
  32. package/dist/botnet-feed-CVwRm42k.mjs +11 -0
  33. package/dist/brand-protection-DfNf5REj.mjs +27 -0
  34. package/dist/browser-run-DVaiBLYX.mjs +46 -0
  35. package/dist/build-BKPVP5ip.mjs +2 -0
  36. package/dist/build-C4giET85.mjs +2 -0
  37. package/dist/builds-BG5DHqU3.mjs +71 -0
  38. package/dist/cache-C05hHXUp.mjs +45 -0
  39. package/dist/{certificate-authorities-NUQzCDK8.mjs → certificate-authorities-DyCFmZwR.mjs} +3 -3
  40. package/dist/cf-B9aqZZKD.mjs +18 -0
  41. package/dist/chunk-AUSY7DKT-BJX6Fdc4.mjs +312 -0
  42. package/dist/chunk-FT2NMTJB-DQ7s3x7Q.mjs +361 -0
  43. package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +2 -0
  44. package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
  45. package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
  46. package/dist/{cli-aChy8ou_.mjs → cli-D9qlPB-6.mjs} +1 -1
  47. package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
  48. package/dist/{client-certificates-qgLpBn8t.mjs → client-certificates-B-m8rfM9.mjs} +6 -6
  49. package/dist/{client-side-security-DZO6Xw14.mjs → client-side-security-M4oIUqID.mjs} +14 -14
  50. package/dist/{cloud-connector-C7vGDCzX.mjs → cloud-connector-B63Dwn6n.mjs} +3 -3
  51. package/dist/cloudflared-B48cfu95.mjs +2 -0
  52. package/dist/cloudforce-one-Dlc1GNFy.mjs +447 -0
  53. package/dist/{command-07vhr56i.mjs → command-BQpXcGKV.mjs} +1 -1
  54. package/dist/{command-Cdx___59.mjs → command-BWlpCtHe.mjs} +1 -1
  55. package/dist/{command-CrtDkZNs.mjs → command-BlGILcTA.mjs} +1 -1
  56. package/dist/{command-eM48o0J6.mjs → command-CKQlxypn.mjs} +1 -1
  57. package/dist/{command-D0MKPucK.mjs → command-CRl00uA2.mjs} +1 -1
  58. package/dist/{command-Ds5OVat3.mjs → command-CUkXxZsc.mjs} +1 -1
  59. package/dist/command-CXxh5Hce.mjs +2 -0
  60. package/dist/{command-BWC9CbE7.mjs → command-CzvlHvov.mjs} +1 -1
  61. package/dist/{command-B6TpINoN.mjs → command-DBaNgfA4.mjs} +1 -1
  62. package/dist/{command-C2pNxAeL.mjs → command-DEQSv-S1.mjs} +1 -1
  63. package/dist/{command-Dv6YavZa.mjs → command-DyE8v4sd.mjs} +1 -1
  64. package/dist/command-Rv2MR-eh.mjs +2 -0
  65. package/dist/{command-BsmF3J_l.mjs → command-SS1z_t68.mjs} +1 -1
  66. package/dist/{command-maDJWJgu.mjs → command-VuxpEvmH.mjs} +1 -1
  67. package/dist/{command-dAYWrB5y.mjs → command-ZBQ1WITj.mjs} +1 -1
  68. package/dist/{completions-D0280hul.mjs → completions-lf50FBGm.mjs} +2 -2
  69. package/dist/connector-interrupts-DHN1KtUE.mjs +6 -0
  70. package/dist/connector-telemetry-events-CHg7FmXh.mjs +6 -0
  71. package/dist/connector-telemetry-snapshots-CSifYi9r.mjs +6 -0
  72. package/dist/connectors-0UwPUav-.mjs +15 -0
  73. package/dist/containers-DRzgE46U.mjs +375 -0
  74. package/dist/containers-DuIsM7lM.mjs +78 -0
  75. package/dist/{content-scan-BCtWBCqd.mjs → content-scan-COyTz0Wb.mjs} +7 -7
  76. package/dist/{context-CquYYyS3.mjs → context-Bwkz4Lm_.mjs} +2 -2
  77. package/dist/{cps-C8BbnbuD.mjs → cps-B7_BJaAU.mjs} +3 -3
  78. package/dist/{csamScanner-CsJ9H2fA.mjs → csamScanner-jez2EYXC.mjs} +3 -3
  79. package/dist/ct-alerting-CACDrY0E.mjs +5 -0
  80. package/dist/{custom-certificates-CA8HqolM.mjs → custom-certificates-BBd92YlF.mjs} +7 -7
  81. package/dist/{custom-csrs-D0P2vWJE.mjs → custom-csrs-DTwBiNMX.mjs} +5 -5
  82. package/dist/{custom-hostnames-CzYMChbh.mjs → custom-hostnames-DIWlqvN9.mjs} +12 -12
  83. package/dist/{custom-nameservers-Cet3oF56.mjs → custom-nameservers-DISy8v8u.mjs} +5 -5
  84. package/dist/{custom-pages-DUkHIaTP.mjs → custom-pages-BHXO_NFv.mjs} +10 -10
  85. package/dist/d1-MvAQMvvo.mjs +89 -0
  86. package/dist/{dcv-delegation-BkdRVEAH.mjs → dcv-delegation-Buq0hcm_.mjs} +2 -2
  87. package/dist/delegate.mjs +1 -1
  88. package/dist/{deploy-BdWBEbLj.mjs → deploy-BS47vZvJ.mjs} +1 -1
  89. package/dist/deploy-context-Cfushp8j.mjs +56 -0
  90. package/dist/{deploy-input-LmLfj6kI.mjs → deploy-input-BAhS5LYx.mjs} +1 -1
  91. package/dist/{dev-BHkVwAea.mjs → dev-D8FGPKRt.mjs} +2 -2
  92. package/dist/diagnostics-ChDfJ-Gv.mjs +15 -0
  93. package/dist/{dialog-Dpi-UVbz.mjs → dialog-CL1Zy4pn.mjs} +1 -1
  94. package/dist/discover-DIDEGKo3.mjs +2 -0
  95. package/dist/discover-P20XeGBF.mjs +2 -0
  96. package/dist/{dist-Cpb7_h4N.mjs → dist-8rP3V95o.mjs} +5 -5
  97. package/dist/dist-CYFkGHYv.mjs +487 -0
  98. package/dist/dls-8D00tqvC.mjs +17 -0
  99. package/dist/{dns-BLNa0GrP.mjs → dns-C-A5pwf3.mjs} +63 -63
  100. package/dist/{dns-firewall-ChCvC5rT.mjs → dns-firewall-DIiF4pro.mjs} +9 -9
  101. package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
  102. package/dist/dotenv-DpXaxfho.mjs +4 -0
  103. package/dist/dry-run-DmsbOMF1.mjs +2 -0
  104. package/dist/durable-objects-CnIqbj84.mjs +6 -0
  105. package/dist/{email-auth-C28s03aI.mjs → email-auth-v97Md32E.mjs} +3 -3
  106. package/dist/{email-routing-Ci-xjXIN.mjs → email-routing-I29RG4hb.mjs} +22 -22
  107. package/dist/{email-security-DPU6xvI9.mjs → email-security-BCarmbky.mjs} +86 -86
  108. package/dist/{email-sending-kTVAlVKO.mjs → email-sending-CsHk2HAJ.mjs} +22 -22
  109. package/dist/error-sanitization-BWnGnB73.mjs +2 -0
  110. package/dist/error-sanitization-C_a2LxOK.mjs +2 -0
  111. package/dist/fieldExtractors-GIVe9jZa.mjs +9 -0
  112. package/dist/{firewall-BND3qSY2.mjs → firewall-DpgFqJr3.mjs} +16 -16
  113. package/dist/flagship-BVaXXlsX.mjs +28 -0
  114. package/dist/{fraud-DgyYv_CC.mjs → fraud-B5GQdEF2.mjs} +3 -3
  115. package/dist/{generate-VxmGG8BF.mjs → generate-CeeWW3eX.mjs} +1 -1
  116. package/dist/generate-D80-1GnZ.mjs +2 -0
  117. package/dist/{google-tag-gateway-v3p7murv.mjs → google-tag-gateway-C4O61lp-.mjs} +3 -3
  118. package/dist/gt-3bcLGJ7V.mjs +3 -0
  119. package/dist/{healthchecks-CByb4qYA.mjs → healthchecks-BwYMnKSF.mjs} +10 -10
  120. package/dist/{hostnames-3CqeMF5g.mjs → hostnames-DhrGRFeI.mjs} +5 -5
  121. package/dist/{hyperdrive-CmyYTE-K.mjs → hyperdrive-DAA8Fazg.mjs} +10 -10
  122. package/dist/iam-sRKDU2Z3.mjs +52 -0
  123. package/dist/images-DXdekLVs.mjs +71 -0
  124. package/dist/index.mjs +1 -1
  125. package/dist/init-j47MT4Qe.mjs +39 -0
  126. package/dist/intel-CnVeSjIS.mjs +76 -0
  127. package/dist/interactive-Dqv0RWVU.mjs +42 -0
  128. package/dist/interactive-Wpd3FcDc.mjs +2 -0
  129. package/dist/{ips-WWvPwSBc.mjs → ips-COCUG8mk.mjs} +2 -2
  130. package/dist/k2-CmHkArHL.mjs +13 -0
  131. package/dist/{keyless-certificates-DqILy3t9.mjs → keyless-certificates-l2_S__h3.mjs} +6 -6
  132. package/dist/keys-CDZreums.mjs +4 -0
  133. package/dist/kv-DkpKVimq.mjs +15 -0
  134. package/dist/{lazy-command--5YpWUVY.mjs → lazy-command-_vZGz6mv.mjs} +1 -1
  135. package/dist/{leaked-credential-checks-C0U1oYM5.mjs → leaked-credential-checks-edbapECI.mjs} +8 -8
  136. package/dist/lifecycle-oud60haK.mjs +2 -0
  137. package/dist/{load-balancers-BJKI9lm7.mjs → load-balancers-C5YMvhXD.mjs} +40 -40
  138. package/dist/{local-rYpzEQb-.mjs → local-C0lQ9sTg.mjs} +1 -1
  139. package/dist/local-D5L5Bwju.mjs +2 -0
  140. package/dist/{local-runtime-DZTTIe6x.mjs → local-runtime-DtnWXN0a.mjs} +1 -1
  141. package/dist/{login-bnylLTit.mjs → login-BrjOuHKu.mjs} +1 -1
  142. package/dist/login-DeOM4v0L.mjs +2 -0
  143. package/dist/logo-matches-CF8321pb.mjs +6 -0
  144. package/dist/logos-Bd8xNRKW.mjs +7 -0
  145. package/dist/logpush-BYk3qqwY.mjs +46 -0
  146. package/dist/{logs-c3b3USyS.mjs → logs-Jcj2NN8H.mjs} +11 -11
  147. package/dist/magic-cloud-networking-Dgdb9H0f.mjs +71 -0
  148. package/dist/magic-network-monitoring-CxVU4MZB.mjs +36 -0
  149. package/dist/magic-transit-KDyfUgTv.mjs +383 -0
  150. package/dist/managed-defense-CxaDeNUd.mjs +18 -0
  151. package/dist/{managed-transforms-DcYAvqTe.mjs → managed-transforms-C7rT5E-x.mjs} +4 -4
  152. package/dist/{matches-hnU16rSJ.mjs → matches-BtKqG8T9.mjs} +3 -3
  153. package/dist/{mcp-kZX4irfN.mjs → mcp-QDd1Iyc0.mjs} +17 -17
  154. package/dist/mesh-DtrIzl5z.mjs +26 -0
  155. package/dist/metadata-Df5kCWJv.mjs +2 -0
  156. package/dist/{migrate-BNvUWrjy.mjs → migrate-DHlfR_gZ.mjs} +1 -1
  157. package/dist/{monetization-Dsqj9DCA.mjs → monetization-pLalYYMI.mjs} +9 -9
  158. package/dist/mtls-certificates-DYA9Wu-c.mjs +13 -0
  159. package/dist/network-DrJxPWXQ.mjs +50 -0
  160. package/dist/{network-interconnects-osO_vAPu.mjs → network-interconnects-D73MlYG8.mjs} +19 -19
  161. package/dist/{oauth-CeZ3d_dB.mjs → oauth-B08YQ4xq.mjs} +1 -1
  162. package/dist/{oauth-w0fWmrwU.mjs → oauth-TGbM1Q0V.mjs} +1 -1
  163. package/dist/oauth-clients-CkPDLFd-.mjs +16 -0
  164. package/dist/{oauth-scopes-CxpRD6d7.mjs → oauth-scopes-VgliqcQe.mjs} +2 -2
  165. package/dist/{observability-BxL2RqWZ.mjs → observability-CvN9oxAo.mjs} +42 -42
  166. package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
  167. package/dist/{organization-DNieJ1xJ.mjs → organization-DIwqRBBV.mjs} +16 -16
  168. package/dist/{organizations-BIXPmTy5.mjs → organizations-Dk0D9ukm.mjs} +2 -2
  169. package/dist/{origin-ca-certificates-dVJvSIH8.mjs → origin-ca-certificates-BSFqMTn-.mjs} +5 -5
  170. package/dist/{origin-post-quantum-encryption-CO6tDW1t.mjs → origin-post-quantum-encryption-BOKWKDTY.mjs} +3 -3
  171. package/dist/{origin-tls-client-auth-DeTY8aN2.mjs → origin-tls-client-auth-BzE3WpcN.mjs} +14 -14
  172. package/dist/output-BGqhvqe2.mjs +2 -0
  173. package/dist/{page-rules-DA552Ra4.mjs → page-rules-BKaU37cM.mjs} +7 -7
  174. package/dist/pages-2Xg-lrMf.mjs +54 -0
  175. package/dist/{pay-per-crawl-DoTg9VP7.mjs → pay-per-crawl-5-KTQXRr.mjs} +33 -33
  176. package/dist/pay-per-use-sGebKzNK.mjs +6 -0
  177. package/dist/pipelines-BM-T7mMK.mjs +44 -0
  178. package/dist/precursor-DmQ32-Sp.mjs +4 -0
  179. package/dist/previews-DDQ9ACDJ.mjs +4 -0
  180. package/dist/{progress-TLUEIYE6.mjs → progress-BYVZuEcG.mjs} +1 -1
  181. package/dist/{prompt-Ck_1PCHm.mjs → prompt-F5wxc8zq.mjs} +1 -1
  182. package/dist/queries-DPBkVynK.mjs +9 -0
  183. package/dist/queues-CCXRs98q.mjs +57 -0
  184. package/dist/r2-BKuBSW8h.mjs +125 -0
  185. package/dist/{radar-Bez6k9Dw.mjs → radar-Gv1yFoRX.mjs} +150 -150
  186. package/dist/{raw-fetch-DNxNCoeP.mjs → raw-fetch-DyYWa923.mjs} +1 -1
  187. package/dist/realtime-CVl-rvgx.mjs +172 -0
  188. package/dist/registrar-sandbox-cmOYDnkp.mjs +56 -0
  189. package/dist/registrar-swlnh22i.mjs +43 -0
  190. package/dist/{registry-CsSLAAOE.mjs → registry-C20J1MW0.mjs} +1 -1
  191. package/dist/reporting-Bgwsvol1.mjs +14 -0
  192. package/dist/request-headers-CUee83pa.mjs +2 -0
  193. package/dist/request-tracers-BBiJvVDz.mjs +4 -0
  194. package/dist/resolve-DvxgnWjL.mjs +2 -0
  195. package/dist/resolve-qwL1LmKN.mjs +2 -0
  196. package/dist/resource-sharing-C1JiYLbl.mjs +40 -0
  197. package/dist/resource-tagging-C9VOSlDR.mjs +4 -0
  198. package/dist/rules-BDunCGMj.mjs +18 -0
  199. package/dist/{rulesets-RJ6yBefy.mjs → rulesets-BMGxrnv9.mjs} +17 -17
  200. package/dist/rum-B7XiECe9.mjs +30 -0
  201. package/dist/run-CrZgB8L_.mjs +2 -0
  202. package/dist/run-nNxXb_Cv.mjs +2 -0
  203. package/dist/schema-DC0kdqgV.mjs +2 -0
  204. package/dist/schema-flags-BUZR9SLd.mjs +5 -0
  205. package/dist/scim-CORcs2wK.mjs +18 -0
  206. package/dist/secrets-store-BoZQaFey.mjs +24 -0
  207. package/dist/{security-insights-DVAqroY5.mjs → security-insights-DblK_6sg.mjs} +20 -20
  208. package/dist/{security-txt-rfrrdiZV.mjs → security-txt-Dl7RPnRb.mjs} +4 -4
  209. package/dist/{session-B6mFkaVZ.mjs → session-BWe9et4K.mjs} +1 -1
  210. package/dist/shared-0N31BXkY.mjs +2 -0
  211. package/dist/{smart-shield-_HA814Im.mjs → smart-shield-DX0-8ruu.mjs} +11 -11
  212. package/dist/{snippets-mRelEw0p.mjs → snippets-BFN-Lg3K.mjs} +8 -8
  213. package/dist/source-mXUcrTVw.mjs +6 -0
  214. package/dist/spawn-DZ9A-xXb.mjs +10 -0
  215. package/dist/{spectrum-BwtOiaDw.mjs → spectrum-HYWLWB0X.mjs} +11 -11
  216. package/dist/{speed-DmqsZtiJ.mjs → speed-Dj0YhfRe.mjs} +11 -11
  217. package/dist/src-CAiZlihY.mjs +117 -0
  218. package/dist/{ssl-DCvfveJB.mjs → ssl-BQL1fNtD.mjs} +16 -16
  219. package/dist/startup-profile-0X5ebbng.mjs +29 -0
  220. package/dist/startup-profile-CXnsF4c7.mjs +2 -0
  221. package/dist/state-BA2CanJ_.mjs +2 -0
  222. package/dist/{state-BPwdiNO_.mjs → state-Dy6-rKNd.mjs} +1 -1
  223. package/dist/stream-DKv2TtZN.mjs +102 -0
  224. package/dist/submit-Byt2KBGI.mjs +4 -0
  225. package/dist/{tags-Djw0e-4j.mjs → tags-BIBsdG68.mjs} +2 -2
  226. package/dist/telemetry-DBXOMuLh.mjs +2 -0
  227. package/dist/{telemetry-DrFNujdx.mjs → telemetry-bu3txnIR.mjs} +1 -1
  228. package/dist/{tenant-tc1wb_ym.mjs → tenant-Bs4Ac4n3.mjs} +5 -5
  229. package/dist/{tenant-custom-nameservers-XCbXryBZ.mjs → tenant-custom-nameservers-DcaELeCE.mjs} +4 -4
  230. package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
  231. package/dist/{tools-CB4NleeJ.mjs → tools-BbTX7rlM.mjs} +1 -1
  232. package/dist/tunnels-DWcrz9Sf.mjs +29 -0
  233. package/dist/turnstile-2MIGp2ce.mjs +33 -0
  234. package/dist/{ui-D1hhIDIs.mjs → ui-YmjF66Ct.mjs} +1 -1
  235. package/dist/update-check-B-CvDAUz.mjs +2 -0
  236. package/dist/update-check-CfB0PNTY.mjs +2 -0
  237. package/dist/update-check-worker.mjs +1 -1
  238. package/dist/url-info-B8udoxlx.mjs +4 -0
  239. package/dist/{url-normalization-Dbypc9wz.mjs → url-normalization-C6AdWtaE.mjs} +4 -4
  240. package/dist/url-scanner-Dg0c_yVb.mjs +16 -0
  241. package/dist/{user-3uwLMH78.mjs → user-BLZ-0Bgv.mjs} +51 -51
  242. package/dist/values-BUK-m0Jg.mjs +4 -0
  243. package/dist/vectorize-DEUSEQXY.mjs +32 -0
  244. package/dist/version-BZNc7Y3t.mjs +2 -0
  245. package/dist/waiting-rooms-BycGk2Y0.mjs +53 -0
  246. package/dist/{web-assets-BfEprX1S.mjs → web-assets-CLZdWOmN.mjs} +30 -30
  247. package/dist/{web3-DNbp5sZw.mjs → web3-DjeavuLg.mjs} +13 -13
  248. package/dist/workers-C_SfyU-v.mjs +38 -0
  249. package/dist/workers-builds-COn5Ne5G.mjs +14 -0
  250. package/dist/workers-for-platforms-tchCXwNF.mjs +42 -0
  251. package/dist/{workers-vpc-LVfayM2-.mjs → workers-vpc-CKts8Av0.mjs} +7 -7
  252. package/dist/workflows-BibtWuOx.mjs +43 -0
  253. package/dist/{wrangler-migration-B0mKHqGd.mjs → wrangler-migration-BpJqCFAa.mjs} +1 -1
  254. package/dist/{zaraz-BY60ZUQ4.mjs → zaraz-BvQZB0YY.mjs} +11 -11
  255. package/dist/{zero-trust-CQNohO7_.mjs → zero-trust-FStq4uhn.mjs} +411 -411
  256. package/dist/{zone-BVDW2UGd.mjs → zone-tymlghWb.mjs} +2 -2
  257. package/dist/{zones-CcZL0YQp.mjs → zones-Bz6dgT9_.mjs} +43 -43
  258. package/package.json +20 -21
  259. package/dist/abuse-reports-DX5xgeka.mjs +0 -24
  260. package/dist/account-tags-CiKwgOWd.mjs +0 -15
  261. package/dist/addressing-B70NFnrX.mjs +0 -93
  262. package/dist/agent-context-GRiQ4zRU.mjs +0 -2
  263. package/dist/agent-memory-DJRquHeq.mjs +0 -34
  264. package/dist/ai-CP2oIS-I.mjs +0 -29
  265. package/dist/ai-gateway-CrrEtzUP.mjs +0 -82
  266. package/dist/ai-security-Bt_fG65f.mjs +0 -10
  267. package/dist/alerting-CRr88fVR.mjs +0 -56
  268. package/dist/analytics-XqS9OP5B.mjs +0 -20
  269. package/dist/analytics_engine-CzmYem4f.mjs +0 -4
  270. package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
  271. package/dist/artifacts-qFjlNRqb.mjs +0 -43
  272. package/dist/auth-BmJ946bE.mjs +0 -2
  273. package/dist/auth-Br-t8vL_.mjs +0 -2
  274. package/dist/autoconfig-D-copdZG.mjs +0 -511
  275. package/dist/basin-catalog-CshcpsAH.mjs +0 -46
  276. package/dist/billing-B-xNxxiP.mjs +0 -23
  277. package/dist/bot-management-DhafeA2J.mjs +0 -9
  278. package/dist/botnet-feed-D6uCLE_D.mjs +0 -11
  279. package/dist/brand-protection-c3WiHbYn.mjs +0 -27
  280. package/dist/browser-run-D9_cwaSD.mjs +0 -46
  281. package/dist/build-9ihDp-Gy.mjs +0 -2
  282. package/dist/build-DrG6TqMw.mjs +0 -2
  283. package/dist/builds-Dl8if-2k.mjs +0 -71
  284. package/dist/cache-CIZokBjd.mjs +0 -45
  285. package/dist/cf-DfQfIu3q.mjs +0 -18
  286. package/dist/chunk-FT2NMTJB-BFqlGcem.mjs +0 -97
  287. package/dist/chunk-KKDV4JPS-B_t8sDTz.mjs +0 -2
  288. package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
  289. package/dist/chunk-WMOON6TZ-B8xCqjB1.mjs +0 -2
  290. package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
  291. package/dist/cloudflared-CEfZhSQH.mjs +0 -2
  292. package/dist/cloudforce-one-CE7y5UkF.mjs +0 -447
  293. package/dist/command-C65Ed0o9.mjs +0 -2
  294. package/dist/command-DHdWKtqx.mjs +0 -2
  295. package/dist/connector-interrupts-CVjFhU-C.mjs +0 -6
  296. package/dist/connector-telemetry-events-Bu3LKP6T.mjs +0 -6
  297. package/dist/connector-telemetry-snapshots-BbDTIc06.mjs +0 -6
  298. package/dist/connectors-DGtx-rPI.mjs +0 -15
  299. package/dist/containers-CzNbBrYE.mjs +0 -239
  300. package/dist/containers-DEFrbNgO.mjs +0 -78
  301. package/dist/ct-alerting-CYsQZO2H.mjs +0 -5
  302. package/dist/d1-B2duXfH2.mjs +0 -41
  303. package/dist/diagnostics-9Wj5UWBL.mjs +0 -15
  304. package/dist/discover-BYkHr5Ja.mjs +0 -2
  305. package/dist/discover-t6E9lpf3.mjs +0 -2
  306. package/dist/dist-D1iG7guo.mjs +0 -366
  307. package/dist/dist-zep5OXGt.mjs +0 -48
  308. package/dist/dls-Caya7FZc.mjs +0 -17
  309. package/dist/dot-prop-IITUZ2XW-BsZYdILY.mjs +0 -2
  310. package/dist/dotenv-CcQjGlV0.mjs +0 -4
  311. package/dist/dry-run-p9Q7nMZ5.mjs +0 -2
  312. package/dist/durable-objects-DuRbdp7N.mjs +0 -6
  313. package/dist/error-sanitization-BbEw--0B.mjs +0 -2
  314. package/dist/error-sanitization-p5rmb53x.mjs +0 -2
  315. package/dist/fieldExtractors-ceaXu4zD.mjs +0 -9
  316. package/dist/flagship-DfxbNzgx.mjs +0 -28
  317. package/dist/generate-9P8Q_RiO.mjs +0 -2
  318. package/dist/gt-KlYHH-UC.mjs +0 -2
  319. package/dist/iam-CV_M681j.mjs +0 -52
  320. package/dist/images-DaLPjskW.mjs +0 -71
  321. package/dist/init-CBKifk5L.mjs +0 -39
  322. package/dist/intel-MpftjuPB.mjs +0 -76
  323. package/dist/interactive-D80kbTap.mjs +0 -32
  324. package/dist/interactive-mJQ_IrGd.mjs +0 -2
  325. package/dist/k2-D0QYUFqT.mjs +0 -13
  326. package/dist/keys-DhX4AcqF.mjs +0 -4
  327. package/dist/kv-DLUfUL0_.mjs +0 -15
  328. package/dist/lifecycle-Cyc3fmyN.mjs +0 -2
  329. package/dist/local-DkYQiSQQ.mjs +0 -2
  330. package/dist/login-CnE2Ii_F.mjs +0 -2
  331. package/dist/logo-matches-DFZybI0C.mjs +0 -6
  332. package/dist/logos-Da2YtqSN.mjs +0 -7
  333. package/dist/logpush-Q7WIEHS1.mjs +0 -46
  334. package/dist/magic-cloud-networking-BoyDmFq3.mjs +0 -71
  335. package/dist/magic-network-monitoring-BkUbpMUp.mjs +0 -36
  336. package/dist/magic-transit-4-THD45G.mjs +0 -383
  337. package/dist/managed-defense-CTMqSp6z.mjs +0 -18
  338. package/dist/mesh-Dxzvvso6.mjs +0 -26
  339. package/dist/metadata-C33s4rc-.mjs +0 -2
  340. package/dist/mtls-certificates-BSbMwIna.mjs +0 -13
  341. package/dist/network-mEnXTEiG.mjs +0 -50
  342. package/dist/oauth-clients-CWPHi-Yn.mjs +0 -16
  343. package/dist/open-PCXX3ZDZ-C7gpxSsl.mjs +0 -4
  344. package/dist/output-ClYel9WX.mjs +0 -2
  345. package/dist/pages-B0x7tidm.mjs +0 -54
  346. package/dist/pay-per-use-yRO2QBfe.mjs +0 -6
  347. package/dist/pipelines-CQxrm9ao.mjs +0 -44
  348. package/dist/precursor-FiGYDRV9.mjs +0 -4
  349. package/dist/previews-BthBa50j.mjs +0 -4
  350. package/dist/queries-C0RRdol7.mjs +0 -9
  351. package/dist/queues-sLgvjsRP.mjs +0 -57
  352. package/dist/r2-C2PllL6i.mjs +0 -125
  353. package/dist/realtime-D-HSXznX.mjs +0 -172
  354. package/dist/registrar-DwHrG9QR.mjs +0 -43
  355. package/dist/registrar-sandbox-jNukmzQP.mjs +0 -56
  356. package/dist/reporting-DolhAb10.mjs +0 -14
  357. package/dist/request-headers-Lhj314mk.mjs +0 -2
  358. package/dist/request-tracers-w72hKc33.mjs +0 -4
  359. package/dist/resolve-CGKqk7q8.mjs +0 -2
  360. package/dist/resolve-Djf2xgBx.mjs +0 -2
  361. package/dist/resource-sharing-DTrSkqI4.mjs +0 -40
  362. package/dist/resource-tagging-aURR4fIJ.mjs +0 -4
  363. package/dist/rules-C8a7cV-W.mjs +0 -18
  364. package/dist/rum-Bk1dPW4p.mjs +0 -30
  365. package/dist/run-BJOAPmsz.mjs +0 -2
  366. package/dist/run-iFM5TxtQ.mjs +0 -2
  367. package/dist/schema-flags-PagOq-G2.mjs +0 -5
  368. package/dist/schema-v7mOxMdx.mjs +0 -2
  369. package/dist/scim-C0FmjkkV.mjs +0 -18
  370. package/dist/secrets-store-cG_5RMzK.mjs +0 -24
  371. package/dist/shared-BqsWoApw.mjs +0 -2
  372. package/dist/source-38bULAR8.mjs +0 -6
  373. package/dist/spawn-BzPhcLJI.mjs +0 -10
  374. package/dist/src--KDGqL5N.mjs +0 -109
  375. package/dist/startup-profile-BCe9k9sR.mjs +0 -17
  376. package/dist/startup-profile-WrwRyMwH.mjs +0 -2
  377. package/dist/state-a1tTOGjm.mjs +0 -2
  378. package/dist/stream-aroClJeD.mjs +0 -102
  379. package/dist/submit-BBKhoKT8.mjs +0 -4
  380. package/dist/telemetry-DoBQOGRk.mjs +0 -2
  381. package/dist/tunnels-C2FTswb6.mjs +0 -29
  382. package/dist/turnstile-BV4Mdd-j.mjs +0 -33
  383. package/dist/update-check-CFt6cMOi.mjs +0 -2
  384. package/dist/update-check-Dtj9fzNe.mjs +0 -2
  385. package/dist/url-info-CeegsDK7.mjs +0 -4
  386. package/dist/url-scanner-BFXMrpJF.mjs +0 -16
  387. package/dist/values-BTncDc3U.mjs +0 -4
  388. package/dist/vectorize-CtMAtx8r.mjs +0 -32
  389. package/dist/version-oN1bmOgM.mjs +0 -2
  390. package/dist/waiting-rooms-1xDvjF13.mjs +0 -53
  391. package/dist/workers-DK_JgS4Y.mjs +0 -38
  392. package/dist/workers-builds-CdhwmmsQ.mjs +0 -14
  393. package/dist/workers-for-platforms-CP6IqxrK.mjs +0 -42
  394. package/dist/workflows-CA5K8FFb.mjs +0 -43
  395. /package/dist/{Page-DAgOEX17.mjs → Page-BShsqCXr.mjs} +0 -0
  396. /package/dist/{alerts-D3iKtzoN.mjs → alerts-BSON-vFh.mjs} +0 -0
  397. /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
  398. /package/dist/{autorag-pvRfDwne.mjs → autorag-kNrLiqDX.mjs} +0 -0
  399. /package/dist/{body-parser-NjzJZMOV.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
  400. /package/dist/{brands-DP5Ndir1.mjs → brands-bBJgbbOH.mjs} +0 -0
  401. /package/dist/{browser-extension-Dee2Y1qn.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
  402. /package/dist/{clear-qLKPlJqb.mjs → clear-BW9vLgI3.mjs} +0 -0
  403. /package/dist/{cli-types-_Kmwfpnp.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
  404. /package/dist/{connector-telemetry-events-latest-_aCmWeZx.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
  405. /package/dist/{connector-telemetry-snapshots-latest-CffEplpV.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
  406. /package/dist/{delegate-CCGgla7X.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
  407. /package/dist/{domain-info-BQh9XapD.mjs → domain-info-BkcBcyfF.mjs} +0 -0
  408. /package/dist/{errors-cuuW88wR.mjs → errors-_sob7Ihu.mjs} +0 -0
  409. /package/dist/{health--10IShMi.mjs → health-CTaCeVyC.mjs} +0 -0
  410. /package/dist/{input-validation-0CeePPHp.mjs → input-validation-D7z60HJH.mjs} +0 -0
  411. /package/dist/{internal-BUs583vv.mjs → internal-BYS7hO8c.mjs} +0 -0
  412. /package/dist/{live-VCSxA0N9.mjs → live-BJE_YWE1.mjs} +0 -0
  413. /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-nBMEx1f-.mjs} +0 -0
  414. /package/dist/{r2-data-catalog-Bg7zq1IB.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
  415. /package/dist/{rate-limit-analytics-D3q0mGv2.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
  416. /package/dist/{rate-limits-BIxlBuMn.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
  417. /package/dist/{ready-CAgelFmC.mjs → ready-B3pLxnjc.mjs} +0 -0
  418. /package/dist/{recent-submissions-B3TOjNmk.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
  419. /package/dist/{refute-BZNkFpBB.mjs → refute-Dp3VodMn.mjs} +0 -0
  420. /package/dist/{scan-logo-StecHiaf.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
  421. /package/dist/{scan-page-B4adr-vD.mjs → scan-page-CxeudOzj.mjs} +0 -0
  422. /package/dist/{search-Devngw4M.mjs → search-B_P5ZTQj.mjs} +0 -0
  423. /package/dist/{signed-url-ChR5eXXd.mjs → signed-url-D5RwvrQq.mjs} +0 -0
  424. /package/dist/{submission-info-BGb81HZN.mjs → submission-info-_t78q2OE.mjs} +0 -0
  425. /package/dist/{total-queries-_wa6KxEl.mjs → total-queries-CPrKEciQ.mjs} +0 -0
  426. /package/dist/{tracked-domains-BesKGqfI.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
  427. /package/dist/{verify-CYM5GlPu.mjs → verify-5KcvRk-q.mjs} +0 -0
@@ -1,40 +1,40 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-rYpzEQb-.mjs";import{n as t}from"./auth-Br-t8vL_.mjs";import{a as n,i as r,t as i}from"./context-CquYYyS3.mjs";import{t as a}from"./output-ClYel9WX.mjs";import{t as o}from"./dry-run-p9Q7nMZ5.mjs";import{t as s}from"./progress-TLUEIYE6.mjs";import{t as c}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as l,t as u}from"./body-parser-NjzJZMOV.mjs";import{n as d}from"./input-validation-0CeePPHp.mjs";import{t as f}from"./cli-types-_Kmwfpnp.mjs";import{n as p,t as m}from"./raw-fetch-DNxNCoeP.mjs";function h(e){return e.usage(`$0 security-insights audit-logs get <issue-id>
2
+ import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,i as r,t as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./output-BGqhvqe2.mjs";import{t as o}from"./dry-run-DmsbOMF1.mjs";import{t as s}from"./progress-BYVZuEcG.mjs";import{t as c}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{t as f}from"./cli-types-9oYmRTHJ.mjs";import{n as p,t as m}from"./raw-fetch-DyYWa923.mjs";function h(e){return e.usage(`$0 security-insights audit-logs get <issue-id>
3
3
 
4
- Lists audit log entries for a specific Security Center insight, showing changes to its status and classification over time.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <issue-id>`,describe:`Retrieves Issue Audit Log`,builder:f(h),handler:async l=>c({command:`security-insights audit-logs get`,classification:{safeFlags:[`field-changed`,`order`,`dry-run`]}},l,async()=>{let c={per_page:l[`per-page`],cursor:l.cursor,field_changed:l[`field-changed`],changed_by:l[`changed-by`],since:l.since,before:l.before,order:l.order};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights audit-logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/${l[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(l[`issue-id`]))}/audit-log`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r),"issue-id":String(l[`issue-id`]??``)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityInsights.auditLogs.get({account_or_zone:d,account_or_zone_id:f,issue_id:l[`issue-id`],...c})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 security-insights audit-logs list
4
+ Lists audit log entries for a specific Security Center insight, showing changes to its status and classification over time.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <issue-id>`,describe:`Retrieves Issue Audit Log`,builder:f(h),handler:async l=>c({command:`security-insights audit-logs get`,classification:{safeFlags:[`field-changed`,`order`,`dry-run`]}},l,async()=>{let c={per_page:l[`per-page`],cursor:l.cursor,field_changed:l[`field-changed`],changed_by:l[`changed-by`],since:l.since,before:l.before,order:l.order};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights audit-logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/${l[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(l[`issue-id`]))}/audit-log`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r),"issue-id":String(l[`issue-id`]??``)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.securityInsights.auditLogs.get({account_or_zone:d,account_or_zone_id:f,issue_id:l[`issue-id`],...c}));a(p,{successLabel:`Loaded`})})};function ee(e){return e.usage(`$0 security-insights audit-logs list
5
5
 
6
- Lists audit log entries for all Security Center insights in the account or zone, showing changes to insight status and classification.`).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`Retrieves account or zone Audit Log`,builder:f(g),handler:async l=>c({command:`security-insights audit-logs list`,classification:{safeFlags:[`field-changed`,`order`,`dry-run`]}},l,async()=>{let c={per_page:l[`per-page`],cursor:l.cursor,field_changed:l[`field-changed`],changed_by:l[`changed-by`],since:l.since,before:l.before,order:l.order};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/audit-log`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityInsights.auditLogs.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},v={command:`audit-logs`,describe:`Operations for audit-logs`,builder:e=>e.command(ee).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 security-insights classify <issue-id>
6
+ Lists audit log entries for all Security Center insights in the account or zone, showing changes to insight status and classification.`).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor for pagination. Use the cursor value from result_info of the previous response.`}).option(`field-changed`,{type:`string`,description:`Filter by the field that was changed.`,choices:[`status`,`user_classification`]}).option(`changed-by`,{type:`string`,description:`Filter by the actor that made the change.`}).option(`since`,{type:`string`,description:`Filter entries changed at or after this timestamp (RFC 3339).`}).option(`before`,{type:`string`,description:`Filter entries changed before this timestamp (RFC 3339).`}).option(`order`,{type:`string`,description:`Sort order for results. Use 'asc' for oldest first or 'desc' for newest first.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`Retrieves account or zone Audit Log`,builder:f(ee),handler:async l=>c({command:`security-insights audit-logs list`,classification:{safeFlags:[`field-changed`,`order`,`dry-run`]}},l,async()=>{let c={per_page:l[`per-page`],cursor:l.cursor,field_changed:l[`field-changed`],changed_by:l[`changed-by`],since:l.since,before:l.before,order:l.order};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/audit-log`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.securityInsights.auditLogs.list({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})},v={command:`audit-logs`,describe:`Operations for audit-logs`,builder:e=>e.command(g).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 security-insights classify <issue-id>
7
7
 
8
- Updates the user classification for a Security Center insight. Valid values are 'false_positive' or 'accept_risk'. To reset, set classification to null. Cannot change directly between classification values - must reset to null first.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`classification`,{type:`string`,description:`User-defined classification for the insight. Can be 'false_positive', 'accept_risk', 'other', or null.`,choices:[`false_positive`,`accept_risk`,`other`]}).option(`rationale`,{type:`string`,description:`Rationale for the classification change. Required when classification is 'accept_risk' or 'other'.`}).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:`classify <issue-id>`,describe:`Updates Security Center Insight Classification`,builder:y,handler:async f=>c({command:`security-insights classify`,classification:{safeFlags:[`classification`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await n():void 0,t=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf security-insights classify`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/${f[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(f[`issue-id`]))}/classification`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r),"issue-id":String(f[`issue-id`]??``)},bodyKind:`json`,body:f.body===void 0?u({classification:d(f.classification,`classification`,`text`),rationale:d(f.rationale,`rationale`,`text`)}):l(f.body)});return}let c=await t(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await i();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body);a(await s(`Updating`,async()=>c.securityInsights.classify({...e,account_or_zone:p,account_or_zone_id:m,issue_id:f[`issue-id`]})),{successLabel:`Updated`});return}let h=u({classification:d(f.classification,`classification`,`text`),rationale:d(f.rationale,`rationale`,`text`)});a(await s(`Updating`,async()=>c.securityInsights.classify({...h,account_or_zone:p,account_or_zone_id:m,issue_id:f[`issue-id`]})),{successLabel:`Updated`})})};function x(e){return e.usage(`$0 security-insights context get <issue-id>
8
+ Updates the user classification for a Security Center insight. Valid values are 'false_positive' or 'accept_risk'. To reset, set classification to null. Cannot change directly between classification values - must reset to null first.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`classification`,{type:`string`,description:`User-defined classification for the insight. Can be 'false_positive', 'accept_risk', 'other', or null.`,choices:[`false_positive`,`accept_risk`,`other`]}).option(`rationale`,{type:`string`,description:`Rationale for the classification change. Required when classification is 'accept_risk' or 'other'.`}).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:`classify <issue-id>`,describe:`Updates Security Center Insight Classification`,builder:y,handler:async f=>c({command:`security-insights classify`,classification:{safeFlags:[`classification`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await n():void 0,t=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf security-insights classify`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/${f[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(f[`issue-id`]))}/classification`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r),"issue-id":String(f[`issue-id`]??``)},bodyKind:`json`,body:f.body===void 0?u({classification:d(f.classification,`classification`,`text`),rationale:d(f.rationale,`rationale`,`text`)}):l(f.body)});return}let c=await t(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await i();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body),t=await s(`Updating`,async()=>c.securityInsights.classify({...e,account_or_zone:p,account_or_zone_id:m,issue_id:f[`issue-id`]}));a(t,{successLabel:`Updated`});return}let h=u({classification:d(f.classification,`classification`,`text`),rationale:d(f.rationale,`rationale`,`text`)}),g=await s(`Updating`,async()=>c.securityInsights.classify({...h,account_or_zone:p,account_or_zone_id:m,issue_id:f[`issue-id`]}));a(g,{successLabel:`Updated`})})};function x(e){return e.usage(`$0 security-insights context get <issue-id>
9
9
 
10
- Returns the full context payload for an insight. This endpoint is used for insights with large payloads that are not included inline in the list response.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <issue-id>`,describe:`Retrieves Security Center Insight Context`,builder:x,handler:async r=>c({command:`security-insights context get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf security-insights context get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/insights/${r[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(r[`issue-id`]))}/context`,pathParams:{"issue-id":String(r[`issue-id`]??``)},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l,a(await s(`Loading`,async()=>c.securityInsights.context.get({account_id:l,issue_id:r[`issue-id`]})),{successLabel:`Loaded`})})},C={command:`context`,describe:`Operations for context`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 security-insights count by-class
10
+ Returns the full context payload for an insight. This endpoint is used for insights with large payloads that are not included inline in the list response.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <issue-id>`,describe:`Retrieves Security Center Insight Context`,builder:x,handler:async r=>c({command:`security-insights context get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf security-insights context get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/security-center/insights/${r[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(r[`issue-id`]))}/context`,pathParams:{"issue-id":String(r[`issue-id`]??``)},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.securityInsights.context.get({account_id:l,issue_id:r[`issue-id`]}));a(u,{successLabel:`Loaded`})})},C={command:`context`,describe:`Operations for context`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 security-insights count by-class
11
11
 
12
- Retrieves Security Center insight counts aggregated by classification class.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`by-class`,describe:`Retrieves Security Center Insight Counts by Class`,builder:f(w),handler:async l=>c({command:`security-insights count by-class`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights count by-class`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/class`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityInsights.count.byClass({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 security-insights count by-partner
12
+ Retrieves Security Center insight counts aggregated by classification class.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`by-class`,describe:`Retrieves Security Center Insight Counts by Class`,builder:f(w),handler:async l=>c({command:`security-insights count by-class`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights count by-class`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/class`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.securityInsights.count.byClass({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 security-insights count by-partner
13
13
 
14
- Retrieves the uncapped count of active, non-dismissed, unclassified RiskRecon insights for the account or zone.`).option(`source`,{type:`string`,description:`Source`,choices:[`riskrecon`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`by-partner`,describe:`Retrieves a Partner Security Center Insight Count`,builder:f(E),handler:async l=>c({command:`security-insights count by-partner`,classification:{safeFlags:[`source`,`dry-run`]}},l,async()=>{let c={source:l.source};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights count by-partner`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/partner-count`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityInsights.count.byPartner({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 security-insights count by-severity
14
+ Retrieves the uncapped count of active, non-dismissed, unclassified RiskRecon insights for the account or zone.`).option(`source`,{type:`string`,description:`Source`,choices:[`riskrecon`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`by-partner`,describe:`Retrieves a Partner Security Center Insight Count`,builder:f(E),handler:async l=>c({command:`security-insights count by-partner`,classification:{safeFlags:[`source`,`dry-run`]}},l,async()=>{let c={source:l.source};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights count by-partner`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/partner-count`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.securityInsights.count.byPartner({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 security-insights count by-severity
15
15
 
16
- Retrieves Security Center insight counts aggregated by severity level (critical, high, medium, low).`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`by-severity`,describe:`Retrieves Security Center Insight Counts by Severity`,builder:f(O),handler:async l=>c({command:`security-insights count by-severity`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights count by-severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/severity`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityInsights.count.bySeverity({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 security-insights count by-type
16
+ Retrieves Security Center insight counts aggregated by severity level (critical, high, medium, low).`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`by-severity`,describe:`Retrieves Security Center Insight Counts by Severity`,builder:f(O),handler:async l=>c({command:`security-insights count by-severity`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights count by-severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/severity`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.securityInsights.count.bySeverity({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 security-insights count by-type
17
17
 
18
- Retrieves Security Center insight counts aggregated by insight type.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`by-type`,describe:`Retrieves Security Center Insight Counts by Type`,builder:f(A),handler:async l=>c({command:`security-insights count by-type`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights count by-type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/type`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityInsights.count.byType({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},M={command:`count`,describe:`Operations for count`,builder:e=>e.command(T).command(D).command(k).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 security-insights dismiss <issue-id>
18
+ Retrieves Security Center insight counts aggregated by insight type.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`by-type`,describe:`Retrieves Security Center Insight Counts by Type`,builder:f(A),handler:async l=>c({command:`security-insights count by-type`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights count by-type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/type`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.securityInsights.count.byType({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})},M={command:`count`,describe:`Operations for count`,builder:e=>e.command(T).command(D).command(k).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 security-insights dismiss <issue-id>
19
19
 
20
- Archives a Security Center insight for an account or zone, removing it from the active insights list while preserving historical data.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dismiss`,{type:`boolean`,description:`The dismiss 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 P={command:`dismiss <issue-id>`,describe:`Archives Security Center Insight`,builder:N,handler:async d=>c({command:`security-insights dismiss`,classification:{safeFlags:[`dismiss`,`dry-run`]}},d,async()=>{if(d.dryRun){let e=d.zone===void 0?await n():void 0,t=d.zone===void 0?`accounts`:`zones`,r=d.zone??e??`<account-id>`;o({command:`cf security-insights dismiss`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/${d[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(d[`issue-id`]))}/dismiss`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r),"issue-id":String(d[`issue-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({dismiss:d.dismiss}):l(d.body)});return}let c=await t(d),f=d.zone===void 0?`accounts`:`zones`,p=f===`zones`?await r({zone:d.zone},c,{quiet:d.quiet}):d.local?e:await i();if(f===`zones`?d.zoneId=p:d.accountId=p,d.body){let e=l(d.body);a(await s(`Updating`,async()=>c.securityInsights.dismiss({...e,account_or_zone:f,account_or_zone_id:p,issue_id:d[`issue-id`]})),{successLabel:`Updated`});return}let m=u({dismiss:d.dismiss});a(await s(`Updating`,async()=>c.securityInsights.dismiss({...m,account_or_zone:f,account_or_zone_id:p,issue_id:d[`issue-id`]})),{successLabel:`Updated`})})};function F(e){return e.usage(`$0 security-insights list
20
+ Archives a Security Center insight for an account or zone, removing it from the active insights list while preserving historical data.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dismiss`,{type:`boolean`,description:`The dismiss 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 P={command:`dismiss <issue-id>`,describe:`Archives Security Center Insight`,builder:N,handler:async d=>c({command:`security-insights dismiss`,classification:{safeFlags:[`dismiss`,`dry-run`]}},d,async()=>{if(d.dryRun){let e=d.zone===void 0?await n():void 0,t=d.zone===void 0?`accounts`:`zones`,r=d.zone??e??`<account-id>`;o({command:`cf security-insights dismiss`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/${d[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(d[`issue-id`]))}/dismiss`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r),"issue-id":String(d[`issue-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({dismiss:d.dismiss}):l(d.body)});return}let c=await t(d),f=d.zone===void 0?`accounts`:`zones`,p=f===`zones`?await r({zone:d.zone},c,{quiet:d.quiet}):d.local?e:await i();if(f===`zones`?d.zoneId=p:d.accountId=p,d.body){let e=l(d.body),t=await s(`Updating`,async()=>c.securityInsights.dismiss({...e,account_or_zone:f,account_or_zone_id:p,issue_id:d[`issue-id`]}));a(t,{successLabel:`Updated`});return}let m=u({dismiss:d.dismiss}),h=await s(`Updating`,async()=>c.securityInsights.dismiss({...m,account_or_zone:f,account_or_zone_id:p,issue_id:d[`issue-id`]}));a(h,{successLabel:`Updated`})})};function F(e){return e.usage(`$0 security-insights list
21
21
 
22
- Lists all Security Center insights for the account or zone, showing security findings and recommendations.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`list`,describe:`Retrieves Security Center Insights`,builder:f(F),handler:async l=>c({command:`security-insights list`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject,page:l.page,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.securityInsights.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 security-insights partners settings get <partner>
22
+ Lists all Security Center insights for the account or zone, showing security findings and recommendations.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`Retrieves Security Center Insights`,builder:f(F),handler:async l=>c({command:`security-insights list`,classification:{safeFlags:[`dismissed`,`dry-run`]}},l,async()=>{let c={dismissed:l.dismissed,issue_class:l[`issue-class`],issue_type:l[`issue-type`],product:l.product,source:l.source,severity:l.severity,subject:l.subject,page:l.page,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.securityInsights.list({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})};function te(e){return e.usage(`$0 security-insights partners settings get <partner>
23
23
 
24
- Returns whether the account has enabled the selected partner integration. An integration that has never been configured is returned as disabled.`).positional(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <partner>`,describe:`Retrieves Partner Integration Settings`,builder:f(I),handler:async r=>c({command:`security-insights partners settings get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf security-insights partners settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/partners/${r.partner==null?`<partner>`:encodeURIComponent(String(r.partner))}/settings`,pathParams:{partner:String(r.partner??``)},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l,a(await s(`Loading`,async()=>c.securityInsights.partners.settings.get({account_id:l,partner:r.partner})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 security-insights partners settings update <partner>
24
+ Returns whether the account has enabled the selected partner integration. An integration that has never been configured is returned as disabled.`).positional(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <partner>`,describe:`Retrieves Partner Integration Settings`,builder:f(te),handler:async r=>c({command:`security-insights partners settings get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf security-insights partners settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/security-center/partners/${r.partner==null?`<partner>`:encodeURIComponent(String(r.partner))}/settings`,pathParams:{partner:String(r.partner??``)},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.securityInsights.partners.settings.get({account_id:l,partner:r.partner}));a(u,{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 security-insights partners settings update <partner>
25
25
 
26
- Enables or disables the selected partner integration for the account. Enabling the integration for the first time also schedules an account scan for that partner.`).positional(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether the partner integration is enabled for the account.`}).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 z={command:`update <partner>`,describe:`Updates Partner Integration Settings`,builder:f(R),handler:async r=>c({command:`security-insights partners settings update`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf security-insights partners settings update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/partners/${r.partner==null?`<partner>`:encodeURIComponent(String(r.partner))}/settings`,pathParams:{partner:String(r.partner??``)},bodyKind:`json`,body:r.body===void 0?u({enabled:r.enabled}):l(r.body)});return}let c=await t(r),d=r.local?e:await i();if(r.accountId=d,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.securityInsights.partners.settings.update({body:e,account_id:d,partner:r.partner})),{successLabel:`Created`});return}if(r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let f=u({enabled:r.enabled});a(await s(`Creating`,async()=>c.securityInsights.partners.settings.update({body:f,account_id:d,partner:r.partner})),{successLabel:`Created`})})},B={command:`settings`,describe:`Operations for partners.settings`,builder:e=>e.command(L).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 security-insights partners shadow-hosts list
26
+ Enables or disables the selected partner integration for the account. Enabling the integration for the first time also schedules an account scan for that partner.`).positional(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether the partner integration is enabled for the account.`}).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 z={command:`update <partner>`,describe:`Updates Partner Integration Settings`,builder:f(R),handler:async r=>c({command:`security-insights partners settings update`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf security-insights partners settings update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/security-center/partners/${r.partner==null?`<partner>`:encodeURIComponent(String(r.partner))}/settings`,pathParams:{partner:String(r.partner??``)},bodyKind:`json`,body:r.body===void 0?u({enabled:r.enabled}):l(r.body)});return}let c=await t(r),d=r.local?e:await i();if(r.accountId=d,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.securityInsights.partners.settings.update({body:e,account_id:d,partner:r.partner}));a(t,{successLabel:`Created`});return}if(r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let f=u({enabled:r.enabled}),p=await s(`Creating`,async()=>c.securityInsights.partners.settings.update({body:f,account_id:d,partner:r.partner}));a(p,{successLabel:`Created`})})},B={command:`settings`,describe:`Operations for partners.settings`,builder:e=>e.command(L).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 security-insights partners shadow-hosts list
27
27
 
28
- Lists partner-discovered hosts beneath the zone that are not in the account.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for premium partner asset results.`}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`Lists Partner-Discovered Shadow Hosts for a Zone`,builder:V,handler:async e=>c({command:`security-insights partners shadow-hosts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){o({command:`cf security-insights partners shadow-hosts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/partners/${e.partner==null?`<partner>`:encodeURIComponent(String(e.partner))}/shadow-hosts`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),partner:String(e.partner??``)},query:n,bodyKind:`none`});return}let i=await t(e);e.zoneId=await r({zone:e.zone},i,{quiet:e.quiet});let a=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();p((await s(`Loading`,async()=>m(`/zones/${e.zoneId}/security-center/partners/${encodeURIComponent(String(e.partner))}/shadow-hosts${a?`?`+a:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}))).toString(`utf-8`))})},U={command:`shadow-hosts`,describe:`Operations for partners.shadow-hosts`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 security-insights partners shadow-zone-hosts list
28
+ Lists partner-discovered hosts beneath the zone that are not in the account.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for premium partner asset results.`}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`Lists Partner-Discovered Shadow Hosts for a Zone`,builder:V,handler:async e=>c({command:`security-insights partners shadow-hosts list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){o({command:`cf security-insights partners shadow-hosts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/partners/${e.partner==null?`<partner>`:encodeURIComponent(String(e.partner))}/shadow-hosts`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),partner:String(e.partner??``)},query:n,bodyKind:`none`});return}let i=await t(e);e.zoneId=await r({zone:e.zone},i,{quiet:e.quiet});let a=new URLSearchParams(Object.entries(n).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),c=await s(`Loading`,async()=>m(`/zones/${e.zoneId}/security-center/partners/${encodeURIComponent(String(e.partner))}/shadow-hosts${a?`?`+a:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));p(c.toString(`utf-8`))})},U={command:`shadow-hosts`,describe:`Operations for partners.shadow-hosts`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 security-insights partners shadow-zone-hosts list
29
29
 
30
- Lists hosts discovered beneath a shadow-zone domain. This endpoint is available only to premium accounts and supports JSON and CSV output.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`domain`,{type:`string`,description:`The shadow-zone domain.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for premium partner asset results.`}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`Lists Hosts in a Partner-Discovered Shadow Zone`,builder:W,handler:async r=>c({command:`security-insights partners shadow-zone-hosts list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let a={page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf security-insights partners shadow-zone-hosts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/partners/${r.partner==null?`<partner>`:encodeURIComponent(String(r.partner))}/shadow-zones/${r.domain==null?`<domain>`:encodeURIComponent(String(r.domain))}/hosts`,pathParams:{partner:String(r.partner??``),domain:String(r.domain??``)},query:a,bodyKind:`none`});return}await t(r);let c=r.local?e:await i();r.accountId=c;let l=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();p((await s(`Loading`,async()=>m(`/accounts/${c}/security-center/partners/${encodeURIComponent(String(r.partner))}/shadow-zones/${encodeURIComponent(String(r.domain))}/hosts${l?`?`+l:``}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}))).toString(`utf-8`))})},K={command:`shadow-zone-hosts`,describe:`Operations for partners.shadow-zone-hosts`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.usage(`$0 security-insights partners shadow-zones list
30
+ Lists hosts discovered beneath a shadow-zone domain. This endpoint is available only to premium accounts and supports JSON and CSV output.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`domain`,{type:`string`,description:`The shadow-zone domain.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for premium partner asset results.`}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`Lists Hosts in a Partner-Discovered Shadow Zone`,builder:W,handler:async r=>c({command:`security-insights partners shadow-zone-hosts list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let a={page:r.page,per_page:r[`per-page`]};if(r.dryRun){let e=await n();o({command:`cf security-insights partners shadow-zone-hosts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/security-center/partners/${r.partner==null?`<partner>`:encodeURIComponent(String(r.partner))}/shadow-zones/${r.domain==null?`<domain>`:encodeURIComponent(String(r.domain))}/hosts`,pathParams:{partner:String(r.partner??``),domain:String(r.domain??``)},query:a,bodyKind:`none`});return}await t(r);let c=r.local?e:await i();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()=>m(`/accounts/${c}/security-center/partners/${encodeURIComponent(String(r.partner))}/shadow-zones/${encodeURIComponent(String(r.domain))}/hosts${l?`?`+l:``}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));p(u.toString(`utf-8`))})},K={command:`shadow-zone-hosts`,describe:`Operations for partners.shadow-zone-hosts`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.usage(`$0 security-insights partners shadow-zones list
31
31
 
32
- Lists domains discovered by the selected partner that are not in the account. Baseline accounts receive the total count only; premium accounts receive paginated items and may request CSV output.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for premium partner asset results.`}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`Lists Partner-Discovered Shadow Zones`,builder:q,handler:async r=>c({command:`security-insights partners shadow-zones list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let a={page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf security-insights partners shadow-zones list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/partners/${r.partner==null?`<partner>`:encodeURIComponent(String(r.partner))}/shadow-zones`,pathParams:{partner:String(r.partner??``)},query:a,bodyKind:`none`});return}await t(r);let c=r.local?e:await i();r.accountId=c;let l=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();p((await s(`Loading`,async()=>m(`/accounts/${c}/security-center/partners/${encodeURIComponent(String(r.partner))}/shadow-zones${l?`?`+l:``}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}))).toString(`utf-8`))})},Y={command:`shadow-zones`,describe:`Operations for partners.shadow-zones`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},X={command:`partners`,describe:`Operations for partners`,builder:e=>e.command(B).command(U).command(K).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Z(e){return e.usage(`$0 security-insights scans list
32
+ Lists domains discovered by the selected partner that are not in the account. Baseline accounts receive the total count only; premium accounts receive paginated items and may request CSV output.`).option(`partner`,{type:`string`,description:`The partner integration identifier.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number for premium partner asset results.`}).option(`per-page`,{type:`number`,description:`Number of premium partner asset results per page. Values other than 1 must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`Lists Partner-Discovered Shadow Zones`,builder:q,handler:async r=>c({command:`security-insights partners shadow-zones list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let a={page:r.page,per_page:r[`per-page`]};if(r.dryRun){let e=await n();o({command:`cf security-insights partners shadow-zones list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/security-center/partners/${r.partner==null?`<partner>`:encodeURIComponent(String(r.partner))}/shadow-zones`,pathParams:{partner:String(r.partner??``)},query:a,bodyKind:`none`});return}await t(r);let c=r.local?e:await i();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()=>m(`/accounts/${c}/security-center/partners/${encodeURIComponent(String(r.partner))}/shadow-zones${l?`?`+l:``}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));p(u.toString(`utf-8`))})},Y={command:`shadow-zones`,describe:`Operations for partners.shadow-zones`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},X={command:`partners`,describe:`Operations for partners`,builder:e=>e.command(B).command(U).command(K).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Z(e){return e.usage(`$0 security-insights scans list
33
33
 
34
- Returns the most recent on-demand scans for the account or zone, up to a maximum of 5. Each scan includes its ID, start time, and current status. This includes both account or zone-wide and zone-scoped scans. Also returns quota information showing how many scans have been used and how many remain in the current 24-hour window.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`list`,describe:`Get Recent account or zone Scans`,builder:Z,handler:async l=>c({command:`security-insights scans list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/scans`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.securityInsights.scans.list({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})};function ne(e){return e.usage(`$0 security-insights scans start
34
+ Returns the most recent on-demand scans for the account or zone, up to a maximum of 5. Each scan includes its ID, start time, and current status. This includes both account or zone-wide and zone-scoped scans. Also returns quota information showing how many scans have been used and how many remain in the current 24-hour window.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`list`,describe:`Get Recent account or zone Scans`,builder:Z,handler:async l=>c({command:`security-insights scans list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf security-insights scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/scans`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.securityInsights.scans.list({account_or_zone:u,account_or_zone_id:d}));a(f,{successLabel:`Loaded`})})};function ne(e){return e.usage(`$0 security-insights scans start
35
35
 
36
- Initiates an on-demand security scan for the entire account or zone, scanning all zones associated with the account or zone. Rate limited to 5 scans per account or zone per 24-hour window.`).option(`issue-type`,{type:`string`,description:`The issue_type field`,choices:[`compliance_violation`,`email_security`,`exposed_infrastructure`,`insecure_configuration`,`weak_authentication`,`configuration_suggestion`]}).option(`issue-class`,{type:`string`,description:`The issue_class field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for starting an on-demand scan. Specify issue_type or issue_class to scope the scan, or provide an empty object to scan all issue types.`}).conflicts(`issue-type`,[`issue-class`]).conflicts(`issue-class`,[`issue-type`])}const re={command:`start`,describe:`Start On-Demand account or zone Scan`,builder:ne,handler:async f=>c({command:`security-insights scans start`,classification:{safeFlags:[`issue-type`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await n():void 0,t=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf security-insights scans start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/scans`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:f.body===void 0?u({issue_type:d(f[`issue-type`],`issue-type`,`text`),issue_class:d(f[`issue-class`],`issue-class`,`text`)}):l(f.body)});return}let c=await t(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await i();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body);a(await s(`Creating`,async()=>c.securityInsights.scans.start({body:e,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`});return}let h=u({issue_type:d(f[`issue-type`],`issue-type`,`text`),issue_class:d(f[`issue-class`],`issue-class`,`text`)});a(await s(`Creating`,async()=>c.securityInsights.scans.start({body:h,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`})})},ie={command:`scans`,describe:`Operations for scans`,builder:e=>e.command(Q).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.usage(`$0 security-insights state get
36
+ Initiates an on-demand security scan for the entire account or zone, scanning all zones associated with the account or zone. Rate limited to 5 scans per account or zone per 24-hour window.`).option(`issue-type`,{type:`string`,description:`The issue_type field`,choices:[`compliance_violation`,`email_security`,`exposed_infrastructure`,`insecure_configuration`,`weak_authentication`,`configuration_suggestion`]}).option(`issue-class`,{type:`string`,description:`The issue_class field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for starting an on-demand scan. Specify issue_type or issue_class to scope the scan, or provide an empty object to scan all issue types.`}).conflicts(`issue-type`,[`issue-class`]).conflicts(`issue-class`,[`issue-type`])}const re={command:`start`,describe:`Start On-Demand account or zone Scan`,builder:ne,handler:async f=>c({command:`security-insights scans start`,classification:{safeFlags:[`issue-type`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await n():void 0,t=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf security-insights scans start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/security-center/insights/scans`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:f.body===void 0?u({issue_type:d(f[`issue-type`],`issue-type`,`text`),issue_class:d(f[`issue-class`],`issue-class`,`text`)}):l(f.body)});return}let c=await t(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await i();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body),t=await s(`Creating`,async()=>c.securityInsights.scans.start({body:e,account_or_zone:p,account_or_zone_id:m}));a(t,{successLabel:`Created`});return}let h=u({issue_type:d(f[`issue-type`],`issue-type`,`text`),issue_class:d(f[`issue-class`],`issue-class`,`text`)}),g=await s(`Creating`,async()=>c.securityInsights.scans.start({body:h,account_or_zone:p,account_or_zone_id:m}));a(g,{successLabel:`Created`})})},ie={command:`scans`,describe:`Operations for scans`,builder:e=>e.command(Q).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.usage(`$0 security-insights state get
37
37
 
38
- Returns account-level Security Center state: whether scans are enabled for the account and whether the account was recently reactivated from a dormant state.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get`,describe:`Retrieves Account State`,builder:ae,handler:async r=>c({command:`security-insights state get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf security-insights state get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/state`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l,a(await s(`Loading`,async()=>c.securityInsights.state.get({account_id:l})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 security-insights state update
38
+ Returns account-level Security Center state: whether scans are enabled for the account and whether the account was recently reactivated from a dormant state.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get`,describe:`Retrieves Account State`,builder:ae,handler:async r=>c({command:`security-insights state get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf security-insights state get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/security-center/state`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.securityInsights.state.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 security-insights state update
39
39
 
40
- Updates account-level Security Center state. Currently supports enabling or disabling scans for the account. Returns the account's state after the update.`).option(`scans-enabled`,{type:`boolean`,description:`Enable or disable scans for the account.`}).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 se={command:`update`,describe:`Updates Account State`,builder:$,handler:async r=>c({command:`security-insights state update`,classification:{safeFlags:[`scans-enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf security-insights state update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/state`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({scans_enabled:r[`scans-enabled`]}):l(r.body)});return}let c=await t(r),d=r.local?e:await i();if(r.accountId=d,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.securityInsights.state.update({...e,account_id:d})),{successLabel:`Updated`});return}if(r[`scans-enabled`]===void 0)throw Error(`--scans-enabled is required (or pass --body with this field set).`);let f=u({scans_enabled:r[`scans-enabled`]});a(await s(`Updating`,async()=>c.securityInsights.state.update({...f,account_id:d})),{successLabel:`Updated`})})},ce={command:`state`,describe:`Operations for state`,builder:e=>e.command(oe).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},le={command:`security-insights`,describe:`security-insights`,builder:e=>e.command(b).command(P).command(te).command(v).command(C).command(M).command(X).command(ie).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{le as default};
40
+ Updates account-level Security Center state. Currently supports enabling or disabling scans for the account. Returns the account's state after the update.`).option(`scans-enabled`,{type:`boolean`,description:`Enable or disable scans for the account.`}).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 se={command:`update`,describe:`Updates Account State`,builder:$,handler:async r=>c({command:`security-insights state update`,classification:{safeFlags:[`scans-enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf security-insights state update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/security-center/state`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({scans_enabled:r[`scans-enabled`]}):l(r.body)});return}let c=await t(r),d=r.local?e:await i();if(r.accountId=d,r.body){let e=l(r.body),t=await s(`Updating`,async()=>c.securityInsights.state.update({...e,account_id:d}));a(t,{successLabel:`Updated`});return}if(r[`scans-enabled`]===void 0)throw Error(`--scans-enabled is required (or pass --body with this field set).`);let f=u({scans_enabled:r[`scans-enabled`]}),p=await s(`Updating`,async()=>c.securityInsights.state.update({...f,account_id:d}));a(p,{successLabel:`Updated`})})},ce={command:`state`,describe:`Operations for state`,builder:e=>e.command(oe).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},le={command:`security-insights`,describe:`security-insights`,builder:e=>e.command(b).command(P).command(I).command(v).command(C).command(M).command(X).command(ie).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{le as default};
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-Br-t8vL_.mjs";import{i as t}from"./context-CquYYyS3.mjs";import{t as n}from"./output-ClYel9WX.mjs";import{t as r}from"./dry-run-p9Q7nMZ5.mjs";import{t as i}from"./progress-TLUEIYE6.mjs";import{t as a}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as o,t as s}from"./body-parser-NjzJZMOV.mjs";import{n as c}from"./input-validation-0CeePPHp.mjs";import{n as l}from"./prompt-Ck_1PCHm.mjs";function u(e){return e.usage(`$0 security-txt delete
2
+ import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{n as l}from"./prompt-F5wxc8zq.mjs";function u(e){return e.usage(`$0 security-txt delete
3
3
 
4
4
  Removes the security.txt file configuration for a zone. The /.well-known/security.txt endpoint will no longer be served.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const d={command:`delete`,describe:`Deletes security.txt`,builder:u,handler:async o=>a({command:`security-txt delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf security-txt delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/security-center/securitytxt`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await l({force:!!o.force})){process.stderr.write(`Aborted.
5
- `);return}n(await i(`Deleting`,async()=>a.securityTxt.delete({zone_id:s})),{successLabel:`Deleted`})})};function f(e){return e.usage(`$0 security-txt get
5
+ `);return}let c=await i(`Deleting`,async()=>a.securityTxt.delete({zone_id:s}));n(c,{successLabel:`Deleted`})})};function f(e){return e.usage(`$0 security-txt get
6
6
 
7
- Retrieves the current security.txt file configuration for a zone, used for security vulnerability reporting.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Retrieves security.txt`,builder:f,handler:async o=>a({command:`security-txt get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf security-txt get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/security-center/securitytxt`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.securityTxt.get({zone_id:s})),{successLabel:`Loaded`})})};function m(e){return e.usage(`$0 security-txt update
7
+ Retrieves the current security.txt file configuration for a zone, used for security vulnerability reporting.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`get`,describe:`Retrieves security.txt`,builder:f,handler:async o=>a({command:`security-txt get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf security-txt get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/security-center/securitytxt`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.securityTxt.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function m(e){return e.usage(`$0 security-txt update
8
8
 
9
- Updates the security.txt file configuration for a zone, which provides security researchers with vulnerability reporting information.`).option(`acknowledgments`,{type:`string`,array:!0,description:`The acknowledgments field`}).option(`canonical`,{type:`string`,array:!0,description:`The canonical field`}).option(`contact`,{type:`string`,array:!0,description:`The contact field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`encryption`,{type:`string`,array:!0,description:`The encryption field`}).option(`expires`,{type:`string`,description:`The expires field`}).option(`hiring`,{type:`string`,array:!0,description:`The hiring field`}).option(`policy`,{type:`string`,array:!0,description:`The policy field`}).option(`preferred-languages`,{type:`string`,description:`The preferred_languages field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`update`,describe:`Updates security.txt`,builder:m,handler:async l=>a({command:`security-txt update`,classification:{safeFlags:[`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf security-txt update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/security-center/securitytxt`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({acknowledgments:l.acknowledgments,canonical:l.canonical,contact:l.contact,enabled:l.enabled,encryption:l.encryption,expires:c(l.expires,`expires`,`text`),hiring:l.hiring,policy:l.policy,preferred_languages:c(l[`preferred-languages`],`preferred-languages`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.securityTxt.update({body:e,zone_id:u})),{successLabel:`Updated`});return}let d=s({acknowledgments:l.acknowledgments,canonical:l.canonical,contact:l.contact,enabled:l.enabled,encryption:l.encryption,expires:c(l.expires,`expires`,`text`),hiring:l.hiring,policy:l.policy,preferred_languages:c(l[`preferred-languages`],`preferred-languages`,`text`)});n(await i(`Updating`,async()=>a.securityTxt.update({body:d,zone_id:u})),{successLabel:`Updated`})})},g={command:`security-txt`,describe:`Manage the /.well-known/security.txt file that tells security researchers how to report vulnerabilities`,builder:e=>e.command(d).command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
9
+ Updates the security.txt file configuration for a zone, which provides security researchers with vulnerability reporting information.`).option(`acknowledgments`,{type:`string`,array:!0,description:`The acknowledgments field`}).option(`canonical`,{type:`string`,array:!0,description:`The canonical field`}).option(`contact`,{type:`string`,array:!0,description:`The contact field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`encryption`,{type:`string`,array:!0,description:`The encryption field`}).option(`expires`,{type:`string`,description:`The expires field`}).option(`hiring`,{type:`string`,array:!0,description:`The hiring field`}).option(`policy`,{type:`string`,array:!0,description:`The policy field`}).option(`preferred-languages`,{type:`string`,description:`The preferred_languages field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`update`,describe:`Updates security.txt`,builder:m,handler:async l=>a({command:`security-txt update`,classification:{safeFlags:[`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf security-txt update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/security-center/securitytxt`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({acknowledgments:l.acknowledgments,canonical:l.canonical,contact:l.contact,enabled:l.enabled,encryption:l.encryption,expires:c(l.expires,`expires`,`text`),hiring:l.hiring,policy:l.policy,preferred_languages:c(l[`preferred-languages`],`preferred-languages`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.securityTxt.update({body:e,zone_id:u}));n(t,{successLabel:`Updated`});return}let d=s({acknowledgments:l.acknowledgments,canonical:l.canonical,contact:l.contact,enabled:l.enabled,encryption:l.encryption,expires:c(l.expires,`expires`,`text`),hiring:l.hiring,policy:l.policy,preferred_languages:c(l[`preferred-languages`],`preferred-languages`,`text`)}),f=await i(`Updating`,async()=>a.securityTxt.update({body:d,zone_id:u}));n(f,{successLabel:`Updated`})})},g={command:`security-txt`,describe:`Manage the /.well-known/security.txt file that tells security researchers how to report vulnerabilities`,builder:e=>e.command(d).command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{o as t}from"./chunk-FT2NMTJB-BFqlGcem.mjs";import{t as n}from"./banner-Xk4xBN8U.mjs";let r=!1,i=!1,a=!1;function o(e,t={}){if(!(r||i)){if(t.quiet||!process.stderr.isTTY){i=!0;return}process.stderr.write(`${n(e,t.update)}\n`),r=!0}}function s(n){!r||i||a||n===`default`||t({allowGlobalAuthKey:!1})!==void 0||(process.stderr.write(`${e.muted(`Active profile:`)} ${e.info(n)}\n`),a=!0)}export{s as n,o as t};
2
+ import{r as e}from"./theme-CQ_TYifs.mjs";import{o as t}from"./chunk-FT2NMTJB-DQ7s3x7Q.mjs";import{t as n}from"./banner-D03JEqRs.mjs";let r=!1,i=!1,a=!1;function o(e,t={}){if(!(r||i)){if(t.quiet||!process.stderr.isTTY){i=!0;return}process.stderr.write(`${n(e,t.update)}\n`),r=!0}}function s(n){!r||i||a||n==="default"||t({allowGlobalAuthKey:!1})!==void 0||(process.stderr.write(`${e.muted(`Active profile:`)} ${e.info(n)}\n`),a=!0)}export{s as n,o as t};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./theme-CQ_TYifs.mjs";import{r as t}from"./dotenv-DpXaxfho.mjs";import{G as n,nt as r,q as i}from"./dist-CYFkGHYv.mjs";import"./ui-YmjF66Ct.mjs";import{n as a}from"./dist-8rP3V95o.mjs";import{t as o}from"./context-Bwkz4Lm_.mjs";import{_ as s,d as c,f as l,t as u}from"./deploy-context-Cfushp8j.mjs";import{t as d}from"./auth-token-CtguMdmF.mjs";import{c as f,i as p,l as m,t as h}from"./containers-DRzgE46U.mjs";import{a as g,i as _,n as v,o as y,r as b}from"./build-BKPVP5ip.mjs";import{i as x,n as S,t as C}from"./deploy-input-BAhS5LYx.mjs";import{readBuildOutput as w}from"@cloudflare/build-output-utils";function T(e){return e.option(`prebuilt`,{type:`boolean`,description:`Deploy existing Build Output Specification files without building`,default:!1}).option(`tag`,{type:`string`,description:`A tag to associate with this Worker Version`,requiresArg:!0}).option(`message`,{type:`string`,description:`A message to associate with this Worker Version`,requiresArg:!0}).option(`secrets-file`,{type:`string`,description:`Path to a file containing secrets to upload with the version (JSON or .env format)`,requiresArg:!0}).option(`dry-run`,{describe:`Build a project and run checks without actually uploading the Worker`,type:`boolean`,default:!1}).option(`worker`,b)}async function E(e,n){return e.prebuilt||(await v(e.mode,{worker:e.worker}),a.message(``,{spacing:0})),t(e,()=>D(e,n))}async function D(t,v){let{workers:b,rootConfig:T,containers:E}=await w(process.cwd());if(T.buildContext.isPreview){let e=[`cf previews deploy`,...t.prebuilt?[`--prebuilt`]:[],...T.buildContext.mode===void 0?[]:[`--mode`,T.buildContext.mode]].join(` `);throw Error(`This build output is for a Preview. Run ${e} instead.`)}y(t.mode,T.buildContext.mode);let D=g(b,t.worker),{wranglerConfig:O,builtConfig:k}=_(D,T),A=C(D,k),j=t[`dry-run`]?``:await d(),M=t[`dry-run`]?void 0:T.accountId??await o({skipProjectSettings:!0,complianceRegion:i(O)}),N=u(j);m(N),s({logger:N.logger,fetchResult:N.fetchResult,fetchPagedListResult:N.fetchPagedListResult}),M!==void 0&&E.length>0&&l(M,j,n(O));let P=h(E,O,{accountId:M,containersRollout:t[`containers-rollout`]}),F;if(v.command===`Deploy`){let n=S(D,O,M,t,P);a.message(e.bold(`Deploy`),{symbol:e.muted(`├`),spacing:0}),{versionId:F}=await p(n,O,A,{syncWorkersSite:void 0,analyseBundle:void 0})}else{let n=x(D,O,M,t,P);a.message(e.bold(`Upload`),{symbol:e.muted(`├`),spacing:0}),{versionId:F}=await f(n,O,A,{analyseBundle:void 0})}F!==null&&!t[`dry-run`]&&(v.command!==`Deploy`||t[`containers-rollout`]!==`none`)&&await c([...v.command===`Deploy`?P.standard.builtImages:[],...P.durableObjects.builtImages],r()),a.success(t[`dry-run`]?`Dry run complete`:`${v.command} complete`)}export{T as n,E as t};
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./auth-Br-t8vL_.mjs";import{i as t}from"./context-CquYYyS3.mjs";import{t as n}from"./output-ClYel9WX.mjs";import{t as r}from"./dry-run-p9Q7nMZ5.mjs";import{t as i}from"./progress-TLUEIYE6.mjs";import{t as a}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as o,r as s,t as c}from"./body-parser-NjzJZMOV.mjs";import{n as l}from"./input-validation-0CeePPHp.mjs";import{a as u,n as d}from"./prompt-Ck_1PCHm.mjs";function f(e){return e.usage(`$0 smart-shield cache-reserve-clear clear
2
+ import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,n as d}from"./prompt-F5wxc8zq.mjs";function f(e){return e.usage(`$0 smart-shield cache-reserve-clear clear
3
3
 
4
4
  You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).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 p={command:`clear`,describe:`Start Cache Reserve Clear`,builder:f,handler:async o=>a({command:`smart-shield cache-reserve-clear clear`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf smart-shield cache-reserve-clear clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`})){process.stderr.write(`Aborted.
5
- `);return}n(await i(`Deleting`,async()=>a.smartShield.cacheReserveClear.clear({zone_id:s})),{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 smart-shield cache-reserve-clear status
5
+ `);return}let c=await i(`Deleting`,async()=>a.smartShield.cacheReserveClear.clear({zone_id:s}));n(c,{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 smart-shield cache-reserve-clear status
6
6
 
7
- You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`status`,describe:`Get Cache Reserve Clear`,builder:m,handler:async o=>a({command:`smart-shield cache-reserve-clear status`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf smart-shield cache-reserve-clear status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.smartShield.cacheReserveClear.status({zone_id:s})),{successLabel:`Loaded`})})},g={command:`cache-reserve-clear`,describe:`Cache Reserve Clear operations`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 smart-shield get
7
+ You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`status`,describe:`Get Cache Reserve Clear`,builder:m,handler:async o=>a({command:`smart-shield cache-reserve-clear status`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf smart-shield cache-reserve-clear status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.smartShield.cacheReserveClear.status({zone_id:s}));n(c,{successLabel:`Loaded`})})},g={command:`cache-reserve-clear`,describe:`Cache Reserve Clear operations`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 smart-shield get
8
8
 
9
- Retrieve Smart Shield Settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Get Smart Shield Settings`,builder:_,handler:async o=>a({command:`smart-shield get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf smart-shield get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.smartShield.get({zone_id:s})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 smart-shield health-checks create
9
+ Retrieve Smart Shield Settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Get Smart Shield Settings`,builder:_,handler:async o=>a({command:`smart-shield get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf smart-shield get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.smartShield.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 smart-shield health-checks create
10
10
 
11
- Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create`,describe:`Create Health Check`,builder:y,handler:async s=>a({command:`smart-shield health-checks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf smart-shield health-checks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({address:l(s.address,`address`,`text`),check_regions:s[`check-regions`],consecutive_fails:s[`consecutive-fails`],consecutive_successes:s[`consecutive-successes`],description:l(s.description,`description`,`text`),http_config:{allow_insecure:s[`http-config-allow-insecure`],expected_body:l(s[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:s[`http-config-expected-codes`],follow_redirects:s[`http-config-follow-redirects`],method:l(s[`http-config-method`],`http-config-method`,`text`),path:l(s[`http-config-path`],`http-config-path`,`text`),port:s[`http-config-port`]},interval:s.interval,name:l(s.name,`name`,`text`),retries:s.retries,suspended:s.suspended,tcp_config:{method:l(s[`tcp-config-method`],`tcp-config-method`,`text`),port:s[`tcp-config-port`]},timeout:s.timeout,type:l(s.type,`type`,`text`)}):o(s.body)});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body);n(await i(`Creating`,async()=>a.smartShield.healthChecks.create({body:e,zone_id:d})),{successLabel:`Created`});return}s.address===void 0&&(s.address=await u(`address`,`The hostname or IP address of the origin server to run health checks on.`)),s.name===void 0&&(s.name=await u(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=c({address:l(s.address,`address`,`text`),check_regions:s[`check-regions`],consecutive_fails:s[`consecutive-fails`],consecutive_successes:s[`consecutive-successes`],description:l(s.description,`description`,`text`),http_config:{allow_insecure:s[`http-config-allow-insecure`],expected_body:l(s[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:s[`http-config-expected-codes`],follow_redirects:s[`http-config-follow-redirects`],method:l(s[`http-config-method`],`http-config-method`,`text`),path:l(s[`http-config-path`],`http-config-path`,`text`),port:s[`http-config-port`]},interval:s.interval,name:l(s.name,`name`,`text`),retries:s.retries,suspended:s.suspended,tcp_config:{method:l(s[`tcp-config-method`],`tcp-config-method`,`text`),port:s[`tcp-config-port`]},timeout:s.timeout,type:l(s.type,`type`,`text`)});n(await i(`Creating`,async()=>a.smartShield.healthChecks.create({body:f,zone_id:d})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 smart-shield health-checks delete <healthcheck-id>
11
+ Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create`,describe:`Create Health Check`,builder:y,handler:async s=>a({command:`smart-shield health-checks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf smart-shield health-checks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({address:l(s.address,`address`,`text`),check_regions:s[`check-regions`],consecutive_fails:s[`consecutive-fails`],consecutive_successes:s[`consecutive-successes`],description:l(s.description,`description`,`text`),http_config:{allow_insecure:s[`http-config-allow-insecure`],expected_body:l(s[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:s[`http-config-expected-codes`],follow_redirects:s[`http-config-follow-redirects`],method:l(s[`http-config-method`],`http-config-method`,`text`),path:l(s[`http-config-path`],`http-config-path`,`text`),port:s[`http-config-port`]},interval:s.interval,name:l(s.name,`name`,`text`),retries:s.retries,suspended:s.suspended,tcp_config:{method:l(s[`tcp-config-method`],`tcp-config-method`,`text`),port:s[`tcp-config-port`]},timeout:s.timeout,type:l(s.type,`type`,`text`)}):o(s.body)});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Creating`,async()=>a.smartShield.healthChecks.create({body:e,zone_id:d}));n(t,{successLabel:`Created`});return}s.address===void 0&&(s.address=await u(`address`,`The hostname or IP address of the origin server to run health checks on.`)),s.name===void 0&&(s.name=await u(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=c({address:l(s.address,`address`,`text`),check_regions:s[`check-regions`],consecutive_fails:s[`consecutive-fails`],consecutive_successes:s[`consecutive-successes`],description:l(s.description,`description`,`text`),http_config:{allow_insecure:s[`http-config-allow-insecure`],expected_body:l(s[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:s[`http-config-expected-codes`],follow_redirects:s[`http-config-follow-redirects`],method:l(s[`http-config-method`],`http-config-method`,`text`),path:l(s[`http-config-path`],`http-config-path`,`text`),port:s[`http-config-port`]},interval:s.interval,name:l(s.name,`name`,`text`),retries:s.retries,suspended:s.suspended,tcp_config:{method:l(s[`tcp-config-method`],`tcp-config-method`,`text`),port:s[`tcp-config-port`]},timeout:s.timeout,type:l(s.type,`type`,`text`)}),p=await i(`Creating`,async()=>a.smartShield.healthChecks.create({body:f,zone_id:d}));n(p,{successLabel:`Created`})})};function x(e){return e.usage(`$0 smart-shield health-checks delete <healthcheck-id>
12
12
 
13
13
  Delete a health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <healthcheck-id>`,describe:`Delete Health Check`,builder:x,handler:async o=>a({command:`smart-shield health-checks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf smart-shield health-checks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/smart_shield/healthchecks/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await d({force:!!o.force})){process.stderr.write(`Aborted.
14
- `);return}n(await i(`Deleting`,async()=>a.smartShield.healthChecks.delete({zone_id:s,healthcheck_id:o[`healthcheck-id`]})),{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 smart-shield health-checks edit <healthcheck-id>
14
+ `);return}let c=await i(`Deleting`,async()=>a.smartShield.healthChecks.delete({zone_id:s,healthcheck_id:o[`healthcheck-id`]}));n(c,{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 smart-shield health-checks edit <healthcheck-id>
15
15
 
16
- Patch a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).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 <healthcheck-id>`,describe:`Patch Health Check`,builder:C,handler:async s=>a({command:`smart-shield health-checks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf smart-shield health-checks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/smart_shield/healthchecks/${s[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(s[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(s[`healthcheck-id`]??``),"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({address:l(s.address,`address`,`text`),check_regions:s[`check-regions`],consecutive_fails:s[`consecutive-fails`],consecutive_successes:s[`consecutive-successes`],description:l(s.description,`description`,`text`),http_config:{allow_insecure:s[`http-config-allow-insecure`],expected_body:l(s[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:s[`http-config-expected-codes`],follow_redirects:s[`http-config-follow-redirects`],method:l(s[`http-config-method`],`http-config-method`,`text`),path:l(s[`http-config-path`],`http-config-path`,`text`),port:s[`http-config-port`]},interval:s.interval,name:l(s.name,`name`,`text`),retries:s.retries,suspended:s.suspended,tcp_config:{method:l(s[`tcp-config-method`],`tcp-config-method`,`text`),port:s[`tcp-config-port`]},timeout:s.timeout,type:l(s.type,`type`,`text`)}):o(s.body)});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.smartShield.healthChecks.edit({body:e,zone_id:d,healthcheck_id:s[`healthcheck-id`]})),{successLabel:`Updated`});return}s.address===void 0&&(s.address=await u(`address`,`The hostname or IP address of the origin server to run health checks on.`)),s.name===void 0&&(s.name=await u(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=c({address:l(s.address,`address`,`text`),check_regions:s[`check-regions`],consecutive_fails:s[`consecutive-fails`],consecutive_successes:s[`consecutive-successes`],description:l(s.description,`description`,`text`),http_config:{allow_insecure:s[`http-config-allow-insecure`],expected_body:l(s[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:s[`http-config-expected-codes`],follow_redirects:s[`http-config-follow-redirects`],method:l(s[`http-config-method`],`http-config-method`,`text`),path:l(s[`http-config-path`],`http-config-path`,`text`),port:s[`http-config-port`]},interval:s.interval,name:l(s.name,`name`,`text`),retries:s.retries,suspended:s.suspended,tcp_config:{method:l(s[`tcp-config-method`],`tcp-config-method`,`text`),port:s[`tcp-config-port`]},timeout:s.timeout,type:l(s.type,`type`,`text`)});n(await i(`Updating`,async()=>a.smartShield.healthChecks.edit({body:f,zone_id:d,healthcheck_id:s[`healthcheck-id`]})),{successLabel:`Updated`})})};function T(e){return e.usage(`$0 smart-shield health-checks get <healthcheck-id>
16
+ Patch a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).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 <healthcheck-id>`,describe:`Patch Health Check`,builder:C,handler:async s=>a({command:`smart-shield health-checks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf smart-shield health-checks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/smart_shield/healthchecks/${s[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(s[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(s[`healthcheck-id`]??``),"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({address:l(s.address,`address`,`text`),check_regions:s[`check-regions`],consecutive_fails:s[`consecutive-fails`],consecutive_successes:s[`consecutive-successes`],description:l(s.description,`description`,`text`),http_config:{allow_insecure:s[`http-config-allow-insecure`],expected_body:l(s[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:s[`http-config-expected-codes`],follow_redirects:s[`http-config-follow-redirects`],method:l(s[`http-config-method`],`http-config-method`,`text`),path:l(s[`http-config-path`],`http-config-path`,`text`),port:s[`http-config-port`]},interval:s.interval,name:l(s.name,`name`,`text`),retries:s.retries,suspended:s.suspended,tcp_config:{method:l(s[`tcp-config-method`],`tcp-config-method`,`text`),port:s[`tcp-config-port`]},timeout:s.timeout,type:l(s.type,`type`,`text`)}):o(s.body)});return}let a=await e(s),d=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body),t=await i(`Updating`,async()=>a.smartShield.healthChecks.edit({body:e,zone_id:d,healthcheck_id:s[`healthcheck-id`]}));n(t,{successLabel:`Updated`});return}s.address===void 0&&(s.address=await u(`address`,`The hostname or IP address of the origin server to run health checks on.`)),s.name===void 0&&(s.name=await u(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=c({address:l(s.address,`address`,`text`),check_regions:s[`check-regions`],consecutive_fails:s[`consecutive-fails`],consecutive_successes:s[`consecutive-successes`],description:l(s.description,`description`,`text`),http_config:{allow_insecure:s[`http-config-allow-insecure`],expected_body:l(s[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:s[`http-config-expected-codes`],follow_redirects:s[`http-config-follow-redirects`],method:l(s[`http-config-method`],`http-config-method`,`text`),path:l(s[`http-config-path`],`http-config-path`,`text`),port:s[`http-config-port`]},interval:s.interval,name:l(s.name,`name`,`text`),retries:s.retries,suspended:s.suspended,tcp_config:{method:l(s[`tcp-config-method`],`tcp-config-method`,`text`),port:s[`tcp-config-port`]},timeout:s.timeout,type:l(s.type,`type`,`text`)}),p=await i(`Updating`,async()=>a.smartShield.healthChecks.edit({body:f,zone_id:d,healthcheck_id:s[`healthcheck-id`]}));n(p,{successLabel:`Updated`})})};function T(e){return e.usage(`$0 smart-shield health-checks get <healthcheck-id>
17
17
 
18
- Fetch a single configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:T,handler:async o=>a({command:`smart-shield health-checks get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf smart-shield health-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/smart_shield/healthchecks/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.smartShield.healthChecks.get({zone_id:s,healthcheck_id:o[`healthcheck-id`]})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 smart-shield health-checks list
18
+ Fetch a single configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:T,handler:async o=>a({command:`smart-shield health-checks get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf smart-shield health-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/smart_shield/healthchecks/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.smartShield.healthChecks.get({zone_id:s,healthcheck_id:o[`healthcheck-id`]}));n(c,{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 smart-shield health-checks list
19
19
 
20
- List configured health checks.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List Health Checks`,builder:D,handler:async o=>a({command:`smart-shield health-checks list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`]};if(o.dryRun){r({command:`cf smart-shield health-checks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.smartShield.healthChecks.list({zone_id:c,...a})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 smart-shield health-checks update <healthcheck-id>
20
+ List configured health checks.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List Health Checks`,builder:D,handler:async o=>a({command:`smart-shield health-checks list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`]};if(o.dryRun){r({command:`cf smart-shield health-checks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.smartShield.healthChecks.list({zone_id:c,...a}));n(l,{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 smart-shield health-checks update <healthcheck-id>
21
21
 
22
- Update a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`errors`,{type:`string`,description:`The errors field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`result-address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`result-check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`result-consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`result-consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`result-description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`result-http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`result-http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`result-http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`result-http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`result-http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`result-http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`result-http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`result-interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`result-name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`result-retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`result-suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`result-tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`result-tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`result-timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`result-type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`success`,{type:`boolean`,description:`Whether the API call was successful.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:k,handler:async u=>a({command:`smart-shield health-checks update`,classification:{safeFlags:[`result-http-config-allow-insecure`,`result-http-config-follow-redirects`,`result-http-config-method`,`result-suspended`,`result-tcp-config-method`,`success`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf smart-shield health-checks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/smart_shield/healthchecks/${u[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(u[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(u[`healthcheck-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({errors:s(u.errors,`errors`),messages:s(u.messages,`messages`),result:{address:l(u[`result-address`],`result-address`,`text`),check_regions:u[`result-check-regions`],consecutive_fails:u[`result-consecutive-fails`],consecutive_successes:u[`result-consecutive-successes`],description:l(u[`result-description`],`result-description`,`text`),http_config:{allow_insecure:u[`result-http-config-allow-insecure`],expected_body:l(u[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:u[`result-http-config-expected-codes`],follow_redirects:u[`result-http-config-follow-redirects`],method:l(u[`result-http-config-method`],`result-http-config-method`,`text`),path:l(u[`result-http-config-path`],`result-http-config-path`,`text`),port:u[`result-http-config-port`]},interval:u[`result-interval`],name:l(u[`result-name`],`result-name`,`text`),retries:u[`result-retries`],suspended:u[`result-suspended`],tcp_config:{method:l(u[`result-tcp-config-method`],`result-tcp-config-method`,`text`),port:u[`result-tcp-config-port`]},timeout:u[`result-timeout`],type:l(u[`result-type`],`result-type`,`text`)},success:u.success}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.smartShield.healthChecks.update({...e,zone_id:d,healthcheck_id:u[`healthcheck-id`]})),{successLabel:`Updated`});return}if(u.errors===void 0)throw Error(`--errors is required (or pass --body with this field set).`);if(u.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);if(u.success===void 0)throw Error(`--success is required (or pass --body with this field set).`);let f=c({errors:s(u.errors,`errors`),messages:s(u.messages,`messages`),result:{address:l(u[`result-address`],`result-address`,`text`),check_regions:u[`result-check-regions`],consecutive_fails:u[`result-consecutive-fails`],consecutive_successes:u[`result-consecutive-successes`],description:l(u[`result-description`],`result-description`,`text`),http_config:{allow_insecure:u[`result-http-config-allow-insecure`],expected_body:l(u[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:u[`result-http-config-expected-codes`],follow_redirects:u[`result-http-config-follow-redirects`],method:l(u[`result-http-config-method`],`result-http-config-method`,`text`),path:l(u[`result-http-config-path`],`result-http-config-path`,`text`),port:u[`result-http-config-port`]},interval:u[`result-interval`],name:l(u[`result-name`],`result-name`,`text`),retries:u[`result-retries`],suspended:u[`result-suspended`],tcp_config:{method:l(u[`result-tcp-config-method`],`result-tcp-config-method`,`text`),port:u[`result-tcp-config-port`]},timeout:u[`result-timeout`],type:l(u[`result-type`],`result-type`,`text`)},success:u.success});n(await i(`Updating`,async()=>a.smartShield.healthChecks.update({...f,zone_id:d,healthcheck_id:u[`healthcheck-id`]})),{successLabel:`Updated`})})},j={command:`health-checks`,describe:`Health checks operations`,builder:e=>e.command(b).command(S).command(w).command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 smart-shield update
22
+ Update a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`errors`,{type:`string`,description:`The errors field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`result-address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`result-check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`result-consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`result-consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`result-description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`result-http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`result-http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`result-http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`result-http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`result-http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`result-http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`result-http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`result-interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`result-name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`result-retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`result-suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`result-tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`result-tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`result-timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`result-type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`success`,{type:`boolean`,description:`Whether the API call was successful.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:k,handler:async u=>a({command:`smart-shield health-checks update`,classification:{safeFlags:[`result-http-config-allow-insecure`,`result-http-config-follow-redirects`,`result-http-config-method`,`result-suspended`,`result-tcp-config-method`,`success`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf smart-shield health-checks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/smart_shield/healthchecks/${u[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(u[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(u[`healthcheck-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({errors:s(u.errors,`errors`),messages:s(u.messages,`messages`),result:{address:l(u[`result-address`],`result-address`,`text`),check_regions:u[`result-check-regions`],consecutive_fails:u[`result-consecutive-fails`],consecutive_successes:u[`result-consecutive-successes`],description:l(u[`result-description`],`result-description`,`text`),http_config:{allow_insecure:u[`result-http-config-allow-insecure`],expected_body:l(u[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:u[`result-http-config-expected-codes`],follow_redirects:u[`result-http-config-follow-redirects`],method:l(u[`result-http-config-method`],`result-http-config-method`,`text`),path:l(u[`result-http-config-path`],`result-http-config-path`,`text`),port:u[`result-http-config-port`]},interval:u[`result-interval`],name:l(u[`result-name`],`result-name`,`text`),retries:u[`result-retries`],suspended:u[`result-suspended`],tcp_config:{method:l(u[`result-tcp-config-method`],`result-tcp-config-method`,`text`),port:u[`result-tcp-config-port`]},timeout:u[`result-timeout`],type:l(u[`result-type`],`result-type`,`text`)},success:u.success}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Updating`,async()=>a.smartShield.healthChecks.update({...e,zone_id:d,healthcheck_id:u[`healthcheck-id`]}));n(t,{successLabel:`Updated`});return}if(u.errors===void 0)throw Error(`--errors is required (or pass --body with this field set).`);if(u.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);if(u.success===void 0)throw Error(`--success is required (or pass --body with this field set).`);let f=c({errors:s(u.errors,`errors`),messages:s(u.messages,`messages`),result:{address:l(u[`result-address`],`result-address`,`text`),check_regions:u[`result-check-regions`],consecutive_fails:u[`result-consecutive-fails`],consecutive_successes:u[`result-consecutive-successes`],description:l(u[`result-description`],`result-description`,`text`),http_config:{allow_insecure:u[`result-http-config-allow-insecure`],expected_body:l(u[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:u[`result-http-config-expected-codes`],follow_redirects:u[`result-http-config-follow-redirects`],method:l(u[`result-http-config-method`],`result-http-config-method`,`text`),path:l(u[`result-http-config-path`],`result-http-config-path`,`text`),port:u[`result-http-config-port`]},interval:u[`result-interval`],name:l(u[`result-name`],`result-name`,`text`),retries:u[`result-retries`],suspended:u[`result-suspended`],tcp_config:{method:l(u[`result-tcp-config-method`],`result-tcp-config-method`,`text`),port:u[`result-tcp-config-port`]},timeout:u[`result-timeout`],type:l(u[`result-type`],`result-type`,`text`)},success:u.success}),p=await i(`Updating`,async()=>a.smartShield.healthChecks.update({...f,zone_id:d,healthcheck_id:u[`healthcheck-id`]}));n(p,{successLabel:`Updated`})})},j={command:`health-checks`,describe:`Health checks operations`,builder:e=>e.command(b).command(S).command(w).command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 smart-shield update
23
23
 
24
- Set Smart Shield Settings.`).option(`cache-reserve-value`,{type:`string`,description:`Specifies the enablement value of Cache Reserve.`,choices:[`on`,`off`]}).option(`regional-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Regional Tiered Cache.`,choices:[`on`,`off`]}).option(`smart-routing-value`,{type:`string`,description:`Specifies the enablement value of Smart Routing.`,choices:[`on`,`off`]}).option(`smart-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Smart Tiered Cache.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The patch body for Smart Shield.`})}const N={command:`update`,describe:`Patch Smart Shield Settings`,builder:M,handler:async s=>a({command:`smart-shield update`,classification:{safeFlags:[`cache-reserve-value`,`regional-tiered-cache-value`,`smart-routing-value`,`smart-tiered-cache-value`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf smart-shield update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({cache_reserve:{value:l(s[`cache-reserve-value`],`cache-reserve-value`,`text`)},regional_tiered_cache:{value:l(s[`regional-tiered-cache-value`],`regional-tiered-cache-value`,`text`)},smart_routing:{value:l(s[`smart-routing-value`],`smart-routing-value`,`text`)},smart_tiered_cache:{value:l(s[`smart-tiered-cache-value`],`smart-tiered-cache-value`,`text`)}}):o(s.body)});return}let a=await e(s),u=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.smartShield.update({...e,zone_id:u})),{successLabel:`Updated`});return}let d=c({cache_reserve:{value:l(s[`cache-reserve-value`],`cache-reserve-value`,`text`)},regional_tiered_cache:{value:l(s[`regional-tiered-cache-value`],`regional-tiered-cache-value`,`text`)},smart_routing:{value:l(s[`smart-routing-value`],`smart-routing-value`,`text`)},smart_tiered_cache:{value:l(s[`smart-tiered-cache-value`],`smart-tiered-cache-value`,`text`)}});n(await i(`Updating`,async()=>a.smartShield.update({...d,zone_id:u})),{successLabel:`Updated`})})},P={command:`smart-shield`,describe:`Smart Shield settings, health checks, and cache reserve management`,builder:e=>e.command(v).command(N).command(g).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{P as default};
24
+ Set Smart Shield Settings.`).option(`cache-reserve-value`,{type:`string`,description:`Specifies the enablement value of Cache Reserve.`,choices:[`on`,`off`]}).option(`regional-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Regional Tiered Cache.`,choices:[`on`,`off`]}).option(`smart-routing-value`,{type:`string`,description:`Specifies the enablement value of Smart Routing.`,choices:[`on`,`off`]}).option(`smart-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Smart Tiered Cache.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The patch body for Smart Shield.`})}const N={command:`update`,describe:`Patch Smart Shield Settings`,builder:M,handler:async s=>a({command:`smart-shield update`,classification:{safeFlags:[`cache-reserve-value`,`regional-tiered-cache-value`,`smart-routing-value`,`smart-tiered-cache-value`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf smart-shield update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({cache_reserve:{value:l(s[`cache-reserve-value`],`cache-reserve-value`,`text`)},regional_tiered_cache:{value:l(s[`regional-tiered-cache-value`],`regional-tiered-cache-value`,`text`)},smart_routing:{value:l(s[`smart-routing-value`],`smart-routing-value`,`text`)},smart_tiered_cache:{value:l(s[`smart-tiered-cache-value`],`smart-tiered-cache-value`,`text`)}}):o(s.body)});return}let a=await e(s),u=await t({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body),t=await i(`Updating`,async()=>a.smartShield.update({...e,zone_id:u}));n(t,{successLabel:`Updated`});return}let d=c({cache_reserve:{value:l(s[`cache-reserve-value`],`cache-reserve-value`,`text`)},regional_tiered_cache:{value:l(s[`regional-tiered-cache-value`],`regional-tiered-cache-value`,`text`)},smart_routing:{value:l(s[`smart-routing-value`],`smart-routing-value`,`text`)},smart_tiered_cache:{value:l(s[`smart-tiered-cache-value`],`smart-tiered-cache-value`,`text`)}}),f=await i(`Updating`,async()=>a.smartShield.update({...d,zone_id:u}));n(f,{successLabel:`Updated`})})},P={command:`smart-shield`,describe:`Smart Shield settings, health checks, and cache reserve management`,builder:e=>e.command(v).command(N).command(g).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{P as default};
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./auth-Br-t8vL_.mjs";import{i as n}from"./context-CquYYyS3.mjs";import{t as r}from"./output-ClYel9WX.mjs";import{t as i}from"./dry-run-p9Q7nMZ5.mjs";import{t as a}from"./progress-TLUEIYE6.mjs";import{t as o}from"./run-iFM5TxtQ.mjs";import"./telemetry-DoBQOGRk.mjs";import{n as s,r as c,t as l}from"./body-parser-NjzJZMOV.mjs";import{n as u,t as d}from"./input-validation-0CeePPHp.mjs";import{n as f}from"./prompt-Ck_1PCHm.mjs";import{n as p,t as m}from"./raw-fetch-DNxNCoeP.mjs";function h(e){return e.usage(`$0 snippets content get <snippet-name>
2
+ import{i as e,n as t}from"./auth-AobvBmz4.mjs";import{i as n}from"./context-Bwkz4Lm_.mjs";import{t as r}from"./output-BGqhvqe2.mjs";import{t as i}from"./dry-run-DmsbOMF1.mjs";import{t as a}from"./progress-BYVZuEcG.mjs";import{t as o}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as s,r as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u,t as d}from"./input-validation-D7z60HJH.mjs";import{n as f}from"./prompt-F5wxc8zq.mjs";import{n as p,t as m}from"./raw-fetch-DyYWa923.mjs";function h(e){return e.usage(`$0 snippets content get <snippet-name>
3
3
 
4
4
  Fetches the content of a snippet belonging to the zone.`).positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,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 g={command:`get <snippet-name>`,describe:`Get a zone snippet content`,builder:h,handler:async e=>o({command:`snippets content get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){i({command:`cf snippets content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/${e[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(e[`snippet-name`]))}/content`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"snippet-name":String(e[`snippet-name`]??``)},bodyKind:`none`});return}let r=await t(e);e.zoneId=await n({zone:e.zone},r,{quiet:e.quiet});let o=await a(`Loading`,async()=>m(`/zones/${e.zoneId}/snippets/${encodeURIComponent(String(e[`snippet-name`]))}/content`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));p(e.text===!0?o.toString(`utf-8`):o)})},_={command:`content`,describe:`Operations for content`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 snippets delete <snippet-name>
5
5
 
6
6
  Deletes a snippet belonging to the zone. Returns a 4XX response if the zone or snippet no longer exists.`).positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <snippet-name>`,describe:`Delete a zone snippet`,builder:v,handler:async e=>o({command:`snippets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf snippets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/${e[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(e[`snippet-name`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"snippet-name":String(e[`snippet-name`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
7
- `);return}r(await a(`Deleting`,async()=>o.snippets.delete({zone_id:s,snippet_name:e[`snippet-name`]})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 snippets get <snippet-name>
7
+ `);return}let c=await a(`Deleting`,async()=>o.snippets.delete({zone_id:s,snippet_name:e[`snippet-name`]}));r(c,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 snippets get <snippet-name>
8
8
 
9
- Fetches a snippet belonging to the zone.`).positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <snippet-name>`,describe:`Get a zone snippet`,builder:b,handler:async e=>o({command:`snippets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf snippets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/${e[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(e[`snippet-name`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"snippet-name":String(e[`snippet-name`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.snippets.get({zone_id:s,snippet_name:e[`snippet-name`]})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 snippets list
9
+ Fetches a snippet belonging to the zone.`).positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <snippet-name>`,describe:`Get a zone snippet`,builder:b,handler:async e=>o({command:`snippets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf snippets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/${e[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(e[`snippet-name`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"snippet-name":String(e[`snippet-name`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.snippets.get({zone_id:s,snippet_name:e[`snippet-name`]}));r(c,{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 snippets list
10
10
 
11
- Fetches all snippets belonging to the zone.`).option(`page`,{type:`number`,description:`Specifies the current page number.`}).option(`per-page`,{type:`number`,description:`Specifies how many results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List zone snippets`,builder:S,handler:async e=>o({command:`snippets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`]};if(e.dryRun){i({command:`cf snippets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c,r(await a(`Loading`,async()=>s.snippets.list({zone_id:c,...o})),{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 snippets rules delete
11
+ Fetches all snippets belonging to the zone.`).option(`page`,{type:`number`,description:`Specifies the current page number.`}).option(`per-page`,{type:`number`,description:`Specifies how many results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List zone snippets`,builder:S,handler:async e=>o({command:`snippets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`]};if(e.dryRun){i({command:`cf snippets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.snippets.list({zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 snippets rules delete
12
12
 
13
13
  Deletes all snippet rules belonging to the zone.`).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 T={command:`delete`,describe:`Delete zone snippet rules`,builder:w,handler:async e=>o({command:`snippets rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf snippets rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
14
- `);return}r(await a(`Deleting`,async()=>o.snippets.rules.delete({zone_id:s})),{successLabel:`Deleted`})})};function E(e){return e.usage(`$0 snippets rules list
14
+ `);return}let c=await a(`Deleting`,async()=>o.snippets.rules.delete({zone_id:s}));r(c,{successLabel:`Deleted`})})};function E(e){return e.usage(`$0 snippets rules list
15
15
 
16
- Fetches all snippet rules belonging to the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List zone snippet rules`,builder:E,handler:async e=>o({command:`snippets rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf snippets rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s,r(await a(`Loading`,async()=>o.snippets.rules.list({zone_id:s})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 snippets rules update
16
+ Fetches all snippet rules belonging to the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List zone snippet rules`,builder:E,handler:async e=>o({command:`snippets rules list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf snippets rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.snippets.rules.list({zone_id:s}));r(c,{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 snippets rules update
17
17
 
18
- Updates all snippet rules belonging to the zone.`).option(`rules`,{type:`string`,description:`Lists snippet rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Define a snippet rules object.`})}const k={command:`update`,describe:`Update zone snippet rules`,builder:O,handler:async e=>o({command:`snippets rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf snippets rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({rules:c(e.rules,`rules`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body);r(await a(`Updating`,async()=>o.snippets.rules.update({...t,zone_id:u})),{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let d=l({rules:c(e.rules,`rules`)});r(await a(`Updating`,async()=>o.snippets.rules.update({...d,zone_id:u})),{successLabel:`Updated`})})},A={command:`rules`,describe:`Operations for rules`,builder:e=>e.command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 snippets update <snippet-name>
18
+ Updates all snippet rules belonging to the zone.`).option(`rules`,{type:`string`,description:`Lists snippet rules. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Define a snippet rules object.`})}const k={command:`update`,describe:`Update zone snippet rules`,builder:O,handler:async e=>o({command:`snippets rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf snippets rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({rules:c(e.rules,`rules`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.snippets.rules.update({...t,zone_id:u}));r(n,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let d=l({rules:c(e.rules,`rules`)}),f=await a(`Updating`,async()=>o.snippets.rules.update({...d,zone_id:u}));r(f,{successLabel:`Updated`})})},A={command:`rules`,describe:`Operations for rules`,builder:e=>e.command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 snippets update <snippet-name>
19
19
 
20
- Creates or updates a snippet belonging to the zone.`).positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Define a snippet object.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`Provide metadata about the snippet.`})}const M={command:`update <snippet-name>`,describe:`Update a zone snippet`,builder:j,handler:async s=>o({command:`snippets update`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){i({command:`cf snippets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/snippets/${s[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(s[`snippet-name`]))}`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``),"snippet-name":String(s[`snippet-name`]??``)},bodyKind:`multipart`,body:{body:s.body,file:s.file,metadata:s.metadata}});return}let o=await t(s);if(s.zoneId=await n({zone:s.zone},o,{quiet:s.quiet}),s.file!==void 0||s.body!==void 0||s.metadata!==void 0){let t=new FormData;if(s.file){let e=d(s.file);t.append(`file`,new Blob([e]),s.file.split(/[\\/]/).filter(Boolean).pop())}else s.body!==void 0&&t.append(`file`,s.body);if(s.metadata!==void 0){let e=typeof s.metadata==`string`?u(s.metadata,`metadata`,`text`):s.metadata;t.append(`metadata`,typeof e==`string`?e:JSON.stringify(e))}r(await a(`Updating`,async()=>e(o,`PUT`,`/zones/${s.zoneId}/snippets/${encodeURIComponent(String(s[`snippet-name`]))}`,{body:t})),{successLabel:`Updated`});return}if(s.body){let t=u(s.body,`body`,`binary`);r(await a(`Updating`,async()=>e(o,`PUT`,`/zones/${s.zoneId}/snippets/${encodeURIComponent(String(s[`snippet-name`]))}`,{body:t,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Updated`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},N={command:`snippets`,describe:`snippets`,builder:e=>e.command(y).command(x).command(C).command(M).command(_).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{N as default};
20
+ Creates or updates a snippet belonging to the zone.`).positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Define a snippet object.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`Provide metadata about the snippet.`})}const M={command:`update <snippet-name>`,describe:`Update a zone snippet`,builder:j,handler:async s=>o({command:`snippets update`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){i({command:`cf snippets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/snippets/${s[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(s[`snippet-name`]))}`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``),"snippet-name":String(s[`snippet-name`]??``)},bodyKind:`multipart`,body:{body:s.body,file:s.file,metadata:s.metadata}});return}let o=await t(s);if(s.zoneId=await n({zone:s.zone},o,{quiet:s.quiet}),s.file!==void 0||s.body!==void 0||s.metadata!==void 0){let t=new FormData;if(s.file){let e=d(s.file);t.append(`file`,new Blob([e]),s.file.split(/[\\/]/).filter(Boolean).pop())}else s.body!==void 0&&t.append(`file`,s.body);if(s.metadata!==void 0){let e=typeof s.metadata==`string`?u(s.metadata,`metadata`,`text`):s.metadata;t.append(`metadata`,typeof e==`string`?e:JSON.stringify(e))}let n=await a(`Updating`,async()=>e(o,`PUT`,`/zones/${s.zoneId}/snippets/${encodeURIComponent(String(s[`snippet-name`]))}`,{body:t}));r(n,{successLabel:`Updated`});return}if(s.body){let t=u(s.body,`body`,`binary`),n=await a(`Updating`,async()=>e(o,`PUT`,`/zones/${s.zoneId}/snippets/${encodeURIComponent(String(s[`snippet-name`]))}`,{body:t,headers:{"Content-Type":`multipart/form-data`}}));r(n,{successLabel:`Updated`});return}if(s.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},N={command:`snippets`,describe:`snippets`,builder:e=>e.command(y).command(x).command(C).command(M).command(_).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{N as default};
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire as e}from"node:module";import t from"node:process";import n from"node:os";import r from"node:tty";var i=Object.create,a=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,c=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,u=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=s(t),c=0,u=i.length,d;c<u;c++)d=i[c],!l.call(e,d)&&d!==n&&a(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=o(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:i(c(e)),d(t||!e||!e.__esModule||!l.call(e,`default`)?a(n,`default`,{value:e,enumerable:!0}):n,e)),p=/* @__PURE__ */ e(import.meta.url);const m=(e=0)=>t=>`\u001B[${t+e}m`,h=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,g=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,_={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(_.modifier);const v=Object.keys(_.color),y=Object.keys(_.bgColor);[...v,...y];function b(){let e=/* @__PURE__ */ new Map;for(let[t,n]of Object.entries(_)){for(let[t,r]of Object.entries(n))_[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=_[t],e.set(r[0],r[1]);Object.defineProperty(_,t,{value:n,enumerable:!1})}return Object.defineProperty(_,"codes",{value:e,enumerable:!1}),_.color.close=`\x1B[39m`,_.bgColor.close=`\x1B[49m`,_.color.ansi=m(),_.color.ansi256=h(),_.color.ansi16m=g(),_.bgColor.ansi=m(10),_.bgColor.ansi256=h(10),_.bgColor.ansi16m=g(10),Object.defineProperties(_,{rgbToAnsi256:{value(e,t,n){return e===t&&t===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(n/255*5)},enumerable:!1},hexToRgb:{value(e){let t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!t)return[0,0,0];let[n]=t;n.length===3&&(n=[...n].map(e=>e+e).join(``));let r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:e=>_.rgbToAnsi256(..._.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value(e){if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,n,r;if(e>=232)t=((e-232)*10+8)/255,n=t,r=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,n=Math.floor(i/6)/5,r=i%6/5}let i=Math.max(t,n,r)*2;if(i===0)return 30;let a=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(t));return i===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(e,t,n)=>_.ansi256ToAnsi(_.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>_.ansi256ToAnsi(_.hexToAnsi256(e)),enumerable:!1}}),_}const x=b();function S(e,n=globalThis.Deno?globalThis.Deno.args:t.argv){let r=e.startsWith(`-`)?``:e.length===1?`-`:`--`,i=n.indexOf(r+e),a=n.indexOf(`--`);return i!==-1&&(a===-1||i<a)}const{env:C}=t;let w;S(`no-color`)||S(`no-colors`)||S(`color=false`)||S(`color=never`)?w=0:(S(`color`)||S(`colors`)||S(`color=true`)||S(`color=always`))&&(w=1);function T(){if(`FORCE_COLOR`in C)return C.FORCE_COLOR===`true`?1:C.FORCE_COLOR===`false`?0:C.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(C.FORCE_COLOR,10),3)}function E(e){return e!==0&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function D(e,{streamIsTTY:r,sniffFlags:i=!0}={}){let a=T();a!==void 0&&(w=a);let o=i?w:a;if(o===0)return 0;if(i){if(S(`color=16m`)||S(`color=full`)||S(`color=truecolor`))return 3;if(S(`color=256`))return 2}if(`TF_BUILD`in C&&`AGENT_NAME`in C)return 1;if(e&&!r&&o===void 0)return 0;let s=o||0;if(C.TERM===`dumb`)return s;if(t.platform===`win32`){let e=n.release().split(`.`);return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if(`CI`in C)return`GITHUB_ACTIONS`in C||`GITEA_ACTIONS`in C?3:[`TRAVIS`,`CIRCLECI`,`APPVEYOR`,`GITLAB_CI`,`BUILDKITE`,`DRONE`].some(e=>e in C)||C.CI_NAME===`codeship`?1:s;if(`TEAMCITY_VERSION`in C)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(C.TEAMCITY_VERSION);if(C.COLORTERM===`truecolor`||C.TERM===`xterm-kitty`)return 3;if(`TERM_PROGRAM`in C){let e=Number.parseInt((C.TERM_PROGRAM_VERSION||``).split(`.`)[0],10);switch(C.TERM_PROGRAM){case`iTerm.app`:return e>=3?3:2;case`Apple_Terminal`:return 2}}return/-256(color)?$/i.test(C.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(C.TERM)||`COLORTERM`in C?1:s}function O(e,t={}){return E(D(e,{streamIsTTY:e&&e.isTTY,...t}))}const k={stdout:O({isTTY:r.isatty(1)}),stderr:O({isTTY:r.isatty(2)})};function A(e,t,n){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,a=0,o=``;do o+=e.slice(a,r)+t+n,a=r+i,r=e.indexOf(t,a);while(r!==-1);return o+=e.slice(a),o}function j(e,t,n,r){let i=0,a=``;do{let o=e[r-1]===`\r`;a+=e.slice(i,o?r-1:r)+t+(o?`\r
3
+ `:`
4
+ `)+n,i=r+1,r=e.indexOf(`
5
+ `,i)}while(r!==-1);return a+=e.slice(i),a}const{stdout:M,stderr:N}=k,P=Symbol(`GENERATOR`),F=Symbol(`STYLER`),I=Symbol(`IS_EMPTY`),L=[`ansi`,`ansi`,`ansi256`,`ansi16m`],R=Object.create(null),z=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let n=M?M.level:0;e.level=t.level===void 0?n:t.level},B=e=>{let t=(...e)=>e.join(` `);return z(t,e),Object.setPrototypeOf(t,V.prototype),t};function V(e){return B(e)}Object.setPrototypeOf(V.prototype,Function.prototype);for(let[e,t]of Object.entries(x))R[e]={get(){let n=G(this,W(t.open,t.close,this[F]),this[I]);return Object.defineProperty(this,e,{value:n}),n}};R.visible={get(){let e=G(this,this[F],!0);return Object.defineProperty(this,"visible",{value:e}),e}};const H=(e,t,n,...r)=>e===`rgb`?t===`ansi16m`?x[n].ansi16m(...r):t===`ansi256`?x[n].ansi256(x.rgbToAnsi256(...r)):x[n].ansi(x.rgbToAnsi(...r)):e===`hex`?H(`rgb`,t,n,...x.hexToRgb(...r)):x[n][e](...r);for(let e of[`rgb`,`hex`,`ansi256`]){R[e]={get(){let{level:t}=this;return function(...n){let r=W(H(e,L[t],`color`,...n),x.color.close,this[F]);return G(this,r,this[I])}}};let t=`bg`+e[0].toUpperCase()+e.slice(1);R[t]={get(){let{level:t}=this;return function(...n){let r=W(H(e,L[t],`bgColor`,...n),x.bgColor.close,this[F]);return G(this,r,this[I])}}}}const U=Object.defineProperties(()=>{},{...R,level:{enumerable:!0,get(){return this[P].level},set(e){this[P].level=e}}}),W=(e,t,n)=>{let r,i;return n===void 0?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},G=(e,t,n)=>{let r=(...e)=>K(r,e.length===1?``+e[0]:e.join(` `));return Object.setPrototypeOf(r,U),r[P]=e,r[F]=t,r[I]=n,r},K=(e,t)=>{if(e.level<=0||!t)return e[I]?``:t;let n=e[F];if(n===void 0)return t;let{openAll:r,closeAll:i}=n;if(t.includes(`\x1B`))for(;n!==void 0;)t=A(t,n.close,n.open),n=n.parent;let a=t.indexOf(`
6
+ `);return a!==-1&&(t=j(t,i,r,a)),r+t+i};Object.defineProperties(V.prototype,R);const q=V();V({level:N?N.level:0});export{f as i,u as n,p as r,q as t};
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import{i as e,n as t}from"./source-mXUcrTVw.mjs";import{r as n}from"./theme-CQ_TYifs.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import"./ui-YmjF66Ct.mjs";import{a as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./gt-3bcLGJ7V.mjs";import{n as d,t as f}from"./discover-P20XeGBF.mjs";import{t as p}from"./registry-C20J1MW0.mjs";import{constants as m}from"node:os";import{spawn as h}from"node:child_process";var g=/* @__PURE__ */ t(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=/* @__PURE__ */ new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),_=/* @__PURE__ */ t(((e,t)=>{let n=o();t.exports=(e,t,r)=>n(e,t,r)===0})),v=/* @__PURE__ */ t(((e,t)=>{let n=o();t.exports=(e,t,r)=>n(e,t,r)!==0})),y=/* @__PURE__ */ t(((e,t)=>{let n=o();t.exports=(e,t,r)=>n(e,t,r)>=0})),b=/* @__PURE__ */ t(((e,t)=>{let n=o();t.exports=(e,t,r)=>n(e,t,r)<0})),x=/* @__PURE__ */ t(((e,t)=>{let n=o();t.exports=(e,t,r)=>n(e,t,r)<=0})),S=/* @__PURE__ */ t(((e,t)=>{let n=_(),r=v(),i=u(),a=y(),o=b(),s=x();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),C=/* @__PURE__ */ t(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),d(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.value=this.semver===n?``:this.operator+this.semver.version,d(`comp`,this)}parse(e){let t=this.options.loose?o[s.COMPARATORLOOSE]:o[s.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),this.semver=r[2]?new f(r[2],this.options.loose):n}toString(){return this.value}test(e){if(d(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}return u(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new p(t.value,n).test(this.value):t.operator===``?t.value===``||new p(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||u(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||u(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=a(),{safeRe:o,t:s}=i(),u=S(),d=l(),f=c(),p=w()})),w=/* @__PURE__ */ t(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=o(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof u)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!w(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&T(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(S,``);let t=((this.options.includePrerelease&&b)|(this.options.loose&&x))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,a=i?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];e=e.replace(a,R(this.options.includePrerelease)),d(`hyphen replace`,e),e=e.replace(p[h.COMPARATORTRIM],_),d(`comparator trim`,e),e=e.replace(p[h.TILDETRIM],v),d(`tilde trim`,e),e=e.replace(p[h.CARETTRIM],y),d(`caret trim`,e);let o=e.split(` `).map(e=>D(e,this.options)).join(` `).split(/\s+/).map(e=>L(e,this.options));i&&(o=o.filter(e=>(d(`loose invalid filter`,e,this.options),!!e.match(p[h.COMPARATORLOOSE])))),d(`range list`,o);let s=/* @__PURE__ */ new Map,c=o.map(e=>new u(e,this.options));for(let e of c){if(w(e))return[e];s.set(e.value,e)}s.size>1&&s.has(``)&&s.delete(``);let l=[...s.values()];return r.set(t,l),l}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>E(e,n)&&t.set.some(t=>E(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(z(this.set[t],e,this.options))return!0;return!1}};let r=new(g()),o=a(),u=C(),d=l(),f=c(),{safeRe:p,src:m,t:h,comparatorTrimReplace:_,tildeTrimReplace:v,caretTrimReplace:y}=i(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=s(),S=new RegExp(m[h.BUILD],`g`),w=e=>e.value===`<0.0.0-0`,T=e=>e.value===``,E=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},D=(e,t)=>(e=e.replace(p[h.BUILD],``),d(`comp`,e,t),e=M(e,t),d(`caret`,e),e=A(e,t),d(`tildes`,e),e=P(e,t),d(`xrange`,e),e=I(e,t),d(`stars`,e),e),O=e=>!e||e.toLowerCase()===`x`||e===`*`,k=(e,t,n)=>O(e)&&!O(t)||O(t)&&n&&!O(n),A=(e,t)=>e.trim().split(/\s+/).map(e=>j(e,t)).join(` `),j=(e,t)=>{let n=t.loose?p[h.TILDELOOSE]:p[h.TILDE],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{d(`tilde`,e,t,n,i,a,o);let s;return O(n)?s=``:O(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:O(a)?s=`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:o?(d(`replaceTilde pr`,o),s=`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`):s=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,d(`tilde return`,s),s})},M=(e,t)=>e.trim().split(/\s+/).map(e=>N(e,t)).join(` `),N=(e,t)=>{d(`caret`,e,t);let n=t.loose?p[h.CARETLOOSE]:p[h.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{d(`caret`,e,t,n,i,a,o);let s;return O(n)?s=``:O(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:O(a)?s=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(d(`replaceCaret pr`,o),s=n===`0`?i===`0`?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(d(`no pr`),s=n===`0`?i===`0`?`>=${n}.${i}.${a} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),d(`caret return`,s),s})},P=(e,t)=>(d(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>F(e,t)).join(` `)),F=(e,t)=>{e=e.trim();let n=t.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{if(d(`xRange`,e,n,r,i,a,o,s),k(i,a,o))return e;let c=O(i),l=c||O(a),u=l||O(o),f=u;return r===`=`&&f&&(r=``),s=t.includePrerelease?`-0`:``,c?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(l&&(a=0),o=0,r===`>`?(r=`>=`,l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,l?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):l?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:u&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),d(`xRange return`,n),n})},I=(e,t)=>(d(`replaceStars`,e,t),e.trim().replace(p[h.STAR],``)),L=(e,t)=>(d(`replaceGTE0`,e,t),e.trim().replace(p[t.includePrerelease?h.GTE0PRE:h.GTE0],``)),R=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=O(r)?``:O(i)?`>=${r}.0.0${e?`-0`:``}`:O(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=O(l)?``:O(u)?`<${+l+1}.0.0-0`:O(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),z=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(d(e[n].semver),e[n].semver!==u.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),T=/* @__PURE__ */ e((/* @__PURE__ */ t(((e,t)=>{let n=w();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})))(),1);function E(e){let t=f(e);if(t.length===0)throw A(e),new r(1);if(t.length>1)throw j(t),new r(1);let[n]=t;if(!n)throw new r(1);if(!n.binary)throw M(n),new r(1);if(n.impl.versionConstraint!==void 0&&!D(n.installedVersion,n.impl.versionConstraint.range))throw O(n),new r(1);return n}function D(e,t){return e!==void 0&&(0,T.default)(e,t,{includePrerelease:!0})}function O(e){console.error(`\n${n.bold(e.impl.pkg)}@${e.installedVersion??`unknown`} is installed, but it is not compatible with cf's local runtime.\n\n`+k(e)+`Try: ${e.impl.installHint}`)}function k(e){let t=e.impl.versionConstraint?.display??`a compatible version`;return`cf requires ${n.bold(t)} for ${n.bold(`cf dev`)}, ${n.bold(`cf build`)}, ${n.bold(`cf deploy`)}, and ${n.bold(`cf previews deploy`)}.\n`}function A(e){console.error(`
3
+ No Cloudflare dev-server is installed in this project.
4
+
5
+ A project must declare exactly one of the following in its manifest:
6
+ `);for(let e of d)console.error(` ${n.bold(e.pkg)} ${n.muted(`(${e.description})`)}`),console.error(` install: ${e.installHint}`);console.error(`\nThe manifest checked was: ${e}/(package.json|pyproject.toml|Cargo.toml)`)}function j(e){console.error(`
7
+ Multiple Cloudflare dev-server implementations are configured:
8
+ `);for(let t of e)console.error(` - ${n.bold(t.impl.pkg)} (${t.manifestPath})`);console.error(`
9
+ A project can only use one dev-server. Remove all but one
10
+ from your project's manifest and try again.`)}function M(e){if(e.installed&&e.impl.versionConstraint){console.error(`\n${n.bold(e.impl.pkg)} is declared in ${e.manifestPath}, but this installation does not include the cf delegate.\n\n`+k(e)+`Try: ${e.impl.installHint}`);return}console.error(`\n${n.bold(e.impl.pkg)} is declared in ${e.manifestPath} but is not installed.\n\nTry: ${e.impl.installHint}`)}function N(e,t=process.platform){return t!==`win32`||e!==`SIGINT`}function P(e,t,n){let r=t??n??void 0;return{exitCode:e??(r?128+(m.signals[r]??1):1),...r?{signal:r}:{}}}async function F(e,t,n,r={}){let i=r.output??`stdout`,a=e.binary;if(!a)throw Error(`Cannot spawn ${e.impl.pkg}: binary not found.\nTry: ${e.impl.installHint}`);let{command:o,prefixArgs:s}=L(a),c=h(o,[...s,t,...n],{stdio:[`inherit`,i===`stderr`?process.stderr:i===`silent`?`ignore`:`inherit`,`inherit`],env:I(t,r.env)}),l,u=e=>{l??=e,N(e)&&c.kill(e)},d=()=>u(`SIGINT`),f=()=>u(`SIGTERM`);process.on(`SIGINT`,d),process.on(`SIGTERM`,f);try{return await new Promise((e,t)=>{c.once(`exit`,(t,n)=>{e(P(t,n,l))}),c.once(`error`,e=>{t(e)})})}finally{process.off(`SIGINT`,d),process.off(`SIGTERM`,f)}}function I(e,t={}){let n={...R(process.env,`--no-deprecation`),...t,CLOUDFLARE_CF_AUTH:`true`};return e===`dev`?{...n,...p(n)}:n}function L(e){return e.startsWith(`uv:`)?{command:`uv`,prefixArgs:[`run`,`--no-sync`,e.slice(3)]}:{command:e,prefixArgs:[]}}function R(e,t){let n=e.NODE_OPTIONS??``;return n.split(/\s+/).includes(t)?e:{...e,NODE_OPTIONS:n?`${n} ${t}`:t}}export{E as n,F as t};