cf 1.0.0-beta.18 → 1.0.0-beta.19

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 (281) hide show
  1. package/README.md +7 -0
  2. package/dist/_meta/commands.json +3003 -1544
  3. package/dist/_meta/hand-written-commands.json +6 -0
  4. package/dist/_meta/schemas.json +2127 -1070
  5. package/dist/{abuse-reports-Ce-g5uZP.mjs → abuse-reports-DhgunVFo.mjs} +3 -3
  6. package/dist/{access-BtsMwesh.mjs → access-BDoDq_WZ.mjs} +1 -1
  7. package/dist/{accounts-X5QVzEUW.mjs → accounts-DLTCzZJg.mjs} +24 -26
  8. package/dist/{acm-C_NepMi6.mjs → acm-DS1CosYq.mjs} +1 -1
  9. package/dist/{addressing-BkQY1hoA.mjs → addressing-DFeYj8TY.mjs} +2 -2
  10. package/dist/{agent-memory-1OPgC3lK.mjs → agent-memory-DXjQ8N0g.mjs} +1 -1
  11. package/dist/{ai-Bb0_Zknm.mjs → ai-V5YopMkS.mjs} +4 -4
  12. package/dist/{ai-audit-DuEjVdML.mjs → ai-audit-yg8D0azz.mjs} +2 -2
  13. package/dist/{ai-gateway-Cm2vWMSI.mjs → ai-gateway--dkH9qGz.mjs} +13 -13
  14. package/dist/ai-search-BRtsUaUI.mjs +79 -0
  15. package/dist/{ai-security-A2STvE1b.mjs → ai-security-DRJCcLpF.mjs} +1 -1
  16. package/dist/{alerting-CIwSk-Ks.mjs → alerting-8DsyMKGG.mjs} +30 -30
  17. package/dist/{analytics-H--uM3DA.mjs → analytics-BpYUZTtQ.mjs} +1 -1
  18. package/dist/{analytics-engine-Alu7cllT.mjs → analytics-engine-CT2E0Dkw.mjs} +1 -1
  19. package/dist/{api-security-D-pcnhUL.mjs → api-security-CBhWZE8z.mjs} +6 -6
  20. package/dist/{argo-Lvmcx3am.mjs → argo-B0u2N3Dh.mjs} +1 -1
  21. package/dist/{artifacts-xT5S-mVa.mjs → artifacts-B6XzjMiM.mjs} +1 -1
  22. package/dist/{audit-logs-DEoRBLkU.mjs → audit-logs-59fCc1aw.mjs} +1 -1
  23. package/dist/auth-5cgi8ePZ.mjs +2 -0
  24. package/dist/auth-BaUNb1Ed.mjs +2 -0
  25. package/dist/auth-ChYOc_rS.mjs +2 -0
  26. package/dist/{auth-token-D9XIPlwf.mjs → auth-token-B1pP2jaK.mjs} +1 -1
  27. package/dist/{autoconfig-9po_tqsS.mjs → autoconfig-Cdm2IFLM.mjs} +20 -20
  28. package/dist/{basin-catalog-DFHt3cWi.mjs → basin-catalog-CV05WlA4.mjs} +1 -1
  29. package/dist/{billing-Bm2JNSGa.mjs → billing-Ad-rK-JH.mjs} +3 -3
  30. package/dist/{blocks-Bat9A8V_.mjs → blocks-CKb_aLWN.mjs} +1 -1
  31. package/dist/body-parser-ChnyBsfm.mjs +2 -0
  32. package/dist/{bot-management-CSr38g-O.mjs → bot-management-CGpfjQ4w.mjs} +1 -1
  33. package/dist/{botnet-feed-ebeWWSJj.mjs → botnet-feed-CMrF6ZGq.mjs} +1 -1
  34. package/dist/{brand-protection-BCn9Mv-d.mjs → brand-protection-CP73_yX8.mjs} +1 -1
  35. package/dist/{browser-run-BcWxzhAn.mjs → browser-run-OpUfawh_.mjs} +21 -21
  36. package/dist/{build-i8l2qGVZ.mjs → build-CMPlf8mh.mjs} +1 -1
  37. package/dist/build-DQZ2w_dQ.mjs +2 -0
  38. package/dist/{builds-BMwDzi7G.mjs → builds-DsRNlILV.mjs} +39 -39
  39. package/dist/{cache-_VaTLC5T.mjs → cache-RppXjxXA.mjs} +3 -3
  40. package/dist/{cf-Bq4pA4n6.mjs → cf-PISMdEje.mjs} +11 -11
  41. package/dist/{chunk-2HLTAS5V-D7COzUOd.mjs → chunk-2HLTAS5V-B92NbX1j.mjs} +1 -1
  42. package/dist/{chunk-2K52M2W5-CYxfQXUq.mjs → chunk-2K52M2W5-c__08AOB.mjs} +7 -7
  43. package/dist/chunk-DSGVRFIS-DfQO1boa.mjs +2 -0
  44. package/dist/{cli-P3q5DG3W.mjs → cli-Dd1n2YAJ.mjs} +1 -1
  45. package/dist/{client-side-security-CjSXrpa9.mjs → client-side-security-BYfwOkUo.mjs} +1 -1
  46. package/dist/{cloud-connector-BPJBeP06.mjs → cloud-connector-CQZUqAMQ.mjs} +2 -2
  47. package/dist/{cloudflared-By8BzYXc.mjs → cloudflared-C1SdXpYv.mjs} +1 -1
  48. package/dist/{cloudforce-one-DXX31GMi.mjs → cloudforce-one-C1xdpspb.mjs} +200 -210
  49. package/dist/{command-Bkc04OyY.mjs → command-BioiZMm9.mjs} +1 -1
  50. package/dist/{command-BbsPxJBT.mjs → command-C0nJ2LRd.mjs} +1 -1
  51. package/dist/{command-DDcBC4px.mjs → command-C5ARgURy.mjs} +1 -1
  52. package/dist/{command-CL7LLXM7.mjs → command-C7NIRU-u.mjs} +1 -1
  53. package/dist/{command-BXiA79DP.mjs → command-C8DV-x_C.mjs} +1 -1
  54. package/dist/{command-BtTc28ql.mjs → command-CFV1cqfR.mjs} +1 -1
  55. package/dist/{command-NoxvOARP.mjs → command-ChQXv0jP.mjs} +1 -1
  56. package/dist/{command-DCQgsd2U.mjs → command-D203VrTG.mjs} +1 -1
  57. package/dist/{command-DZfKHiru.mjs → command-D5BUzDX8.mjs} +1 -1
  58. package/dist/{command-CBZhxmKD.mjs → command-DWE7YdeC.mjs} +1 -1
  59. package/dist/{command-C6w1OdoC.mjs → command-DlB10kIb.mjs} +1 -1
  60. package/dist/{command-CxWLFv5Y.mjs → command-DmPQXNRg.mjs} +1 -1
  61. package/dist/{command-Bgb-3yPg.mjs → command-F0jlqvKr.mjs} +1 -1
  62. package/dist/{command-DppVezAB.mjs → command-FOQNhNqP.mjs} +1 -1
  63. package/dist/{command-CYyfigfC.mjs → command-yAXk5NXh.mjs} +1 -1
  64. package/dist/{completions-CrDmwKnK.mjs → completions-Bh0Hz-hA.mjs} +3 -3
  65. package/dist/{connector-interrupts-V4HGULCM.mjs → connector-interrupts-Bd949WX0.mjs} +1 -1
  66. package/dist/{connector-telemetry-events-D9mTcfbJ.mjs → connector-telemetry-events-Dw8iIg5Q.mjs} +1 -1
  67. package/dist/{connector-telemetry-snapshots-COrPVKol.mjs → connector-telemetry-snapshots-DqEIaz99.mjs} +1 -1
  68. package/dist/{connectors-DvVlxGDx.mjs → connectors-RUEU1QDB.mjs} +1 -1
  69. package/dist/containers-xU-0EhLO.mjs +78 -0
  70. package/dist/{containers-BtcOgwm5.mjs → containers-yUOvm-4V.mjs} +211 -211
  71. package/dist/{content-scan-DldLmTjy.mjs → content-scan-Cm2-Xhqo.mjs} +2 -2
  72. package/dist/{context-C_a8oSY9.mjs → context-BQ6KeMgq.mjs} +2 -2
  73. package/dist/{cps-REo1OWP1.mjs → cps-CgPduy0H.mjs} +1 -1
  74. package/dist/{csam-scanner-CIbbdoJK.mjs → csam-scanner-B0Ra6fXL.mjs} +1 -1
  75. package/dist/{custom-csrs-iGNc3rSZ.mjs → custom-csrs-6lfu1-RR.mjs} +1 -1
  76. package/dist/{custom-hostnames-BNxYbTyu.mjs → custom-hostnames-Dzov_CPw.mjs} +15 -15
  77. package/dist/{custom-nameservers-BMJoTSlQ.mjs → custom-nameservers-Bfhv_9_k.mjs} +1 -1
  78. package/dist/{custom-pages-Qdemt1Fm.mjs → custom-pages-DxVD_f10.mjs} +1 -1
  79. package/dist/{d1-DvCiQibO.mjs → d1-D7p4uJ-e.mjs} +10 -12
  80. package/dist/delegate.mjs +1 -1
  81. package/dist/{deploy-K664XPOb.mjs → deploy-BjWvVZol.mjs} +1 -1
  82. package/dist/deploy-context-C-ZdGP0Z.mjs +56 -0
  83. package/dist/{deploy-input-KK6yyBN_.mjs → deploy-input-B8Nq6Eh6.mjs} +1 -1
  84. package/dist/{dev-CnoMHxf4.mjs → dev-D20UkcYT.mjs} +1 -1
  85. package/dist/{diagnostics-Cw0mtcep.mjs → diagnostics-DdhTemYB.mjs} +1 -1
  86. package/dist/{dialog-D4Y9ocuF.mjs → dialog-BnIgdgWi.mjs} +1 -1
  87. package/dist/discover-DEjUARkU.mjs +2 -0
  88. package/dist/{dist-DZRTPMMA.mjs → dist-CnKd5XoR.mjs} +19 -19
  89. package/dist/{dist-uRuGmkMB.mjs → dist-DAeCUX-u.mjs} +3 -3
  90. package/dist/{dls-DoqfqutH.mjs → dls-BBODA9Rk.mjs} +1 -1
  91. package/dist/{dns-DC6WcO3m.mjs → dns-CK_hyn5q.mjs} +5 -5
  92. package/dist/{dns-firewall-DpQH9BCE.mjs → dns-firewall-DbvX9R-7.mjs} +1 -1
  93. package/dist/{docs-CqNRBHab.mjs → docs-BDTijwM3.mjs} +1 -1
  94. package/dist/{dot-prop-IITUZ2XW-BnPfnQkb.mjs → dot-prop-IITUZ2XW-C4pkmT-K.mjs} +1 -1
  95. package/dist/{dotenv-usOKkeW7.mjs → dotenv-Ck-6V1hm.mjs} +1 -1
  96. package/dist/{dry-run-C2KjGX10.mjs → dry-run-DQmFkNK_.mjs} +1 -1
  97. package/dist/{durable-objects-CJDDy3CC.mjs → durable-objects-DcFbd1Ka.mjs} +1 -1
  98. package/dist/{email-auth--NHg1TjG.mjs → email-auth-BEgDxU-g.mjs} +1 -1
  99. package/dist/{email-routing-COjENK55.mjs → email-routing-DKWmPOVo.mjs} +1 -1
  100. package/dist/{email-security-rdjH95T2.mjs → email-security-RWbAp8qa.mjs} +15 -15
  101. package/dist/{email-sending-26VJhR6Q.mjs → email-sending-BbJy_vl8.mjs} +1 -1
  102. package/dist/error-sanitization-Byb-_IS9.mjs +2 -0
  103. package/dist/{error-sanitization-pOyzm2F1.mjs → error-sanitization-DWJ5ka7h.mjs} +1 -1
  104. package/dist/{field-extractors-DBOvGOwz.mjs → field-extractors-Bob6udAc.mjs} +1 -1
  105. package/dist/{firewall-D8K93ffF.mjs → firewall-DziiEsR8.mjs} +1 -1
  106. package/dist/{flagship-CHdmCmvQ.mjs → flagship-xOtgddUK.mjs} +1 -1
  107. package/dist/{fraud-CY4TV5Vc.mjs → fraud-BUS7i5Yh.mjs} +1 -1
  108. package/dist/generate-D6V4Q58z.mjs +2 -0
  109. package/dist/get-BTisquA3.mjs +2 -0
  110. package/dist/{google-tag-gateway-DzSt4wlz.mjs → google-tag-gateway-DgSzyeK-.mjs} +1 -1
  111. package/dist/{gt-3bcLGJ7V.mjs → gt-D6YemCLh.mjs} +1 -1
  112. package/dist/{healthchecks-B52Mf3uL.mjs → healthchecks-CbD2PsnM.mjs} +1 -1
  113. package/dist/{hyperdrive-CHsW0r6Z.mjs → hyperdrive-Cs_cfSXU.mjs} +1 -1
  114. package/dist/{iam-o1n9eUXf.mjs → iam-DvsCztqU.mjs} +5 -5
  115. package/dist/{images-CJHAGxX6.mjs → images-BipVjHNw.mjs} +1 -1
  116. package/dist/index.mjs +1 -1
  117. package/dist/init-LvFgCsNX.mjs +43 -0
  118. package/dist/{intel-B3S1gxUg.mjs → intel-D1LPkkBM.mjs} +31 -41
  119. package/dist/{interactive-BW9T1D1q.mjs → interactive-d_lFnSev.mjs} +3 -3
  120. package/dist/interactive-pjVqirHx.mjs +2 -0
  121. package/dist/{ips-q_UJMiy8.mjs → ips-2iUGs8ws.mjs} +1 -1
  122. package/dist/{k2-BNqVZnDN.mjs → k2-DGzRm3NJ.mjs} +1 -1
  123. package/dist/{kv-B0nXSOcW.mjs → kv-BW-s9MJY.mjs} +4 -4
  124. package/dist/{lazy-command-4ccdBqrc.mjs → lazy-command-Bq-rWPQe.mjs} +1 -1
  125. package/dist/{leaked-credential-checks-BXwIjlTs.mjs → leaked-credential-checks-CnY6ih6p.mjs} +1 -1
  126. package/dist/{load-balancers-DJtMztJ0.mjs → load-balancers-CtnusAzP.mjs} +1 -1
  127. package/dist/{local-Dil4fTWX.mjs → local-B4sZZTRA.mjs} +1 -1
  128. package/dist/local-DCnFIgLJ.mjs +2 -0
  129. package/dist/{local-runtime-B7TKFu6E.mjs → local-runtime-DoBuyriC.mjs} +1 -1
  130. package/dist/login-CqZJgUF1.mjs +5 -0
  131. package/dist/{login-D-1FiBNv.mjs → login-DR60WiAY.mjs} +1 -1
  132. package/dist/{logo-matches-qVYq8tWL.mjs → logo-matches-C1-6KOkZ.mjs} +1 -1
  133. package/dist/{logos-tnIahhcu.mjs → logos-Yzhd-VKb.mjs} +2 -2
  134. package/dist/{logpush-D4s3pJRw.mjs → logpush-JYG4gXZ-.mjs} +3 -3
  135. package/dist/{logs-cw7UL5V2.mjs → logs-DLblEjK0.mjs} +1 -1
  136. package/dist/{magic-cloud-networking-CLEHztNY.mjs → magic-cloud-networking-CblQwsQr.mjs} +13 -13
  137. package/dist/{magic-network-monitoring-DRwygeVq.mjs → magic-network-monitoring-D2px4Ep4.mjs} +3 -3
  138. package/dist/{magic-transit-BFopRdPs.mjs → magic-transit-Bnwsi0UQ.mjs} +61 -61
  139. package/dist/{managed-defense-D5kpmq0T.mjs → managed-defense-CTtNoxzW.mjs} +3 -3
  140. package/dist/{managed-transforms-CT4jjnzJ.mjs → managed-transforms-B92mJi5i.mjs} +1 -1
  141. package/dist/{matches-ClJ_24EY.mjs → matches-CzbL1XD-.mjs} +1 -1
  142. package/dist/{mcp-50os3IRG.mjs → mcp-Cic_aMer.mjs} +1 -1
  143. package/dist/{mesh-jxtQP8sS.mjs → mesh-DZTgD16C.mjs} +14 -14
  144. package/dist/{migrate-DerOyuv2.mjs → migrate-DtNDRcAI.mjs} +1 -1
  145. package/dist/{monetization-D6cCDi-h.mjs → monetization-DCQ2_niU.mjs} +1 -1
  146. package/dist/{network-dnWHB2uY.mjs → network-BqMqD2qn.mjs} +1 -1
  147. package/dist/{network-interconnects-Cf8qSVdt.mjs → network-interconnects-BFQ1yARl.mjs} +2 -2
  148. package/dist/{o11y-oMSg1pG4.mjs → o11y-CS5q1vSh.mjs} +5 -5
  149. package/dist/oauth-DPLYUvRl.mjs +2 -0
  150. package/dist/oauth-DdYSPYoE.mjs +4 -0
  151. package/dist/{oauth-clients-XDmoe-b4.mjs → oauth-clients-9BPswYm_.mjs} +1 -1
  152. package/dist/{oauth-scopes-D9VYGuTs.mjs → oauth-scopes-CLOKfQi2.mjs} +1 -1
  153. package/dist/{open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs → open-PCXX3ZDZ-5J5IU2MX-DFe2CQkm.mjs} +1 -1
  154. package/dist/{open-PCXX3ZDZ-D55O2jpQ.mjs → open-PCXX3ZDZ-BD2iNJqn.mjs} +1 -1
  155. package/dist/{organization-94lHeeOs.mjs → organization-DFRN2g6z.mjs} +1 -1
  156. package/dist/{organizations-BJf3UTFi.mjs → organizations-yiGopnKf.mjs} +1 -1
  157. package/dist/{origin-post-quantum-encryption-DMytVSUZ.mjs → origin-post-quantum-encryption-n9gsxikn.mjs} +1 -1
  158. package/dist/output-O6b9MR9R.mjs +2 -0
  159. package/dist/{page-rules-BUI-50oz.mjs → page-rules-F1Jdxx6A.mjs} +1 -1
  160. package/dist/{pages-CcdpCzHs.mjs → pages-CezC0YrR.mjs} +2 -2
  161. package/dist/{pay-per-crawl-B1uHZn9j.mjs → pay-per-crawl-fZ-kTBbN.mjs} +2 -2
  162. package/dist/{pay-per-use-t066I5wm.mjs → pay-per-use-B14BTKVI.mjs} +2 -2
  163. package/dist/{pipelines-Co6S044l.mjs → pipelines-BN7ydBHl.mjs} +5 -5
  164. package/dist/{precursor-BftyvS86.mjs → precursor-B88RDDZT.mjs} +2 -2
  165. package/dist/previews-CiqRIq_k.mjs +7 -0
  166. package/dist/process-DiXf4VPi.mjs +2 -0
  167. package/dist/{progress-Q5w9PNTT.mjs → progress-CdlDthXA.mjs} +1 -1
  168. package/dist/{prompt-C0hKSr-R.mjs → prompt-1AC-qwxS.mjs} +1 -1
  169. package/dist/{queries-4MubO6Sz.mjs → queries-C2sgUI9j.mjs} +1 -1
  170. package/dist/{queues-CteS5M92.mjs → queues-DCP5x-PZ.mjs} +1 -1
  171. package/dist/{r2-2QpT_Gso.mjs → r2-D7UhzWR7.mjs} +26 -26
  172. package/dist/{radar-ODKaK4FJ.mjs → radar-osOiFeY_.mjs} +1 -1
  173. package/dist/{raw-fetch-CEOuoKl9.mjs → raw-fetch-1VlXDwwX.mjs} +1 -1
  174. package/dist/{realtime-DkfU8uEX.mjs → realtime-DCnqxiWo.mjs} +90 -87
  175. package/dist/{registrar-DM6JTVPS.mjs → registrar-DAFYjjRa.mjs} +8 -8
  176. package/dist/{registrar-sandbox-BPNGf65G.mjs → registrar-sandbox-zeNHABZ0.mjs} +4 -4
  177. package/dist/{registry-CRnk93ur.mjs → registry-DG4ZiuN9.mjs} +1 -1
  178. package/dist/{reporting-5yFNXbJg.mjs → reporting-KehV_PXm.mjs} +1 -1
  179. package/dist/{request-headers-DXvswze2.mjs → request-headers-ojAw3pQO.mjs} +1 -1
  180. package/dist/{request-tracers-BarLZY95.mjs → request-tracers-BStCgh6m.mjs} +1 -1
  181. package/dist/resolve-BGNMAcGR.mjs +2 -0
  182. package/dist/{resource-sharing-BVEwBPs8.mjs → resource-sharing-3xtSgWG7.mjs} +3 -3
  183. package/dist/{rules-_C31X4Jz.mjs → rules-7F-G2Bg_.mjs} +3 -3
  184. package/dist/{rulesets-8RwxoFhG.mjs → rulesets-B0YtS2br.mjs} +20 -20
  185. package/dist/{rum-CAUcpXpM.mjs → rum-B3V6tqS-.mjs} +1 -1
  186. package/dist/{run-DtFLvOHB.mjs → run-B_07PrkW.mjs} +1 -1
  187. package/dist/run-D6AJfZT-.mjs +2 -0
  188. package/dist/{schema-S3pUZwpI.mjs → schema-C-tyhSnb.mjs} +1 -1
  189. package/dist/{schema-flags-DibfxEF6.mjs → schema-flags-DY3OKCvr.mjs} +4 -4
  190. package/dist/{scim-DX5XrQ4w.mjs → scim-CQ9TdajH.mjs} +6 -6
  191. package/dist/{secrets-store-DSqqrr25.mjs → secrets-store-Dl2hDxXu.mjs} +2 -2
  192. package/dist/{security-insights-FSktO04S.mjs → security-insights-BsLMdo1r.mjs} +2 -2
  193. package/dist/{security-txt-D2g3lQdg.mjs → security-txt-pCAiHvys.mjs} +1 -1
  194. package/dist/session-BsNzFtPi.mjs +2 -0
  195. package/dist/shared-CWBjMZDR.mjs +2 -0
  196. package/dist/{smart-shield-IVb2sR0C.mjs → smart-shield-BTXQsVxz.mjs} +1 -1
  197. package/dist/{snippets-cWwWficN.mjs → snippets-CYVieyc3.mjs} +2 -2
  198. package/dist/source-AlTrHNem.mjs +6 -0
  199. package/dist/{spawn-BW2bJmKO.mjs → spawn-Bdznd0EB.mjs} +2 -2
  200. package/dist/{spectrum-DYiIBYRB.mjs → spectrum-DLRr4Q03.mjs} +14 -14
  201. package/dist/{speed-C7uiW2Wf.mjs → speed-BJfaDYxz.mjs} +13 -13
  202. package/dist/sql-DQ4xrdc2.mjs +4 -0
  203. package/dist/src-BnMvFE3q.mjs +125 -0
  204. package/dist/{ssl-xQP_HbWN.mjs → ssl-CL1B69Pw.mjs} +1 -1
  205. package/dist/startup-profile-DuaJFX1y.mjs +2 -0
  206. package/dist/startup-profile-HMblAiBi.mjs +29 -0
  207. package/dist/{state-Boubf1X6.mjs → state-DN9yfd2C.mjs} +1 -1
  208. package/dist/state-DePlO0Kv.mjs +2 -0
  209. package/dist/{stream-CfWgj8Cr.mjs → stream-DrMZOO5u.mjs} +17 -17
  210. package/dist/{submit-DxGr1T40.mjs → submit-DjlLoVk2.mjs} +1 -1
  211. package/dist/{tags-LEJ2VYhQ.mjs → tags-DY7Ur1k-.mjs} +4 -4
  212. package/dist/{telemetry-BHne10Yy.mjs → telemetry-BG3kcYsV.mjs} +1 -1
  213. package/dist/telemetry-Dpm6GfZD.mjs +2 -0
  214. package/dist/{tenant-7d5vwc6K.mjs → tenant-BEMfNMjO.mjs} +1 -1
  215. package/dist/{tenant-custom-nameservers-BkxlPr5O.mjs → tenant-custom-nameservers-CCRbb0ch.mjs} +1 -1
  216. package/dist/{tools-BCCRUENY.mjs → tools-ZffhHUDd.mjs} +1 -1
  217. package/dist/tunnels-_JXe-UgM.mjs +29 -0
  218. package/dist/{turnstile-DhLkdhij.mjs → turnstile-DXEfneQq.mjs} +1 -1
  219. package/dist/ui-CY79jlGZ.mjs +2 -0
  220. package/dist/update-check-DfbYVefm.mjs +2 -0
  221. package/dist/{update-check-wvjOsnGK.mjs → update-check-atcehhBC.mjs} +1 -1
  222. package/dist/update-check-worker.mjs +1 -1
  223. package/dist/{url-info-CeoV5dBc.mjs → url-info-B1kL9asc.mjs} +1 -1
  224. package/dist/{url-normalization-9NoaoRNh.mjs → url-normalization-CUHKRKJh.mjs} +1 -1
  225. package/dist/{url-scanner-w_-Sumz-.mjs → url-scanner-OnZP_-jm.mjs} +2 -2
  226. package/dist/{user-D33B3alX.mjs → user-BBBuFNj4.mjs} +1 -1
  227. package/dist/{vectorize-Wp9De13y.mjs → vectorize-DcctB8bw.mjs} +3 -3
  228. package/dist/version-CLgSHoNm.mjs +2 -0
  229. package/dist/{waiting-rooms-BE8FloRd.mjs → waiting-rooms-JaFE5wP1.mjs} +2 -2
  230. package/dist/{web-assets-ew0iaP7c.mjs → web-assets-Cu0swUPe.mjs} +10 -10
  231. package/dist/{web3-BUyXBaqq.mjs → web3-C67z4OtQ.mjs} +1 -1
  232. package/dist/{workers-pP5tsDbD.mjs → workers-ClTP0Ysl.mjs} +5 -5
  233. package/dist/{workers-builds-DzU9NGno.mjs → workers-builds-C5wKhvKe.mjs} +7 -7
  234. package/dist/{workers-for-platforms-B4xzFNxJ.mjs → workers-for-platforms-rxwkYyb3.mjs} +5 -5
  235. package/dist/{workers-vpc-Bre_t9Al.mjs → workers-vpc-B4vyvr1W.mjs} +1 -1
  236. package/dist/{workflows-DXYGKtqq.mjs → workflows-COJ5jwvk.mjs} +24 -24
  237. package/dist/wrangler-migration-Cp546RDG.mjs +946 -0
  238. package/dist/{zaraz-DoH4QD0u.mjs → zaraz-BkZ7yW05.mjs} +2 -2
  239. package/dist/{zero-trust-DKt20rzE.mjs → zero-trust-lUFLYuL1.mjs} +496 -444
  240. package/dist/{zone-BXM3p0JR.mjs → zone-CC1_qxt-.mjs} +1 -1
  241. package/dist/{zones-CJdtqEBx.mjs → zones-BRiLlTmW.mjs} +37 -28
  242. package/package.json +11 -11
  243. package/dist/ai-search-DDRpxyOM.mjs +0 -79
  244. package/dist/auth-B73lQS2h.mjs +0 -2
  245. package/dist/auth-DMzEmOhG.mjs +0 -2
  246. package/dist/auth-Db1KT0vm.mjs +0 -2
  247. package/dist/body-parser-DnBfDdx3.mjs +0 -2
  248. package/dist/build-BRJnyeu8.mjs +0 -2
  249. package/dist/chunk-DSGVRFIS-C5SqiTOz.mjs +0 -2
  250. package/dist/containers-Bt2zFsFd.mjs +0 -78
  251. package/dist/deploy-context-ClNVJYlR.mjs +0 -56
  252. package/dist/discover-DIDEGKo3.mjs +0 -2
  253. package/dist/error-sanitization-CIQOep3I.mjs +0 -2
  254. package/dist/generate-D80-1GnZ.mjs +0 -2
  255. package/dist/get-By1q8YlI.mjs +0 -2
  256. package/dist/hostnames-BMITIM8P.mjs +0 -11
  257. package/dist/init-CqQDL6i3.mjs +0 -43
  258. package/dist/interactive-DGUWZ2Gk.mjs +0 -2
  259. package/dist/local-DxWDQDnG.mjs +0 -2
  260. package/dist/login-chQP8825.mjs +0 -5
  261. package/dist/oauth-BfBdHhPS.mjs +0 -4
  262. package/dist/oauth-DDOiiH7h.mjs +0 -2
  263. package/dist/output-Co4xdFf6.mjs +0 -2
  264. package/dist/previews-BLhnhElx.mjs +0 -7
  265. package/dist/process-2wmDCy17.mjs +0 -2
  266. package/dist/resolve-BpgXeklt.mjs +0 -2
  267. package/dist/run-LcOb9rhI.mjs +0 -2
  268. package/dist/session-Cq3YNLoI.mjs +0 -2
  269. package/dist/shared-eefMO8R4.mjs +0 -2
  270. package/dist/source-mXUcrTVw.mjs +0 -6
  271. package/dist/sql-TGV8qQMj.mjs +0 -4
  272. package/dist/src-BUH-P_zd.mjs +0 -125
  273. package/dist/startup-profile-BOaseXnO.mjs +0 -29
  274. package/dist/startup-profile-BwEZFVGS.mjs +0 -2
  275. package/dist/state-CODDG9Nx.mjs +0 -2
  276. package/dist/telemetry-BavSU4ku.mjs +0 -2
  277. package/dist/tunnels-DlGODvwT.mjs +0 -29
  278. package/dist/ui-BtIBQeaG.mjs +0 -2
  279. package/dist/update-check-nLfkSfdz.mjs +0 -2
  280. package/dist/version-B2RUUqGT.mjs +0 -2
  281. package/dist/wrangler-migration-R9TQ_4Qd.mjs +0 -946
