cf 0.14.0 → 0.15.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 (448) hide show
  1. package/dist/_meta/commands.json +4040 -1629
  2. package/dist/_meta/hand-written-commands.json +16 -43
  3. package/dist/_meta/schemas.json +445 -756
  4. package/dist/abuse-reports-BAQR1w79.mjs +26 -0
  5. package/dist/access-C8KMplzp.mjs +27 -0
  6. package/dist/account-B-KQSR0L.mjs +12 -0
  7. package/dist/account-tags-EncLJpLc.mjs +15 -0
  8. package/dist/accounts-BA4Mp3A_.mjs +132 -0
  9. package/dist/acm-ByxUJcqF.mjs +15 -0
  10. package/dist/addressing-C-ym0h0G.mjs +93 -0
  11. package/dist/agent-memory-CkPSiZDI.mjs +34 -0
  12. package/dist/ai-DkE_Q64s.mjs +31 -0
  13. package/dist/ai-audit-pPcjYWI5.mjs +6 -0
  14. package/dist/ai-gateway-DtrwF1lQ.mjs +147 -0
  15. package/dist/ai-search-DLD_kDS1.mjs +79 -0
  16. package/dist/ai-security-jyZcBl9g.mjs +10 -0
  17. package/dist/alerting-DOROjm8E.mjs +56 -0
  18. package/dist/analytics-rQ-h-plT.mjs +21 -0
  19. package/dist/analytics_engine-Cg9gCAMt.mjs +4 -0
  20. package/dist/{lifecycle-CadF_i2n.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
  21. package/dist/api-security-B8p8vp8u.mjs +154 -0
  22. package/dist/argo-g8SjUb_t.mjs +10 -0
  23. package/dist/artifacts-B1PaeF5h.mjs +43 -0
  24. package/dist/audit-logs-DmU_PHy_.mjs +4 -0
  25. package/dist/auth-CZqics6E.mjs +2 -0
  26. package/dist/auth-Cp7gT-AF.mjs +8 -0
  27. package/dist/billing-CvTbUg-H.mjs +23 -0
  28. package/dist/bot-management-z53tbcbH.mjs +9 -0
  29. package/dist/botnet-feed-CSBbJdr_.mjs +11 -0
  30. package/dist/brand-protection-DzV211IQ.mjs +27 -0
  31. package/dist/browser-extension-C0Hi9CHX.mjs +15 -0
  32. package/dist/browser-run-DYQvMAyo.mjs +46 -0
  33. package/dist/build-BPIp8J5F.mjs +2 -0
  34. package/dist/build-OC77a1zq.mjs +2 -0
  35. package/dist/builds-CwKRqjQ5.mjs +71 -0
  36. package/dist/cache-CugNPPsJ.mjs +45 -0
  37. package/dist/certificate-authorities-DaEnJYge.mjs +6 -0
  38. package/dist/cf-oadujOtC.mjs +18 -0
  39. package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
  40. package/dist/chunk-DL5FNmn1.mjs +2 -0
  41. package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
  42. package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
  43. package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
  44. package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
  45. package/dist/client-certificates-DZUIqBTB.mjs +13 -0
  46. package/dist/client-side-security-Dk6F1ENG.mjs +63 -0
  47. package/dist/cloud-connector-avpf86kG.mjs +6 -0
  48. package/dist/cloudflared-DhItYrCq.mjs +2 -0
  49. package/dist/cloudforce-one-DNRhUD8z.mjs +456 -0
  50. package/dist/command-B2Qe-WUa.mjs +2 -0
  51. package/dist/{command-BL6weJf3.mjs → command-CF0giIIc.mjs} +1 -1
  52. package/dist/command-D45NW-R3.mjs +2 -0
  53. package/dist/command-DIvPLK8x.mjs +2 -0
  54. package/dist/{completions-Dn621okY.mjs → completions-xPLd1cvL.mjs} +3 -3
  55. package/dist/{config-BY6KpMZs.mjs → config-B4vIa0zp.mjs} +1 -1
  56. package/dist/connector-interrupts-BSztJ-Ko.mjs +6 -0
  57. package/dist/connector-telemetry-events-_M8CCK6_.mjs +6 -0
  58. package/dist/connector-telemetry-snapshots-DySvmR9a.mjs +6 -0
  59. package/dist/connectors-BSmhzNB7.mjs +15 -0
  60. package/dist/containers-B5vDcFzo.mjs +78 -0
  61. package/dist/{dist-CFQREIRi.mjs → containers-CFzvhmyz.mjs} +84 -83
  62. package/dist/content-scan-CeLZAcbT.mjs +14 -0
  63. package/dist/cps-BlI_Od72.mjs +6 -0
  64. package/dist/csamScanner-Cn7d0HWS.mjs +10 -0
  65. package/dist/ct-alerting-lhgFPu-y.mjs +5 -0
  66. package/dist/custom-certificates-Ba4Do5qt.mjs +17 -0
  67. package/dist/custom-csrs-MNUIx8yX.mjs +11 -0
  68. package/dist/custom-hostnames-Dj1SBd0J.mjs +27 -0
  69. package/dist/custom-nameservers-C7nzhNzV.mjs +9 -0
  70. package/dist/custom-pages-BgfhGksj.mjs +21 -0
  71. package/dist/d1-P2kWbdID.mjs +45 -0
  72. package/dist/data-security-pBIozmRL.mjs +71 -0
  73. package/dist/dcv-delegation-Bpy9WnKZ.mjs +4 -0
  74. package/dist/delegate-GctF_lrq.mjs +2 -0
  75. package/dist/delegate.mjs +1 -1
  76. package/dist/{deploy-BtETDvDA.mjs → deploy-CVYdt3NK.mjs} +1 -1
  77. package/dist/{deploy-input-BoLTdQzS.mjs → deploy-input-DpOgndz4.mjs} +1 -1
  78. package/dist/{dev-B5WcIpEr.mjs → dev-PPUBjWcm.mjs} +1 -1
  79. package/dist/diagnostics-C62habGQ.mjs +15 -0
  80. package/dist/{dialog-Bud0hiYv.mjs → dialog-C_ccBiZp.mjs} +1 -1
  81. package/dist/dist-B4pQ4CXK.mjs +48 -0
  82. package/dist/{dist-BRg_z9Ut.mjs → dist-BpadEMNY.mjs} +1 -1
  83. package/dist/dist-dc4E1u01.mjs +272 -0
  84. package/dist/dls-CpkcyQ8C.mjs +17 -0
  85. package/dist/dns-DG1X4Wap.mjs +135 -0
  86. package/dist/dns-firewall-B1gGHEDo.mjs +71 -0
  87. package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
  88. package/dist/dry-run-CLX6Pbtq.mjs +2 -0
  89. package/dist/durable-objects-D214VhxH.mjs +8 -0
  90. package/dist/email-auth-Ba4ONan2.mjs +6 -0
  91. package/dist/email-routing-BlqKnqNM.mjs +45 -0
  92. package/dist/email-security-Dl1E1Dko.mjs +160 -0
  93. package/dist/email-sending-DIRSSRIz.mjs +47 -0
  94. package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
  95. package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
  96. package/dist/fieldExtractors-zqYKMCEn.mjs +9 -0
  97. package/dist/firewall-DdsDh8GD.mjs +56 -0
  98. package/dist/flagship-CkUIVW7c.mjs +28 -0
  99. package/dist/fraud-BUpZgvQT.mjs +22 -0
  100. package/dist/google-tag-gateway-Bi1uLnEU.mjs +6 -0
  101. package/dist/healthchecks-DjQWb3EM.mjs +22 -0
  102. package/dist/hostnames-ClBLPbct.mjs +11 -0
  103. package/dist/hyperdrive-U54xZsWU.mjs +37 -0
  104. package/dist/iam-T-wWmOep.mjs +52 -0
  105. package/dist/images-ia5UG1GW.mjs +71 -0
  106. package/dist/index.mjs +1 -1
  107. package/dist/intel-BhswZLMI.mjs +76 -0
  108. package/dist/{interactive-CGOh-aYq.mjs → interactive-B6woOLo-.mjs} +23 -23
  109. package/dist/interactive-DnUvQHjc.mjs +2 -0
  110. package/dist/ips-Dad_EvhM.mjs +4 -0
  111. package/dist/keyless-certificates-BhHaxLjM.mjs +13 -0
  112. package/dist/keys-DjIPvqj4.mjs +4 -0
  113. package/dist/kv-DzXVnK94.mjs +21 -0
  114. package/dist/leaked-credential-checks-B9G_ZTNH.mjs +18 -0
  115. package/dist/lifecycle-Ichnb2x1.mjs +2 -0
  116. package/dist/load-balancers-3wGHPsYz.mjs +76 -0
  117. package/dist/local-B6b2OIBW.mjs +2 -0
  118. package/dist/local-BrfySqnx.mjs +2 -0
  119. package/dist/{local-runtime-Dj8k-p62.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
  120. package/dist/login-CEQbOgBM.mjs +5 -0
  121. package/dist/login-DEWvGuaU.mjs +2 -0
  122. package/dist/logo-matches-YGRPstPi.mjs +6 -0
  123. package/dist/logos-BirufUgo.mjs +7 -0
  124. package/dist/logpush-BlNbUHyV.mjs +46 -0
  125. package/dist/logs-DmFlVF9q.mjs +48 -0
  126. package/dist/magic-cloud-networking-B3Wj2dhJ.mjs +71 -0
  127. package/dist/magic-network-monitoring-ry63w2Rw.mjs +36 -0
  128. package/dist/magic-transit-CBVOK2aa.mjs +387 -0
  129. package/dist/managed-defense-BdW6s483.mjs +18 -0
  130. package/dist/managed-transforms-BIeiofIS.mjs +9 -0
  131. package/dist/matches-CAnwci0P.mjs +6 -0
  132. package/dist/mcp-BfhOMGFE.mjs +32 -0
  133. package/dist/mesh-CxUL2Wf-.mjs +26 -0
  134. package/dist/mtls-certificates-CzmTw4zs.mjs +13 -0
  135. package/dist/network-C68psMbz.mjs +50 -0
  136. package/dist/network-interconnects-CLsMrTuk.mjs +73 -0
  137. package/dist/oauth-D4bkeMAw.mjs +14 -0
  138. package/dist/oauth-DouM-qz0.mjs +2 -0
  139. package/dist/oauth-clients-DbUmVE_5.mjs +16 -0
  140. package/dist/oauth-scopes-CQ18rwBg.mjs +4 -0
  141. package/dist/observability-DpYxkFeZ.mjs +80 -0
  142. package/dist/{open-PBXRGS4R-ClEt4E8F.mjs → open-PBXRGS4R-C4CKEADM.mjs} +1 -1
  143. package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
  144. package/dist/organization-Dg55Xfz7.mjs +75 -0
  145. package/dist/organizations-QnyzGjB2.mjs +4 -0
  146. package/dist/origin-ca-certificates-Co5lqIGL.mjs +11 -0
  147. package/dist/origin-post-quantum-encryption-Cz8JZamC.mjs +6 -0
  148. package/dist/origin-tls-client-auth-Dd0T1Kfv.mjs +30 -0
  149. package/dist/{output-Z2lQmPUW.mjs → output-Bia1u2k5.mjs} +1 -1
  150. package/dist/page-rules--D3eXrCf.mjs +39 -0
  151. package/dist/pages-Ce8DDgNr.mjs +60 -0
  152. package/dist/pay-per-crawl-CpkEbasz.mjs +65 -0
  153. package/dist/pay-per-use-fyM1DWgY.mjs +6 -0
  154. package/dist/pipelines-CAqCgBLh.mjs +44 -0
  155. package/dist/precursor-DBnn4Q35.mjs +4 -0
  156. package/dist/previews-y_nSqWK5.mjs +4 -0
  157. package/dist/progress-Bi02B6v4.mjs +2 -0
  158. package/dist/{prompt-BP8XrQSj.mjs → prompt-Bx2PB-tt.mjs} +1 -1
  159. package/dist/queries-dg-CVXjf.mjs +9 -0
  160. package/dist/queues-C_ilLbRI.mjs +63 -0
  161. package/dist/r2-data-catalog-DGv6aROr.mjs +44 -0
  162. package/dist/r2-hZAkra-l.mjs +127 -0
  163. package/dist/radar-BO9b0aZy.mjs +300 -0
  164. package/dist/{raw-fetch-DNH2V8qH.mjs → raw-fetch-DNTQkXbg.mjs} +1 -1
  165. package/dist/realtime-eSavuSeE.mjs +172 -0
  166. package/dist/registrar-Ct30kOXZ.mjs +43 -0
  167. package/dist/registrar-sandbox-Dmn9zGUk.mjs +56 -0
  168. package/dist/{registry-BrtVdMrC.mjs → registry-vreNkX6u.mjs} +1 -1
  169. package/dist/reporting-B-F5aWUJ.mjs +14 -0
  170. package/dist/request-headers-Dnbzv6RZ.mjs +2 -0
  171. package/dist/request-tracers-CaubpUFV.mjs +4 -0
  172. package/dist/resolve-BXemCSyA.mjs +2 -0
  173. package/dist/resolve-CUDKxUrW.mjs +2 -0
  174. package/dist/resource-sharing-6Snv-b69.mjs +40 -0
  175. package/dist/resource-tagging-W_LFiX2J.mjs +4 -0
  176. package/dist/rules-C26eyeA5.mjs +18 -0
  177. package/dist/rulesets-BKzIwVtJ.mjs +37 -0
  178. package/dist/rum-Xdw5hyWY.mjs +30 -0
  179. package/dist/run-BBBMrSrs.mjs +2 -0
  180. package/dist/run-BRucX7Rz.mjs +2 -0
  181. package/dist/{schema-DmuJtMN5.mjs → schema-DqtYndhB.mjs} +1 -1
  182. package/dist/{schema-flags-CUGxFeZe.mjs → schema-flags-CebDI0f1.mjs} +1 -1
  183. package/dist/scim-odJTXiIe.mjs +18 -0
  184. package/dist/{sdk-Bvqx-_3z.mjs → sdk-CvIO3tWS.mjs} +1 -1
  185. package/dist/secrets-store-RYpWWzaw.mjs +24 -0
  186. package/dist/security-center-B3D95vCa.mjs +30 -0
  187. package/dist/security-txt-BSytVv-9.mjs +9 -0
  188. package/dist/shared-D67owd9x.mjs +2 -0
  189. package/dist/smart-shield-C83Sfnf4.mjs +24 -0
  190. package/dist/snippets-B6oE9WIa.mjs +20 -0
  191. package/dist/source-BR4_k2ad.mjs +6 -0
  192. package/dist/spawn-CKqJ9J4_.mjs +523 -0
  193. package/dist/spectrum-CfxY--X_.mjs +83 -0
  194. package/dist/speed-DzK-kiWt.mjs +24 -0
  195. package/dist/src-B3h6tKMt.mjs +108 -0
  196. package/dist/ssl-dnjzPcSB.mjs +45 -0
  197. package/dist/startup-profile-CYEokTVe.mjs +2 -0
  198. package/dist/startup-profile-CgWHy4rE.mjs +17 -0
  199. package/dist/state-BxCejn42.mjs +2 -0
  200. package/dist/state-DSzkxXML.mjs +2 -0
  201. package/dist/stream-oFyhS4Wi.mjs +102 -0
  202. package/dist/submit-4f-ravmC.mjs +4 -0
  203. package/dist/tags-DrIP6Uiq.mjs +4 -0
  204. package/dist/{telemetry-2s9Y3FaN.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
  205. package/dist/telemetry-Ds4epd3D.mjs +2 -0
  206. package/dist/telemetry-mKEb8lYB.mjs +2 -0
  207. package/dist/tenant-C-gc3NWv.mjs +12 -0
  208. package/dist/tenant-custom-nameservers-DduTQIwh.mjs +9 -0
  209. package/dist/{tools-Dz1JCrHd.mjs → tools-BMKpYraQ.mjs} +1 -1
  210. package/dist/tunnels-D0QYsskp.mjs +29 -0
  211. package/dist/turnstile-C6Q3spRB.mjs +33 -0
  212. package/dist/ui-DH95w1Qk.mjs +5 -0
  213. package/dist/undici-DTSBJHNS.mjs +96 -0
  214. package/dist/update-check-BBS1K1jt.mjs +2 -0
  215. package/dist/update-check-CTLoakFV.mjs +2 -0
  216. package/dist/update-check-worker.mjs +2 -0
  217. package/dist/url-info-Cs0V89qq.mjs +4 -0
  218. package/dist/url-normalization-DaEQYy5h.mjs +9 -0
  219. package/dist/url-scanner-C4YVeQ4v.mjs +16 -0
  220. package/dist/user-BV1VY3Kl.mjs +112 -0
  221. package/dist/values-qDS63E43.mjs +4 -0
  222. package/dist/vectorize-NFzD3mP5.mjs +32 -0
  223. package/dist/version-W6_TN_kN.mjs +2 -0
  224. package/dist/waiting-rooms-Y9YGj3ih.mjs +53 -0
  225. package/dist/web-assets-Gd6z8dbt.mjs +64 -0
  226. package/dist/web3-DCJx4NRp.mjs +28 -0
  227. package/dist/workers-B-j-1ygi.mjs +36 -0
  228. package/dist/workers-builds-DPrNKjZW.mjs +14 -0
  229. package/dist/workers-for-platforms-BjKAhMLA.mjs +25 -0
  230. package/dist/workers-vpc-C5YoCnQK.mjs +13 -0
  231. package/dist/workflows-C2KKIJjl.mjs +43 -0
  232. package/dist/zaraz-CVLCs1IX.mjs +22 -0
  233. package/dist/zero-trust-BtJi4OXF.mjs +795 -0
  234. package/dist/zone-hKgt0WzO.mjs +4 -0
  235. package/dist/zones-CCNyaD3J.mjs +124 -0
  236. package/package.json +12 -9
  237. package/dist/_meta/agent-context.json +0 -195
  238. package/dist/abuse-reports-CDFjJ2e8.mjs +0 -8
  239. package/dist/access-BoT1waG4.mjs +0 -11
  240. package/dist/account-agnMUKWj.mjs +0 -2
  241. package/dist/account-tags-BRMMHCee.mjs +0 -9
  242. package/dist/accounts-Cut77dAt.mjs +0 -30
  243. package/dist/acm-C8WgXNCl.mjs +0 -3
  244. package/dist/addressing-CR8EV42x.mjs +0 -13
  245. package/dist/agent-context-Wj5TRRbW.mjs +0 -8
  246. package/dist/agent-memory-CVJpKKZy.mjs +0 -6
  247. package/dist/ai-BbNYt-yI.mjs +0 -5
  248. package/dist/ai-audit-mVajM-2i.mjs +0 -2
  249. package/dist/ai-gateway-BsepSA_v.mjs +0 -13
  250. package/dist/ai-search-DbEJqm5-.mjs +0 -7
  251. package/dist/ai-security-DmyB5EYk.mjs +0 -4
  252. package/dist/alerting-dmy3hd8O.mjs +0 -6
  253. package/dist/analytics-B1xBMla0.mjs +0 -5
  254. package/dist/analytics_engine-DazCn3iC.mjs +0 -2
  255. package/dist/api-security-0HXCzfHk.mjs +0 -50
  256. package/dist/argo-DSHsE8zv.mjs +0 -2
  257. package/dist/artifacts-CwiU9Mxu.mjs +0 -5
  258. package/dist/audit-logs-DwFtMDwH.mjs +0 -2
  259. package/dist/auth-B0ZyXc3y.mjs +0 -5
  260. package/dist/auth-DWxtJ918.mjs +0 -8
  261. package/dist/billing-Cbpadkgu.mjs +0 -3
  262. package/dist/bot-management-B6M2Vyyn.mjs +0 -5
  263. package/dist/botnet-feed-Dn8UuE4h.mjs +0 -3
  264. package/dist/brand-protection-B5R0b3pu.mjs +0 -3
  265. package/dist/browser-extension-D55pYZf_.mjs +0 -3
  266. package/dist/browser-run-C1b2VkGB.mjs +0 -4
  267. package/dist/build-CP2JUfV1.mjs +0 -2
  268. package/dist/builds-CVEXO_4a.mjs +0 -9
  269. package/dist/cache-BU5xX82E.mjs +0 -9
  270. package/dist/certificate-authorities--tZTWJWD.mjs +0 -2
  271. package/dist/cf-BV2HLCQm.mjs +0 -18
  272. package/dist/chunk-QBZBEHZB-BcCMlc8C.mjs +0 -2
  273. package/dist/chunk-XLADBZ7F-DgFrtUhW.mjs +0 -103
  274. package/dist/chunk-vbHwaUoU.mjs +0 -2
  275. package/dist/client-certificates-DX84qeYG.mjs +0 -3
  276. package/dist/client-side-security-DsSO2rZQ.mjs +0 -37
  277. package/dist/cloud-connector-cf8qlxap.mjs +0 -2
  278. package/dist/cloudforce-one-DzVXorbu.mjs +0 -32
  279. package/dist/command-DYrspBc0.mjs +0 -2
  280. package/dist/connector-interrupts-DqpqPPkp.mjs +0 -2
  281. package/dist/connector-telemetry-events-CCD-_B-8.mjs +0 -2
  282. package/dist/connector-telemetry-snapshots-D3CeGGhk.mjs +0 -2
  283. package/dist/connectors-aPQspZdg.mjs +0 -3
  284. package/dist/containers-D0Kjl8h-.mjs +0 -58
  285. package/dist/content-scan-BVx18XmS.mjs +0 -4
  286. package/dist/cps-ByazyM0x.mjs +0 -2
  287. package/dist/csamScanner-OG5lQxBC.mjs +0 -6
  288. package/dist/ct-alerting-BJx5n8Zf.mjs +0 -3
  289. package/dist/custom-certificates-BuJ2e9TA.mjs +0 -5
  290. package/dist/custom-csrs-CR_5qbST.mjs +0 -3
  291. package/dist/custom-hostnames-BzDTsQXb.mjs +0 -5
  292. package/dist/custom-nameservers-OfMPRGkD.mjs +0 -3
  293. package/dist/custom-pages-BmGXoTIo.mjs +0 -3
  294. package/dist/d1-DedC8N0N.mjs +0 -21
  295. package/dist/data-security-B2UB26ry.mjs +0 -7
  296. package/dist/dcv-delegation-C11vmzbG.mjs +0 -2
  297. package/dist/diagnostics-Cf6BLpAo.mjs +0 -3
  298. package/dist/dist-CyisSore.mjs +0 -371
  299. package/dist/dist-Dr4Hg_Up.mjs +0 -48
  300. package/dist/dls-R6PvHbhj.mjs +0 -3
  301. package/dist/dns-Cl8se64c.mjs +0 -29
  302. package/dist/dns-firewall-WtmKilDT.mjs +0 -57
  303. package/dist/dry-run-YSQndLvt.mjs +0 -2
  304. package/dist/durable-objects-jfVU6yp_.mjs +0 -2
  305. package/dist/email-auth-DPmZ85eW.mjs +0 -2
  306. package/dist/email-routing-Bf6DbNTr.mjs +0 -6
  307. package/dist/email-security-DTifjSxM.mjs +0 -18
  308. package/dist/email-sending-Dm3WkFHV.mjs +0 -7
  309. package/dist/error-sanitization-D8zuyPj_.mjs +0 -2
  310. package/dist/fieldExtractors-CeXZL0-I.mjs +0 -3
  311. package/dist/firewall-D5N2APXO.mjs +0 -8
  312. package/dist/flagship-sUOy9jei.mjs +0 -4
  313. package/dist/fraud-WLW2Ep1Z.mjs +0 -20
  314. package/dist/google-tag-gateway-lbww1FaJ.mjs +0 -2
  315. package/dist/healthchecks-0ih8Qjiw.mjs +0 -4
  316. package/dist/hostnames-Ba6FuL8K.mjs +0 -3
  317. package/dist/hyperdrive-DMqcU639.mjs +0 -21
  318. package/dist/iam-CXlYm0uC.mjs +0 -6
  319. package/dist/images-D_g1oli6.mjs +0 -8
  320. package/dist/intel-B8bS0ARd.mjs +0 -8
  321. package/dist/ips-68fzniN4.mjs +0 -2
  322. package/dist/keyless-certificates-CeLnqBvX.mjs +0 -3
  323. package/dist/keys-DkVdS2lF.mjs +0 -2
  324. package/dist/kv-gDAN50BQ.mjs +0 -5
  325. package/dist/leaked-credential-checks-DfnvHpvg.mjs +0 -4
  326. package/dist/load-balancers-m0HqyXPZ.mjs +0 -6
  327. package/dist/local-BwL_gesw.mjs +0 -2
  328. package/dist/logo-matches-DPbHlsKQ.mjs +0 -2
  329. package/dist/logos-DFBJFAYJ.mjs +0 -3
  330. package/dist/logpush-gzmlZayc.mjs +0 -4
  331. package/dist/logs-BuzwQgt5.mjs +0 -18
  332. package/dist/magic-cloud-networking-BbHCi1Vp.mjs +0 -5
  333. package/dist/magic-network-monitoring-kWMmnPTG.mjs +0 -4
  334. package/dist/magic-transit-ClSmJDKw.mjs +0 -111
  335. package/dist/managed-defense-EOihg1UR.mjs +0 -2
  336. package/dist/managed-transforms-BZ_XdGE2.mjs +0 -3
  337. package/dist/matches-B6sG0_fr.mjs +0 -2
  338. package/dist/mcp--kK0vS5i.mjs +0 -4
  339. package/dist/mesh-DfXYUHOO.mjs +0 -4
  340. package/dist/mtls-certificates-DZd-0X7l.mjs +0 -3
  341. package/dist/network-U6f_5ihp.mjs +0 -6
  342. package/dist/network-interconnects-DKZGTiYM.mjs +0 -41
  343. package/dist/oauth-BdVr2hJp.mjs +0 -14
  344. package/dist/oauth-clients-CY3OkPhC.mjs +0 -4
  345. package/dist/oauth-scopes-BTY7_5L-.mjs +0 -2
  346. package/dist/observability-Bsp-LdmJ.mjs +0 -10
  347. package/dist/organization-BSeMdj-7.mjs +0 -45
  348. package/dist/organizations-BroR48Nv.mjs +0 -2
  349. package/dist/origin-ca-certificates-jC-EMn6W.mjs +0 -3
  350. package/dist/origin-post-quantum-encryption-DIspLvA0.mjs +0 -2
  351. package/dist/origin-tls-client-auth-CZ_nUEcM.mjs +0 -4
  352. package/dist/page-rules-ZcdjPohY.mjs +0 -27
  353. package/dist/pages-W4tKa7xk.mjs +0 -14
  354. package/dist/pay-per-crawl-BNM1mJmP.mjs +0 -5
  355. package/dist/pay-per-use-DKxlnkH3.mjs +0 -2
  356. package/dist/pipelines-Dug0BR-c.mjs +0 -6
  357. package/dist/precursor-D-11DkRU.mjs +0 -4
  358. package/dist/previews-D_Nv4dR6.mjs +0 -4
  359. package/dist/progress-a5IKeKni.mjs +0 -2
  360. package/dist/queries-BdA2vJoe.mjs +0 -3
  361. package/dist/queues-Bu06ZqUE.mjs +0 -7
  362. package/dist/r2-COC9wMKb.mjs +0 -25
  363. package/dist/r2-data-catalog-CX5Rl5Qx.mjs +0 -16
  364. package/dist/radar-L-yoLIHF.mjs +0 -2
  365. package/dist/realtime-JKIiXfzi.mjs +0 -20
  366. package/dist/registrar-_dYUZrK0.mjs +0 -43
  367. package/dist/registrar-sandbox-D1yfW_Q_.mjs +0 -56
  368. package/dist/reporting-3fyoMcmb.mjs +0 -2
  369. package/dist/request-headers-BhQQAfJt.mjs +0 -2
  370. package/dist/request-tracers-TisEth2p.mjs +0 -2
  371. package/dist/resolve-CYUp6YgC.mjs +0 -2
  372. package/dist/resource-sharing-C4-dnohU.mjs +0 -6
  373. package/dist/resource-tagging-BRDifKqM.mjs +0 -2
  374. package/dist/rules-BCF3gIkw.mjs +0 -4
  375. package/dist/rulesets-wp6rllt3.mjs +0 -5
  376. package/dist/rum-B77awgoB.mjs +0 -4
  377. package/dist/run-BS8otL3u.mjs +0 -2
  378. package/dist/scim-C9BmUYil.mjs +0 -4
  379. package/dist/secrets-store-ckkZR2dM.mjs +0 -7
  380. package/dist/security-center-BCahKT57.mjs +0 -2
  381. package/dist/security-txt-0SI5du7I.mjs +0 -3
  382. package/dist/shared-D0B-7q-D.mjs +0 -2
  383. package/dist/smart-shield-BDPbrZa4.mjs +0 -4
  384. package/dist/snippets-CVRR_h0i.mjs +0 -4
  385. package/dist/spawn-DP4T92ss.mjs +0 -519
  386. package/dist/spectrum-CjNXQIQE.mjs +0 -63
  387. package/dist/speed-CrXCHk3h.mjs +0 -4
  388. package/dist/src-BbnV77C4.mjs +0 -108
  389. package/dist/ssl-DKORhHkh.mjs +0 -15
  390. package/dist/startup-profile-CBIH6yZy.mjs +0 -17
  391. package/dist/state-QUu6HfxC.mjs +0 -2
  392. package/dist/stream-wY3zi3FK.mjs +0 -16
  393. package/dist/submit-B-4oCBSk.mjs +0 -2
  394. package/dist/tags-5uJEkYJZ.mjs +0 -2
  395. package/dist/telemetry-n3NJourL.mjs +0 -2
  396. package/dist/tenant-BkFvv2o3.mjs +0 -2
  397. package/dist/tenant-custom-nameservers-DcjC1q0r.mjs +0 -3
  398. package/dist/tunnel-Cd4ipbvJ.mjs +0 -2
  399. package/dist/tunnels-9Zg3ePwD.mjs +0 -5
  400. package/dist/turnstile-BTwKYpzD.mjs +0 -23
  401. package/dist/ui-DQSZeaG5.mjs +0 -5
  402. package/dist/url-info-D7Y61BFd.mjs +0 -2
  403. package/dist/url-normalization-B4n8HiNQ.mjs +0 -3
  404. package/dist/url-scanner-CiCIltSQ.mjs +0 -2
  405. package/dist/user-DDFDGJ0Y.mjs +0 -12
  406. package/dist/values-DRznB_Cl.mjs +0 -2
  407. package/dist/vectorize-CbznPhzq.mjs +0 -4
  408. package/dist/waiting-rooms-CKP5hYBK.mjs +0 -11
  409. package/dist/web-assets-C-ZoSkkh.mjs +0 -8
  410. package/dist/web3-DwlN4dOw.mjs +0 -4
  411. package/dist/workers-builds-ECw_x_kp.mjs +0 -2
  412. package/dist/workers-for-platforms-BYGy46R6.mjs +0 -5
  413. package/dist/workers-vpc-CCosFcxz.mjs +0 -3
  414. package/dist/workers-zFMrbUkg.mjs +0 -6
  415. package/dist/workflows-C8GXGDRW.mjs +0 -5
  416. package/dist/zaraz-B5UIREaz.mjs +0 -2
  417. package/dist/zero-trust-DUp0XoIo.mjs +0 -91
  418. package/dist/zone-BGLkk-mL.mjs +0 -2
  419. package/dist/zones-CwYjNXMH.mjs +0 -44
  420. /package/dist/{alerts-CarPLL8k.mjs → alerts-CstOk8n0.mjs} +0 -0
  421. /package/dist/{autorag-zK-3harf.mjs → autorag-PRTwXGgn.mjs} +0 -0
  422. /package/dist/{body-parser-Cmw7PZ7a.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
  423. /package/dist/{brands-CpgTsX8h.mjs → brands-BHRXlWDm.mjs} +0 -0
  424. /package/dist/{clear-C5gzBA8G.mjs → clear-UvKESVx3.mjs} +0 -0
  425. /package/dist/{cli-types-abvWQN3T.mjs → cli-types-tt_LZMbn.mjs} +0 -0
  426. /package/dist/{connector-telemetry-events-latest-BY-dbhQZ.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
  427. /package/dist/{connector-telemetry-snapshots-latest-DoMvHvCO.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
  428. /package/dist/{domain-info-Cw3G4nap.mjs → domain-info-BqTDXNBo.mjs} +0 -0
  429. /package/dist/{health-DkEXPkS6.mjs → health-CwPzzrV6.mjs} +0 -0
  430. /package/dist/{input-validation-nF-0Ze2h.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
  431. /package/dist/{internal-4fU2r5en.mjs → internal-WLHfxX64.mjs} +0 -0
  432. /package/dist/{live-B4iGrwY2.mjs → live-D_k7eHdv.mjs} +0 -0
  433. /package/dist/{metadata-C5fJJr-k.mjs → metadata-APBiectA.mjs} +0 -0
  434. /package/dist/{project-settings-Bc3wYHo8.mjs → project-settings-DSXevRvj.mjs} +0 -0
  435. /package/dist/{rate-limit-analytics-DNsAFIeM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
  436. /package/dist/{rate-limits-CsOim7bm.mjs → rate-limits-C3K9smdl.mjs} +0 -0
  437. /package/dist/{ready-tTe-zcIw.mjs → ready-CvwvbdTX.mjs} +0 -0
  438. /package/dist/{recent-submissions-B3eTV5yC.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
  439. /package/dist/{refute-BY76YVrT.mjs → refute-CIAFMj00.mjs} +0 -0
  440. /package/dist/{scan-logo-DdoF_a5y.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
  441. /package/dist/{scan-page-sSgLwwZN.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
  442. /package/dist/{search-BFvQr-sl.mjs → search-12jA1b4l.mjs} +0 -0
  443. /package/dist/{signed-url-Cr8hiZPJ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
  444. /package/dist/{submission-info-DT2mLnu1.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
  445. /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
  446. /package/dist/{total-queries-6gs5iy9T.mjs → total-queries-CJTc9Pde.mjs} +0 -0
  447. /package/dist/{tracked-domains-D6XKO2EV.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
  448. /package/dist/{verify-CM1NakP0.mjs → verify-CZW5Fo1q.mjs} +0 -0
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,n as m}from"./prompt-Bx2PB-tt.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 email-sending get <message-id>
3
+
4
+ Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <message-id>`,describe:`Fetch an email message`,builder:h,handler:async t=>c({command:`email-sending get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf email-sending get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/messages/${t[`message-id`]==null?`<message-id>`:encodeURIComponent(String(t[`message-id`]))}`,pathParams:{"message-id":String(t[`message-id`]??``)},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.emailSending.get({account_id:l,message_id:t[`message-id`]})),{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 email-sending limits get
5
+
6
+ Returns the current daily sending quota for the account and, when a quota is resolved, the account's current usage against it. Quota is null when not yet available; usage is null when there is no resolved quota or usage is temporarily unavailable.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Get sending limits`,builder:_,handler:async t=>c({command:`email-sending limits get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf email-sending limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/limits`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.emailSending.limits.get({account_id:l})),{successLabel:`Loaded`})})},y={command:`limits`,describe:`Inspect account-level sending quotas and current usage`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 email-sending reputation get
7
+
8
+ Returns the authoritative Email Sending reputation state and active evaluation policy. Accounts without an evaluation are Healthy with null evaluation timestamps.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Get account reputation`,builder:b,handler:async t=>c({command:`email-sending reputation get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf email-sending reputation get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/reputation`,pathParams:{},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.emailSending.reputation.get({account_id:l})),{successLabel:`Loaded`})})},S={command:`reputation`,describe:`Operations for reputation`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.usage(`$0 email-sending send-raw
9
+
10
+ Send a raw RFC 5322 (MIME) email for the specified account. Provide the full MIME message plus the SMTP envelope (from and recipients).`).option(`from`,{type:`string`,description:`Sender email address.`}).option(`mime-message`,{type:`string`,description:`The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP envelope routing; the From and To headers in the MIME message control what the recipient's email client displays.`}).option(`recipients`,{type:`string`,array:!0,description:`List of recipient email addresses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`send-raw`,describe:`Send a raw MIME email`,builder:C,handler:async t=>c({command:`email-sending send-raw`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf email-sending send-raw`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/send_raw`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({from:f(t.from,`from`,`text`),mime_message:f(t[`mime-message`],`mime-message`,`text`),recipients:t.recipients}):l(t.body)});return}let c=await i(t),u=t.local?e:await n();if(t.accountId=u,t.body){let e=l(t.body);a(await s(`Creating`,async()=>c.emailSending.sendRaw({...e,account_id:u})),{successLabel:`Created`});return}if(t.from===void 0&&(t.from=await p(`from`,`Sender email address.`)),t[`mime-message`]===void 0&&(t[`mime-message`]=await p(`mime-message`,`The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP envelope routing; the From and To headers in the MIME message control what the recipient's email client displays.`)),t.recipients===void 0)throw Error(`--recipients is required (or pass --body with this field set).`);let m=d({from:f(t.from,`from`,`text`),mime_message:f(t[`mime-message`],`mime-message`,`text`),recipients:t.recipients});a(await s(`Creating`,async()=>c.emailSending.sendRaw({...m,account_id:u})),{successLabel:`Created`})})};function T(e){return e.usage(`$0 email-sending send
11
+
12
+ Send an email for the specified account using the structured builder. Provide the sender, recipients, subject, and at least one of text or html; attachments are optional.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`send`,describe:`Send an email`,builder:T,handler:async t=>c({command:`email-sending send`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf email-sending send`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/send`,pathParams:{},bodyKind:`json`,body:t.body===void 0?void 0:l(t.body)});return}let c=await i(t),u=t.local?e:await n();if(t.accountId=u,t.body){let e=l(t.body);a(await s(`Creating`,async()=>c.emailSending.send({...e,account_id:u})),{successLabel:`Created`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function D(e){return e.usage("$0 email-sending subdomains create\n\nCreates a new sending subdomain or re-enables sending on an existing subdomain that had it disabled. If zone-level Email Sending has not been enabled yet, the zone flag is automatically set when the entitlement is present. A leftmost wildcard such as `*.example.com` is accepted only for accounts with wildcard Email Sending enabled. Wildcard senders share the base domain's DKIM signing identity and `cf-bounce.<base>` return path.").option(`name`,{type:`string`,description:"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."}).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:`create`,describe:`Create a sending subdomain`,builder:D,handler:async e=>c({command:`email-sending subdomains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.emailSending.subdomains.create({...t,zone_id:r})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."));let c=d({name:f(e.name,`name`,`text`)});a(await s(`Creating`,async()=>n.emailSending.subdomains.create({...c,zone_id:r})),{successLabel:`Created`})})};function k(e){return e.usage(`$0 email-sending subdomains delete <subdomain-id>
13
+
14
+ Disables sending on a subdomain and removes its DNS records. If routing is still active on the subdomain, only sending is disabled.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain 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 A={command:`delete <subdomain-id>`,describe:`Delete a sending subdomain`,builder:k,handler:async e=>c({command:`email-sending subdomains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await m({force:!!e.force,message:`This operation disables sending and removes the subdomain's Email Sending DNS records.`})){process.stderr.write(`Aborted.
15
+ `);return}a(await s(`Deleting`,async()=>n.emailSending.subdomains.delete({zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Deleted`})})};function j(e){return e.usage(`$0 email-sending subdomains dns fix <subdomain-id>
16
+
17
+ Idempotently re-applies the sending DNS records (creates missing records, re-applies the email_routing lock on records whose lock has been cleared). Refuses with a 409 if foreign MX, multiple SPF, multiple DMARC, or multiple DKIM records exist at the relevant DNS names — those require manual cleanup.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`fix <subdomain-id>`,describe:`Fix sending subdomain DNS records`,builder:j,handler:async e=>c({command:`email-sending subdomains dns fix`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains dns fix`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/dns`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Creating`,async()=>n.emailSending.subdomains.dns.fix({zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Created`})})};function N(e){return e.usage(`$0 email-sending subdomains dns get <subdomain-id>
18
+
19
+ Returns the expected DNS records for a sending subdomain.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <subdomain-id>`,describe:`Get sending subdomain DNS records`,builder:N,handler:async e=>c({command:`email-sending subdomains dns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains dns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/dns`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.emailSending.subdomains.dns.get({zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 email-sending subdomains dns status <subdomain-id>
20
+
21
+ Returns the desired DNS records for a sending subdomain along with a live diff against actual DNS state. Use this to detect missing, unlocked, foreign, or multi-record conflicts before deciding whether to call the fix endpoint. For wildcard sending rows, each call also rechecks the governing organizational-domain DMARC policy and reports policy drift that DNS Fix cannot repair.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`status <subdomain-id>`,describe:`Get sending subdomain DNS status`,builder:F,handler:async e=>c({command:`email-sending subdomains dns status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains dns status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/dns/status`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.emailSending.subdomains.dns.status({zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Loaded`})})},L={command:`dns`,describe:`Operations for subdomains.dns`,builder:e=>e.command(M).command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 email-sending subdomains get <subdomain-id>
22
+
23
+ Gets information for a specific sending subdomain.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`get <subdomain-id>`,describe:`Get a sending subdomain`,builder:R,handler:async e=>c({command:`email-sending subdomains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.emailSending.subdomains.get({zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Loaded`})})};function z(e){return e.usage(`$0 email-sending subdomains list
24
+
25
+ Lists all sending-enabled subdomains for the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List sending subdomains`,builder:z,handler:async e=>c({command:`email-sending subdomains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.emailSending.subdomains.list({zone_id:r})),{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 email-sending subdomains preview
26
+
27
+ Returns the DNS records that would be created for a sending subdomain, flags which records are missing, and reports any conflicts with existing DNS records. This is a read-only dry-run — no records are created or modified. Use before or after creating a subdomain to check DNS status. A leftmost wildcard requires wildcard Email Sending to be enabled for the account and previews base-scoped DKIM and return-path records.`).option(`name`,{type:`string`,description:"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`preview`,describe:`Preview sending subdomain DNS`,builder:V,handler:async e=>c({command:`email-sending subdomains preview`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/preview`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Loading`,async()=>n.emailSending.subdomains.preview({...t,zone_id:r})),{successLabel:`Loaded`});return}e.name===void 0&&(e.name=await p(`name`,"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement."));let c=d({name:f(e.name,`name`,`text`)});a(await s(`Loading`,async()=>n.emailSending.subdomains.preview({...c,zone_id:r})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 email-sending subdomains reputation get-complaints <subdomain-id>
28
+
29
+ Returns the matched complaint count for a sending subdomain in a half-open time window of up to seven days.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`start-at`,{type:`string`,description:`Start at`,demandOption:!0}).option(`end-at`,{type:`string`,description:`End at`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get-complaints <subdomain-id>`,describe:`Get sending subdomain complaint count`,builder:U,handler:async e=>c({command:`email-sending subdomains reputation get-complaints`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={start_at:e[`start-at`],end_at:e[`end-at`]};if(e.dryRun){o({command:`cf email-sending subdomains reputation get-complaints`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/reputation/complaints`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.emailSending.subdomains.reputation.getComplaints({zone_id:c,subdomain_id:e[`subdomain-id`],...n})),{successLabel:`Loaded`})})},G={command:`reputation`,describe:`Operations for subdomains.reputation`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 email-sending subdomains update <subdomain-id>
30
+
31
+ Updates the activity-log preview preference for a sending subdomain.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`drop-suppressed-recipients`,{type:`boolean`,description:`Whether a send request that includes a recipient suppressed on
32
+ this subdomain drops that recipient and still delivers to the
33
+ rest, instead of failing the entire request.
34
+ `}).option(`preview-enabled`,{type:`boolean`,description:`Whether sent messages from this subdomain can be previewed in the activity log.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"At least one of `preview_enabled` or `drop_suppressed_recipients` must be provided. A field omitted from the request body is left unchanged. "})}const q={command:`update <subdomain-id>`,describe:`Update a sending subdomain`,builder:K,handler:async e=>c({command:`email-sending subdomains update`,classification:{safeFlags:[`drop-suppressed-recipients`,`preview-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-sending subdomains update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"subdomain-id":String(e[`subdomain-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.emailSending.subdomains.update({body:t,zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Updated`});return}let c=d({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]});a(await s(`Updating`,async()=>n.emailSending.subdomains.update({body:c,zone_id:r,subdomain_id:e[`subdomain-id`]})),{successLabel:`Updated`})})},J={command:`subdomains`,describe:`Configure sending subdomains and keep their DNS records healthy`,builder:e=>e.command(O).command(A).command(te).command(B).command(H).command(q).command(L).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Y(e){return e.usage(`$0 email-sending suppressions create
35
+
36
+ Creates an account-wide suppression. If a mutable legacy zone-linked row already exists, it is promoted without changing its identifier.`).option(`email`,{type:`string`,description:`The email address to suppress.`}).option(`expires-at`,{type:`string`,description:`Expiration timestamp for the suppression. Omit or set to null for a permanent suppression that never expires.`}).option(`note`,{type:`string`,description:`Advisory note for this suppression. Not enforced or validated beyond length.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const X={command:`create`,describe:`Create account Email Sending suppression`,builder:Y,handler:async t=>c({command:`email-sending suppressions create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf email-sending suppressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/suppressions`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({email:f(t.email,`email`,`text`),expires_at:f(t[`expires-at`],`expires-at`,`text`),note:f(t.note,`note`,`text`)}):l(t.body)});return}let c=await i(t),u=t.local?e:await n();if(t.accountId=u,t.body){let e=l(t.body);a(await s(`Creating`,async()=>c.emailSending.suppressions.create({...e,account_id:u})),{successLabel:`Created`});return}t.email===void 0&&(t.email=await p(`email`,`The email address to suppress.`));let m=d({email:f(t.email,`email`,`text`),expires_at:f(t[`expires-at`],`expires-at`,`text`),note:f(t.note,`note`,`text`)});a(await s(`Creating`,async()=>c.emailSending.suppressions.create({...m,account_id:u})),{successLabel:`Created`})})};function Z(e){return e.usage(`$0 email-sending suppressions delete <suppression-id>
37
+
38
+ Deletes the suppression, its note, and every legacy internal zone membership, allowing future delivery attempts to the address.`).positional(`suppression-id`,{type:`string`,description:`The suppression's 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 Q={command:`delete <suppression-id>`,describe:`Delete account Email Sending suppression`,builder:Z,handler:async t=>c({command:`email-sending suppressions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){o({command:`cf email-sending suppressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/suppressions/${t[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(t[`suppression-id`]))}`,pathParams:{"suppression-id":String(t[`suppression-id`]??``)},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();if(t.accountId=l,!await m({force:!!t.force,message:`This operation removes an Email Sending suppression and may allow email delivery to resume for the address.`})){process.stderr.write(`Aborted.
39
+ `);return}a(await s(`Deleting`,async()=>c.emailSending.suppressions.delete({account_id:l,suppression_id:t[`suppression-id`]})),{successLabel:`Deleted`})})};function ne(e){return e.usage(`$0 email-sending suppressions edit <suppression-id>
40
+
41
+ Updates expiry or advisory note fields without changing legacy internal zone memberships.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`expires-at`,{type:`string`,description:"New expiry. Send `null` to make the suppression permanent; omit to leave it unchanged."}).option(`note`,{type:`string`,description:`Replacement advisory note. Send an empty string to clear it; omit to leave it unchanged.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`edit <suppression-id>`,describe:`Update account Email Sending suppression`,builder:ne,handler:async t=>c({command:`email-sending suppressions edit`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf email-sending suppressions edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/suppressions/${t[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(t[`suppression-id`]))}`,pathParams:{"suppression-id":String(t[`suppression-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({expires_at:f(t[`expires-at`],`expires-at`,`text`),note:f(t.note,`note`,`text`)}):l(t.body)});return}let c=await i(t),u=t.local?e:await n();if(t.accountId=u,t.body){let e=l(t.body);a(await s(`Updating`,async()=>c.emailSending.suppressions.edit({...e,account_id:u,suppression_id:t[`suppression-id`]})),{successLabel:`Updated`});return}let p=d({expires_at:f(t[`expires-at`],`expires-at`,`text`),note:f(t.note,`note`,`text`)});a(await s(`Updating`,async()=>c.emailSending.suppressions.edit({...p,account_id:u,suppression_id:t[`suppression-id`]})),{successLabel:`Updated`})})};function ie(e){return e.usage(`$0 email-sending suppressions get <suppression-id>
42
+
43
+ Gets an Email Sending suppression owned by the account.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`get <suppression-id>`,describe:`Get account Email Sending suppression`,builder:ie,handler:async t=>c({command:`email-sending suppressions get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf email-sending suppressions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/suppressions/${t[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(t[`suppression-id`]))}`,pathParams:{"suppression-id":String(t[`suppression-id`]??``)},bodyKind:`none`});return}let c=await i(t),l=t.local?e:await n();t.accountId=l,a(await s(`Loading`,async()=>c.emailSending.suppressions.get({account_id:l,suppression_id:t[`suppression-id`]})),{successLabel:`Loaded`})})};function oe(e){return e.usage(`$0 email-sending suppressions import
44
+
45
+ Imports up to 1,000 account-level Email Sending suppressions in one request.`).option(`items`,{type:`string`,description:`Suppressions to import. Items with a duplicate email address are deduplicated before processing. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $={command:`import`,describe:`Bulk import account Email Sending suppressions`,builder:oe,handler:async t=>c({command:`email-sending suppressions import`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf email-sending suppressions import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/suppressions/bulk`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({items:u(t.items,`items`)}):l(t.body)});return}let c=await i(t),f=t.local?e:await n();if(t.accountId=f,t.body){let e=l(t.body);a(await s(`Creating`,async()=>c.emailSending.suppressions.import({...e,account_id:f})),{successLabel:`Created`});return}if(t.items===void 0)throw Error(`--items is required (or pass --body with this field set).`);let p=d({items:u(t.items,`items`)});a(await s(`Creating`,async()=>c.emailSending.suppressions.import({...p,account_id:f})),{successLabel:`Created`})})};function se(e){return e.usage(`$0 email-sending suppressions list
46
+
47
+ Lists every active Email Sending suppression owned by the account, including legacy rows with internal zone memberships.`).option(`per-page`,{type:`number`,description:`Maximum number of suppressions to return per page.`}).option(`cursor`,{type:`string`,description:"Opaque pagination cursor returned as `result_info.next_cursor`. It carries the filters that produced it."}).option(`email`,{type:`string`,description:`Exact email-address filter.`}).option(`search`,{type:`string`,description:"A complete address is an exact match; a value ending in `@` matches that username across every domain. Prefix searches may return short intermediate pages while the bounded account scan advances."}).option(`reason`,{type:`string`,description:`Filter to suppressions with this reason.`,choices:[`manual`,`complaint`,`hard_bounce`,`soft_bounce`,`policy`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List account Email Sending suppressions`,builder:ee(se),handler:async t=>c({command:`email-sending suppressions list`,classification:{safeFlags:[`reason`,`dry-run`]}},t,async()=>{let c={per_page:t[`per-page`],cursor:t.cursor,email:t.email,search:t.search,reason:t.reason};if(t.dryRun){o({command:`cf email-sending suppressions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/email/sending/suppressions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(t),u=t.local?e:await n();t.accountId=u,a(await s(`Loading`,async()=>l.emailSending.suppressions.list({account_id:u,...c})),{successLabel:`Loaded`})})},le={command:`suppressions`,describe:`Prevent delivery to suppressed addresses and manage the account suppression list`,builder:e=>e.command(X).command(Q).command(re).command(ae).command($).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ue={command:`email-sending`,describe:`Send transactional email and manage sending subdomains and their DNS configuration`,builder:e=>e.command(g).command(E).command(w).command(y).command(S).command(J).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./error-sanitization-DOlqWkNu.mjs";export{e as sanitizeError};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{r as e}from"./sdk-CvIO3tWS.mjs";import{I as t}from"./dist-dc4E1u01.mjs";function n(e){if(typeof e!=`object`||!e)return[];let t=e.errors;return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.code;return typeof t==`number`&&Number.isFinite(t)?[t]:[]}):[]}function r(e){return typeof e==`number`&&Number.isInteger(e)&&e>=100&&e<=599}function i(e){try{return a(e)}catch{return{errorType:`Error`}}}function a(i){if(i instanceof e){let e=n(i.body);return{errorType:`APIError`,...r(i.statusCode)?{httpStatus:i.statusCode}:{},...e.length===0?{}:{errorCodes:e}}}return i instanceof t?{errorType:`APIError`,...r(i.status)?{httpStatus:i.status}:{},...typeof i.code==`number`&&Number.isFinite(i.code)?{errorCodes:[i.code]}:{}}:i instanceof Error?{errorType:`Error`}:{errorType:typeof i}}export{i as t};
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./prompt-Bx2PB-tt.mjs";function f(e){return e.usage(`$0 fieldExtractors delete <extractor>
3
+
4
+ Deletes all custom extraction rules for an extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,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 p={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:f,handler:async c=>s({command:`fieldExtractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf fieldExtractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/field_extractors/${c.extractor==null?`<extractor>`:encodeURIComponent(String(c.extractor))}`,pathParams:{extractor:String(c.extractor??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await d({force:!!c.force})){process.stderr.write(`Aborted.
5
+ `);return}i(await o(`Deleting`,async()=>s.fieldExtractors.delete({account_id:l,extractor:c.extractor})),{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 fieldExtractors get <extractor>
6
+
7
+ Retrieves the custom extraction rules configured for a given extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <extractor>`,describe:`Get Field Extractor`,builder:m,handler:async c=>s({command:`fieldExtractors get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf fieldExtractors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/field_extractors/${c.extractor==null?`<extractor>`:encodeURIComponent(String(c.extractor))}`,pathParams:{extractor:String(c.extractor??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.fieldExtractors.get({account_id:l,extractor:c.extractor})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 fieldExtractors update <extractor>
8
+
9
+ Replaces all custom extraction rules for an extractor type. Omitted rules are deleted.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`rules`,{type:`string`,description:`The rules field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Desired-state replacement of all rules for this extractor type.`})}const _={command:`update <extractor>`,describe:`Update Field Extractor`,builder:g,handler:async d=>s({command:`fieldExtractors update`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf fieldExtractors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/field_extractors/${d.extractor==null?`<extractor>`:encodeURIComponent(String(d.extractor))}`,pathParams:{extractor:String(d.extractor??``)},bodyKind:`json`,body:d.body===void 0?u({rules:l(d.rules,`rules`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.fieldExtractors.update({...e,account_id:f,extractor:d.extractor})),{successLabel:`Updated`});return}if(d.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let p=u({rules:l(d.rules,`rules`)});i(await o(`Updating`,async()=>s.fieldExtractors.update({...p,account_id:f,extractor:d.extractor})),{successLabel:`Updated`})})},v={command:`fieldExtractors`,describe:`fieldExtractors`,builder:e=>e.command(p).command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{v as default};
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{n as p}from"./prompt-Bx2PB-tt.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 firewall access-rules create
3
+
4
+ Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).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 ee={command:`create`,describe:`Create an IP Access rule`,builder:h,handler:async u=>c({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await r():void 0,t=u.zone===void 0?`accounts`:`zones`,n=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}}):l(u.body)});return}let c=await i(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await t({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await n();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body);a(await s(`Creating`,async()=>c.firewall.accessRules.create({...e,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`});return}let h=d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}});a(await s(`Creating`,async()=>c.firewall.accessRules.create({...h,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 firewall access-rules delete <rule-id>
5
+
6
+ Deletes an existing IP Access rule defined. Note: This operation will affect all zones in the account or zone.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,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 _={command:`delete <rule-id>`,describe:`Delete an IP Access rule`,builder:g,handler:async l=>c({command:`firewall access-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/firewall/access_rules/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(l[`rule-id`]??``),"account-or-zone-id":String(n)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await n();if(u===`zones`?l.zoneId=d:l.accountId=d,!await p({force:!!l.force,message:`This operation deletes the account-level IP Access Rule and affects every zone in the account.`})){process.stderr.write(`Aborted.
7
+ `);return}a(await s(`Deleting`,async()=>c.firewall.accessRules.delete({account_or_zone:u,account_or_zone_id:d,rule_id:l[`rule-id`]})),{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 firewall access-rules edit <rule-id>
8
+
9
+ Updates an IP Access rule defined. Note: This operation will affect all zones in the account or zone.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`edit <rule-id>`,describe:`Update an IP Access rule`,builder:v,handler:async u=>c({command:`firewall access-rules edit`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await r():void 0,t=u.zone===void 0?`accounts`:`zones`,n=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/firewall/access_rules/rules/${u[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(u[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(u[`rule-id`]??``),"account-or-zone-id":String(n)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)},notes:f(u.notes,`notes`,`text`)}):l(u.body)});return}let c=await i(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await t({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await n();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body);a(await s(`Updating`,async()=>c.firewall.accessRules.edit({body:e,account_or_zone:p,account_or_zone_id:m,rule_id:u[`rule-id`]})),{successLabel:`Updated`});return}let h=d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)},notes:f(u.notes,`notes`,`text`)});a(await s(`Updating`,async()=>c.firewall.accessRules.edit({body:h,account_or_zone:p,account_or_zone_id:m,rule_id:u[`rule-id`]})),{successLabel:`Updated`})})};function b(e){return e.usage(`$0 firewall access-rules get <rule-id>
10
+
11
+ Fetches the details of an IP Access rule defined.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:b,handler:async l=>c({command:`firewall access-rules get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/firewall/access_rules/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(l[`rule-id`]??``),"account-or-zone-id":String(n)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await n();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.firewall.accessRules.get({account_or_zone:u,account_or_zone_id:d,rule_id:l[`rule-id`]})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 firewall access-rules list
12
+
13
+ Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.`).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
14
+ Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List IP Access rules`,builder:m(S),handler:async l=>c({command:`firewall access-rules list`,classification:{safeFlags:[`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},l,async()=>{let c={"configuration.target":l[`configuration-target`],"configuration.value":l[`configuration-value`],notes:l.notes,match:l.match,page:l.page,per_page:l[`per-page`],order:l.order,direction:l.direction};if(l.dryRun){let e=l.zone===void 0?await r():void 0,t=l.zone===void 0?`accounts`:`zones`,n=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await t({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await n();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.firewall.accessRules.list({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})},w={command:`access-rules`,describe:`IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone`,builder:e=>e.command(ee).command(_).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 firewall filters bulk-delete
15
+
16
+ Deletes one or more existing filters.`).option(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`bulk-delete`,describe:`Delete filters`,builder:T,handler:async e=>c({command:`firewall filters bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let n={id:e.id};if(e.dryRun){o({command:`cf firewall filters bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=c,!await p({force:!!e.force})){process.stderr.write(`Aborted.
17
+ `);return}a(await s(`Deleting`,async()=>r.firewall.filters.bulkDelete({zone_id:c,...n})),{successLabel:`Deleted`})})};function D(e){return e.usage(`$0 firewall filters bulk-update
18
+
19
+ Updates one or more existing filters.`).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:`bulk-update`,describe:`Update filters`,builder:D,handler:async e=>c({command:`firewall filters bulk-update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall filters bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.firewall.filters.bulkUpdate({body:t,zone_id:r})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function k(e){return e.usage(`$0 firewall filters create
20
+
21
+ Creates one or more filters.`).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:`create`,describe:`Create filters`,builder:k,handler:async e=>c({command:`firewall filters create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall filters create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.firewall.filters.create({body:t,zone_id:r})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function j(e){return e.usage(`$0 firewall filters delete <filter-id>
22
+
23
+ Deletes an existing filter.`).positional(`filter-id`,{type:`string`,description:`The unique identifier of the filter.`,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 M={command:`delete <filter-id>`,describe:`Delete a filter`,builder:j,handler:async e=>c({command:`firewall filters delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf firewall filters delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await p({force:!!e.force})){process.stderr.write(`Aborted.
24
+ `);return}a(await s(`Deleting`,async()=>n.firewall.filters.delete({zone_id:r,filter_id:e[`filter-id`]})),{successLabel:`Deleted`})})};function N(e){return e.usage(`$0 firewall filters get <filter-id>
25
+
26
+ Fetches the details of a filter.`).positional(`filter-id`,{type:`string`,description:`The unique identifier of the filter.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <filter-id>`,describe:`Get a filter`,builder:N,handler:async e=>c({command:`firewall filters get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall filters get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.firewall.filters.get({zone_id:r,filter_id:e[`filter-id`]})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 firewall filters list
27
+
28
+ Fetches filters in a zone. You can filter the results using several optional parameters.`).option(`paused`,{type:`boolean`,description:`When true, indicates that the filter is currently paused.`}).option(`expression`,{type:`string`,description:`A case-insensitive string to find in the expression.`}).option(`description`,{type:`string`,description:`A case-insensitive string to find in the description.`}).option(`ref`,{type:`string`,description:`The filter ref (a short reference tag) to search for. Must be an exact match.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of filters per page.`}).option(`id`,{type:`string`,description:`The unique identifier of the filter.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List filters`,builder:m(F),handler:async e=>c({command:`firewall filters list`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{let n={paused:e.paused,expression:e.expression,description:e.description,ref:e.ref,page:e.page,per_page:e[`per-page`],id:e.id};if(e.dryRun){o({command:`cf firewall filters list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.firewall.filters.list({zone_id:c,...n})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 firewall filters update <filter-id>
29
+
30
+ Updates an existing filter.`).positional(`filter-id`,{type:`string`,description:`The unique identifier of the filter.`,demandOption:!0}).option(`description`,{type:`string`,description:`An informative summary of the filter.`}).option(`expression`,{type:`string`,description:`The filter expression. For more information, refer to [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/).`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the filter is currently paused.`}).option(`ref`,{type:`string`,description:`A short reference tag. Allows you to select related filters.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`update <filter-id>`,describe:`Update a filter`,builder:L,handler:async e=>c({command:`firewall filters update`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall filters update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/filters/${e[`filter-id`]==null?`<filter-id>`:encodeURIComponent(String(e[`filter-id`]))}`,pathParams:{"filter-id":String(e[`filter-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({description:f(e.description,`description`,`text`),expression:f(e.expression,`expression`,`text`),paused:e.paused,ref:f(e.ref,`ref`,`text`)}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.firewall.filters.update({body:t,zone_id:r,filter_id:e[`filter-id`]})),{successLabel:`Updated`});return}let c=d({description:f(e.description,`description`,`text`),expression:f(e.expression,`expression`,`text`),paused:e.paused,ref:f(e.ref,`ref`,`text`)});a(await s(`Updating`,async()=>n.firewall.filters.update({body:c,zone_id:r,filter_id:e[`filter-id`]})),{successLabel:`Updated`})})},z={command:`filters`,describe:`Operations for filters`,builder:e=>e.command(E).command(O).command(A).command(M).command(P).command(I).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.usage(`$0 firewall lockdowns create
31
+
32
+ Creates a new Zone Lockdown rule.`).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`create`,describe:`Create a Zone Lockdown rule`,builder:te,handler:async e=>c({command:`firewall lockdowns create`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configurations:u(e.configurations,`configurations`),description:f(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.firewall.lockdowns.create({...t,zone_id:r})),{successLabel:`Created`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let c=d({configurations:u(e.configurations,`configurations`),description:f(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls});a(await s(`Creating`,async()=>n.firewall.lockdowns.create({...c,zone_id:r})),{successLabel:`Created`})})};function V(e){return e.usage(`$0 firewall lockdowns delete <lock-downs-id>
33
+
34
+ Deletes an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const H={command:`delete <lock-downs-id>`,describe:`Delete a Zone Lockdown rule`,builder:V,handler:async e=>c({command:`firewall lockdowns delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"lock-downs-id":String(e[`lock-downs-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await p({force:!!e.force,message:`This operation deletes the Zone Lockdown rule from the zone.`})){process.stderr.write(`Aborted.
35
+ `);return}a(await s(`Deleting`,async()=>n.firewall.lockdowns.delete({zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Deleted`})})};function U(e){return e.usage(`$0 firewall lockdowns get <lock-downs-id>
36
+
37
+ Fetches the details of a Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <lock-downs-id>`,describe:`Get a Zone Lockdown rule`,builder:U,handler:async e=>c({command:`firewall lockdowns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"lock-downs-id":String(e[`lock-downs-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.firewall.lockdowns.get({zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 firewall lockdowns list
38
+
39
+ Fetches Zone Lockdown rules. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`modified-on`,{type:`string`,description:`The timestamp of when the rule was last modified.`}).option(`ip`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`uri-search`,{type:`string`,description:`A single URI to search for in the list of URLs of existing rules.`}).option(`ip-range-search`,{type:`string`,description:`A single IP address range to search for in existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`created-on`,{type:`string`,description:`The timestamp of when the rule was created.`}).option(`description-search`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`ip-search`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`list`,describe:`List Zone Lockdown rules`,builder:G,handler:async e=>c({command:`firewall lockdowns list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,description:e.description,modified_on:e[`modified-on`],ip:e.ip,priority:e.priority,uri_search:e[`uri-search`],ip_range_search:e[`ip-range-search`],per_page:e[`per-page`],created_on:e[`created-on`],description_search:e[`description-search`],ip_search:e[`ip-search`]};if(e.dryRun){o({command:`cf firewall lockdowns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.firewall.lockdowns.list({zone_id:c,...n})),{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 firewall lockdowns update <lock-downs-id>
40
+
41
+ Updates an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const J={command:`update <lock-downs-id>`,describe:`Update a Zone Lockdown rule`,builder:q,handler:async e=>c({command:`firewall lockdowns update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"lock-downs-id":String(e[`lock-downs-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configurations:u(e.configurations,`configurations`),urls:e.urls}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.firewall.lockdowns.update({...t,zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Updated`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let c=d({configurations:u(e.configurations,`configurations`),urls:e.urls});a(await s(`Updating`,async()=>n.firewall.lockdowns.update({...c,zone_id:r,lock_downs_id:e[`lock-downs-id`]})),{successLabel:`Updated`})})},Y={command:`lockdowns`,describe:`Zone lockdown rules that restrict access to URLs by IP address or range`,builder:e=>e.command(B).command(H).command(W).command(K).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return e.usage(`$0 firewall ua-rules create
42
+
43
+ Creates a new User Agent Blocking rule in a zone.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ua` when specifying a user agent in the rule.",choices:[`ua`]}).option(`configuration-value`,{type:`string`,description:`the user agent to exactly match`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`create`,describe:`Create a User Agent Blocking rule`,builder:X,handler:async e=>c({command:`firewall ua-rules create`,classification:{safeFlags:[`configuration-target`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.firewall.uaRules.create({...t,zone_id:r})),{successLabel:`Created`});return}let c=d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused});a(await s(`Creating`,async()=>n.firewall.uaRules.create({...c,zone_id:r})),{successLabel:`Created`})})};function Q(e){return e.usage(`$0 firewall ua-rules delete <ua-rule-id>
44
+
45
+ Deletes an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,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 ne={command:`delete <ua-rule-id>`,describe:`Delete a User Agent Blocking rule`,builder:Q,handler:async e=>c({command:`firewall ua-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await p({force:!!e.force,message:`This operation deletes the User Agent Blocking rule from the zone.`})){process.stderr.write(`Aborted.
46
+ `);return}a(await s(`Deleting`,async()=>n.firewall.uaRules.delete({zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Deleted`})})};function re(e){return e.usage(`$0 firewall ua-rules get <ua-rule-id>
47
+
48
+ Fetches the details of a User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <ua-rule-id>`,describe:`Get a User Agent Blocking rule`,builder:re,handler:async e=>c({command:`firewall ua-rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.firewall.uaRules.get({zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Loaded`})})};function ae(e){return e.usage(`$0 firewall ua-rules list
49
+
50
+ Fetches User Agent Blocking rules in a zone. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`user-agent`,{type:`string`,description:`A string to search for in the user agent values of existing rules.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`List User Agent Blocking rules`,builder:ae,handler:async e=>c({command:`firewall ua-rules list`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{let n={page:e.page,description:e.description,per_page:e[`per-page`],user_agent:e[`user-agent`],paused:e.paused};if(e.dryRun){o({command:`cf firewall ua-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.firewall.uaRules.list({zone_id:c,...n})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 firewall ua-rules update <ua-rule-id>
51
+
52
+ Updates an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const se={command:`update <ua-rule-id>`,describe:`Update a User Agent Blocking rule`,builder:$,handler:async e=>c({command:`firewall ua-rules update`,classification:{safeFlags:[`configuration-target`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall ua-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"ua-rule-id":String(e[`ua-rule-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Updating`,async()=>n.firewall.uaRules.update({...t,zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Updated`});return}let c=d({configuration:{target:f(e[`configuration-target`],`configuration-target`,`text`),value:f(e[`configuration-value`],`configuration-value`,`text`)},description:f(e.description,`description`,`text`),paused:e.paused});a(await s(`Updating`,async()=>n.firewall.uaRules.update({...c,zone_id:r,ua_rule_id:e[`ua-rule-id`]})),{successLabel:`Updated`})})},ce={command:`ua-rules`,describe:`Block or challenge requests based on the User-Agent header string`,builder:e=>e.command(Z).command(ne).command(ie).command(oe).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function le(e){return e.usage(`$0 firewall waf packages get <package-id>
53
+
54
+ Fetches the details of a WAF package. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).`).positional(`package-id`,{type:`string`,description:`Defines a package identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <package-id>`,describe:`Get a WAF package`,builder:le,handler:async e=>c({command:`firewall waf packages get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall waf packages get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/waf/packages/${e[`package-id`]==null?`<package-id>`:encodeURIComponent(String(e[`package-id`]))}`,pathParams:{"package-id":String(e[`package-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>n.firewall.waf.packages.get({zone_id:r,package_id:e[`package-id`]})),{successLabel:`Loaded`})})};function de(e){return e.usage(`$0 firewall waf packages list
55
+
56
+ Fetches WAF packages for a zone. **Note:** Applies only to the [previous version of WAF managed rules](https://developers.cloudflare.com/support/firewall/managed-rules-web-application-firewall-waf/understanding-waf-managed-rules-web-application-firewall/).`).option(`page`,{type:`number`,description:`The page number of paginated results.`}).option(`per-page`,{type:`number`,description:`The number of packages per page.`}).option(`order`,{type:`string`,description:`The field used to sort returned packages.`,choices:[`name`]}).option(`direction`,{type:`string`,description:`The direction used to sort returned packages.`,choices:[`asc`,`desc`]}).option(`match`,{type:`string`,description:"When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`name`,{type:`string`,description:`The name of the WAF package.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`List WAF packages`,builder:m(de),handler:async e=>c({command:`firewall waf packages list`,classification:{safeFlags:[`order`,`direction`,`match`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,match:e.match,name:e.name};if(e.dryRun){o({command:`cf firewall waf packages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/waf/packages`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let r=await i(e),c=await t({zone:e.zone},r,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>r.firewall.waf.packages.list({zone_id:c,...n})),{successLabel:`Loaded`})})},pe={command:`packages`,describe:`Operations for waf.packages`,builder:e=>e.command(ue).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},me={command:`waf`,describe:`Legacy WAF managed rule packages, rule groups, individual rules, and override configurations`,builder:e=>e.command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},he={command:`firewall`,describe:`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,builder:e=>e.command(w).command(z).command(Y).command(ce).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{he as default};
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,n as m}from"./prompt-Bx2PB-tt.mjs";function h(e){return e.usage(`$0 flagship apps create
3
+
4
+ Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create app`,builder:h,handler:async r=>c({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({name:f(r.name,`name`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.flagship.apps.create({...e,account_id:u})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await p(`name`,`The name field`));let m=d({name:f(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.flagship.apps.create({...m,account_id:u})),{successLabel:`Created`})})};function _(e){return e.usage("$0 flagship apps definitions get <app-id>\n\nReturns an app's evaluation-only flag definitions for SDKs that evaluate locally. Send the returned `ETag` in `If-None-Match` to avoid downloading unchanged definitions.").positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`if-none-match`,{type:`string`,description:"Previously returned ETag, or `*`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <app-id>`,describe:`Get flag definitions`,builder:_,handler:async l=>c({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`if-none-match`]!==void 0&&(c[`If-None-Match`]=String(l[`if-none-match`])),l.dryRun){o({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/definitions`,pathParams:{"app-id":String(l[`app-id`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await t();l.accountId=d,a(await s(`Loading`,async()=>r(u,`GET`,`/accounts/${d}/flagship/apps/${encodeURIComponent(String(l[`app-id`]))}/definitions`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Loaded`})})},y={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 flagship apps delete <app-id>
5
+
6
+ Deletes an app and all its flags and changelog history. Returns 409 if any Worker still references this app via a Flagship binding.`).positional(`app-id`,{type:`string`,description:`App 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 x={command:`delete <app-id>`,describe:`Delete app`,builder:b,handler:async r=>c({command:`flagship apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}`,pathParams:{"app-id":String(r[`app-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
7
+ `);return}a(await s(`Deleting`,async()=>c.flagship.apps.delete({account_id:l,app_id:r[`app-id`]})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 flagship apps evaluate create <app-id>
8
+
9
+ Evaluates a flag against the provided context, passed as a JSON request body (OFREP-shaped) rather than query parameters. Returns the same response shape as the GET variant.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`The flagKey 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 C={command:`create <app-id>`,describe:`Evaluate flag (POST)`,builder:S,handler:async r=>c({command:`flagship apps evaluate create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps evaluate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/evaluate`,pathParams:{"app-id":String(r[`app-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({flagKey:f(r[`flag-key`],`flag-key`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.flagship.apps.evaluate.create({...e,account_id:u,app_id:r[`app-id`]})),{successLabel:`Created`});return}r[`flag-key`]===void 0&&(r[`flag-key`]=await p(`flag-key`,`The flagKey field`));let m=d({flagKey:f(r[`flag-key`],`flag-key`,`text`)});a(await s(`Creating`,async()=>c.flagship.apps.evaluate.create({...m,account_id:u,app_id:r[`app-id`]})),{successLabel:`Created`})})};function w(e){return e.usage(`$0 flagship apps evaluate get <app-id>
10
+
11
+ Evaluates a flag against the provided context. Pass context attributes as query parameters; values are forwarded as strings. For low-latency in-Worker evaluation, prefer the Flagship binding over this endpoint.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`The flag key to evaluate.`,demandOption:!0}).option(`targeting-key`,{type:`string`,description:`Context targeting key (per OpenFeature spec); used for percentage rollout bucketing.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <app-id>`,describe:`Evaluate flag`,builder:w,handler:async r=>c({command:`flagship apps evaluate get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={flagKey:r[`flag-key`],targetingKey:r[`targeting-key`]};if(r.dryRun){o({command:`cf flagship apps evaluate get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/evaluate`,pathParams:{"app-id":String(r[`app-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.flagship.apps.evaluate.get({account_id:u,app_id:r[`app-id`],...c})),{successLabel:`Loaded`})})},E={command:`evaluate`,describe:`Operations for apps.evaluate`,builder:e=>e.command(C).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function D(e){return e.usage(`$0 flagship apps flags changelog list
12
+
13
+ Returns the audit history for a flag, newest first. Each entry includes the event type and full flag state after the change; \`update\` entries include a field-level diff. Capped at 200 entries per flag.`).option(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`flag-key`,{type:`string`,description:`Flag key (slug).`,demandOption:!0}).option(`limit`,{type:`string`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`Get flag changelog`,builder:D,handler:async r=>c({command:`flagship apps flags changelog list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,cursor:r.cursor};if(r.dryRun){o({command:`cf flagship apps flags changelog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags/${r[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(r[`flag-key`]))}/changelog`,pathParams:{"app-id":String(r[`app-id`]??``),"flag-key":String(r[`flag-key`]??``)},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.flagship.apps.flags.changelog.list({account_id:u,app_id:r[`app-id`],flag_key:r[`flag-key`],...c})),{successLabel:`Loaded`})})},k={command:`changelog`,describe:`Operations for apps.flags.changelog`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 flagship apps flags create <app-id>
14
+
15
+ Creates a flag. Returns 409 if the key already exists. \`type\` is always inferred from variation values; legacy request-side values are ignored.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`create <app-id>`,describe:`Create flag`,builder:A,handler:async r=>c({command:`flagship apps flags create`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps flags create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags`,pathParams:{"app-id":String(r[`app-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({default_variation:f(r[`default-variation`],`default-variation`,`text`),description:f(r.description,`description`,`text`),enabled:r.enabled,key:f(r.key,`key`,`text`),rules:u(r.rules,`rules`),type:f(r.type,`type`,`text`)}):l(r.body)});return}let c=await i(r),m=r.local?e:await t();if(r.accountId=m,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.flagship.apps.flags.create({...e,account_id:m,app_id:r[`app-id`]})),{successLabel:`Created`});return}if(r[`default-variation`]===void 0&&(r[`default-variation`]=await p(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(r.key===void 0&&(r.key=await p(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),r.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let h=d({default_variation:f(r[`default-variation`],`default-variation`,`text`),description:f(r.description,`description`,`text`),enabled:r.enabled,key:f(r.key,`key`,`text`),rules:u(r.rules,`rules`),type:f(r.type,`type`,`text`)});a(await s(`Creating`,async()=>c.flagship.apps.flags.create({...h,account_id:m,app_id:r[`app-id`]})),{successLabel:`Created`})})};function M(e){return e.usage(`$0 flagship apps flags delete <flag-key>
16
+
17
+ Deletes a flag permanently. Subsequent evaluations fall back to the caller-supplied default. Cannot be undone.`).positional(`flag-key`,{type:`string`,description:`Flag key (slug).`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App 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 N={command:`delete <flag-key>`,describe:`Delete flag`,builder:M,handler:async r=>c({command:`flagship apps flags delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps flags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags/${r[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(r[`flag-key`]))}`,pathParams:{"app-id":String(r[`app-id`]??``),"flag-key":String(r[`flag-key`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
18
+ `);return}a(await s(`Deleting`,async()=>c.flagship.apps.flags.delete({account_id:l,app_id:r[`app-id`],flag_key:r[`flag-key`]})),{successLabel:`Deleted`})})};function P(e){return e.usage(`$0 flagship apps flags get <flag-key>
19
+
20
+ Returns the full flag definition including rules, variations, and audit fields.`).positional(`flag-key`,{type:`string`,description:`Flag key (slug).`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <flag-key>`,describe:`Get flag`,builder:P,handler:async r=>c({command:`flagship apps flags get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps flags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags/${r[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(r[`flag-key`]))}`,pathParams:{"app-id":String(r[`app-id`]??``),"flag-key":String(r[`flag-key`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.flagship.apps.flags.get({account_id:l,app_id:r[`app-id`],flag_key:r[`flag-key`]})),{successLabel:`Loaded`})})};function I(e){return e.usage("$0 flagship apps flags list\n\nLists an app's flags ordered by key. Pass `cursor` from `result_info` to page forward; a null cursor indicates the last page.").option(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`limit`,{type:`string`,description:`Max items to return (1–200).`}).option(`cursor`,{type:`string`,description:`Pagination cursor from a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List flags`,builder:I,handler:async r=>c({command:`flagship apps flags list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,cursor:r.cursor};if(r.dryRun){o({command:`cf flagship apps flags list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags`,pathParams:{"app-id":String(r[`app-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.flagship.apps.flags.list({account_id:u,app_id:r[`app-id`],...c})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 flagship apps flags update <flag-key>
21
+
22
+ Replaces the entire flag definition. Omitted fields are dropped, not preserved — read before writing. Each update appends a changelog entry.`).positional(`flag-key`,{type:`string`,description:`Flag key (slug).`,demandOption:!0}).option(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`default-variation`,{type:`string`,description:"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`."}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:"When false, the flag bypasses all rules and always serves `default_variation`."}).option(`key`,{type:`string`,description:`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`}).option(`rules`,{type:`string`,description:"Targeting rules evaluated in ascending `priority`; the first matching rule wins. An empty array means the flag always serves `default_variation`. Provide as a JSON array of objects or @path/to/file.json."}).option(`type`,{type:`string`,description:`Deprecated compatibility field. Omit it; the API ignores this value and infers the type from the flag's variations.`,choices:[`boolean`,`string`,`number`,`json`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update <flag-key>`,describe:`Update flag`,builder:R,handler:async r=>c({command:`flagship apps flags update`,classification:{safeFlags:[`enabled`,`type`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps flags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}/flags/${r[`flag-key`]==null?`<flag-key>`:encodeURIComponent(String(r[`flag-key`]))}`,pathParams:{"app-id":String(r[`app-id`]??``),"flag-key":String(r[`flag-key`]??``)},bodyKind:`json`,body:r.body===void 0?d({default_variation:f(r[`default-variation`],`default-variation`,`text`),description:f(r.description,`description`,`text`),enabled:r.enabled,key:f(r.key,`key`,`text`),rules:u(r.rules,`rules`),type:f(r.type,`type`,`text`)}):l(r.body)});return}let c=await i(r),m=r.local?e:await t();if(r.accountId=m,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.flagship.apps.flags.update({...e,account_id:m,app_id:r[`app-id`],flag_key:r[`flag-key`]})),{successLabel:`Updated`});return}if(r[`default-variation`]===void 0&&(r[`default-variation`]=await p(`default-variation`,"Variation the API serves when the flag is off, or when it's on but no rule matches the context. Must be a key in `variations`.")),r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(r.key===void 0&&(r.key=await p(`key`,`Unique identifier for the flag within an app. Used in all evaluation and SDK calls.`)),r.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let h=d({default_variation:f(r[`default-variation`],`default-variation`,`text`),description:f(r.description,`description`,`text`),enabled:r.enabled,key:f(r.key,`key`,`text`),rules:u(r.rules,`rules`),type:f(r.type,`type`,`text`)});a(await s(`Updating`,async()=>c.flagship.apps.flags.update({...h,account_id:m,app_id:r[`app-id`],flag_key:r[`flag-key`]})),{successLabel:`Updated`})})},B={command:`flags`,describe:`Operations for apps.flags`,builder:e=>e.command(j).command(N).command(F).command(L).command(z).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 flagship apps get <app-id>
23
+
24
+ Returns an app's name and audit fields. Flag definitions are not included.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <app-id>`,describe:`Get app`,builder:V,handler:async r=>c({command:`flagship apps get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}`,pathParams:{"app-id":String(r[`app-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.flagship.apps.get({account_id:l,app_id:r[`app-id`]})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 flagship apps list
25
+
26
+ Lists all apps in the account. Returns identity and audit fields only — flag definitions are not included.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List apps`,builder:U,handler:async r=>c({command:`flagship apps list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.flagship.apps.list({account_id:l})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 flagship apps update <app-id>
27
+
28
+ Updates an app. Only \`name\` is mutable.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`update <app-id>`,describe:`Update app`,builder:G,handler:async r=>c({command:`flagship apps update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf flagship apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/flagship/apps/${r[`app-id`]==null?`<app-id>`:encodeURIComponent(String(r[`app-id`]))}`,pathParams:{"app-id":String(r[`app-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({name:f(r.name,`name`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.flagship.apps.update({...e,account_id:u,app_id:r[`app-id`]})),{successLabel:`Updated`});return}let p=d({name:f(r.name,`name`,`text`)});a(await s(`Updating`,async()=>c.flagship.apps.update({...p,account_id:u,app_id:r[`app-id`]})),{successLabel:`Updated`})})},q={command:`apps`,describe:`Operations for apps`,builder:e=>e.command(g).command(x).command(H).command(W).command(K).command(y).command(E).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`flagship`,describe:`flagship`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ import{_ as e}from"./oauth-D4bkeMAw.mjs";import{r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";function l(e){return e.usage(`$0 fraud get
3
+
4
+ Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Get Fraud Detection Settings`,builder:l,handler:async o=>a({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.fraud.get({zone_id:s})),{successLabel:`Loaded`})})};function d(e){return e.usage("$0 fraud update\n\nUpdate Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.").option(`authentication-settings-failure-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
5
+ - Maximum of 10 codes per criterion.
6
+ - Each code must be a valid HTTP status code (100-599).
7
+ - Codes are deduplicated and sorted on save.
8
+ - Omit to leave unchanged on update.
9
+ - Provide an empty array \`[]\` to clear codes on update.
10
+ `}).option(`authentication-settings-success-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).option(`authentication-settings-success-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
11
+ - Maximum of 10 codes per criterion.
12
+ - Each code must be a valid HTTP status code (100-599).
13
+ - Codes are deduplicated and sorted on save.
14
+ - Omit to leave unchanged on update.
15
+ - Provide an empty array \`[]\` to clear codes on update.
16
+ `}).option(`user-profiles`,{type:`string`,description:`Whether Fraud User Profiles is enabled for the zone.`,choices:[`enabled`,`disabled`]}).option(`username-expressions`,{type:`string`,array:!0,description:`List of expressions to detect usernames in write HTTP requests.
17
+
18
+ - Maximum of 10 expressions.
19
+ - Omit or set to null to leave unchanged on update.
20
+ - Provide an empty array \`[]\` to clear all expressions on update.
21
+ - Invalid expressions will result in a 10400 Bad Request with details in the \`messages\` array.
22
+ `}).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)`}).check(e=>{if([`authentication-settings-failure-criteria-kind`,`authentication-settings-failure-criteria-status-codes`,`authentication-settings-success-criteria-kind`,`authentication-settings-success-criteria-status-codes`].some(t=>e[t]!==void 0)){let t=[`authentication-settings-failure-criteria-kind`,`authentication-settings-success-criteria-kind`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --authentication_settings-* flag is set`)}return!0})}const f={command:`update`,describe:`Update Fraud Detection Settings`,builder:d,handler:async l=>a({command:`fraud update`,classification:{safeFlags:[`authentication-settings-failure-criteria-kind`,`authentication-settings-success-criteria-kind`,`user-profiles`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf fraud update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({authentication_settings:{failure_criteria:{kind:c(l[`authentication-settings-failure-criteria-kind`],`authentication-settings-failure-criteria-kind`,`text`),status_codes:l[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:c(l[`authentication-settings-success-criteria-kind`],`authentication-settings-success-criteria-kind`,`text`),status_codes:l[`authentication-settings-success-criteria-status-codes`]}},user_profiles:c(l[`user-profiles`],`user-profiles`,`text`),username_expressions:l[`username-expressions`]}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.fraud.update({body:e,zone_id:u})),{successLabel:`Updated`});return}let d=s({authentication_settings:{failure_criteria:{kind:c(l[`authentication-settings-failure-criteria-kind`],`authentication-settings-failure-criteria-kind`,`text`),status_codes:l[`authentication-settings-failure-criteria-status-codes`]},success_criteria:{kind:c(l[`authentication-settings-success-criteria-kind`],`authentication-settings-success-criteria-kind`,`text`),status_codes:l[`authentication-settings-success-criteria-status-codes`]}},user_profiles:c(l[`user-profiles`],`user-profiles`,`text`),username_expressions:l[`username-expressions`]});n(await i(`Updating`,async()=>a.fraud.update({body:d,zone_id:u})),{successLabel:`Updated`})})},p={command:`fraud`,describe:`fraud`,builder:e=>e.command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import{_ as e}from"./oauth-D4bkeMAw.mjs";import{r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l}from"./prompt-Bx2PB-tt.mjs";function u(e){return e.usage(`$0 google-tag-gateway config get
3
+
4
+ Gets the Google Tag Gateway configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:u,handler:async o=>a({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.googleTagGateway.config.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 google-tag-gateway config update
5
+
6
+ Updates the Google Tag Gateway configuration for a zone.`).option(`enabled`,{type:`boolean`,description:`Enables or disables Google Tag Gateway for this zone.`}).option(`endpoint`,{type:`string`,description:`Specifies the endpoint path for proxying Google Tag Manager requests. Use an absolute path starting with '/', with no nested paths and alphanumeric characters only (e.g. /metrics).`}).option(`hide-original-ip`,{type:`boolean`,description:`Hides the original client IP address from Google when enabled.`}).option(`measurement-id`,{type:`string`,description:`Specify the Google Tag Manager container or measurement ID (e.g. GTM-XXXXXXX or G-XXXXXXXXXX).`}).option(`set-up-tag`,{type:`boolean`,description:`Set up the associated Google Tag on the zone automatically when enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Google Tag Gateway configuration for a zone.`})}const p={command:`update`,describe:`Update Google Tag Gateway configuration`,builder:f,handler:async u=>a({command:`google-tag-gateway config update`,classification:{safeFlags:[`enabled`,`hide-original-ip`,`set-up-tag`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf google-tag-gateway config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({enabled:u.enabled,endpoint:c(u.endpoint,`endpoint`,`text`),hideOriginalIp:u[`hide-original-ip`],measurementId:c(u[`measurement-id`],`measurement-id`,`text`),setUpTag:u[`set-up-tag`]}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.googleTagGateway.config.update({body:e,zone_id:d})),{successLabel:`Updated`});return}if(u.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(u.endpoint===void 0&&(u.endpoint=await l(`endpoint`,`Specifies the endpoint path for proxying Google Tag Manager requests. Use an absolute path starting with '/', with no nested paths and alphanumeric characters only (e.g. /metrics).`)),u[`hide-original-ip`]===void 0)throw Error(`--hide-original-ip is required (or pass --body with this field set).`);u[`measurement-id`]===void 0&&(u[`measurement-id`]=await l(`measurement-id`,`Specify the Google Tag Manager container or measurement ID (e.g. GTM-XXXXXXX or G-XXXXXXXXXX).`));let f=s({enabled:u.enabled,endpoint:c(u.endpoint,`endpoint`,`text`),hideOriginalIp:u[`hide-original-ip`],measurementId:c(u[`measurement-id`],`measurement-id`,`text`),setUpTag:u[`set-up-tag`]});n(await i(`Updating`,async()=>a.googleTagGateway.config.update({body:f,zone_id:d})),{successLabel:`Updated`})})},m={command:`config`,describe:`Google Tag Gateway config operations`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`google-tag-gateway`,describe:`Google Tag Gateway operations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+ import{_ as e}from"./oauth-D4bkeMAw.mjs";import{r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,n as u}from"./prompt-Bx2PB-tt.mjs";function d(e){return e.usage(`$0 healthchecks create
3
+
4
+ Create a new health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const f={command:`create`,describe:`Create Health Check`,builder:d,handler:async u=>a({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.healthchecks.create({body:e,zone_id:d})),{successLabel:`Created`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)});n(await i(`Creating`,async()=>a.healthchecks.create({body:f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
5
+
6
+ Delete a health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const m={command:`delete <healthcheck-id>`,describe:`Delete Health Check`,builder:p,handler:async o=>a({command:`healthchecks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf healthchecks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
7
+ `);return}n(await i(`Deleting`,async()=>a.healthchecks.delete({zone_id:s,healthcheck_id:o[`healthcheck-id`]})),{successLabel:`Deleted`})})};function h(e){return e.usage(`$0 healthchecks edit <healthcheck-id>
8
+
9
+ Patch a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`edit <healthcheck-id>`,describe:`Patch Health Check`,builder:h,handler:async u=>a({command:`healthchecks edit`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks/${u[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(u[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(u[`healthcheck-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.healthchecks.edit({body:e,zone_id:d,healthcheck_id:u[`healthcheck-id`]})),{successLabel:`Updated`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)});n(await i(`Updating`,async()=>a.healthchecks.edit({body:f,zone_id:d,healthcheck_id:u[`healthcheck-id`]})),{successLabel:`Updated`})})};function _(e){return e.usage(`$0 healthchecks get <healthcheck-id>
10
+
11
+ Fetch a single configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <healthcheck-id>`,describe:`Health Check Details`,builder:_,handler:async o=>a({command:`healthchecks get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf healthchecks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.healthchecks.get({zone_id:s,healthcheck_id:o[`healthcheck-id`]})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 healthchecks list
12
+
13
+ List configured health checks.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List Health Checks`,builder:y,handler:async o=>a({command:`healthchecks list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`]};if(o.dryRun){r({command:`cf healthchecks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.healthchecks.list({zone_id:c,...a})),{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 healthchecks previews create
14
+
15
+ Create a new preview health check.`).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`create`,describe:`Create Preview Health Check`,builder:x,handler:async u=>a({command:`healthchecks previews create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks previews create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks/preview`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.healthchecks.previews.create({body:e,zone_id:d})),{successLabel:`Created`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)});n(await i(`Creating`,async()=>a.healthchecks.previews.create({body:f,zone_id:d})),{successLabel:`Created`})})};function C(e){return e.usage(`$0 healthchecks previews delete <healthcheck-id>
16
+
17
+ Delete a health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const w={command:`delete <healthcheck-id>`,describe:`Delete Preview Health Check`,builder:C,handler:async o=>a({command:`healthchecks previews delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf healthchecks previews delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks/preview/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
18
+ `);return}n(await i(`Deleting`,async()=>a.healthchecks.previews.delete({zone_id:s,healthcheck_id:o[`healthcheck-id`]})),{successLabel:`Deleted`})})};function T(e){return e.usage(`$0 healthchecks previews get <healthcheck-id>
19
+
20
+ Fetch a single configured health check preview.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <healthcheck-id>`,describe:`Health Check Preview Details`,builder:T,handler:async o=>a({command:`healthchecks previews get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf healthchecks previews get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/healthchecks/preview/${o[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(o[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(o[`healthcheck-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.healthchecks.previews.get({zone_id:s,healthcheck_id:o[`healthcheck-id`]})),{successLabel:`Loaded`})})},D={command:`previews`,describe:`Test a health check configuration before deploying it to production`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 healthchecks update <healthcheck-id>
21
+
22
+ Update a configured health check.`).positional(`healthcheck-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`update <healthcheck-id>`,describe:`Update Health Check`,builder:O,handler:async u=>a({command:`healthchecks update`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf healthchecks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/healthchecks/${u[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(u[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(u[`healthcheck-id`]??``),"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.healthchecks.update({body:e,zone_id:d,healthcheck_id:u[`healthcheck-id`]})),{successLabel:`Updated`});return}u.address===void 0&&(u.address=await l(`address`,`The hostname or IP address of the origin server to run health checks on.`)),u.name===void 0&&(u.name=await l(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=s({address:c(u.address,`address`,`text`),check_regions:u[`check-regions`],consecutive_fails:u[`consecutive-fails`],consecutive_successes:u[`consecutive-successes`],description:c(u.description,`description`,`text`),http_config:{allow_insecure:u[`http-config-allow-insecure`],expected_body:c(u[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:u[`http-config-expected-codes`],follow_redirects:u[`http-config-follow-redirects`],method:c(u[`http-config-method`],`http-config-method`,`text`),path:c(u[`http-config-path`],`http-config-path`,`text`),port:u[`http-config-port`]},interval:u.interval,name:c(u.name,`name`,`text`),retries:u.retries,suspended:u.suspended,tcp_config:{method:c(u[`tcp-config-method`],`tcp-config-method`,`text`),port:u[`tcp-config-port`]},timeout:u.timeout,type:c(u.type,`type`,`text`)});n(await i(`Updating`,async()=>a.healthchecks.update({body:f,zone_id:d,healthcheck_id:u[`healthcheck-id`]})),{successLabel:`Updated`})})},A={command:`healthchecks`,describe:`Standalone health checks that monitor origin server availability from Cloudflare's edge`,builder:e=>e.command(f).command(m).command(g).command(v).command(b).command(k).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{A as default};
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ import{_ as e}from"./oauth-D4bkeMAw.mjs";import{a as t,r as n}from"./auth-Cp7gT-AF.mjs";import{t as r}from"./output-Bia1u2k5.mjs";import{t as i}from"./dry-run-CLX6Pbtq.mjs";import{t as a}from"./progress-Bi02B6v4.mjs";import{t as o}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./prompt-Bx2PB-tt.mjs";function l(e){return e.usage(`$0 hostnames settings tls-single get <hostname>
3
+
4
+ Get the requested TLS setting for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get <hostname>`,describe:`Get TLS setting for hostname`,builder:l,handler:async t=>o({command:`hostnames settings tls-single get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf hostnames settings tls-single get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/hostnames/settings/${t[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(t[`setting-id`]))}/${t.hostname==null?`<hostname>`:encodeURIComponent(String(t.hostname))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"setting-id":String(t[`setting-id`]??``),hostname:String(t.hostname??``)},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.hostnames.settings.tlsSingle.get({zone_id:s,setting_id:t[`setting-id`],hostname:t.hostname})),{successLabel:`Loaded`})})},d={command:`tls-single`,describe:`Operations for settings.tls-single`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function f(e){return e.usage(`$0 hostnames settings tls delete <hostname>
5
+
6
+ Delete the tls setting value for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',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 p={command:`delete <hostname>`,describe:`Delete TLS setting for hostname`,builder:f,handler:async t=>o({command:`hostnames settings tls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){i({command:`cf hostnames settings tls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/hostnames/settings/${t[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(t[`setting-id`]))}/${t.hostname==null?`<hostname>`:encodeURIComponent(String(t.hostname))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"setting-id":String(t[`setting-id`]??``),hostname:String(t.hostname??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await c({force:!!t.force})){process.stderr.write(`Aborted.
7
+ `);return}r(await a(`Deleting`,async()=>o.hostnames.settings.tls.delete({zone_id:s,setting_id:t[`setting-id`],hostname:t.hostname})),{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 hostnames settings tls get <setting-id>
8
+
9
+ List the requested TLS setting for the hostnames under this zone.`).positional(`setting-id`,{type:`string`,description:'The TLS Setting name. The value type depends on the setting: - `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`). - `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`). - `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <setting-id>`,describe:`List TLS setting for hostnames`,builder:m,handler:async t=>o({command:`hostnames settings tls get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){i({command:`cf hostnames settings tls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/hostnames/settings/${t[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(t[`setting-id`]))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"setting-id":String(t[`setting-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.hostnames.settings.tls.get({zone_id:s,setting_id:t[`setting-id`]})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 hostnames settings tls update <hostname>
10
+
11
+ Update the tls setting value for the hostname.`).positional(`hostname`,{type:`string`,description:`The hostname for which the tls settings are set.`,demandOption:!0}).option(`setting-id`,{type:`string`,description:'The TLS Setting name.\nThe value type depends on the setting:\n- `ciphers`: value is an array of cipher suite strings (e.g., `["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"]`).\n- `min_tls_version`: value is a TLS version string (`"1.0"`, `"1.1"`, `"1.2"`, or `"1.3"`).\n- `http2`: value is `"on"` or `"off"`.',demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`update <hostname>`,describe:`Edit TLS setting for hostname`,builder:g,handler:async c=>o({command:`hostnames settings tls update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf hostnames settings tls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/hostnames/settings/${c[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(c[`setting-id`]))}/${c.hostname==null?`<hostname>`:encodeURIComponent(String(c.hostname))}`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"setting-id":String(c[`setting-id`]??``),hostname:String(c.hostname??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c),l=await e({zone:c.zone},o,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=s(c.body);r(await a(`Updating`,async()=>o.hostnames.settings.tls.update({...e,zone_id:l,setting_id:c[`setting-id`],hostname:c.hostname})),{successLabel:`Updated`});return}r(await a(`Updating`,async()=>t(o,`PUT`,`/zones/${c.zoneId}/hostnames/settings/${encodeURIComponent(String(c[`setting-id`]))}/${encodeURIComponent(String(c.hostname))}`)),{successLabel:`Updated`})})},v={command:`tls`,describe:`Operations for settings.tls`,builder:e=>e.command(p).command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(v).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},b={command:`hostnames`,describe:`hostnames`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};