cf 0.9.1 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/README.md +20 -5
  2. package/dist/_meta/agent-context.json +46 -39
  3. package/dist/_meta/commands.json +9358 -10581
  4. package/dist/_meta/hand-written-commands.json +784 -0
  5. package/dist/_meta/schemas.json +14870 -14667
  6. package/dist/abuse-reports-sDBTV0qZ.mjs +8 -0
  7. package/dist/{access-CxyW_sIW.mjs → access-DcNzuCue.mjs} +1 -1
  8. package/dist/account-BX90zXn5.mjs +2 -0
  9. package/dist/account-tags-Bz3JG5hI.mjs +9 -0
  10. package/dist/accounts-DCuW3xyZ.mjs +28 -0
  11. package/dist/{acm-CHacxa3s.mjs → acm-zjfShZLS.mjs} +1 -1
  12. package/dist/{addressing-BnqNmmYN.mjs → addressing-DORQ64Ux.mjs} +11 -11
  13. package/dist/{agent-context-Bu6yvDqA.mjs → agent-context-BgPR_aQr.mjs} +1 -1
  14. package/dist/agent-memory-C0hAUMeC.mjs +6 -0
  15. package/dist/ai-BpEBGMT2.mjs +5 -0
  16. package/dist/ai-audit-DnU3vn3E.mjs +2 -0
  17. package/dist/ai-gateway-COOrr_Yw.mjs +13 -0
  18. package/dist/ai-search-DKbN9Tyd.mjs +7 -0
  19. package/dist/ai-security-C_I5lo58.mjs +4 -0
  20. package/dist/{alerting-qa8SkXlD.mjs → alerting-4T8gmZs-.mjs} +4 -4
  21. package/dist/analytics-Bxh4TCP7.mjs +3 -0
  22. package/dist/analytics_engine-fV56bjVN.mjs +2 -0
  23. package/dist/{api-security-MfHbfZyf.mjs → api-security-COk_i184.mjs} +20 -20
  24. package/dist/argo-DIRfvxvv.mjs +2 -0
  25. package/dist/args-DlUhyGU0.mjs +2 -0
  26. package/dist/artifacts-BBfXNfUg.mjs +4 -0
  27. package/dist/audit-logs-BlOrlAWe.mjs +2 -0
  28. package/dist/{auth-DuLchM18.mjs → auth-D3X9HYhD.mjs} +3 -3
  29. package/dist/auth-DPhNN3Ly.mjs +5 -0
  30. package/dist/billing-B9e4PnvN.mjs +3 -0
  31. package/dist/body-parser-BshbixEq.mjs +2 -0
  32. package/dist/bot-management-D2JVeS-V.mjs +5 -0
  33. package/dist/botnet-feed-BTzTYs5d.mjs +3 -0
  34. package/dist/brand-protection-C5Q6Gpw9.mjs +3 -0
  35. package/dist/{browser-extension-q79xHrVW.mjs → browser-extension-u5uA0Lwk.mjs} +1 -1
  36. package/dist/browser-run-CHGOCTdG.mjs +4 -0
  37. package/dist/build-D0FhOj40.mjs +8 -0
  38. package/dist/{cache-Cl7vKJwH.mjs → cache-C6V7PbQM.mjs} +1 -1
  39. package/dist/{calls-DtK_ANxq.mjs → calls-Bye8Tyy-.mjs} +1 -1
  40. package/dist/certificate-authorities-B-U_e6JJ.mjs +2 -0
  41. package/dist/cf-Ds4JFovl.mjs +18 -0
  42. package/dist/chunk-LQW53VED-22IYZovK.mjs +119 -0
  43. package/dist/chunk-QBZBEHZB-CKzQKcIp.mjs +2 -0
  44. package/dist/{client-certificates-BtPU9GsQ.mjs → client-certificates-3RrC-6LG.mjs} +1 -1
  45. package/dist/{client-side-security-DAn-3jwp.mjs → client-side-security-DIdKvRMT.mjs} +1 -1
  46. package/dist/cloud-connector-CL1jPQud.mjs +2 -0
  47. package/dist/cloudforce-one-DULeqLkR.mjs +36 -0
  48. package/dist/command-C9VP3xaA.mjs +2 -0
  49. package/dist/{completions-BHE4pRjB.mjs → completions-CqgGKRAC.mjs} +3 -3
  50. package/dist/config.d.mts +1460 -1348
  51. package/dist/config.mjs +1 -1
  52. package/dist/connector-interrupts-CXlLObDv.mjs +2 -0
  53. package/dist/connector-telemetry-events-BrYX4ig4.mjs +2 -0
  54. package/dist/connector-telemetry-events-latest-BbpcII3_.mjs +2 -0
  55. package/dist/connector-telemetry-snapshots-BdeBQYcM.mjs +2 -0
  56. package/dist/connector-telemetry-snapshots-latest-DuCiimXl.mjs +2 -0
  57. package/dist/{connectors-Bo6ZT8PT.mjs → connectors-BQwyBJ4_.mjs} +1 -1
  58. package/dist/containers-BrQtGiNp.mjs +58 -0
  59. package/dist/{content-scan-D03UfK2X.mjs → content-scan-DNzhXYkY.mjs} +1 -1
  60. package/dist/{csamScanner-DgS-7ADh.mjs → csamScanner-CFq5s1Q3.mjs} +1 -1
  61. package/dist/{ct-alerting-8AKtNnUg.mjs → ct-alerting-CH6UmsGQ.mjs} +1 -1
  62. package/dist/custom-certificates-DnG73Wg2.mjs +5 -0
  63. package/dist/custom-csrs-bhClr2SU.mjs +3 -0
  64. package/dist/custom-hostnames-C0eiGvG9.mjs +5 -0
  65. package/dist/custom-nameservers-CVMhhLm6.mjs +3 -0
  66. package/dist/custom-pages-DTINMR30.mjs +3 -0
  67. package/dist/d1-sKdExJYF.mjs +20 -0
  68. package/dist/data-security-mV3a6UfW.mjs +7 -0
  69. package/dist/dcv-delegation-dBu3jdRw.mjs +2 -0
  70. package/dist/delegate.mjs +1 -1
  71. package/dist/{deploy-DGlmjPTS.mjs → deploy-BL59O1O1.mjs} +1 -1
  72. package/dist/deploy-input-Dz6q-__n.mjs +2 -0
  73. package/dist/{dev-BbLV0Ti-.mjs → dev-BDaavgH1.mjs} +2 -2
  74. package/dist/diagnostics-CJV6qWUA.mjs +3 -0
  75. package/dist/{directory-CCndFkbQ.mjs → directory-B5zCMusW.mjs} +1 -1
  76. package/dist/{dispatch-namespaces-C48JQ9EA.mjs → dispatch-namespaces-Dg5lu5xX.mjs} +1 -1
  77. package/dist/dist-BHi7UhXO.mjs +72 -0
  78. package/dist/dist-BWpErtDM.mjs +384 -0
  79. package/dist/{dls-BBq99pjI.mjs → dls-t0hnIe_P.mjs} +1 -1
  80. package/dist/dns-C8FC2hbh.mjs +29 -0
  81. package/dist/{dns-firewall-DdwVtm12.mjs → dns-firewall-CuhhUm55.mjs} +1 -1
  82. package/dist/{dot-prop-6SRZBKHT-C_xd7eTS.mjs → dot-prop-6SRZBKHT-wwGHcwAa.mjs} +1 -1
  83. package/dist/dry-run-DL2V6yFm.mjs +2 -0
  84. package/dist/durable-objects-BLrgM3Cw.mjs +2 -0
  85. package/dist/email-auth-BmYrl0pO.mjs +2 -0
  86. package/dist/email-routing-CF3_Z957.mjs +6 -0
  87. package/dist/email-security-F7OYcMkZ.mjs +18 -0
  88. package/dist/email-sending-EyU3WvGQ.mjs +7 -0
  89. package/dist/fieldExtractors-Cno37T2m.mjs +3 -0
  90. package/dist/firewall-8YWWy4iB.mjs +11 -0
  91. package/dist/flagship-C4x0l-8J.mjs +4 -0
  92. package/dist/{fraud-AH47n-wL.mjs → fraud-HR_SdUx3.mjs} +1 -1
  93. package/dist/google-tag-gateway-BdcS0WnX.mjs +2 -0
  94. package/dist/{healthchecks-DfEUG007.mjs → healthchecks-4qOvjrTN.mjs} +2 -2
  95. package/dist/{hostnames-DQUiD3Vr.mjs → hostnames-DehdYOMz.mjs} +1 -1
  96. package/dist/{hyperdrive-RyQboMWI.mjs → hyperdrive-3gD3hn70.mjs} +1 -1
  97. package/dist/iam-DR72hmii.mjs +6 -0
  98. package/dist/images-CeKc5JPh.mjs +8 -0
  99. package/dist/index.mjs +1 -1
  100. package/dist/intel-DtFix9WL.mjs +8 -0
  101. package/dist/{interactive-mV8PABm6.mjs → interactive-C7M55Wxx.mjs} +1 -1
  102. package/dist/ips-CtWCjXAN.mjs +2 -0
  103. package/dist/{keyless-certificates-oNu5jWKF.mjs → keyless-certificates-Dk24yQFz.mjs} +1 -1
  104. package/dist/keys-BmhG6Kn1.mjs +2 -0
  105. package/dist/{kv-Bi9B4E0A.mjs → kv-BuVPAuZP.mjs} +1 -1
  106. package/dist/{leaked-credential-checks-DKRjBLcr.mjs → leaked-credential-checks-XcZmt1I-.mjs} +1 -1
  107. package/dist/load-balancers-CylN-l7n.mjs +6 -0
  108. package/dist/{local-DTyuGwTw.mjs → local-Be3lg_9E.mjs} +1 -1
  109. package/dist/{local-runtime-IAXhEugU.mjs → local-runtime-Ce7k598H.mjs} +1 -1
  110. package/dist/logexplorer-CvRPoKbj.mjs +17 -0
  111. package/dist/logo-matches-Heuft3yF.mjs +2 -0
  112. package/dist/logos-DRYjGBDq.mjs +3 -0
  113. package/dist/logpush-Dve9jOMp.mjs +4 -0
  114. package/dist/{logs-DmWWL5f9.mjs → logs-SC86FE89.mjs} +1 -1
  115. package/dist/{magic-cloud-networking-XbTa6P52.mjs → magic-cloud-networking-DXzeqwX-.mjs} +4 -4
  116. package/dist/magic-network-monitoring-DW0Jl74i.mjs +4 -0
  117. package/dist/magic-transit-BK_3asH2.mjs +111 -0
  118. package/dist/managed-transforms-B6TV4qoE.mjs +3 -0
  119. package/dist/matches-Iss9Fo4R.mjs +2 -0
  120. package/dist/mcp-8wxXT6JU.mjs +4 -0
  121. package/dist/mesh-Bf9UAS4J.mjs +4 -0
  122. package/dist/{moq-CJpE-eNj.mjs → moq-ZKMFOeVz.mjs} +1 -1
  123. package/dist/mtls-certificates-DoWm6GiE.mjs +3 -0
  124. package/dist/{network-D2WRXCDe.mjs → network-B1lBARU9.mjs} +1 -1
  125. package/dist/{network-interconnects-Clq4X1U8.mjs → network-interconnects-CLYIFHfU.mjs} +1 -1
  126. package/dist/oauth-DuEONNgC.mjs +14 -0
  127. package/dist/{oauth-clients-hilWfAlm.mjs → oauth-clients-DgiTzLzu.mjs} +1 -1
  128. package/dist/oauth-scopes-BOBRMxjm.mjs +2 -0
  129. package/dist/observability-Jya7-zkl.mjs +4 -0
  130. package/dist/{open-PBXRGS4R-C46yIm3u.mjs → open-PBXRGS4R-CX8K4WYl.mjs} +3 -3
  131. package/dist/{organization-D41rIvJa.mjs → organization-CYxYV4e0.mjs} +6 -6
  132. package/dist/organizations-SacGUW44.mjs +2 -0
  133. package/dist/origin-ca-certificates-Ph1bJGQ1.mjs +3 -0
  134. package/dist/origin-post-quantum-encryption-BBLiGAGB.mjs +2 -0
  135. package/dist/origin-tls-client-auth-DSDgTN2X.mjs +4 -0
  136. package/dist/{output-DgW1hQGX.mjs → output-Ccqw2WOb.mjs} +1 -1
  137. package/dist/page-rules-BqEyFR2c.mjs +27 -0
  138. package/dist/pages-CQ7ZVWk1.mjs +14 -0
  139. package/dist/pay-per-crawl-BMe_3_Qj.mjs +4 -0
  140. package/dist/pipelines-6De2Pe2C.mjs +6 -0
  141. package/dist/precursor-iwK-1P_d.mjs +4 -0
  142. package/dist/progress-BqQcF5QH.mjs +2 -0
  143. package/dist/project-settings-C_1-JI6Y.mjs +3 -0
  144. package/dist/prompt-B0sWIs9c.mjs +3 -0
  145. package/dist/{public-BwQqexwo-DbWj8rrr.mjs → public-BYCVISMH-DnMJ5Jct.mjs} +1 -1
  146. package/dist/queries-c7zvnfEQ.mjs +3 -0
  147. package/dist/queues-BU6y16qS.mjs +6 -0
  148. package/dist/r2-Jo3QMahK.mjs +24 -0
  149. package/dist/{r2-data-catalog-DLtf9d6o.mjs → r2-data-catalog-B-tw-JdG.mjs} +1 -1
  150. package/dist/radar-DIYAMEof.mjs +2 -0
  151. package/dist/{rate-limits-B1YjnGue.mjs → rate-limits-DewOcznT.mjs} +1 -1
  152. package/dist/raw-fetch-Cc-MjHeL.mjs +2 -0
  153. package/dist/realtimekit-cnZEVNDn.mjs +7 -0
  154. package/dist/registrar-BsWr_aPM.mjs +23 -0
  155. package/dist/{registrar-sandbox-0i1T3zne.mjs → registrar-sandbox-BlcpUyIH.mjs} +6 -6
  156. package/dist/{registry-DDcSvd8H.mjs → registry-jifR3_Y6.mjs} +1 -1
  157. package/dist/reporting--1AyTV7k.mjs +2 -0
  158. package/dist/request-tracers-C_VX7X6-.mjs +2 -0
  159. package/dist/{resource-sharing-Ctdi9D-j.mjs → resource-sharing-Br5dqr3o.mjs} +1 -1
  160. package/dist/resource-tagging-C33U6T74.mjs +2 -0
  161. package/dist/rules-BfjzALMi.mjs +4 -0
  162. package/dist/rulesets-3i_1Vwt-.mjs +5 -0
  163. package/dist/rum-CjmIckiR.mjs +4 -0
  164. package/dist/{schema-BeXPWeK9.mjs → schema-1mwmslUV.mjs} +1 -1
  165. package/dist/schema-flags-llLJuFFw.mjs +5 -0
  166. package/dist/{scim-BgGsmHrL.mjs → scim-pApmzA5B.mjs} +1 -1
  167. package/dist/sdk-ZctLa5jW.mjs +3 -0
  168. package/dist/{secrets-store-BCpFhYFv.mjs → secrets-store-DBC9WJau.mjs} +1 -1
  169. package/dist/security-center-Djm06dq-.mjs +2 -0
  170. package/dist/{security-txt-Be2Bif0z.mjs → security-txt-Ci7bP4zH.mjs} +1 -1
  171. package/dist/{share-Bz2tFTUP.mjs → share-Dj-MNXrw.mjs} +4 -4
  172. package/dist/shared-BJvq4DkR.mjs +290 -0
  173. package/dist/smart-shield--8EpJjrF.mjs +4 -0
  174. package/dist/snippets-Dyz0PH60.mjs +4 -0
  175. package/dist/{spawn-CHkoow5W.mjs → spawn-C5Z7oWdp.mjs} +108 -112
  176. package/dist/{spectrum-BA0a42eM.mjs → spectrum-rAHWz8rH.mjs} +1 -1
  177. package/dist/{speed-mmOjxOzo.mjs → speed-BKepWBXj.mjs} +1 -1
  178. package/dist/src-gJma71Ec.mjs +108 -0
  179. package/dist/{ssl-Yr6kELqg.mjs → ssl-KdFiY3ev.mjs} +1 -1
  180. package/dist/startup-profile-GLNPHQ9U.mjs +17 -0
  181. package/dist/{state-DZC531l2.mjs → state-Cu3cItUg.mjs} +1 -1
  182. package/dist/{stream-Cu0kYWbc.mjs → stream-CKJ6Tb0M.mjs} +13 -13
  183. package/dist/submit-BxbKKhBn.mjs +2 -0
  184. package/dist/tags-DA8dq9fx.mjs +2 -0
  185. package/dist/tenant-DLXw48hS.mjs +2 -0
  186. package/dist/tenant-custom-nameservers-9G93XuvU.mjs +3 -0
  187. package/dist/{tools-D2Xxfkrc.mjs → tools-x8bj9E6b.mjs} +1 -1
  188. package/dist/{tunnel-CDYkWjnt.mjs → tunnel-CNQA5Flp.mjs} +1 -1
  189. package/dist/tunnels-CC10EOsU.mjs +2 -0
  190. package/dist/turnstile-CH58hnf4.mjs +23 -0
  191. package/dist/{ui-DIpjthrV.mjs → ui-CmnnBm_O.mjs} +1 -1
  192. package/dist/url-info-BpCgdUtL.mjs +2 -0
  193. package/dist/{url-normalization-BeKkOZz7.mjs → url-normalization-BzuynEy1.mjs} +1 -1
  194. package/dist/url-scanner-APIZbhB7.mjs +2 -0
  195. package/dist/user-2-NGebfI.mjs +12 -0
  196. package/dist/values-S_bNv819.mjs +2 -0
  197. package/dist/{vectorize-CjXfiFH4.mjs → vectorize-Bv7feLBC.mjs} +1 -1
  198. package/dist/waiting-rooms-Dk4LIpvm.mjs +11 -0
  199. package/dist/{web-assets-BzM5vVzy.mjs → web-assets-C1UmOyzD.mjs} +1 -1
  200. package/dist/web3-GnUocVYH.mjs +4 -0
  201. package/dist/workers-J1-PLwdl.mjs +28 -0
  202. package/dist/{workers-builds-B44wc67O.mjs → workers-builds-DCHmWOMS.mjs} +4 -4
  203. package/dist/{workflows-rFuQWClt.mjs → workflows-CArfEI2c.mjs} +2 -2
  204. package/dist/zaraz-mg2YlR3_.mjs +2 -0
  205. package/dist/zero-trust-DVdUPtj1.mjs +93 -0
  206. package/dist/zone-DMAfrDJX.mjs +2 -0
  207. package/dist/zones-CNwxUi7I.mjs +21 -0
  208. package/package.json +10 -7
  209. package/dist/abuse-reports-CzDAjFpo.mjs +0 -8
  210. package/dist/account-Dd4-tDYJ.mjs +0 -2
  211. package/dist/account-tags-65fAlHrf.mjs +0 -9
  212. package/dist/accounts-Bp5KGc6r.mjs +0 -28
  213. package/dist/agent-memory-D--BQS0W.mjs +0 -6
  214. package/dist/ai-BnVlQDiI.mjs +0 -5
  215. package/dist/ai-audit-CfpDKXkD.mjs +0 -2
  216. package/dist/ai-gateway-oG4j_oYN.mjs +0 -13
  217. package/dist/ai-search-B2l3B_jn.mjs +0 -7
  218. package/dist/ai-security-byjIIrfl.mjs +0 -4
  219. package/dist/analytics-DeIKjC9n.mjs +0 -3
  220. package/dist/analytics_engine-BnECMIWJ.mjs +0 -2
  221. package/dist/argo-DFerMyXF.mjs +0 -2
  222. package/dist/artifacts-CtyEYYDa.mjs +0 -4
  223. package/dist/audit-logs-retFtvow.mjs +0 -2
  224. package/dist/auth-aazs91XL.mjs +0 -5
  225. package/dist/billing-CxQVqpGZ.mjs +0 -3
  226. package/dist/body-parser-CYD7PKFC.mjs +0 -2
  227. package/dist/bot-management-Rli7v7tg.mjs +0 -5
  228. package/dist/botnet-feed-Cw6XSEf8.mjs +0 -3
  229. package/dist/brand-protection-CTvnHGfV.mjs +0 -3
  230. package/dist/browser-run-FwtwnBzA.mjs +0 -4
  231. package/dist/build-Dji9BYmV.mjs +0 -2
  232. package/dist/certificate-authorities-DZP1RzAs.mjs +0 -2
  233. package/dist/cf-oSz9pud_.mjs +0 -18
  234. package/dist/chunk-LQW53VED-Xakf_rUn.mjs +0 -499
  235. package/dist/cloud-connector-BpVcvhjZ.mjs +0 -2
  236. package/dist/cloudforce-one-2PecncfX.mjs +0 -30
  237. package/dist/connector-interrupts-ollUcksZ.mjs +0 -2
  238. package/dist/connector-telemetry-events-D5_3X7XW.mjs +0 -2
  239. package/dist/connector-telemetry-snapshots-CJ9gLRFR.mjs +0 -2
  240. package/dist/containers-Bog7j0Hw.mjs +0 -54
  241. package/dist/custom-certificates-4y35UC1X.mjs +0 -5
  242. package/dist/custom-csrs-DwBrLh-H.mjs +0 -4
  243. package/dist/custom-hostnames-CDIAnsRa.mjs +0 -5
  244. package/dist/custom-nameservers-stk7ymnP.mjs +0 -3
  245. package/dist/custom-pages-vfDxrXbt.mjs +0 -4
  246. package/dist/d1-Cllm-iTT.mjs +0 -20
  247. package/dist/data-security-rnoSCEdL.mjs +0 -7
  248. package/dist/dcv-delegation-DCRCOL6l.mjs +0 -2
  249. package/dist/deploy-input-DhCo1I0I.mjs +0 -242
  250. package/dist/diagnostics-D5Yo2xqx.mjs +0 -3
  251. package/dist/dist-COfwjT96.mjs +0 -72
  252. package/dist/dns-DdQYtenF.mjs +0 -29
  253. package/dist/durable-objects-BvxXBht_.mjs +0 -2
  254. package/dist/email-CGOC_evd.mjs +0 -2
  255. package/dist/email-auth-DFvXKSkg.mjs +0 -2
  256. package/dist/email-routing-QBRPBlyl.mjs +0 -6
  257. package/dist/email-security-BFagcRPP.mjs +0 -18
  258. package/dist/email-sending-Ddhe7xjN.mjs +0 -7
  259. package/dist/filters-CGisPGD1.mjs +0 -4
  260. package/dist/firewall-DD8U-Brd.mjs +0 -11
  261. package/dist/flagship-FJHc4mFi.mjs +0 -4
  262. package/dist/google-tag-gateway-149kbuG_.mjs +0 -2
  263. package/dist/iam-BhHYhMXO.mjs +0 -6
  264. package/dist/images-CDViyKtZ.mjs +0 -8
  265. package/dist/intel-YHZbPlS3.mjs +0 -8
  266. package/dist/ips-BpCdldFx.mjs +0 -2
  267. package/dist/keys-yYtv7Ztr.mjs +0 -2
  268. package/dist/load-balancers-jRCN75mX.mjs +0 -7
  269. package/dist/logexplorer-kO8CULiK.mjs +0 -24
  270. package/dist/logo-matches-LyDAYPbI.mjs +0 -2
  271. package/dist/logos-O9f5bGSB.mjs +0 -3
  272. package/dist/logpush-dtXLu3Ck.mjs +0 -5
  273. package/dist/magic-network-monitoring-CpfkgZMp.mjs +0 -4
  274. package/dist/magic-transit-DwgZeIj-.mjs +0 -111
  275. package/dist/managed-transforms-DCmogkxv.mjs +0 -3
  276. package/dist/matches-BAeN8VM1.mjs +0 -2
  277. package/dist/mcp-DKZ2D050.mjs +0 -4
  278. package/dist/media-CnxgOViL.mjs +0 -2
  279. package/dist/mesh-CzIPtuaM.mjs +0 -4
  280. package/dist/mtls-certificates-Bbm_1lQI.mjs +0 -3
  281. package/dist/oauth-BPizUUqP.mjs +0 -15
  282. package/dist/oauth-scopes-CmbgsPYd.mjs +0 -2
  283. package/dist/observability-DXYgDdU5.mjs +0 -4
  284. package/dist/organizations-eNzfOwlP.mjs +0 -2
  285. package/dist/origin-ca-certificates-DaiAmw45.mjs +0 -3
  286. package/dist/origin-post-quantum-encryption-7YztBged.mjs +0 -2
  287. package/dist/origin-tls-client-auth-DRwURM8s.mjs +0 -4
  288. package/dist/page-rules-B2Csdc4h.mjs +0 -18
  289. package/dist/pages-BAL6Q7OY.mjs +0 -14
  290. package/dist/pay-per-crawl-C-1-ZAtn.mjs +0 -4
  291. package/dist/pipelines-cyQOuFLb.mjs +0 -6
  292. package/dist/precursor-BrweY39h.mjs +0 -4
  293. package/dist/progress-B84wYh91.mjs +0 -2
  294. package/dist/prompt-CDtLWxNv.mjs +0 -3
  295. package/dist/queries-oM8uGZy5.mjs +0 -3
  296. package/dist/queues-CTx04ZNw.mjs +0 -6
  297. package/dist/r2-CnlIUn7R.mjs +0 -24
  298. package/dist/radar-CGNgGh8v.mjs +0 -2
  299. package/dist/raw-fetch-Dz-QBoP_.mjs +0 -2
  300. package/dist/realtimekit-BPwzhNS9.mjs +0 -7
  301. package/dist/registrar-BEcb90RX.mjs +0 -21
  302. package/dist/reporting-CLbjHlnw.mjs +0 -2
  303. package/dist/request-tracers-BcKpofP1.mjs +0 -2
  304. package/dist/resource-tagging-DGEyVTDN.mjs +0 -2
  305. package/dist/rules-CmuB5rIN.mjs +0 -4
  306. package/dist/rulesets-CGaMq8vG.mjs +0 -8
  307. package/dist/rum-QT6EP4JK.mjs +0 -4
  308. package/dist/schema-flags-DHryz6SF.mjs +0 -5
  309. package/dist/sdk-m4xeaua4.mjs +0 -3
  310. package/dist/security-center-BNm4uPVB.mjs +0 -2
  311. package/dist/session-Ckt20hHa.mjs +0 -2
  312. package/dist/shared-BzPQog8H.mjs +0 -2
  313. package/dist/smart-shield-SODkOUyO.mjs +0 -4
  314. package/dist/snippets-B5jY8v_7.mjs +0 -4
  315. package/dist/src-CHW7s5IS.mjs +0 -108
  316. package/dist/submit-Dl_27e0n.mjs +0 -2
  317. package/dist/tags-Cdo_Pwtr.mjs +0 -2
  318. package/dist/tenant-EX-ANl6X.mjs +0 -2
  319. package/dist/tenant-custom-nameservers-BPHUeckw.mjs +0 -3
  320. package/dist/triggers-Bf9hbP3h.mjs +0 -2
  321. package/dist/tunnels-CgyX8R2J.mjs +0 -2
  322. package/dist/turnstile-BUtzlW-0.mjs +0 -23
  323. package/dist/url-info-CJsa1Oc9.mjs +0 -2
  324. package/dist/url-scanner-Cz-yl0_3.mjs +0 -2
  325. package/dist/user-BxHjEqpd.mjs +0 -12
  326. package/dist/values-C43NurfT.mjs +0 -2
  327. package/dist/versions-BFbc90Wu.mjs +0 -2
  328. package/dist/waiting-rooms-C5jSQv_r.mjs +0 -11
  329. package/dist/web3-Ctv9HGiR.mjs +0 -4
  330. package/dist/workers-D-YbIedB.mjs +0 -24
  331. package/dist/zaraz-BA6kY-b6.mjs +0 -2
  332. package/dist/zero-trust-DOFLlUz1.mjs +0 -102
  333. package/dist/zone-B_rgejLV.mjs +0 -2
  334. package/dist/zone-tags-BWdza4rH.mjs +0 -9
  335. package/dist/zones-DTWO7Vvn.mjs +0 -21
  336. /package/dist/{Page-C-JHZnIy.mjs → Page-9ry_XAVC.mjs} +0 -0
  337. /package/dist/{alerts-B85uj2Vx.mjs → alerts-15-IW4jE.mjs} +0 -0
  338. /package/dist/{autorag-Do9l_LyY.mjs → autorag-CFwRkEKw.mjs} +0 -0
  339. /package/dist/{brands-DateHCdd.mjs → brands-BgT1vu9B.mjs} +0 -0
  340. /package/dist/{chunk-6EUZQHAF-l8tR2Qyj.mjs → chunk-6EUZQHAF-C3w62dek.mjs} +0 -0
  341. /package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-DVMMVVEs.mjs} +0 -0
  342. /package/dist/{clear-CB2kgcEB.mjs → clear-BlCK85Me.mjs} +0 -0
  343. /package/dist/{cli-types-BWdZbsFE.mjs → cli-types-DAYeL_Mj.mjs} +0 -0
  344. /package/dist/{domain-info-DJHEt8JJ.mjs → domain-info-C7LBxPBt.mjs} +0 -0
  345. /package/dist/{health-buY5f5pp.mjs → health-DZFfafkX.mjs} +0 -0
  346. /package/dist/{input-validation-BBKJRoRB.mjs → input-validation-QDIYu7Vb.mjs} +0 -0
  347. /package/dist/{internal-CwyoJUHh.mjs → internal-BKHC2D1Y.mjs} +0 -0
  348. /package/dist/{live-wEpA5V_n.mjs → live-DwCvDmaH.mjs} +0 -0
  349. /package/dist/{metadata-8AkOftcB.mjs → metadata-B5yfL0ln.mjs} +0 -0
  350. /package/dist/{rate-limit-analytics-Bf1uT0lT.mjs → rate-limit-analytics-B8Vuu1sU.mjs} +0 -0
  351. /package/dist/{ready-CBSCPiHE.mjs → ready-D9H2zHHI.mjs} +0 -0
  352. /package/dist/{recent-submissions-Dpmq1f7z.mjs → recent-submissions-BPo0J80d.mjs} +0 -0
  353. /package/dist/{refute-u7ZPQJZy.mjs → refute-2W8NLCN4.mjs} +0 -0
  354. /package/dist/{resolve-XgxRJ-Ys.mjs → resolve-B8CyM1mi.mjs} +0 -0
  355. /package/dist/{scan-logo-Ba8WZAyp.mjs → scan-logo-D5x6F1Y0.mjs} +0 -0
  356. /package/dist/{scan-page-Bcq3Ei86.mjs → scan-page-CWhta3x7.mjs} +0 -0
  357. /package/dist/{search-D9WDwnV4.mjs → search-DZmBQJL9.mjs} +0 -0
  358. /package/dist/{signed-url-CjPbG5zV.mjs → signed-url-CQrmWgz5.mjs} +0 -0
  359. /package/dist/{submission-info-Z9hhp9Rq.mjs → submission-info-C98A0bqq.mjs} +0 -0
  360. /package/dist/{theme-BePJemMn.mjs → theme-CrIBazAF.mjs} +0 -0
  361. /package/dist/{total-queries-aKAYX1iX.mjs → total-queries-BZoaFoDE.mjs} +0 -0
  362. /package/dist/{tracked-domains-Ck7Jm4Kn.mjs → tracked-domains-CNHogPHx.mjs} +0 -0
  363. /package/dist/{verify-2yi0H93r.mjs → verify-4e4L9IRk.mjs} +0 -0
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n,h as r}from"./oauth-BPizUUqP.mjs";import{r as i}from"./auth-DuLchM18.mjs";import{t as a}from"./output-DgW1hQGX.mjs";import{n as o,t as s}from"./progress-B84wYh91.mjs";import{n as c,t as l}from"./body-parser-CYD7PKFC.mjs";import{n as u}from"./input-validation-BBKJRoRB.mjs";import{t as d}from"./cli-types-BWdZbsFE.mjs";function f(e){return e.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 p={command:`get <issue-id>`,describe:`Lists audit log entries for a specific Security Center insight, showing changes to its status and classification over time.`,builder:d(f),handler:async r=>{let c={per_page:r[`per-page`],cursor:r.cursor,field_changed:r[`field-changed`],changed_by:r[`changed-by`],since:r.since,before:r.before,order:r.order};if(r.dryRun){o({command:`cf security-center audit-logs 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`]))}/audit-log`,pathParams:{"issue-id":String(r[`issue-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.securityCenter.auditLogs.get({account_id:u,issue_id:r[`issue-id`],...c})),{successLabel:`Loaded`})}};function ee(e){return e.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 m={command:`list`,describe:`Lists audit log entries for all Security Center insights in the account, showing changes to insight status and classification.`,builder:d(ee),handler:async r=>{let c={per_page:r[`per-page`],cursor:r.cursor,field_changed:r[`field-changed`],changed_by:r[`changed-by`],since:r.since,before:r.before,order:r.order};if(r.dryRun){o({command:`cf security-center audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/insights/audit-log`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.securityCenter.auditLogs.list({account_id:u,...c})),{successLabel:`Loaded`})}},h={command:`audit-logs`,describe:`Operations for audit-logs`,builder:e=>e.command(p).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.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(`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 _={command:`get`,describe:`Retrieves Security Center insight counts aggregated by classification class.`,builder:d(g),handler:async r=>{let c={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject};if(r.dryRun){o({command:`cf security-center insights class get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/insights/class`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.securityCenter.insights.class.get({account_id:u,...c})),{successLabel:`Loaded`})}},v={command:`class`,describe:`Operations for insights.class`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.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 b={command:`dismiss <issue-id>`,describe:`Archives a Security Center insight for an account, removing it from the active insights list while preserving historical data.`,builder:y,handler:async r=>{if(r.dryRun){o({command:`cf security-center insights dismiss`,method:`PUT`,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`]))}/dismiss`,pathParams:{"issue-id":String(r[`issue-id`]??``)},bodyKind:`json`,body:r.body===void 0?l({dismiss:r.dismiss}):c(r.body)});return}let u=await i(r),d=r.local?e:await t();if(r.accountId=d,r.body){let e=c(r.body);a(await s(`Updating`,async()=>u.securityCenter.insights.dismiss({...e,account_id:d,issue_id:r[`issue-id`]})),{successLabel:`Updated`});return}let f=l({dismiss:r.dismiss});a(await s(`Updating`,async()=>u.securityCenter.insights.dismiss({...f,account_id:d,issue_id:r[`issue-id`]})),{successLabel:`Updated`})}};function x(e){return e.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(`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 S={command:`list`,describe:`Lists all Security Center insights for the account, showing security findings and recommendations.`,builder:d(x),handler:async r=>{let c={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject,page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf security-center insights list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/insights`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.securityCenter.insights.list({account_id:u,...c})),{successLabel:`Loaded`})}};function C(e){return e.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(`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 w={command:`get`,describe:`Retrieves Security Center insight counts aggregated by severity level (critical, high, medium, low).`,builder:d(C),handler:async r=>{let c={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject};if(r.dryRun){o({command:`cf security-center insights severity get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/insights/severity`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.securityCenter.insights.severity.get({account_id:u,...c})),{successLabel:`Loaded`})}},T={command:`severity`,describe:`Operations for insights.severity`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.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(`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 D={command:`get`,describe:`Retrieves Security Center insight counts aggregated by insight type.`,builder:d(E),handler:async r=>{let c={dismissed:r.dismissed,issue_class:r[`issue-class`],issue_type:r[`issue-type`],product:r.product,severity:r.severity,subject:r.subject};if(r.dryRun){o({command:`cf security-center insights type get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/insights/type`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.securityCenter.insights.type.get({account_id:u,...c})),{successLabel:`Loaded`})}},O={command:`type`,describe:`Operations for insights.type`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.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 A={command:`update-classification <issue-id>`,describe:`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.`,builder:k,handler:async r=>{if(r.dryRun){o({command:`cf security-center insights update-classification`,method:`PATCH`,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`]))}/classification`,pathParams:{"issue-id":String(r[`issue-id`]??``)},bodyKind:`json`,body:r.body===void 0?l({classification:u(r.classification,`classification`,`text`),rationale:u(r.rationale,`rationale`,`text`)}):c(r.body)});return}let d=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=c(r.body);a(await s(`Updating`,async()=>d.securityCenter.insights.updateClassification({body:e,account_id:f,issue_id:r[`issue-id`]})),{successLabel:`Updated`});return}let p=l({classification:u(r.classification,`classification`,`text`),rationale:u(r.rationale,`rationale`,`text`)});a(await s(`Updating`,async()=>d.securityCenter.insights.updateClassification({body:p,account_id:f,issue_id:r[`issue-id`]})),{successLabel:`Updated`})}},j={command:`insights`,describe:`Security findings and recommendations across your account — DNS, SSL, WAF misconfigurations, etc.`,builder:e=>e.command(b).command(S).command(A).command(v).command(T).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`Returns the most recent on-demand scans for the account, up to a maximum of 5. Each scan includes its ID, start time, and current status. This includes both account-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.`,builder:M,handler:async r=>{if(r.dryRun){o({command:`cf security-center scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/insights/scans`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.securityCenter.scans.list({account_id:l})),{successLabel:`Loaded`})}};function P(e){return e.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 F={command:`start`,describe:`Initiates an on-demand security scan for the entire account, scanning all zones associated with the account. Rate limited to 5 scans per account per 24-hour window.`,builder:P,handler:async r=>{if(r.dryRun){o({command:`cf security-center scans start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/security-center/insights/scans`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({issue_type:u(r[`issue-type`],`issue-type`,`text`),issue_class:u(r[`issue-class`],`issue-class`,`text`)}):c(r.body)});return}let d=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=c(r.body);a(await s(`Creating`,async()=>d.securityCenter.scans.start({body:e,account_id:f})),{successLabel:`Created`});return}let p=l({issue_type:u(r[`issue-type`],`issue-type`,`text`),issue_class:u(r[`issue-class`],`issue-class`,`text`)});a(await s(`Creating`,async()=>d.securityCenter.scans.start({body:p,account_id:f})),{successLabel:`Created`})}},I={command:`scans`,describe:`Operations for scans`,builder:e=>e.command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get`,describe:`Returns account-level Security Center state: whether scans are enabled for the account and whether the account was recently reactivated from a dormant state.`,builder:L,handler:async r=>{if(r.dryRun){o({command:`cf security-center 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 i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.securityCenter.state.get({account_id:l})),{successLabel:`Loaded`})}};function z(e){return e.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 B={command:`update`,describe:`Updates account-level Security Center state. Currently supports enabling or disabling scans for the account. Returns the account's state after the update.`,builder:z,handler:async r=>{if(r.dryRun){o({command:`cf security-center 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?l({scans_enabled:r[`scans-enabled`]}):c(r.body)});return}let u=await i(r),d=r.local?e:await t();if(r.accountId=d,r.body){let e=c(r.body);a(await s(`Updating`,async()=>u.securityCenter.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=l({scans_enabled:r[`scans-enabled`]});a(await s(`Updating`,async()=>u.securityCenter.state.update({...f,account_id:d})),{successLabel:`Updated`})}},V={command:`state`,describe:`Operations for state`,builder:e=>e.command(R).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.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 H={command:`get <issue-id>`,describe:`Lists audit log entries for a specific Security Center insight within a zone, showing changes to its status and classification over time.`,builder:d(te),handler:async e=>{let t={per_page:e[`per-page`],cursor:e.cursor,field_changed:e[`field-changed`],changed_by:e[`changed-by`],since:e.since,before:e.before,order:e.order};if(e.dryRun){o({command:`cf security-center zone-audit-logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/insights/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/audit-log`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"issue-id":String(e[`issue-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),c=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>n.securityCenter.zoneAuditLogs.get({zone_id:c,issue_id:e[`issue-id`],...t})),{successLabel:`Loaded`})}};function U(e){return e.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 W={command:`list`,describe:`Lists audit log entries for all Security Center insights in a specific zone, showing changes to insight status and classification.`,builder:d(U),handler:async e=>{let t={per_page:e[`per-page`],cursor:e.cursor,field_changed:e[`field-changed`],changed_by:e[`changed-by`],since:e.since,before:e.before,order:e.order};if(e.dryRun){o({command:`cf security-center zone-audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/insights/audit-log`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),c=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>n.securityCenter.zoneAuditLogs.list({zone_id:c,...t})),{successLabel:`Loaded`})}},G={command:`zone-audit-logs`,describe:`Operations for zone-audit-logs`,builder:e=>e.command(H).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.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(`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 q={command:`get`,describe:`Retrieves zone-specific Security Center insight counts aggregated by classification class.`,builder:d(K),handler:async e=>{let t={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,severity:e.severity,subject:e.subject};if(e.dryRun){o({command:`cf security-center zone-insights class get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/insights/class`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),c=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>n.securityCenter.zoneInsights.class.get({zone_id:c,...t})),{successLabel:`Loaded`})}},J={command:`class`,describe:`Operations for zone-insights.class`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Y(e){return e.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 X={command:`get <issue-id>`,describe:`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.`,builder:Y,handler:async r=>{if(r.dryRun){o({command:`cf security-center zone-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 i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.securityCenter.zoneInsights.context.get({account_id:l,issue_id:r[`issue-id`]})),{successLabel:`Loaded`})}},Z={command:`context`,describe:`Operations for zone-insights.context`,builder:e=>e.command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.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 ne={command:`update <issue-id>`,describe:`Archives a zone-specific Security Center insight, removing it from the active zone insights while preserving historical data.`,builder:Q,handler:async e=>{if(e.dryRun){o({command:`cf security-center zone-insights dismiss update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/insights/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/dismiss`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({dismiss:e.dismiss}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Updating`,async()=>t.securityCenter.zoneInsights.dismiss.update({...r,zone_id:n,issue_id:e[`issue-id`]})),{successLabel:`Updated`});return}let u=l({dismiss:e.dismiss});a(await s(`Updating`,async()=>t.securityCenter.zoneInsights.dismiss.update({...u,zone_id:n,issue_id:e[`issue-id`]})),{successLabel:`Updated`})}},re={command:`dismiss`,describe:`Operations for zone-insights.dismiss`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ie(e){return e.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(`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 ae={command:`get`,describe:`Lists Security Center insights for a specific zone, showing zone-level security findings.`,builder:d(ie),handler:async e=>{let t={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,severity:e.severity,subject:e.subject,page:e.page,per_page:e[`per-page`]};if(e.dryRun){o({command:`cf security-center zone-insights get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/insights`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),c=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>n.securityCenter.zoneInsights.get({zone_id:c,...t})),{successLabel:`Loaded`})}};function oe(e){return e.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(`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 se={command:`get`,describe:`Retrieves zone-specific Security Center insight counts aggregated by severity level.`,builder:d(oe),handler:async e=>{let t={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,severity:e.severity,subject:e.subject};if(e.dryRun){o({command:`cf security-center zone-insights severity get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/insights/severity`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),c=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>n.securityCenter.zoneInsights.severity.get({zone_id:c,...t})),{successLabel:`Loaded`})}},ce={command:`severity`,describe:`Operations for zone-insights.severity`,builder:e=>e.command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function le(e){return e.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(`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 ue={command:`get`,describe:`Retrieves zone-specific Security Center insight counts aggregated by insight type.`,builder:d(le),handler:async e=>{let t={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,severity:e.severity,subject:e.subject};if(e.dryRun){o({command:`cf security-center zone-insights type get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/insights/type`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),c=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>n.securityCenter.zoneInsights.type.get({zone_id:c,...t})),{successLabel:`Loaded`})}},de={command:`type`,describe:`Operations for zone-insights.type`,builder:e=>e.command(ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function fe(e){return e.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 pe={command:`update-classification <issue-id>`,describe:`Updates the user classification for a zone-specific 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.`,builder:fe,handler:async e=>{if(e.dryRun){o({command:`cf security-center zone-insights update-classification`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/insights/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/classification`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({classification:u(e.classification,`classification`,`text`),rationale:u(e.rationale,`rationale`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Updating`,async()=>t.securityCenter.zoneInsights.updateClassification({body:r,zone_id:n,issue_id:e[`issue-id`]})),{successLabel:`Updated`});return}let d=l({classification:u(e.classification,`classification`,`text`),rationale:u(e.rationale,`rationale`,`text`)});a(await s(`Updating`,async()=>t.securityCenter.zoneInsights.updateClassification({body:d,zone_id:n,issue_id:e[`issue-id`]})),{successLabel:`Updated`})}},$={command:`zone-insights`,describe:`Zone-scoped security insights — counts by class, severity, type, and dismissal`,builder:e=>e.command(ae).command(pe).command(J).command(Z).command(re).command(ce).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`list`,describe:`Returns the most recent on-demand scans for a specific zone, up to a maximum of 5. Each scan includes its ID, start time, and current status. Results include both zone-specific scans and account-wide scans (which cover all zones). Also returns quota information showing how many scans have been used and how many remain in the current 24-hour window.`,builder:me,handler:async e=>{if(e.dryRun){o({command:`cf security-center zone-scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/insights/scans`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.securityCenter.zoneScans.list({zone_id:n})),{successLabel:`Loaded`})}};function ge(e){return e.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 _e={command:`start`,describe:`Initiates an on-demand security scan for a specific zone. Rate limited to 5 scans per account per 24-hour window (shared with account-level scans).`,builder:ge,handler:async e=>{if(e.dryRun){o({command:`cf security-center zone-scans start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/security-center/insights/scans`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({issue_type:u(e[`issue-type`],`issue-type`,`text`),issue_class:u(e[`issue-class`],`issue-class`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.securityCenter.zoneScans.start({body:r,zone_id:n})),{successLabel:`Created`});return}let d=l({issue_type:u(e[`issue-type`],`issue-type`,`text`),issue_class:u(e[`issue-class`],`issue-class`,`text`)});a(await s(`Creating`,async()=>t.securityCenter.zoneScans.start({body:d,zone_id:n})),{successLabel:`Created`})}},ve={command:`zone-scans`,describe:`Operations for zone-scans`,builder:e=>e.command(he).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`security-center`,describe:`Security posture dashboard — view and manage security insights, misconfigurations, and vulnerabilities`,builder:e=>e.command(h).command(j).command(I).command(V).command(G).command($).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ye as default};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{o as e}from"./chunk-LQW53VED-Xakf_rUn.mjs";import"./delegate.mjs";import{a as t,n,t as r}from"./theme-BePJemMn.mjs";import{stripVTControlCharacters as i}from"node:util";function a({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}const o=a();function s(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes(`\x1B`)&&!e.includes(`›`)?e:e.replace(o,``)}const c=(e=0)=>t=>`\u001B[${t+e}m`,l=(e=0)=>t=>`\u001B[${38+e};5;${t}m`,u=(e=0)=>(t,n,r)=>`\u001B[${38+e};2;${t};${n};${r}m`,d={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(d.modifier);const f=Object.keys(d.color),p=Object.keys(d.bgColor);[...f,...p];function m(){let e=new Map;for(let[t,n]of Object.entries(d)){for(let[t,r]of Object.entries(n))d[t]={open:`\u001B[${r[0]}m`,close:`\u001B[${r[1]}m`},n[t]=d[t],e.set(r[0],r[1]);Object.defineProperty(d,t,{value:n,enumerable:!1})}return Object.defineProperty(d,`codes`,{value:e,enumerable:!1}),d.color.close=`\x1B[39m`,d.bgColor.close=`\x1B[49m`,d.color.ansi=c(),d.color.ansi256=l(),d.color.ansi16m=u(),d.bgColor.ansi=c(10),d.bgColor.ansi256=l(10),d.bgColor.ansi16m=u(10),Object.defineProperties(d,{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=>d.rgbToAnsi256(...d.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)=>d.ansi256ToAnsi(d.rgbToAnsi256(e,t,n)),enumerable:!1},hexToAnsi:{value:e=>d.ansi256ToAnsi(d.hexToAnsi256(e)),enumerable:!1}}),d}const h=m(),g=process.env.CLI_VERSION??`0.9.1`,_=`cf-cli/${g}`;function v(e){let t=n(),a=process.env.CF_DELEGATION?` ${t.dim(`·`)} ${t.dim(`delegated`)}`:``,o=`🍊☁️ ${t.bold.hex(r.orange)(`cf`)} ${t.dim(`·`)} ${t.dim(`v${e}`)}${a}`,s=i(o).length,c=`─`.repeat(s);return`${o}\n${t.hex(r.orange)(c)}`}let y=!1,b=!1,x=!1;function S(e,t={}){if(!(y||b)){if(t.quiet||!process.stderr.isTTY){b=!0;return}process.stderr.write(`${v(e)}\n`),y=!0}}function C(n){!y||b||x||n===`default`||e({allowGlobalAuthKey:!1})!==void 0||(process.stderr.write(`${t.muted(`Active profile:`)} ${t.info(n)}\n`),x=!0)}export{g as a,_ as i,C as n,h as o,v as r,s,S as t};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- import{a as e,o as t}from"./theme-BePJemMn.mjs";import"./ui-DIpjthrV.mjs";import{f as n}from"./oauth-BPizUUqP.mjs";import{c as r}from"./interactive-mV8PABm6.mjs";import{i}from"./auth-DuLchM18.mjs";import{a,i as o,n as s}from"./build-Dji9BYmV.mjs";import{a as c,c as l,i as u,l as d,n as f,o as p,t as m}from"./deploy-input-DhCo1I0I.mjs";function h(e){return e.option(`mode`,{type:`string`,alias:`m`,description:`Deployment mode (e.g. production, staging, preview)`}).option(`prebuilt`,{type:`boolean`,description:`Deploy existing Build Output API 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})}async function g(h,g){h.prebuilt||(await s(h.mode),r.message(``,{spacing:0}));let{workers:{default:_},settings:v}=await a(process.cwd()),{wranglerConfig:y,builtConfig:b}=o(_,v),x=m(_,b),S=await i(),C=await n();if(d(c(S)),g.command===`Deploy`){let n=f(_,y,C,h);r.message(e.bold(`Deploy`),{symbol:t.dim(`├`),spacing:0}),await p(n,y,x,{syncWorkersSite:void 0,getNormalizedContainerOptions:void 0,buildContainer:void 0,deployContainers:void 0,analyseBundle:void 0})}else{let n=u(_,y,C,h);r.message(e.bold(`Upload`),{symbol:t.dim(`├`),spacing:0}),await l(n,y,x,{analyseBundle:void 0})}r.success(h[`dry-run`]?`Dry run complete`:`${g.command} complete`)}export{h as n,g as t};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{h as e}from"./oauth-BPizUUqP.mjs";import{r as t}from"./auth-DuLchM18.mjs";import{t as n}from"./output-DgW1hQGX.mjs";import{n as r,t as i}from"./progress-B84wYh91.mjs";import{n as a,t as o}from"./body-parser-CYD7PKFC.mjs";import{n as s}from"./input-validation-BBKJRoRB.mjs";import{a as c,n as l}from"./prompt-CDtLWxNv.mjs";function u(e){return e.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:`clear`,describe:`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.`,builder:u,handler:async a=>{if(a.dryRun){r({command:`cf smart-shield cache-reserve-clear clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`})){process.stderr.write(`Aborted.
3
- `);return}n(await i(`Deleting`,async()=>o.smartShield.cacheReserveClear.clear({zone_id:s})),{successLabel:`Deleted`})}};function f(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`status`,describe:`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.`,builder:f,handler:async a=>{if(a.dryRun){r({command:`cf smart-shield cache-reserve-clear status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.smartShield.cacheReserveClear.status({zone_id:s})),{successLabel:`Loaded`})}},m={command:`cache-reserve-clear`,describe:`Operations for cache-reserve-clear`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`Retrieve Smart Shield Settings.`,builder:h,handler:async a=>{if(a.dryRun){r({command:`cf smart-shield get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.smartShield.get({zone_id:s})),{successLabel:`Loaded`})}};function _(e){return e.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.`,default:!1}).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.`,default:!1}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`],default:`GET`}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`,default:`/`}).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.`,default:80}).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`],default:`connection_established`}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`,default: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 v={command:`create`,describe:`Create a new health check.`,builder:_,handler:async l=>{if(l.dryRun){r({command:`cf smart-shield health-checks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({address:s(l.address,`address`,`text`),check_regions:l[`check-regions`],consecutive_fails:l[`consecutive-fails`],consecutive_successes:l[`consecutive-successes`],description:s(l.description,`description`,`text`),http_config:{allow_insecure:l[`http-config-allow-insecure`],expected_body:s(l[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:l[`http-config-expected-codes`],follow_redirects:l[`http-config-follow-redirects`],method:s(l[`http-config-method`],`http-config-method`,`text`),path:s(l[`http-config-path`],`http-config-path`,`text`),port:l[`http-config-port`]},interval:l.interval,name:s(l.name,`name`,`text`),retries:l.retries,suspended:l.suspended,tcp_config:{method:s(l[`tcp-config-method`],`tcp-config-method`,`text`),port:l[`tcp-config-port`]},timeout:l.timeout,type:s(l.type,`type`,`text`)}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Creating`,async()=>u.smartShield.healthChecks.create({body:e,zone_id:d})),{successLabel:`Created`});return}l.address===void 0&&(l.address=await c(`address`,`The hostname or IP address of the origin server to run health checks on.`)),l.name===void 0&&(l.name=await c(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=o({address:s(l.address,`address`,`text`),check_regions:l[`check-regions`],consecutive_fails:l[`consecutive-fails`],consecutive_successes:l[`consecutive-successes`],description:s(l.description,`description`,`text`),http_config:{allow_insecure:l[`http-config-allow-insecure`],expected_body:s(l[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:l[`http-config-expected-codes`],follow_redirects:l[`http-config-follow-redirects`],method:s(l[`http-config-method`],`http-config-method`,`text`),path:s(l[`http-config-path`],`http-config-path`,`text`),port:l[`http-config-port`]},interval:l.interval,name:s(l.name,`name`,`text`),retries:l.retries,suspended:l.suspended,tcp_config:{method:s(l[`tcp-config-method`],`tcp-config-method`,`text`),port:l[`tcp-config-port`]},timeout:l.timeout,type:s(l.type,`type`,`text`)});n(await i(`Creating`,async()=>u.smartShield.healthChecks.create({body:f,zone_id:d})),{successLabel:`Created`})}};function y(e){return e.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 b={command:`delete <healthcheck-id>`,describe:`Delete a health check.`,builder:y,handler:async a=>{if(a.dryRun){r({command:`cf smart-shield health-checks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield/healthchecks/${a[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(a[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(a[`healthcheck-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force})){process.stderr.write(`Aborted.
4
- `);return}n(await i(`Deleting`,async()=>o.smartShield.healthChecks.delete({zone_id:s,healthcheck_id:a[`healthcheck-id`]})),{successLabel:`Deleted`})}};function x(e){return e.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 S={command:`edit <healthcheck-id>`,describe:`Patch a configured health check.`,builder:x,handler:async l=>{if(l.dryRun){r({command:`cf smart-shield health-checks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/smart_shield/healthchecks/${l[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(l[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(l[`healthcheck-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({address:s(l.address,`address`,`text`),check_regions:l[`check-regions`],consecutive_fails:l[`consecutive-fails`],consecutive_successes:l[`consecutive-successes`],description:s(l.description,`description`,`text`),http_config:{allow_insecure:l[`http-config-allow-insecure`],expected_body:s(l[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:l[`http-config-expected-codes`],follow_redirects:l[`http-config-follow-redirects`],method:s(l[`http-config-method`],`http-config-method`,`text`),path:s(l[`http-config-path`],`http-config-path`,`text`),port:l[`http-config-port`]},interval:l.interval,name:s(l.name,`name`,`text`),retries:l.retries,suspended:l.suspended,tcp_config:{method:s(l[`tcp-config-method`],`tcp-config-method`,`text`),port:l[`tcp-config-port`]},timeout:l.timeout,type:s(l.type,`type`,`text`)}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Updating`,async()=>u.smartShield.healthChecks.edit({body:e,zone_id:d,healthcheck_id:l[`healthcheck-id`]})),{successLabel:`Updated`});return}l.address===void 0&&(l.address=await c(`address`,`The hostname or IP address of the origin server to run health checks on.`)),l.name===void 0&&(l.name=await c(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=o({address:s(l.address,`address`,`text`),check_regions:l[`check-regions`],consecutive_fails:l[`consecutive-fails`],consecutive_successes:l[`consecutive-successes`],description:s(l.description,`description`,`text`),http_config:{allow_insecure:l[`http-config-allow-insecure`],expected_body:s(l[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:l[`http-config-expected-codes`],follow_redirects:l[`http-config-follow-redirects`],method:s(l[`http-config-method`],`http-config-method`,`text`),path:s(l[`http-config-path`],`http-config-path`,`text`),port:l[`http-config-port`]},interval:l.interval,name:s(l.name,`name`,`text`),retries:l.retries,suspended:l.suspended,tcp_config:{method:s(l[`tcp-config-method`],`tcp-config-method`,`text`),port:l[`tcp-config-port`]},timeout:l.timeout,type:s(l.type,`type`,`text`)});n(await i(`Updating`,async()=>u.smartShield.healthChecks.edit({body:f,zone_id:d,healthcheck_id:l[`healthcheck-id`]})),{successLabel:`Updated`})}};function C(e){return e.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 w={command:`get <healthcheck-id>`,describe:`Fetch a single configured health check.`,builder:C,handler:async a=>{if(a.dryRun){r({command:`cf smart-shield health-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield/healthchecks/${a[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(a[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(a[`healthcheck-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.smartShield.healthChecks.get({zone_id:s,healthcheck_id:a[`healthcheck-id`]})),{successLabel:`Loaded`})}};function T(e){return e.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 E={command:`list`,describe:`List configured health checks.`,builder:T,handler:async a=>{let o={page:a.page,per_page:a[`per-page`]};if(a.dryRun){r({command:`cf smart-shield health-checks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.smartShield.healthChecks.list({zone_id:c,...o})),{successLabel:`Loaded`})}};function D(e){return e.positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).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 O={command:`update <healthcheck-id>`,describe:`Update a configured health check.`,builder:D,handler:async c=>{if(c.dryRun){r({command:`cf smart-shield health-checks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/smart_shield/healthchecks/${c[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(c[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(c[`healthcheck-id`]??``),"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({result:{address:s(c[`result-address`],`result-address`,`text`),check_regions:c[`result-check-regions`],consecutive_fails:c[`result-consecutive-fails`],consecutive_successes:c[`result-consecutive-successes`],description:s(c[`result-description`],`result-description`,`text`),http_config:{allow_insecure:c[`result-http-config-allow-insecure`],expected_body:s(c[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:c[`result-http-config-expected-codes`],follow_redirects:c[`result-http-config-follow-redirects`],method:s(c[`result-http-config-method`],`result-http-config-method`,`text`),path:s(c[`result-http-config-path`],`result-http-config-path`,`text`),port:c[`result-http-config-port`]},interval:c[`result-interval`],name:s(c[`result-name`],`result-name`,`text`),retries:c[`result-retries`],suspended:c[`result-suspended`],tcp_config:{method:s(c[`result-tcp-config-method`],`result-tcp-config-method`,`text`),port:c[`result-tcp-config-port`]},timeout:c[`result-timeout`],type:s(c[`result-type`],`result-type`,`text`)},success:c.success}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Updating`,async()=>l.smartShield.healthChecks.update({...e,zone_id:u,healthcheck_id:c[`healthcheck-id`]})),{successLabel:`Updated`});return}if(c.success===void 0)throw Error(`--success is required (or pass --body with this field set).`);let d=o({result:{address:s(c[`result-address`],`result-address`,`text`),check_regions:c[`result-check-regions`],consecutive_fails:c[`result-consecutive-fails`],consecutive_successes:c[`result-consecutive-successes`],description:s(c[`result-description`],`result-description`,`text`),http_config:{allow_insecure:c[`result-http-config-allow-insecure`],expected_body:s(c[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:c[`result-http-config-expected-codes`],follow_redirects:c[`result-http-config-follow-redirects`],method:s(c[`result-http-config-method`],`result-http-config-method`,`text`),path:s(c[`result-http-config-path`],`result-http-config-path`,`text`),port:c[`result-http-config-port`]},interval:c[`result-interval`],name:s(c[`result-name`],`result-name`,`text`),retries:c[`result-retries`],suspended:c[`result-suspended`],tcp_config:{method:s(c[`result-tcp-config-method`],`result-tcp-config-method`,`text`),port:c[`result-tcp-config-port`]},timeout:c[`result-timeout`],type:s(c[`result-type`],`result-type`,`text`)},success:c.success});n(await i(`Updating`,async()=>l.smartShield.healthChecks.update({...d,zone_id:u,healthcheck_id:c[`healthcheck-id`]})),{successLabel:`Updated`})}},k={command:`health-checks`,describe:`Operations for health-checks`,builder:e=>e.command(v).command(b).command(S).command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.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 j={command:`update`,describe:`Set Smart Shield Settings.`,builder:A,handler:async c=>{if(c.dryRun){r({command:`cf smart-shield update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({cache_reserve:{value:s(c[`cache-reserve-value`],`cache-reserve-value`,`text`)},regional_tiered_cache:{value:s(c[`regional-tiered-cache-value`],`regional-tiered-cache-value`,`text`)},smart_routing:{value:s(c[`smart-routing-value`],`smart-routing-value`,`text`)},smart_tiered_cache:{value:s(c[`smart-tiered-cache-value`],`smart-tiered-cache-value`,`text`)}}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Updating`,async()=>l.smartShield.update({...e,zone_id:u})),{successLabel:`Updated`});return}let d=o({cache_reserve:{value:s(c[`cache-reserve-value`],`cache-reserve-value`,`text`)},regional_tiered_cache:{value:s(c[`regional-tiered-cache-value`],`regional-tiered-cache-value`,`text`)},smart_routing:{value:s(c[`smart-routing-value`],`smart-routing-value`,`text`)},smart_tiered_cache:{value:s(c[`smart-tiered-cache-value`],`smart-tiered-cache-value`,`text`)}});n(await i(`Updating`,async()=>l.smartShield.update({...d,zone_id:u})),{successLabel:`Updated`})}},M={command:`smart-shield`,describe:`smart-shield`,builder:e=>e.command(g).command(j).command(m).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import{h as e}from"./oauth-BPizUUqP.mjs";import{a as t,r as n}from"./auth-DuLchM18.mjs";import{t as r}from"./output-DgW1hQGX.mjs";import{n as i,t as a}from"./progress-B84wYh91.mjs";import{n as o}from"./body-parser-CYD7PKFC.mjs";import{n as s,t as c}from"./input-validation-BBKJRoRB.mjs";import{n as l}from"./prompt-CDtLWxNv.mjs";import{n as u,t as d}from"./raw-fetch-Dz-QBoP_.mjs";function f(e){return e.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 p={command:`get <snippet-name>`,describe:`Fetches the content of a snippet belonging to the zone.`,builder:f,handler:async t=>{if(t.dryRun){i({command:`cf snippets content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets/${t[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(t[`snippet-name`]))}/content`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"snippet-name":String(t[`snippet-name`]??``)},bodyKind:`none`});return}let r=await n(t);t.zoneId=await e({zone:t.zone},r,{quiet:t.quiet});let o=await a(`Loading`,async()=>d(`/zones/${t.zoneId}/snippets/${encodeURIComponent(String(t[`snippet-name`]))}/content`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));u(t.text===!0?o.toString(`utf-8`):o)}},m={command:`content`,describe:`Operations for content`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.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 g={command:`delete <snippet-name>`,describe:`Deletes a snippet belonging to the zone. Returns a 4XX response if the zone or snippet no longer exists.`,builder:h,handler:async t=>{if(t.dryRun){i({command:`cf snippets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets/${t[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(t[`snippet-name`]))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"snippet-name":String(t[`snippet-name`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await l({force:!!t.force})){process.stderr.write(`Aborted.
3
- `);return}r(await a(`Deleting`,async()=>o.snippets.delete({zone_id:s,snippet_name:t[`snippet-name`]})),{successLabel:`Deleted`})}};function _(e){return e.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 v={command:`get <snippet-name>`,describe:`Fetches a snippet belonging to the zone.`,builder:_,handler:async t=>{if(t.dryRun){i({command:`cf snippets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets/${t[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(t[`snippet-name`]))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"snippet-name":String(t[`snippet-name`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.snippets.get({zone_id:s,snippet_name:t[`snippet-name`]})),{successLabel:`Loaded`})}};function y(e){return e.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 b={command:`list`,describe:`Fetches all snippets belonging to the zone.`,builder:y,handler:async t=>{let o={page:t.page,per_page:t[`per-page`]};if(t.dryRun){i({command:`cf snippets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await n(t),c=await e({zone:t.zone},s,{quiet:t.quiet});t.zoneId=c,r(await a(`Loading`,async()=>s.snippets.list({zone_id:c,...o})),{successLabel:`Loaded`})}};function x(e){return e.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`,describe:`Deletes all snippet rules belonging to the zone.`,builder:x,handler:async t=>{if(t.dryRun){i({command:`cf snippets rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await l({force:!!t.force})){process.stderr.write(`Aborted.
4
- `);return}r(await a(`Deleting`,async()=>o.snippets.rules.delete({zone_id:s})),{successLabel:`Deleted`})}};function C(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`Fetches all snippet rules belonging to the zone.`,builder:C,handler:async t=>{if(t.dryRun){i({command:`cf snippets rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.snippets.rules.list({zone_id:s})),{successLabel:`Loaded`})}};function T(e){return e.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 E={command:`update`,describe:`Updates all snippet rules belonging to the zone.`,builder:T,handler:async s=>{if(s.dryRun){i({command:`cf snippets rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let c=await n(s),l=await e({zone:s.zone},c,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body);r(await a(`Updating`,async()=>c.snippets.rules.update({...e,zone_id:l})),{successLabel:`Updated`});return}r(await a(`Updating`,async()=>t(c,`PUT`,`/zones/${s.zoneId}/snippets/snippet_rules`)),{successLabel:`Updated`})}},D={command:`rules`,describe:`Operations for rules`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.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 k={command:`update <snippet-name>`,describe:`Creates or updates a snippet belonging to the zone.`,builder:O,handler:async o=>{if(o.dryRun){i({command:`cf snippets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/snippets/${o[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(o[`snippet-name`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"snippet-name":String(o[`snippet-name`]??``)},bodyKind:`multipart`,body:{body:o.body,file:o.file,metadata:o.metadata}});return}let l=await n(o);if(o.zoneId=await e({zone:o.zone},l,{quiet:o.quiet}),o.file!==void 0||o.body!==void 0||o.metadata!==void 0){let e=new FormData;if(o.file){let t=c(o.file);e.append(`file`,new Blob([t]),o.file.split(/[\\/]/).filter(Boolean).pop())}else o.body!==void 0&&e.append(`file`,o.body);if(o.metadata!==void 0){let t=typeof o.metadata==`string`?s(o.metadata,`metadata`,`text`):o.metadata;e.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}r(await a(`Updating`,async()=>t(l,`PUT`,`/zones/${o.zoneId}/snippets/${encodeURIComponent(String(o[`snippet-name`]))}`,{body:e})),{successLabel:`Updated`});return}if(o.body){let e=s(o.body,`body`,`binary`);r(await a(`Updating`,async()=>t(l,`PUT`,`/zones/${o.zoneId}/snippets/${encodeURIComponent(String(o[`snippet-name`]))}`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Updated`});return}if(o.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},A={command:`snippets`,describe:`snippets`,builder:e=>e.command(g).command(v).command(b).command(k).command(m).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{A as default};