@@ -1,39 +1,39 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,t as i}from"./context-C_a8oSY9.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-Q5w9PNTT.mjs";import{t as c}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as l,n as u,t as d}from"./body-parser-DnBfDdx3.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-C0hKSr-R.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/batch`,body:`json`};function ee(e){return e.usage(`$0 email-security allow-policies batch
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-1AC-qwxS.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/batch`,body:`json`};function ee(e){return e.usage(`$0 email-security allow-policies batch
3
3
 
4
4
  Executes multiple allow policy operations atomically: delete, partially update, replace, and create allow policies in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the allow policies to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the policy's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Allow policies to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the policy's ID and every field of its new value. 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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`batch`,describe:`Batch allow policy operations`,builder:ee,handler:async e=>c({command:`email-security allow-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected allow policies and restore normal security scanning and disposition actions for matching emails.`})){process.stderr.write(`Aborted.
5
5
  `);return}if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(g,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(g,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies`,body:`json`};function ne(e){return e.usage(`$0 email-security allow-policies create
6
6
 
7
- Creates a new allow policy that exempts matching emails from security detections. Use with caution as this bypasses email security scanning. Policies can match on sender patterns and apply to specific detections or all detections.`).option(`comments`,{type:`string`,description:`The comments field`}).option(`is-acceptable-sender`,{type:`boolean`,description:`Exempts messages from this sender from Spam, Spoof and Bulk dispositions only; Malicious and Suspicious dispositions still apply.`}).option(`is-exempt-recipient`,{type:`boolean`,description:`Bypasses all detections for messages to this recipient.`}).option(`is-recipient`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026."}).option(`is-regex`,{type:`boolean`,description:`The is_regex field`}).option(`is-sender`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026."}).option(`is-spoof`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026."}).option(`is-trusted-sender`,{type:`boolean`,description:`Bypasses all detections and link following for messages from this sender.`}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an allow policy.`})}const re={command:`create`,describe:`Create email allow policy`,builder:ne,handler:async e=>c({command:`email-security allow-policies create`,classification:{safeFlags:[`is-acceptable-sender`,`is-exempt-recipient`,`is-recipient`,`is-regex`,`is-sender`,`is-spoof`,`is-trusted-sender`,`pattern-type`,`verify-sender`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(_,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`is-acceptable-sender`]===void 0)throw Error(`--is-acceptable-sender is required (or pass --body with this field set).`);if(e[`is-exempt-recipient`]===void 0)throw Error(`--is-exempt-recipient is required (or pass --body with this field set).`);if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(e[`is-trusted-sender`]===void 0)throw Error(`--is-trusted-sender is required (or pass --body with this field set).`);if(e.pattern===void 0&&(e.pattern=await p(`pattern`,"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.")),e[`pattern-type`]===void 0&&(e[`pattern-type`]=await m(`pattern-type`,"Type of pattern matching. - EMAIL: matches a full email address (e.g. `user@example.com`) - DOMAIN: matches a domain name (e.g. `example.com`) - IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. - UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries. ",[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`])),e[`verify-sender`]===void 0)throw Error(`--verify-sender is required (or pass --body with this field set).`);let h=d({comments:f(e.comments,`comments`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}),g=await s(`Creating`,async()=>c.send(_,{body:h,account_id:l}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`};function ie(e){return e.usage(`$0 email-security allow-policies delete <policy-id>
7
+ Creates a new allow policy that exempts matching emails from security detections. Use with caution as this bypasses email security scanning. Policies can match on sender patterns and apply to specific detections or all detections.`).option(`comments`,{type:`string`,description:`The comments field`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send `null` to clear the expiration."}).option(`is-acceptable-sender`,{type:`boolean`,description:`Exempts messages from this sender from Spam, Spoof and Bulk dispositions only; Malicious and Suspicious dispositions still apply.`}).option(`is-exempt-recipient`,{type:`boolean`,description:`Bypasses all detections for messages to this recipient.`}).option(`is-recipient`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026."}).option(`is-regex`,{type:`boolean`,description:`The is_regex field`}).option(`is-sender`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026."}).option(`is-spoof`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026."}).option(`is-trusted-sender`,{type:`boolean`,description:`Bypasses all detections and link following for messages from this sender.`}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an allow policy.`})}const re={command:`create`,describe:`Create email allow policy`,builder:ne,handler:async e=>c({command:`email-security allow-policies create`,classification:{safeFlags:[`is-acceptable-sender`,`is-exempt-recipient`,`is-recipient`,`is-regex`,`is-sender`,`is-spoof`,`is-trusted-sender`,`pattern-type`,`verify-sender`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(_,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`is-acceptable-sender`]===void 0)throw Error(`--is-acceptable-sender is required (or pass --body with this field set).`);if(e[`is-exempt-recipient`]===void 0)throw Error(`--is-exempt-recipient is required (or pass --body with this field set).`);if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(e[`is-trusted-sender`]===void 0)throw Error(`--is-trusted-sender is required (or pass --body with this field set).`);if(e.pattern===void 0&&(e.pattern=await p(`pattern`,"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.")),e[`pattern-type`]===void 0&&(e[`pattern-type`]=await m(`pattern-type`,"Type of pattern matching. - EMAIL: matches a full email address (e.g. `user@example.com`) - DOMAIN: matches a domain name (e.g. `example.com`) - IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. - UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries. ",[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`])),e[`verify-sender`]===void 0)throw Error(`--verify-sender is required (or pass --body with this field set).`);let h=d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}),g=await s(`Creating`,async()=>c.send(_,{body:h,account_id:l}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`};function ie(e){return e.usage(`$0 email-security allow-policies delete <policy-id>
8
8
 
9
9
  Removes an allow policy. After deletion, emails matching this pattern will be subject to normal security scanning and disposition actions.`).positional(`policy-id`,{type:`string`,description:`Allow policy 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 ae={command:`delete <policy-id>`,describe:`Delete an email allow policy`,builder:ie,handler:async e=>c({command:`email-security allow-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the allow policy and restores normal security scanning and disposition actions for matching emails.`})){process.stderr.write(`Aborted.
10
10
  `);return}let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Deleted`})})};var y={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`,body:`json`};function oe(e){return e.usage(`$0 email-security allow-policies edit <policy-id>
11
11
 
12
- Updates an existing allow policy. Only provided fields will be modified. Changes take effect for new emails matching the pattern.`).positional(`policy-id`,{type:`string`,description:`Allow policy identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`is-acceptable-sender`,{type:`boolean`,description:`Exempts messages from this sender from Spam, Spoof and Bulk dispositions only; Malicious and Suspicious dispositions still apply.`}).option(`is-exempt-recipient`,{type:`boolean`,description:`Bypasses all detections for messages to this recipient.`}).option(`is-recipient`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026."}).option(`is-regex`,{type:`boolean`,description:`The is_regex field`}).option(`is-sender`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026."}).option(`is-spoof`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026."}).option(`is-trusted-sender`,{type:`boolean`,description:`Bypasses all detections and link following for messages from this sender.`}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update an allow policy.`})}const se={command:`edit <policy-id>`,describe:`Update an email allow policy`,builder:oe,handler:async e=>c({command:`email-security allow-policies edit`,classification:{safeFlags:[`is-acceptable-sender`,`is-exempt-recipient`,`is-recipient`,`is-regex`,`is-sender`,`is-spoof`,`is-trusted-sender`,`pattern-type`,`verify-sender`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(y,{body:t,account_id:l,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}let p=d({comments:f(e.comments,`comments`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}),m=await s(`Updating`,async()=>c.send(y,{body:p,account_id:l,policy_id:e[`policy-id`]}));a(m,{successLabel:`Updated`})})};var ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`};function le(e){return e.usage(`$0 email-security allow-policies get <policy-id>
12
+ Updates an existing allow policy. Only provided fields will be modified. Changes take effect for new emails matching the pattern.`).positional(`policy-id`,{type:`string`,description:`Allow policy identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send `null` to clear the expiration."}).option(`is-acceptable-sender`,{type:`boolean`,description:`Exempts messages from this sender from Spam, Spoof and Bulk dispositions only; Malicious and Suspicious dispositions still apply.`}).option(`is-exempt-recipient`,{type:`boolean`,description:`Bypasses all detections for messages to this recipient.`}).option(`is-recipient`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026."}).option(`is-regex`,{type:`boolean`,description:`The is_regex field`}).option(`is-sender`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026."}).option(`is-spoof`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026."}).option(`is-trusted-sender`,{type:`boolean`,description:`Bypasses all detections and link following for messages from this sender.`}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update an allow policy.`})}const se={command:`edit <policy-id>`,describe:`Update an email allow policy`,builder:oe,handler:async e=>c({command:`email-security allow-policies edit`,classification:{safeFlags:[`is-acceptable-sender`,`is-exempt-recipient`,`is-recipient`,`is-regex`,`is-sender`,`is-spoof`,`is-trusted-sender`,`pattern-type`,`verify-sender`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(y,{body:t,account_id:l,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}let p=d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}),m=await s(`Updating`,async()=>c.send(y,{body:p,account_id:l,policy_id:e[`policy-id`]}));a(m,{successLabel:`Updated`})})};var ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`};function le(e){return e.usage(`$0 email-security allow-policies get <policy-id>
13
13
 
14
- Retrieves details for a specific allow policy including its pattern, dispositions that are exempted, and whether it applies to all detections.`).positional(`policy-id`,{type:`string`,description:`Allow policy identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <policy-id>`,describe:`Get an email allow policy`,builder:le,handler:async e=>c({command:`email-security allow-policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ce,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Loaded`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies`,query:[`page`,`per_page`,`search`,`order`,`direction`,`is_exempt_recipient`,`is_trusted_sender`,`is_acceptable_sender`,`verify_sender`,`pattern_type`,`pattern`]};function fe(e){return e.usage(`$0 email-security allow-policies list
14
+ Retrieves details for a specific allow policy including its pattern, dispositions that are exempted, and whether it applies to all detections.`).positional(`policy-id`,{type:`string`,description:`Allow policy identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <policy-id>`,describe:`Get an email allow policy`,builder:le,handler:async e=>c({command:`email-security allow-policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ce,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Loaded`})})};var de={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies`,query:[`page`,`per_page`,`search`,`order`,`direction`,`is_exempt_recipient`,`is_trusted_sender`,`is_acceptable_sender`,`verify_sender`,`pattern_type`,`pattern`,`expired`]};function fe(e){return e.usage(`$0 email-security allow-policies list
15
15
 
16
- Returns a paginated list of email allow policies. These policies exempt matching emails from security detection, allowing them to bypass disposition actions. Supports filtering by pattern type and policy attributes.`).option(`page`,{type:`number`,description:`Current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`search`,{type:`string`,description:`Search term for filtering records. Behavior may change.`}).option(`order`,{type:`string`,description:`Field to sort by.`,choices:[`pattern`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`is-exempt-recipient`,{type:`boolean`,description:`Filter to show only policies where messages to the recipient bypass all detections.`}).option(`is-trusted-sender`,{type:`boolean`,description:`Filter to show only policies where messages from the sender bypass all detections and link following.`}).option(`is-acceptable-sender`,{type:`boolean`,description:`Filter to show only policies where messages from the sender are exempted from Spam, Spoof, and Bulk dispositions (not Malicious or Suspicious).`}).option(`verify-sender`,{type:`boolean`,description:`Filter to show only policies that enforce DMARC, SPF, or DKIM authentication.`}).option(`pattern-type`,{type:`string`,description:`Filter by pattern type.`,choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).option(`pattern`,{type:`string`,description:`Filter by exact pattern value.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List email allow policies`,builder:fe,handler:async e=>c({command:`email-security allow-policies list`,classification:{safeFlags:[`order`,`direction`,`is-exempt-recipient`,`is-trusted-sender`,`is-acceptable-sender`,`verify-sender`,`pattern-type`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,direction:e.direction,is_exempt_recipient:e[`is-exempt-recipient`],is_trusted_sender:e[`is-trusted-sender`],is_acceptable_sender:e[`is-acceptable-sender`],verify_sender:e[`verify-sender`],pattern_type:e[`pattern-type`],pattern:e.pattern};if(e.dryRun){let e=await r();o({command:`cf email-security allow-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/allow_policies`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(de,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var b={method:`PUT`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`,body:`json`};function me(e){return e.usage(`$0 email-security allow-policies update <policy-id>
16
+ Returns a paginated list of email allow policies. These policies exempt matching emails from security detection, allowing them to bypass disposition actions. Supports filtering by pattern type and policy attributes.`).option(`page`,{type:`number`,description:`Current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`search`,{type:`string`,description:`Search term for filtering records. Behavior may change.`}).option(`order`,{type:`string`,description:`Field to sort by.`,choices:[`pattern`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`is-exempt-recipient`,{type:`boolean`,description:`Filter to show only policies where messages to the recipient bypass all detections.`}).option(`is-trusted-sender`,{type:`boolean`,description:`Filter to show only policies where messages from the sender bypass all detections and link following.`}).option(`is-acceptable-sender`,{type:`boolean`,description:`Filter to show only policies where messages from the sender are exempted from Spam, Spoof, and Bulk dispositions (not Malicious or Suspicious).`}).option(`verify-sender`,{type:`boolean`,description:`Filter to show only policies that enforce DMARC, SPF, or DKIM authentication.`}).option(`pattern-type`,{type:`string`,description:`Filter by pattern type.`,choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).option(`pattern`,{type:`string`,description:`Filter by exact pattern value.`}).option(`expired`,{type:`boolean`,description:"Filter to return only expired policies (`true`) or only policies that still apply (`false`). Omit to return both."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`list`,describe:`List email allow policies`,builder:fe,handler:async e=>c({command:`email-security allow-policies list`,classification:{safeFlags:[`order`,`direction`,`is-exempt-recipient`,`is-trusted-sender`,`is-acceptable-sender`,`verify-sender`,`pattern-type`,`expired`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,direction:e.direction,is_exempt_recipient:e[`is-exempt-recipient`],is_trusted_sender:e[`is-trusted-sender`],is_acceptable_sender:e[`is-acceptable-sender`],verify_sender:e[`verify-sender`],pattern_type:e[`pattern-type`],pattern:e.pattern,expired:e.expired};if(e.dryRun){let e=await r();o({command:`cf email-security allow-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/allow_policies`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(de,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var b={method:`PUT`,path:t=>e`/accounts/${t.account_id}/email-security/settings/allow_policies/${t.policy_id}`,body:`json`};function me(e){return e.usage(`$0 email-security allow-policies update <policy-id>
17
17
 
18
- Replaces an existing allow policy in full. Unlike PATCH, every field is taken from the request body, so optional fields that are omitted are reset rather than left untouched. Use this when managing policies declaratively.`).positional(`policy-id`,{type:`string`,description:`Allow policy identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`is-acceptable-sender`,{type:`boolean`,description:`Exempts messages from this sender from Spam, Spoof and Bulk dispositions only; Malicious and Suspicious dispositions still apply.`}).option(`is-exempt-recipient`,{type:`boolean`,description:`Bypasses all detections for messages to this recipient.`}).option(`is-recipient`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026."}).option(`is-regex`,{type:`boolean`,description:`The is_regex field`}).option(`is-sender`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026."}).option(`is-spoof`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026."}).option(`is-trusted-sender`,{type:`boolean`,description:`Bypasses all detections and link following for messages from this sender.`}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an allow policy.`})}const he={command:`update <policy-id>`,describe:`Replace an email allow policy`,builder:me,handler:async e=>c({command:`email-security allow-policies update`,classification:{safeFlags:[`is-acceptable-sender`,`is-exempt-recipient`,`is-recipient`,`is-regex`,`is-sender`,`is-spoof`,`is-trusted-sender`,`pattern-type`,`verify-sender`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(b,{body:t,account_id:l,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}if(e[`is-acceptable-sender`]===void 0)throw Error(`--is-acceptable-sender is required (or pass --body with this field set).`);if(e[`is-exempt-recipient`]===void 0)throw Error(`--is-exempt-recipient is required (or pass --body with this field set).`);if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(e[`is-trusted-sender`]===void 0)throw Error(`--is-trusted-sender is required (or pass --body with this field set).`);if(e.pattern===void 0&&(e.pattern=await p(`pattern`,"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.")),e[`pattern-type`]===void 0&&(e[`pattern-type`]=await m(`pattern-type`,"Type of pattern matching. - EMAIL: matches a full email address (e.g. `user@example.com`) - DOMAIN: matches a domain name (e.g. `example.com`) - IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. - UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries. ",[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`])),e[`verify-sender`]===void 0)throw Error(`--verify-sender is required (or pass --body with this field set).`);let h=d({comments:f(e.comments,`comments`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}),g=await s(`Updating`,async()=>c.send(b,{body:h,account_id:l,policy_id:e[`policy-id`]}));a(g,{successLabel:`Updated`})})},ge={command:`allow-policies`,describe:`Operations for allow-policies`,builder:e=>e.command(te).command(re).command(ae).command(se).command(ue).command(pe).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _e={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/analytics/monthly_report`};function ve(e){return e.usage(`$0 email-security analytics monthly-report get
18
+ Replaces an existing allow policy in full. Unlike PATCH, every field is taken from the request body, so optional fields that are omitted are reset rather than left untouched. Use this when managing policies declaratively.`).positional(`policy-id`,{type:`string`,description:`Allow policy identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send `null` to clear the expiration."}).option(`is-acceptable-sender`,{type:`boolean`,description:`Exempts messages from this sender from Spam, Spoof and Bulk dispositions only; Malicious and Suspicious dispositions still apply.`}).option(`is-exempt-recipient`,{type:`boolean`,description:`Bypasses all detections for messages to this recipient.`}).option(`is-recipient`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_exempt_recipient` instead. End of life: July 1, 2026."}).option(`is-regex`,{type:`boolean`,description:`The is_regex field`}).option(`is-sender`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_trusted_sender` instead. End of life: July 1, 2026."}).option(`is-spoof`,{type:`boolean`,description:"Deprecated as of July 1, 2025. Use `is_acceptable_sender` instead. End of life: July 1, 2026."}).option(`is-trusted-sender`,{type:`boolean`,description:`Bypasses all detections and link following for messages from this sender.`}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`verify-sender`,{type:`boolean`,description:`Enforce DMARC, SPF or DKIM authentication. When on, Email Security only honors policies that pass authentication.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an allow policy.`})}const he={command:`update <policy-id>`,describe:`Replace an email allow policy`,builder:me,handler:async e=>c({command:`email-security allow-policies update`,classification:{safeFlags:[`is-acceptable-sender`,`is-exempt-recipient`,`is-recipient`,`is-regex`,`is-sender`,`is-spoof`,`is-trusted-sender`,`pattern-type`,`verify-sender`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security allow-policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/allow_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(b,{body:t,account_id:l,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}if(e[`is-acceptable-sender`]===void 0)throw Error(`--is-acceptable-sender is required (or pass --body with this field set).`);if(e[`is-exempt-recipient`]===void 0)throw Error(`--is-exempt-recipient is required (or pass --body with this field set).`);if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);if(e[`is-trusted-sender`]===void 0)throw Error(`--is-trusted-sender is required (or pass --body with this field set).`);if(e.pattern===void 0&&(e.pattern=await p(`pattern`,"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.")),e[`pattern-type`]===void 0&&(e[`pattern-type`]=await m(`pattern-type`,"Type of pattern matching. - EMAIL: matches a full email address (e.g. `user@example.com`) - DOMAIN: matches a domain name (e.g. `example.com`) - IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. - UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries. ",[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`])),e[`verify-sender`]===void 0)throw Error(`--verify-sender is required (or pass --body with this field set).`);let h=d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_acceptable_sender:e[`is-acceptable-sender`],is_exempt_recipient:e[`is-exempt-recipient`],is_recipient:e[`is-recipient`],is_regex:e[`is-regex`],is_sender:e[`is-sender`],is_spoof:e[`is-spoof`],is_trusted_sender:e[`is-trusted-sender`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`],verify_sender:e[`verify-sender`]}),g=await s(`Updating`,async()=>c.send(b,{body:h,account_id:l,policy_id:e[`policy-id`]}));a(g,{successLabel:`Updated`})})},ge={command:`allow-policies`,describe:`Operations for allow-policies`,builder:e=>e.command(te).command(re).command(ae).command(se).command(ue).command(pe).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _e={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/analytics/monthly_report`};function ve(e){return e.usage(`$0 email-security analytics monthly-report get
19
19
 
20
20
  Returns an aggregated monthly email security report including detections, dispositions, and policy activity for the trailing 12 months.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`get`,describe:`Get monthly report`,builder:ve,handler:async e=>c({command:`email-security analytics monthly-report get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf email-security analytics monthly-report get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/analytics/monthly_report`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(_e,{account_id:l}));a(u,{successLabel:`Loaded`})})},be={command:`monthly-report`,describe:`Operations for analytics.monthly-report`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`analytics`,describe:`Analytics and reporting — monthly report and per-day breakdowns of threat activity`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/batch`,body:`json`};function Se(e){return e.usage(`$0 email-security block-senders batch
21
21
 
22
22
  Executes multiple blocked sender operations atomically: delete, partially update, replace, and create blocked sender patterns in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the blocked sender patterns to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the pattern's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Blocked sender patterns to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the pattern's ID and every field of its new value. 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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ce={command:`batch`,describe:`Batch blocked sender operations`,builder:Se,handler:async e=>c({command:`email-security block-senders batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected blocked sender patterns and stop automatically blocking matching emails based on those rules.`})){process.stderr.write(`Aborted.
23
23
  `);return}if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(x,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(x,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var S={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders`,body:`json`};function we(e){return e.usage(`$0 email-security block-senders create
24
24
 
25
- Creates a new blocked sender pattern. Emails matching this pattern will be blocked from delivery. Patterns can be email addresses, domains, or IP addresses, and support regular expressions.`).option(`comments`,{type:`string`,description:`The comments field`}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a blocked sender pattern.`})}const Te={command:`create`,describe:`Create blocked email sender`,builder:we,handler:async e=>c({command:`email-security block-senders create`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(S,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);e.pattern===void 0&&(e.pattern=await p(`pattern`,"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.")),e[`pattern-type`]===void 0&&(e[`pattern-type`]=await m(`pattern-type`,"Type of pattern matching. - EMAIL: matches a full email address (e.g. `user@example.com`) - DOMAIN: matches a domain name (e.g. `example.com`) - IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. - UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries. ",[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]));let h=d({comments:f(e.comments,`comments`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}),g=await s(`Creating`,async()=>c.send(S,{body:h,account_id:l}));a(g,{successLabel:`Created`})})};var C={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`};function w(e){return e.usage(`$0 email-security block-senders delete <pattern-id>
25
+ Creates a new blocked sender pattern. Emails matching this pattern will be blocked from delivery. Patterns can be email addresses, domains, or IP addresses, and support regular expressions.`).option(`comments`,{type:`string`,description:`The comments field`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the pattern expires. After this time, Email Security ignores the pattern. The value must lie in the future. Send `null` to clear the expiration."}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a blocked sender pattern.`})}const Te={command:`create`,describe:`Create blocked email sender`,builder:we,handler:async e=>c({command:`email-security block-senders create`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(S,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);e.pattern===void 0&&(e.pattern=await p(`pattern`,"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.")),e[`pattern-type`]===void 0&&(e[`pattern-type`]=await m(`pattern-type`,"Type of pattern matching. - EMAIL: matches a full email address (e.g. `user@example.com`) - DOMAIN: matches a domain name (e.g. `example.com`) - IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. - UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries. ",[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]));let h=d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}),g=await s(`Creating`,async()=>c.send(S,{body:h,account_id:l}));a(g,{successLabel:`Created`})})};var C={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`};function w(e){return e.usage(`$0 email-security block-senders delete <pattern-id>
26
26
 
27
27
  Removes a blocked sender pattern. After deletion, emails from this sender will no longer be automatically blocked based on this rule.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern 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 T={command:`delete <pattern-id>`,describe:`Delete a blocked email sender`,builder:w,handler:async e=>c({command:`email-security block-senders delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the blocked sender pattern and stops automatically blocking matching emails based on this rule.`})){process.stderr.write(`Aborted.
28
28
  `);return}let u=await s(`Deleting`,async()=>c.send(C,{account_id:l,pattern_id:e[`pattern-id`]}));a(u,{successLabel:`Deleted`})})};var E={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`,body:`json`};function D(e){return e.usage(`$0 email-security block-senders edit <pattern-id>
29
29
 
30
- Updates an existing blocked sender pattern. Only provided fields will be modified. The pattern will continue blocking emails until deleted.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update a blocked sender pattern.`})}const O={command:`edit <pattern-id>`,describe:`Update a blocked email sender`,builder:D,handler:async e=>c({command:`email-security block-senders edit`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(E,{body:t,account_id:l,pattern_id:e[`pattern-id`]}));a(n,{successLabel:`Updated`});return}let p=d({comments:f(e.comments,`comments`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}),m=await s(`Updating`,async()=>c.send(E,{body:p,account_id:l,pattern_id:e[`pattern-id`]}));a(m,{successLabel:`Updated`})})};var Ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`};function De(e){return e.usage(`$0 email-security block-senders get <pattern-id>
30
+ Updates an existing blocked sender pattern. Only provided fields will be modified. The pattern will continue blocking emails until deleted.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the pattern expires. After this time, Email Security ignores the pattern. The value must lie in the future. Send `null` to clear the expiration."}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update a blocked sender pattern.`})}const O={command:`edit <pattern-id>`,describe:`Update a blocked email sender`,builder:D,handler:async e=>c({command:`email-security block-senders edit`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(E,{body:t,account_id:l,pattern_id:e[`pattern-id`]}));a(n,{successLabel:`Updated`});return}let p=d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}),m=await s(`Updating`,async()=>c.send(E,{body:p,account_id:l,pattern_id:e[`pattern-id`]}));a(m,{successLabel:`Updated`})})};var Ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`};function De(e){return e.usage(`$0 email-security block-senders get <pattern-id>
31
31
 
32
- Retrieves details for a specific blocked sender pattern including its pattern type, value, and metadata.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`get <pattern-id>`,describe:`Get a blocked email sender`,builder:De,handler:async e=>c({command:`email-security block-senders get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ee,{account_id:l,pattern_id:e[`pattern-id`]}));a(u,{successLabel:`Loaded`})})};var ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders`,query:[`page`,`per_page`,`search`,`order`,`direction`,`pattern_type`,`pattern`]};function Ae(e){return e.usage(`$0 email-security block-senders list
32
+ Retrieves details for a specific blocked sender pattern including its pattern type, value, and metadata.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`get <pattern-id>`,describe:`Get a blocked email sender`,builder:De,handler:async e=>c({command:`email-security block-senders get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Ee,{account_id:l,pattern_id:e[`pattern-id`]}));a(u,{successLabel:`Loaded`})})};var ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders`,query:[`page`,`per_page`,`search`,`order`,`direction`,`pattern_type`,`pattern`,`expired`]};function Ae(e){return e.usage(`$0 email-security block-senders list
33
33
 
34
- Returns a paginated list of blocked email sender patterns. These patterns prevent emails from matching senders from being delivered. Supports filtering by pattern type and searching across patterns.`).option(`page`,{type:`number`,description:`Current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`search`,{type:`string`,description:`Search term for filtering records. Behavior may change.`}).option(`order`,{type:`string`,description:`Field to sort by.`,choices:[`pattern`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`pattern-type`,{type:`string`,description:`Filter by pattern type.`,choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).option(`pattern`,{type:`string`,description:`Filter by pattern value.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`list`,describe:`List blocked email senders`,builder:Ae,handler:async e=>c({command:`email-security block-senders list`,classification:{safeFlags:[`order`,`direction`,`pattern-type`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,direction:e.direction,pattern_type:e[`pattern-type`],pattern:e.pattern};if(e.dryRun){let e=await r();o({command:`cf email-security block-senders list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/block_senders`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(ke,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var k={method:`PUT`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`,body:`json`};function Me(e){return e.usage(`$0 email-security block-senders update <pattern-id>
34
+ Returns a paginated list of blocked email sender patterns. These patterns prevent emails from matching senders from being delivered. Supports filtering by pattern type and searching across patterns.`).option(`page`,{type:`number`,description:`Current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`search`,{type:`string`,description:`Search term for filtering records. Behavior may change.`}).option(`order`,{type:`string`,description:`Field to sort by.`,choices:[`pattern`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`pattern-type`,{type:`string`,description:`Filter by pattern type.`,choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).option(`pattern`,{type:`string`,description:`Filter by pattern value.`}).option(`expired`,{type:`boolean`,description:"Filter to return only expired patterns (`true`) or only patterns that still apply (`false`). Omit to return both."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`list`,describe:`List blocked email senders`,builder:Ae,handler:async e=>c({command:`email-security block-senders list`,classification:{safeFlags:[`order`,`direction`,`pattern-type`,`expired`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,direction:e.direction,pattern_type:e[`pattern-type`],pattern:e.pattern,expired:e.expired};if(e.dryRun){let e=await r();o({command:`cf email-security block-senders list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/block_senders`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(ke,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var k={method:`PUT`,path:t=>e`/accounts/${t.account_id}/email-security/settings/block_senders/${t.pattern_id}`,body:`json`};function Me(e){return e.usage(`$0 email-security block-senders update <pattern-id>
35
35
 
36
- Replaces an existing blocked sender pattern in full. Unlike PATCH, every field is taken from the request body, so optional fields that are omitted are reset rather than left untouched. Use this when managing blocked senders declaratively.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a blocked sender pattern.`})}const Ne={command:`update <pattern-id>`,describe:`Replace a blocked email sender`,builder:Me,handler:async e=>c({command:`email-security block-senders update`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(k,{body:t,account_id:l,pattern_id:e[`pattern-id`]}));a(n,{successLabel:`Updated`});return}if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);e.pattern===void 0&&(e.pattern=await p(`pattern`,"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.")),e[`pattern-type`]===void 0&&(e[`pattern-type`]=await m(`pattern-type`,"Type of pattern matching. - EMAIL: matches a full email address (e.g. `user@example.com`) - DOMAIN: matches a domain name (e.g. `example.com`) - IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. - UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries. ",[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]));let h=d({comments:f(e.comments,`comments`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}),g=await s(`Updating`,async()=>c.send(k,{body:h,account_id:l,pattern_id:e[`pattern-id`]}));a(g,{successLabel:`Updated`})})},Pe={command:`block-senders`,describe:`Operations for block-senders`,builder:e=>e.command(Ce).command(Te).command(T).command(O).command(Oe).command(je).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fe={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/investigate/bulk/${t.job_id}/cancel`};function Ie(e){return e.usage(`$0 email-security bulk-actions cancel <job-id>
36
+ Replaces an existing blocked sender pattern in full. Unlike PATCH, every field is taken from the request body, so optional fields that are omitted are reset rather than left untouched. Use this when managing blocked senders declaratively.`).positional(`pattern-id`,{type:`string`,description:`Blocked sender pattern identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`The comments field`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the pattern expires. After this time, Email Security ignores the pattern. The value must lie in the future. Send `null` to clear the expiration."}).option(`is-regex`,{type:`boolean`,description:"Whether `pattern` is a regular expression instead of a literal value."}).option(`pattern`,{type:`string`,description:"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents."}).option(`pattern-type`,{type:`string`,description:"Type of pattern matching.\n- EMAIL: matches a full email address (e.g. `user@example.com`)\n- DOMAIN: matches a domain name (e.g. `example.com`)\n- IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.\n- UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries.\n",choices:[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]}).coerce(`pattern-type`,e=>f(e,`pattern-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a blocked sender pattern.`})}const Ne={command:`update <pattern-id>`,describe:`Replace a blocked email sender`,builder:Me,handler:async e=>c({command:`email-security block-senders update`,classification:{safeFlags:[`is-regex`,`pattern-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security block-senders update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/block_senders/${e[`pattern-id`]==null?`<pattern-id>`:encodeURIComponent(String(e[`pattern-id`]))}`,pathParams:{"pattern-id":String(e[`pattern-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(k,{body:t,account_id:l,pattern_id:e[`pattern-id`]}));a(n,{successLabel:`Updated`});return}if(e[`is-regex`]===void 0)throw Error(`--is-regex is required (or pass --body with this field set).`);e.pattern===void 0&&(e.pattern=await p(`pattern`,"The pattern value to match. The format depends on `pattern_type`: a valid email address for EMAIL (e.g. `user@example.com`), a valid domain name for DOMAIN (e.g. `example.com`), or a plain IPv4 or IPv6 address or CIDR block for IP (e.g. `1.2.3.4`, `1.2.3.0/24`, `2606:4700:4700::1111`, or `2606:4700:4700::/48`); the API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents.")),e[`pattern-type`]===void 0&&(e[`pattern-type`]=await m(`pattern-type`,"Type of pattern matching. - EMAIL: matches a full email address (e.g. `user@example.com`) - DOMAIN: matches a domain name (e.g. `example.com`) - IP: matches a plain IPv4 or IPv6 address (e.g. `1.2.3.4` or `2606:4700:4700::1111`) or CIDR block (e.g. `1.2.3.0/24` or `2606:4700:4700::/48`). The API rejects private or unique-local, loopback, link-local, unspecified, and IPv4 broadcast addresses, including their IPv4-mapped IPv6 equivalents. - UNKNOWN: deprecated; you cannot use this when creating or updating policies, but it may appear on existing entries. ",[`EMAIL`,`DOMAIN`,`IP`,`UNKNOWN`]));let h=d({comments:f(e.comments,`comments`,`text`),expires_at:f(e[`expires-at`],`expires-at`,`text`),is_regex:e[`is-regex`],pattern:f(e.pattern,`pattern`,`text`),pattern_type:e[`pattern-type`]}),g=await s(`Updating`,async()=>c.send(k,{body:h,account_id:l,pattern_id:e[`pattern-id`]}));a(g,{successLabel:`Updated`})})},Pe={command:`block-senders`,describe:`Operations for block-senders`,builder:e=>e.command(Ce).command(Te).command(T).command(O).command(Oe).command(je).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Fe={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/investigate/bulk/${t.job_id}/cancel`};function Ie(e){return e.usage(`$0 email-security bulk-actions cancel <job-id>
37
37
 
38
38
  Cancels the job, marking it as cancelled and stopping any pending message processing. The job record remains visible in list and detail endpoints.`).positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job to cancel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`cancel <job-id>`,describe:`Cancel a bulk action job`,builder:Ie,handler:async e=>c({command:`email-security bulk-actions cancel`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security bulk-actions cancel`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/investigate/bulk/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}/cancel`,pathParams:{"job-id":String(e[`job-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(Fe,{account_id:l,job_id:e[`job-id`]}));a(u,{successLabel:`Created`})})};var A={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/investigate/bulk`,body:`json`};function Re(e){return e.usage(`$0 email-security bulk-actions create
39
39
 
@@ -49,16 +49,16 @@ Returns the individual messages associated with a bulk action job, including the
49
49
  Executes multiple content policy operations atomically: delete, partially update, replace, and create content policies in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the content policies to delete. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the policy's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Content policies to create. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the policy's ID and every field of its new value. 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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const tt={command:`batch`,describe:`Batch content policy operations`,builder:et,handler:async e=>c({command:`email-security content-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may delete the selected content policies and stop evaluating emails against their patterns.`})){process.stderr.write(`Aborted.
50
50
  `);return}if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(j,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(j,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var M={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies`,body:`json`};function nt(e){return e.usage(`$0 email-security content-policies create
51
51
 
52
- Creates a new content policy. Emails whose subject or body matches the pattern will be subject to the configured action.`).option(`enabled`,{type:`boolean`,description:`Whether the policy is active.`}).option(`name`,{type:`string`,description:`Human-readable name of the policy.`}).option(`notes`,{type:`string`,description:`Optional note describing the purpose of the policy.`}).option(`pattern`,{type:`string`,description:`Regular expression the policy matches against.`}).option(`targets`,{type:`string`,array:!0,description:`Parts of the email the pattern is matched against.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a content policy.`})}const rt={command:`create`,describe:`Create a content policy`,builder:nt,handler:async e=>c({command:`email-security content-policies create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(M,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await p(`name`,`Human-readable name of the policy.`)),e.pattern===void 0&&(e.pattern=await p(`pattern`,`Regular expression the policy matches against.`)),e.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let m=d({enabled:e.enabled,name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}),h=await s(`Creating`,async()=>c.send(M,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var it={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies/${t.policy_id}`};function at(e){return e.usage(`$0 email-security content-policies delete <policy-id>
52
+ Creates a new content policy. Emails whose subject or body matches the pattern will be subject to the configured action.`).option(`enabled`,{type:`boolean`,description:`Whether the policy is active.`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send `null` to clear the expiration."}).option(`name`,{type:`string`,description:`Human-readable name of the policy.`}).option(`notes`,{type:`string`,description:`Optional note describing the purpose of the policy.`}).option(`pattern`,{type:`string`,description:`Regular expression the policy matches against.`}).option(`targets`,{type:`string`,array:!0,description:`Parts of the email the pattern is matched against.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a content policy.`})}const rt={command:`create`,describe:`Create a content policy`,builder:nt,handler:async e=>c({command:`email-security content-policies create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,expires_at:f(e[`expires-at`],`expires-at`,`text`),name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(M,{body:t,account_id:l}));a(n,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await p(`name`,`Human-readable name of the policy.`)),e.pattern===void 0&&(e.pattern=await p(`pattern`,`Regular expression the policy matches against.`)),e.targets===void 0)throw Error(`--targets is required (or pass --body with this field set).`);let m=d({enabled:e.enabled,expires_at:f(e[`expires-at`],`expires-at`,`text`),name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}),h=await s(`Creating`,async()=>c.send(M,{body:m,account_id:l}));a(h,{successLabel:`Created`})})};var it={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies/${t.policy_id}`};function at(e){return e.usage(`$0 email-security content-policies delete <policy-id>
53
53
 
54
54
  Removes a content policy. After deletion, emails will no longer be evaluated against this pattern.`).positional(`policy-id`,{type:`string`,description:`Content policy 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 ot={command:`delete <policy-id>`,describe:`Delete a content policy`,builder:at,handler:async e=>c({command:`email-security content-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the content policy and stops evaluating emails against its pattern.`})){process.stderr.write(`Aborted.
55
55
  `);return}let u=await s(`Deleting`,async()=>c.send(it,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Deleted`})})};var N={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies/${t.policy_id}`,body:`json`};function st(e){return e.usage(`$0 email-security content-policies edit <policy-id>
56
56
 
57
- Updates an existing content policy. Only provided fields will be modified.`).positional(`policy-id`,{type:`string`,description:`Content policy identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether the policy is active.`}).option(`name`,{type:`string`,description:`Human-readable name of the policy.`}).option(`notes`,{type:`string`,description:`Optional note describing the purpose of the policy.`}).option(`pattern`,{type:`string`,description:`Regular expression the policy matches against.`}).option(`targets`,{type:`string`,array:!0,description:`Parts of the email the pattern is matched against.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update a content policy.`})}const ct={command:`edit <policy-id>`,describe:`Update a content policy`,builder:st,handler:async e=>c({command:`email-security content-policies edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:l,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}let p=d({enabled:e.enabled,name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}),m=await s(`Updating`,async()=>c.send(N,{body:p,account_id:l,policy_id:e[`policy-id`]}));a(m,{successLabel:`Updated`})})};var lt={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies/${t.policy_id}`};function ut(e){return e.usage(`$0 email-security content-policies get <policy-id>
57
+ Updates an existing content policy. Only provided fields will be modified.`).positional(`policy-id`,{type:`string`,description:`Content policy identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether the policy is active.`}).option(`expires-at`,{type:`string`,description:"Timestamp at which the policy expires. After this time, Email Security ignores the policy. The value must lie in the future. Send `null` to clear the expiration."}).option(`name`,{type:`string`,description:`Human-readable name of the policy.`}).option(`notes`,{type:`string`,description:`Optional note describing the purpose of the policy.`}).option(`pattern`,{type:`string`,description:`Regular expression the policy matches against.`}).option(`targets`,{type:`string`,array:!0,description:`Parts of the email the pattern is matched against.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update a content policy.`})}const ct={command:`edit <policy-id>`,describe:`Update a content policy`,builder:st,handler:async e=>c({command:`email-security content-policies edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,expires_at:f(e[`expires-at`],`expires-at`,`text`),name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}):u(e.body)});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:l,policy_id:e[`policy-id`]}));a(n,{successLabel:`Updated`});return}let p=d({enabled:e.enabled,expires_at:f(e[`expires-at`],`expires-at`,`text`),name:f(e.name,`name`,`text`),notes:f(e.notes,`notes`,`text`),pattern:f(e.pattern,`pattern`,`text`),targets:e.targets}),m=await s(`Updating`,async()=>c.send(N,{body:p,account_id:l,policy_id:e[`policy-id`]}));a(m,{successLabel:`Updated`})})};var lt={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies/${t.policy_id}`};function ut(e){return e.usage(`$0 email-security content-policies get <policy-id>
58
58
 
59
- Retrieves details for a specific content policy including its pattern, targets, and metadata.`).positional(`policy-id`,{type:`string`,description:`Content policy identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dt={command:`get <policy-id>`,describe:`Get a content policy`,builder:ut,handler:async e=>c({command:`email-security content-policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(lt,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Loaded`})})};var ft={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies`,query:[`page`,`per_page`,`search`,`order`,`direction`,`enabled`,`name`]};function pt(e){return e.usage(`$0 email-security content-policies list
59
+ Retrieves details for a specific content policy including its pattern, targets, and metadata.`).positional(`policy-id`,{type:`string`,description:`Content policy identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const dt={command:`get <policy-id>`,describe:`Get a content policy`,builder:ut,handler:async e=>c({command:`email-security content-policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security content-policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/content_policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(lt,{account_id:l,policy_id:e[`policy-id`]}));a(u,{successLabel:`Loaded`})})};var ft={method:`GET`,path:t=>e`/accounts/${t.account_id}/email-security/settings/content_policies`,query:[`page`,`per_page`,`search`,`order`,`direction`,`enabled`,`name`,`expired`]};function pt(e){return e.usage(`$0 email-security content-policies list
60
60
 
61
- Returns a paginated list of content policies. These policies match against the subject or body of emails using a pattern. Supports filtering by name or enabled status, and searching across name and pattern fields.`).option(`page`,{type:`number`,description:`Current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`search`,{type:`string`,description:`Search term for filtering records. Behavior may change.`}).option(`order`,{type:`string`,description:`Field to sort by.`,choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`enabled`,{type:`boolean`,description:`Filter by enabled status.`}).option(`name`,{type:`string`,description:`Filter by exact policy name.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`list`,describe:`List content policies`,builder:pt,handler:async e=>c({command:`email-security content-policies list`,classification:{safeFlags:[`order`,`direction`,`enabled`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,direction:e.direction,enabled:e.enabled,name:e.name};if(e.dryRun){let e=await r();o({command:`cf email-security content-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/content_policies`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(ft,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},ht={command:`content-policies`,describe:`Operations for content-policies`,builder:e=>e.command(tt).command(rt).command(ot).command(ct).command(dt).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/domains/batch`,body:`json`};function gt(e){return e.usage(`$0 email-security domains batch
61
+ Returns a paginated list of content policies. These policies match against the subject or body of emails using a pattern. Supports filtering by name or enabled status, and searching across name and pattern fields.`).option(`page`,{type:`number`,description:`Current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`search`,{type:`string`,description:`Search term for filtering records. Behavior may change.`}).option(`order`,{type:`string`,description:`Field to sort by.`,choices:[`name`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`enabled`,{type:`boolean`,description:`Filter by enabled status.`}).option(`name`,{type:`string`,description:`Filter by exact policy name.`}).option(`expired`,{type:`boolean`,description:"Filter to return only expired policies (`true`) or only policies that still apply (`false`). Omit to return both."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`list`,describe:`List content policies`,builder:pt,handler:async e=>c({command:`email-security content-policies list`,classification:{safeFlags:[`order`,`direction`,`enabled`,`expired`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search,order:e.order,direction:e.direction,enabled:e.enabled,name:e.name,expired:e.expired};if(e.dryRun){let e=await r();o({command:`cf email-security content-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/content_policies`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(ft,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},ht={command:`content-policies`,describe:`Operations for content-policies`,builder:e=>e.command(tt).command(rt).command(ot).command(ct).command(dt).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var P={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/domains/batch`,body:`json`};function gt(e){return e.usage(`$0 email-security domains batch
62
62
 
63
63
  Executes multiple domain operations in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the domains to remove protection from. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the domain's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Domains to add protection for. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the domain's ID and every field of its new value. 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(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _t={command:`batch`,describe:`Batch domain operations`,builder:gt,handler:async e=>c({command:`email-security domains batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-security domains batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email-security/settings/domains/batch`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}):u(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation may permanently delete protection for the selected email domains. Emails for those domains will no longer be processed by Email Security.`})){process.stderr.write(`Aborted.
64
64
  `);return}if(e.body){let t=u(e.body),n=await s(`Deleting`,async()=>c.send(P,{body:t,account_id:f}));a(n,{successLabel:`Deleted`});return}if(e.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(e.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(e.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(e.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=d({deletes:l(e.deletes,`deletes`),patches:l(e.patches,`patches`),posts:l(e.posts,`posts`),puts:l(e.puts,`puts`)}),m=await s(`Deleting`,async()=>c.send(P,{body:p,account_id:f}));a(m,{successLabel:`Deleted`})})};var F={method:`POST`,path:t=>e`/accounts/${t.account_id}/email-security/settings/domains`,body:`json`};function vt(e){return e.usage(`$0 email-security domains create
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-DnBfDdx3.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-C0hKSr-R.mjs";var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/messages/${t.message_id}`,response:`binary-response`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 email-sending get <message-id>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-1AC-qwxS.mjs";var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/messages/${t.message_id}`,response:`binary-response`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 email-sending get <message-id>
3
3
 
4
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 y={command:`get <message-id>`,describe:`Fetch an email message`,builder:v,handler:async e=>l({command:`email-sending get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/messages/${e[`message-id`]==null?`<message-id>`:encodeURIComponent(String(e[`message-id`]))}`,pathParams:{"message-id":String(e[`message-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(_,{account_id:l,message_id:e[`message-id`]}));o(u,{successLabel:`Loaded`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/limits`,errors:{403:`ForbiddenError`}};function ee(e){return e.usage(`$0 email-sending limits get
5
5
 
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{t as sanitizeError}from"./error-sanitization-DWJ5ka7h.mjs";
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./chunk-2HLTAS5V-D7COzUOd.mjs";import{n as t}from"./api-eMuS5GI1.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 t){let e=n(i.body);return{errorType:`APIError`,...r(i.statusCode)?{httpStatus:i.statusCode}:{},...e.length===0?{}:{errorCodes:e}}}return i instanceof e?{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};
2
+ import{t as e}from"./chunk-2HLTAS5V-B92NbX1j.mjs";import{n as t}from"./api-eMuS5GI1.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 t){let e=n(i.body);return{errorType:`APIError`,...r(i.statusCode)?{httpStatus:i.statusCode}:{},...e.length===0?{}:{errorCodes:e}}}return i instanceof e?{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};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,t as i}from"./context-C_a8oSY9.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-Q5w9PNTT.mjs";import{t as c}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as l,n as u,t as d}from"./body-parser-DnBfDdx3.mjs";import{n as f}from"./prompt-C0hKSr-R.mjs";var p={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function m(e){return e.usage(`$0 field-extractors delete <extractor>
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./prompt-1AC-qwxS.mjs";var p={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function m(e){return e.usage(`$0 field-extractors delete <extractor>
3
3
 
4
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 h={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:m,handler:async e=>c({command:`field-extractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf field-extractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/field_extractors/${e.extractor==null?`<extractor>`:encodeURIComponent(String(e.extractor))}`,pathParams:{extractor:String(e.extractor??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await f({force:!!e.force})){process.stderr.write(`Aborted.
5
5
  `);return}let u=await s(`Deleting`,async()=>c.send(p,{account_id:l,extractor:e.extractor}));a(u,{successLabel:`Deleted`})})};var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function _(e){return e.usage(`$0 field-extractors get <extractor>
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as u,n as d,t as f}from"./body-parser-DnBfDdx3.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{i as m,n as h}from"./prompt-C0hKSr-R.mjs";var g={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,body:`json`};function _(e){return e.usage(`$0 firewall access-rules create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as u,n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{i as m,n as h}from"./prompt-1AC-qwxS.mjs";var g={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,body:`json`};function _(e){return e.usage(`$0 firewall access-rules create
3
3
 
4
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`]}).coerce(`configuration-target`,e=>p(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>p(e,`access-rule-mode`,`text`)).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`,default:``}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create an IP Access rule`,builder:_,handler:async e=>l({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:p(e.notes,`notes`,`text`)}):d(e.body)});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,h=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=h:e.accountId=h,e.body){let t=d(e.body),n=await c(`Creating`,async()=>l.send(g,{body:t,account_or_zone:u,account_or_zone_id:h}));o(n,{successLabel:`Created`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await m(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let _=f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:p(e.notes,`notes`,`text`)}),v=await c(`Creating`,async()=>l.send(g,{body:_,account_or_zone:u,account_or_zone_id:h}));o(v,{successLabel:`Created`})})};var y={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules/${t.rule_id}`};function b(e){return e.usage(`$0 firewall access-rules delete <rule-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-Db1KT0vm.mjs";import{a as i,t as a}from"./context-C_a8oSY9.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-Q5w9PNTT.mjs";import{t as l}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-DnBfDdx3.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-C0hKSr-R.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 flagship apps create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{i as n,n as r}from"./auth-BaUNb1Ed.mjs";import{a as i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-1AC-qwxS.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/flagship/apps`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 flagship apps create
3
3
 
4
4
  Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Create app`,builder:v,handler:async e=>l({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(_,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let u=p({name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(_,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};function b(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:`Flagship app ID returned when the app was created.`,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 ee={command:`get <app-id>`,describe:`Get flag definitions`,builder:b,handler:async e=>l({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`if-none-match`]!==void 0&&(l[`If-None-Match`]=String(e[`if-none-match`])),e.dryRun){let t=await i();s({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/flagship/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}/definitions`,pathParams:{"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();e.accountId=d;let f=await c(`Loading`,async()=>n(u,`GET`,`/accounts/${d}/flagship/apps/${encodeURIComponent(String(e[`app-id`]))}/definitions`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Loaded`})})},te={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/flagship/apps/${t.app_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 flagship apps delete <app-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as s,t as c}from"./body-parser-DnBfDdx3.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(e){return e.usage(`$0 fraud get
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";var u={method:`GET`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`};function d(e){return e.usage(`$0 fraud get
3
3
 
4
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 f={command:`get`,describe:`Get Fraud Detection Settings`,builder:d,handler:async e=>o({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(u,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var p={method:`PUT`,path:t=>e`/zones/${t.zone_id}/fraud_detection/settings`,body:`json`};function m(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`]}).coerce(`authentication-settings-failure-criteria-kind`,e=>l(e,`authentication-settings-failure-criteria-kind`,`text`)).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
5
5
  - Maximum of 10 codes per criterion.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{n as generateWorkerTypes}from"./generate-CeeWW3eX.mjs";
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export{t as default}from"./get-CRKvqCu6.mjs";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as s,t as c}from"./body-parser-DnBfDdx3.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u}from"./prompt-C0hKSr-R.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`};function f(e){return e.usage(`$0 google-tag-gateway config get
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u}from"./prompt-1AC-qwxS.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`};function f(e){return e.usage(`$0 google-tag-gateway config get
3
3
 
4
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 p={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:f,handler:async e=>o({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/settings/google-tag-gateway/config`,body:`json`};function h(e){return e.usage(`$0 google-tag-gateway config update
5
5
 
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./source-mXUcrTVw.mjs";var t=/* @__PURE__ */ e(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),n=/* @__PURE__ */ e(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||
2
+ import{n as e}from"./source-AlTrHNem.mjs";var t=/* @__PURE__ */ e(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),n=/* @__PURE__ */ e(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||
3
3
  /* istanbul ignore next */9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),r=/* @__PURE__ */ e(((e,r)=>{let{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=n(),s=t();e=r.exports={};let c=e.re=[],l=e.safeRe=[],u=e.src=[],d=e.safeSrc=[],f=e.t={},p=0,m=`[a-zA-Z0-9-]`,h=[[`\\s`,1],[`\\d`,o],[m,a]],g=e=>{for(let[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},_=(e,t,n)=>{let r=g(t),i=p++;s(e,i,t),f[e]=i,u[i]=t,d[i]=r,c[i]=new RegExp(t,n?`g`:void 0),l[i]=new RegExp(r,n?`g`:void 0)};_(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),_(`NUMERICIDENTIFIERLOOSE`,`\\d+`),_(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${m}*`),_(`MAINVERSION`,`(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})`),_(`MAINVERSIONLOOSE`,`(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASEIDENTIFIER`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIER]})`),_(`PRERELEASEIDENTIFIERLOOSE`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASE`,`(?:-(${u[f.PRERELEASEIDENTIFIER]}(?:\\.${u[f.PRERELEASEIDENTIFIER]})*))`),_(`PRERELEASELOOSE`,`(?:-?(${u[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[f.PRERELEASEIDENTIFIERLOOSE]})*))`),_(`BUILDIDENTIFIER`,`${m}+`),_(`BUILD`,`(?:\\+(${u[f.BUILDIDENTIFIER]}(?:\\.${u[f.BUILDIDENTIFIER]})*))`),_(`FULLPLAIN`,`v?${u[f.MAINVERSION]}${u[f.PRERELEASE]}?${u[f.BUILD]}?`),_(`FULL`,`^${u[f.FULLPLAIN]}$`),_(`LOOSEPLAIN`,`[v=\\s]*${u[f.MAINVERSIONLOOSE]}${u[f.PRERELEASELOOSE]}?${u[f.BUILD]}?`),_(`LOOSE`,`^${u[f.LOOSEPLAIN]}$`),_(`GTLT`,`((?:<|>)?=?)`),_(`XRANGEIDENTIFIERLOOSE`,`${u[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_(`XRANGEIDENTIFIER`,`${u[f.NUMERICIDENTIFIER]}|x|X|\\*`),_(`XRANGEPLAIN`,`[v=\\s]*(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:${u[f.PRERELEASE]})?${u[f.BUILD]}?)?)?`),_(`XRANGEPLAINLOOSE`,`[v=\\s]*(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:${u[f.PRERELEASELOOSE]})?${u[f.BUILD]}?)?)?`),_(`XRANGE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAIN]}$`),_(`XRANGELOOSE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAINLOOSE]}$`),_(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),_(`COERCE`,`${u[f.COERCEPLAIN]}(?:$|[^\\d])`),_(`COERCEFULL`,u[f.COERCEPLAIN]+`(?:${u[f.PRERELEASE]})?(?:${u[f.BUILD]})?(?:$|[^\\d])`),_(`COERCERTL`,u[f.COERCE],!0),_(`COERCERTLFULL`,u[f.COERCEFULL],!0),_(`LONETILDE`,`(?:~>?)`),_(`TILDETRIM`,`(\\s*)${u[f.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,_(`TILDE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAIN]}$`),_(`TILDELOOSE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAINLOOSE]}$`),_(`LONECARET`,`(?:\\^)`),_(`CARETTRIM`,`(\\s*)${u[f.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,_(`CARET`,`^${u[f.LONECARET]}${u[f.XRANGEPLAIN]}$`),_(`CARETLOOSE`,`^${u[f.LONECARET]}${u[f.XRANGEPLAINLOOSE]}$`),_(`COMPARATORLOOSE`,`^${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]})$|^$`),_(`COMPARATOR`,`^${u[f.GTLT]}\\s*(${u[f.FULLPLAIN]})$|^$`),_(`COMPARATORTRIM`,`(\\s*)${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]}|${u[f.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,_(`HYPHENRANGE`,`^\\s*(${u[f.XRANGEPLAIN]})\\s+-\\s+(${u[f.XRANGEPLAIN]})\\s*$`),_(`HYPHENRANGELOOSE`,`^\\s*(${u[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[f.XRANGEPLAINLOOSE]})\\s*$`),_(`STAR`,`(<|>)?=?\\s*\\*`),_(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),_(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),i=/* @__PURE__ */ e(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),a=/* @__PURE__ */ e(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),o=/* @__PURE__ */ e(((e,o)=>{let s=t(),{MAX_LENGTH:c,MAX_SAFE_INTEGER:l}=n(),{safeRe:u,t:d}=r(),f=i(),{compareIdentifiers:p}=a(),m=(e,t)=>{let n=t.split(`.`);if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(p(e[t],n[t])!==0)return!1;return!0};o.exports=class e{constructor(t,n){if(n=f(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>c)throw TypeError(`version is longer than ${c} characters`);s(`SemVer`,t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=t.trim().match(n.loose?u[d.LOOSE]:u[d.FULL]);if(!r)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>l||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>l||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>l||this.patch<0)throw TypeError(`Invalid patch version`);this.prerelease=r[4]?r[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<l)return t}return e}):[],this.build=r[5]?r[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(s(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let e=this.prerelease[n],r=t.prerelease[n];if(s(`prerelease compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e!==r)return p(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{let e=this.build[n],r=t.build[n];if(s(`build compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e!==r)return p(e,r)}while(++n)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?u[d.PRERELEASELOOSE]:u[d.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];if(n===!1&&(r=[t]),m(this.prerelease,t)){let e=this.prerelease[t.split(`.`).length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),s=/* @__PURE__ */ e(((e,t)=>{let n=o();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),c=/* @__PURE__ */ e(((e,t)=>{let n=s();t.exports=(e,t,r)=>n(e,t,r)>0}));export{r as a,i,s as n,n as o,o as r,t as s,c as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-Db1KT0vm.mjs";import{i as n}from"./context-C_a8oSY9.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-Q5w9PNTT.mjs";import{t as o}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as s,r as c,t as l}from"./body-parser-DnBfDdx3.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-C0hKSr-R.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks`,body:`json`};function m(e){return e.usage(`$0 healthchecks create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as s,r as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-1AC-qwxS.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/healthchecks`,body:`json`};function m(e){return e.usage(`$0 healthchecks create
3
3
 
4
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-header`,{type:`string`,description:`The HTTP request headers to send in the health check. It is recommended you set a Host header by default. The User-Agent header cannot be overridden. Provide as a JSON object or @path/to/file.json.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).coerce(`http-config-method`,e=>u(e,`http-config-method`,`text`)).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`]}).coerce(`tcp-config-method`,e=>u(e,`tcp-config-method`,`text`)).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 h={command:`create`,describe:`Create Health Check`,builder:m,handler:async e=>o({command:`healthchecks create`,classification:{safeFlags:[`http-config-allow-insecure`,`http-config-follow-redirects`,`http-config-method`,`suspended`,`tcp-config-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf healthchecks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/healthchecks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:f}));r(n,{successLabel:`Created`});return}e.address===void 0&&(e.address=await d(`address`,`The hostname or IP address of the origin server to run health checks on.`)),e.name===void 0&&(e.name=await d(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let m=l({address:u(e.address,`address`,`text`),check_regions:e[`check-regions`],consecutive_fails:e[`consecutive-fails`],consecutive_successes:e[`consecutive-successes`],description:u(e.description,`description`,`text`),http_config:{allow_insecure:e[`http-config-allow-insecure`],expected_body:u(e[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:e[`http-config-expected-codes`],follow_redirects:e[`http-config-follow-redirects`],header:c(e[`http-config-header`],`http-config-header`),method:e[`http-config-method`],path:u(e[`http-config-path`],`http-config-path`,`text`),port:e[`http-config-port`]},interval:e.interval,name:u(e.name,`name`,`text`),retries:e.retries,suspended:e.suspended,tcp_config:{method:e[`tcp-config-method`],port:e[`tcp-config-port`]},timeout:e.timeout,type:u(e.type,`type`,`text`)},[[`http_config`,`header`]]),h=await a(`Creating`,async()=>o.send(p,{body:m,zone_id:f}));r(h,{successLabel:`Created`})})};var g={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/healthchecks/${t.healthcheck_id}`};function _(e){return e.usage(`$0 healthchecks delete <healthcheck-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-Db1KT0vm.mjs";import{a as r,t as i}from"./context-C_a8oSY9.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-Q5w9PNTT.mjs";import{t as c}from"./run-DtFLvOHB.mjs";import"./telemetry-BavSU4ku.mjs";import{n as l,t as u}from"./body-parser-DnBfDdx3.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-C0hKSr-R.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
2
+ import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-1AC-qwxS.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/hyperdrive/configs`,body:`json`};function g(e){return e.usage(`$0 hyperdrive create
3
3
 
4
4
  Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.`).option(`mtls-ca-certificate-id`,{type:`string`,description:`Define CA certificate ID obtained after uploading CA cert.`}).option(`mtls-certificate-id`,{type:`string`,description:`Define mTLS certificate ID obtained after uploading client cert.`}).option(`mtls-sslmode`,{type:`string`,description:"PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA certificate; the require modes cannot be used with a CA certificate.",choices:[`require`,`verify-ca`,`verify-full`,`REQUIRED`,`VERIFY_CA`,`VERIFY_IDENTITY`]}).coerce(`mtls-sslmode`,e=>d(e,`mtls-sslmode`,`text`)).option(`name`,{type:`string`,description:`The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.`}).option(`origin-connection-limit`,{type:`number`,description:`The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.
5
5