cf 1.0.0-beta.25 → 1.0.0-beta.27

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 (262) hide show
  1. package/dist/_meta/commands.json +2015 -3426
  2. package/dist/_meta/hand-written-commands.json +16 -1
  3. package/dist/_meta/schemas.json +9249 -2339
  4. package/dist/abuse-reports-RxXqfDEW.mjs +24 -0
  5. package/dist/{access-__sFDSFL.mjs → access-BxEprr2f.mjs} +1 -1
  6. package/dist/{accounts-CmggwRjh.mjs → accounts-DU2ZNYqP.mjs} +17 -11
  7. package/dist/{acm-AAhRZUAU.mjs → acm-CBCIKBJ4.mjs} +1 -1
  8. package/dist/{addressing-DVeJNPZc.mjs → addressing-BKxiLRHk.mjs} +1 -1
  9. package/dist/{agent-memory-DQhWO6sc.mjs → agent-memory-DkBpQYUL.mjs} +1 -1
  10. package/dist/{ai-CULO9sno.mjs → ai-DqEN_hhg.mjs} +2 -2
  11. package/dist/{ai-audit-udn4HF34.mjs → ai-audit-BmzOgt6x.mjs} +1 -1
  12. package/dist/{ai-gateway-Bm2MMdec.mjs → ai-gateway-B0uiYVHq.mjs} +3 -3
  13. package/dist/ai-search-DbZIxdio.mjs +74 -0
  14. package/dist/{ai-security-DXy9ht-9.mjs → ai-security-CvZfP2JC.mjs} +1 -1
  15. package/dist/{alerting-CssnaN2i.mjs → alerting-BjGwBxZT.mjs} +1 -1
  16. package/dist/{analytics-BVo7Ax0w.mjs → analytics-C7kT_H-W.mjs} +4 -4
  17. package/dist/{analytics-engine-BBd0Bydx.mjs → analytics-engine-BHpcNSdD.mjs} +1 -1
  18. package/dist/{api-security-C-D9OKtH.mjs → api-security-BbcvDtff.mjs} +2 -2
  19. package/dist/{argo-DSziwzvA.mjs → argo-D1VONzu-.mjs} +1 -1
  20. package/dist/{artifacts-nVMgn4dn.mjs → artifacts-2R2sxIKO.mjs} +3 -3
  21. package/dist/{audit-logs-DIZ5oA_y.mjs → audit-logs-LoBB1OO_.mjs} +1 -1
  22. package/dist/auth-CspwoBlp.mjs +2 -0
  23. package/dist/{auth-JsvLULHA.mjs → auth-D499YE2n.mjs} +3 -3
  24. package/dist/{auth-CB9wjyad.mjs → auth-FK2eLQ02.mjs} +1 -1
  25. package/dist/{auth-token-BAgw7kYP.mjs → auth-token-BwpERbnG.mjs} +1 -1
  26. package/dist/{autoconfig-CajkMb3B.mjs → autoconfig-B2w-woU0.mjs} +85 -83
  27. package/dist/{basin-catalog-BRvGeKm3.mjs → basin-catalog-AgOHGiPI.mjs} +2 -2
  28. package/dist/billing-DRNww0iC.mjs +24 -0
  29. package/dist/{blocks-D2tE8dp2.mjs → blocks-C8vyXIAT.mjs} +1 -1
  30. package/dist/body-unions-CjpNjwSW.mjs +2 -0
  31. package/dist/bot-management-fwxKIbaB.mjs +9 -0
  32. package/dist/{botnet-feed-VOL5P4s3.mjs → botnet-feed-DCYB5kYZ.mjs} +1 -1
  33. package/dist/{brand-protection-CSVHQ9Pt.mjs → brand-protection-BVICLzBc.mjs} +1 -1
  34. package/dist/browser-run-CEk-NIgP.mjs +40 -0
  35. package/dist/build-CRm2TQq8.mjs +2 -0
  36. package/dist/{build-BfkzV5_c.mjs → build-DO_GNhRl.mjs} +1 -1
  37. package/dist/{builds-y5BQCJ81.mjs → builds-CoazxuN-.mjs} +26 -26
  38. package/dist/{cache-Bvr988Hj.mjs → cache-jlLJLSu7.mjs} +1 -1
  39. package/dist/{cf-DgLg6Hop.mjs → cf-hP0SOgC6.mjs} +2 -2
  40. package/dist/{chunk-2HLTAS5V-B92NbX1j.mjs → chunk-AAQI36FL-e6E5HW1g.mjs} +1 -1
  41. package/dist/{chunk-DSGVRFIS-Dq2PrGsi.mjs → chunk-DSGVRFIS-DQwKND2c.mjs} +1 -1
  42. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +363 -0
  43. package/dist/{cli-BTxJfFus.mjs → cli-Nqf58-1c.mjs} +3 -3
  44. package/dist/{client-side-security-CFmO0uz9.mjs → client-side-security-VmZzMy-m.mjs} +1 -1
  45. package/dist/{cloud-connector-CtwPdFBa.mjs → cloud-connector-bMlFnqP0.mjs} +1 -1
  46. package/dist/{cloudflared-DPkNN1Qv.mjs → cloudflared-Ba4KWdTO.mjs} +1 -1
  47. package/dist/{cloudforce-one-DHrMaxnU.mjs → cloudforce-one-CCaIBOAo.mjs} +121 -119
  48. package/dist/{command-CDYTsmxe.mjs → command-BASaTmJc.mjs} +1 -1
  49. package/dist/{command-BWyx7dNO.mjs → command-BiIVclNA.mjs} +1 -1
  50. package/dist/{command-CXwKBbj9.mjs → command-Bih1HLr3.mjs} +1 -1
  51. package/dist/{command-Ct3tf-P5.mjs → command-BxZBNPxG.mjs} +1 -1
  52. package/dist/{command-DPOjEs1B.mjs → command-ByYf12-8.mjs} +1 -1
  53. package/dist/{command-CmK8-DJ9.mjs → command-C0qCuw03.mjs} +1 -1
  54. package/dist/{command-DqWBPiew.mjs → command-C2FVMd1b.mjs} +1 -1
  55. package/dist/{command-ckixJeTm.mjs → command-C4OgtX_x.mjs} +1 -1
  56. package/dist/{command-CCDzJjIB.mjs → command-C5Kqc5Km.mjs} +1 -1
  57. package/dist/{command-lJJ7sEZe.mjs → command-CFxyp8Uo.mjs} +1 -1
  58. package/dist/{command-ClneauMx.mjs → command-CZAR85ba.mjs} +1 -1
  59. package/dist/{command-BXCk1OsI.mjs → command-CelQVrZL.mjs} +1 -1
  60. package/dist/{command-YFWLEK8W.mjs → command-CrAlzysj.mjs} +1 -1
  61. package/dist/{command-6_Ms3TZv.mjs → command-pMoNdd22.mjs} +1 -1
  62. package/dist/{completions-B1rYgw_a.mjs → completions-DRzBiqpv.mjs} +1 -1
  63. package/dist/{connector-interrupts-DecTdK6X.mjs → connector-interrupts-CrTeSyaM.mjs} +1 -1
  64. package/dist/{connector-telemetry-events-wePxPACj.mjs → connector-telemetry-events-BbAOUt9h.mjs} +1 -1
  65. package/dist/{connector-telemetry-snapshots-D8sXR1qx.mjs → connector-telemetry-snapshots-DcpBx7Qx.mjs} +1 -1
  66. package/dist/{connectors-C-6RQ_Q1.mjs → connectors-D1WFLJoE.mjs} +1 -1
  67. package/dist/{containers-D65Gpj9Q.mjs → containers-BOBEs1Gk.mjs} +4 -4
  68. package/dist/containers-DINLx5_i.mjs +380 -0
  69. package/dist/{content-scan-DbIDQ-Yu.mjs → content-scan-D1GfPSL0.mjs} +1 -1
  70. package/dist/{context-DCon1tRZ.mjs → context-Dp4CXG22.mjs} +1 -1
  71. package/dist/{cps-DGLmzCzp.mjs → cps-D4uhzg3k.mjs} +1 -1
  72. package/dist/{csam-scanner-R7Ih-Dnw.mjs → csam-scanner-DOOUBeBM.mjs} +1 -3
  73. package/dist/custom-csrs-DtdFo5YZ.mjs +18 -0
  74. package/dist/{custom-hostnames-BFWR-tR_.mjs → custom-hostnames-ccdlELaD.mjs} +1 -1
  75. package/dist/custom-nameservers-p3gDjfva.mjs +12 -0
  76. package/dist/custom-pages-DAkKVzgR.mjs +38 -0
  77. package/dist/d1-CDIyRdh4.mjs +52 -0
  78. package/dist/{delegate-CTj0dYET.mjs → delegate-B4bKqF7i.mjs} +1 -1
  79. package/dist/delegate.mjs +1 -1
  80. package/dist/{deploy-BVTA83rN.mjs → deploy-BaC5Ty7F.mjs} +1 -1
  81. package/dist/{deploy-context-CO8ZSRwx.mjs → deploy-context-DTTgNGro.mjs} +1 -1
  82. package/dist/{deploy-input-PhKRxa_2.mjs → deploy-input-mAy06fAI.mjs} +1 -1
  83. package/dist/{dev-CM5GLHNn.mjs → dev-De-HszNT.mjs} +1 -1
  84. package/dist/{diagnostics-DPjl0aCm.mjs → diagnostics-D1CUs2o9.mjs} +1 -1
  85. package/dist/{dist-ataVE8ob.mjs → dist-D5qkmHhC.mjs} +2 -2
  86. package/dist/{dls-BLTIVlbh.mjs → dls-DWBiYzY1.mjs} +1 -1
  87. package/dist/{dns-firewall-D1bb1byu.mjs → dns-firewall-DH9xIT5H.mjs} +8 -8
  88. package/dist/{dns-DkqVq-nB.mjs → dns-wMjf1t6-.mjs} +14 -8
  89. package/dist/{docs-tOv_OllI.mjs → docs-BA7qslb2.mjs} +1 -1
  90. package/dist/{dotenv-qsoPELMm.mjs → dotenv-DKRemNCH.mjs} +1 -1
  91. package/dist/{durable-objects-OJhns_to.mjs → durable-objects-DF0MYpnV.mjs} +1 -1
  92. package/dist/{email-auth-BbsIBNlu.mjs → email-auth-BShMFXn4.mjs} +1 -1
  93. package/dist/email-domains-CDSbVclP.mjs +14 -0
  94. package/dist/{email-routing-DnitWE1A.mjs → email-routing-CBCkbg_F.mjs} +4 -2
  95. package/dist/{email-security-DiWtb7cx.mjs → email-security-CnNa1YON.mjs} +4 -4
  96. package/dist/{email-sending-DuDjXykw.mjs → email-sending-CpDSw-Eb.mjs} +16 -16
  97. package/dist/error-sanitization-B025CygB.mjs +2 -0
  98. package/dist/{error-sanitization-ahuAGEjT.mjs → error-sanitization-DG8WSzHe.mjs} +1 -1
  99. package/dist/{errors-CCFmptqJ.mjs → errors-DatLr-iR.mjs} +1 -1
  100. package/dist/{field-extractors-DNNnkBZH.mjs → field-extractors-BwGdMnTr.mjs} +1 -1
  101. package/dist/{firewall-C7eZRNVF.mjs → firewall-CY_oem-d.mjs} +25 -9
  102. package/dist/{flagship-BczjsrJ5.mjs → flagship-Bat5EZCk.mjs} +1 -1
  103. package/dist/{fraud-wE0UM2SM.mjs → fraud-CSUKLh8X.mjs} +2 -2
  104. package/dist/global-options-DiKj2cQy.mjs +2 -0
  105. package/dist/{google-tag-gateway-6mvtxcJK.mjs → google-tag-gateway-C2skt6t-.mjs} +1 -1
  106. package/dist/{healthchecks-aIB3DebS.mjs → healthchecks-uC43QKQd.mjs} +1 -1
  107. package/dist/{hyperdrive-DHRP8SJS.mjs → hyperdrive-FcBbpew4.mjs} +3 -3
  108. package/dist/iam-8T74DNhH.mjs +62 -0
  109. package/dist/{images-CLgvxd0t.mjs → images-C3JUaf6b.mjs} +1 -1
  110. package/dist/index.mjs +1 -1
  111. package/dist/{init-B_DBTMXU.mjs → init-BEVVz4_P.mjs} +1 -1
  112. package/dist/{intel-jnoIVlYG.mjs → intel-DRy4rHrt.mjs} +6 -7
  113. package/dist/{interactive-1g0dnrA8.mjs → interactive-CKHdGvkh.mjs} +1 -1
  114. package/dist/{internal-Ba3b-Z8J.mjs → internal-CamuESs0.mjs} +1 -1
  115. package/dist/{ips-CQ4gFfex.mjs → ips-DinCNnWj.mjs} +1 -1
  116. package/dist/k2-wsanPL3y.mjs +10 -0
  117. package/dist/{kv-DQfnNE-w.mjs → kv-BLSPcEnH.mjs} +1 -1
  118. package/dist/{lazy-command-DjGzxiUT.mjs → lazy-command-WB1FOuew.mjs} +1 -1
  119. package/dist/{leaked-credential-checks-CaqjG3Oz.mjs → leaked-credential-checks-CSZd9hBQ.mjs} +1 -1
  120. package/dist/{live-BfobGv8W.mjs → live-B6AsI_E5.mjs} +1 -1
  121. package/dist/{load-balancers-BzSCp2Uh.mjs → load-balancers-gap5u4b1.mjs} +19 -7
  122. package/dist/local-CFsO9Tkg.mjs +2 -0
  123. package/dist/{local-BNmz58v4.mjs → local-CgBhtmON.mjs} +1 -1
  124. package/dist/{local-runtime-DvH92pV8.mjs → local-runtime-CmlJ20uJ.mjs} +1 -1
  125. package/dist/{login-B9wYab6S.mjs → login-BJHaTERg.mjs} +1 -1
  126. package/dist/login-BfuOf-Yi.mjs +2 -0
  127. package/dist/logpush-qhlxsioM.mjs +68 -0
  128. package/dist/{logs-Dan7xU-k.mjs → logs-bI54CJ0w.mjs} +23 -7
  129. package/dist/{magic-network-monitoring-TAjt04vN.mjs → magic-network-monitoring-CX3TaMTu.mjs} +1 -1
  130. package/dist/{magic-transit-BSuLHnQ5.mjs → magic-transit-BwDyySHJ.mjs} +20 -20
  131. package/dist/{managed-defense-CTnIZLg4.mjs → managed-defense-CsBBkfeQ.mjs} +2 -2
  132. package/dist/{managed-transforms-BETvesjp.mjs → managed-transforms-CUC-uAbW.mjs} +1 -1
  133. package/dist/{mcp-DhjMGaKc.mjs → mcp-CyI0sDmL.mjs} +3 -3
  134. package/dist/{mesh-jxLLG3t4.mjs → mesh-Czr0UCP4.mjs} +2 -2
  135. package/dist/{migrate-Bkhk38nJ.mjs → migrate-DKDWYrz2.mjs} +1 -1
  136. package/dist/{monetization-BqDgHlPv.mjs → monetization-NUgfDtSy.mjs} +7 -3
  137. package/dist/{network-D6BRpgOv.mjs → network-B42zrBic.mjs} +1 -1
  138. package/dist/{network-interconnects-tP41GbnL.mjs → network-interconnects-DuIBe8fK.mjs} +4 -4
  139. package/dist/{o11y-h4cIC_1T.mjs → o11y-oEUpMC3O.mjs} +6 -6
  140. package/dist/{oauth-CuM12iNb.mjs → oauth-BLQ1-y3R.mjs} +1 -1
  141. package/dist/{oauth-nDH3nTCa.mjs → oauth-BmSFLp_s.mjs} +1 -1
  142. package/dist/observability-BxhJQCgZ.mjs +4 -0
  143. package/dist/organization-CEnlXwrl.mjs +70 -0
  144. package/dist/{organizations-7Q3d9vcW.mjs → organizations-Dt86ToxE.mjs} +1 -1
  145. package/dist/{origin-post-quantum-encryption-XBMPCdSL.mjs → origin-post-quantum-encryption-lX-uaJSL.mjs} +1 -1
  146. package/dist/package-CiRJBRHO.mjs +2 -0
  147. package/dist/{page-rules-BlT5xlhH.mjs → page-rules-J6LhwR-s.mjs} +1 -1
  148. package/dist/{pages-CIbL62L2.mjs → pages-BksdnChs.mjs} +4 -4
  149. package/dist/{pay-per-crawl-BzsBqo_m.mjs → pay-per-crawl-BLcbHRoR.mjs} +1 -1
  150. package/dist/{pay-per-use-DtejLYJ8.mjs → pay-per-use-VatiU-Nt.mjs} +4 -2
  151. package/dist/{pipelines-LjLb8jq6.mjs → pipelines-B5AoB3f3.mjs} +5 -5
  152. package/dist/precursor-D3VH2MXT.mjs +4 -0
  153. package/dist/{previews-zRYO9uO9.mjs → previews-DzJ85fsr.mjs} +1 -1
  154. package/dist/{progress-_Jux05O5.mjs → progress-DLri-rA7.mjs} +1 -1
  155. package/dist/{prompt-SNVLBS1b.mjs → prompt-D0dXwuME.mjs} +1 -1
  156. package/dist/{queues-Ci4rGGC4.mjs → queues-BsAck4To.mjs} +5 -5
  157. package/dist/{r2-qm2hgS43.mjs → r2-BYjdHDEZ.mjs} +38 -38
  158. package/dist/{radar-C_ydbJe_.mjs → radar-CvLtu-Vr.mjs} +1 -1
  159. package/dist/{raw-fetch-D3ydyJYW.mjs → raw-fetch-DQeDx1wT.mjs} +1 -1
  160. package/dist/{ready-hk-_B8z3.mjs → ready-gsGEaWLL.mjs} +1 -1
  161. package/dist/{realtime-BAvjYmYw.mjs → realtime-DiCEgFTC.mjs} +81 -79
  162. package/dist/{registrar-DD7WZaP2.mjs → registrar-D4wdgWpo.mjs} +8 -8
  163. package/dist/{registrar-sandbox-DbxloH5s.mjs → registrar-sandbox-B6yopzdG.mjs} +2 -2
  164. package/dist/{reporting-CRVg3J1C.mjs → reporting-BiHgnT8L.mjs} +1 -1
  165. package/dist/{request-headers-Cn01EsbI.mjs → request-headers-CoxHUNcB.mjs} +1 -1
  166. package/dist/{request-tracers-BWs0rdFS.mjs → request-tracers-817HTytF.mjs} +1 -1
  167. package/dist/{resource-sharing-yipIkdbd.mjs → resource-sharing-CW9xxtq5.mjs} +12 -12
  168. package/dist/{rules-CCtaBLiN.mjs → rules-CRhe_ca9.mjs} +1 -1
  169. package/dist/rulesets-CKyc-Xlx.mjs +42 -0
  170. package/dist/{rum-gDOKylu_.mjs → rum-BfnWHW_d.mjs} +1 -1
  171. package/dist/{run-Br8sYjNF.mjs → run-Ciw_GIrC.mjs} +1 -1
  172. package/dist/run-DD45EQTm.mjs +2 -0
  173. package/dist/{schema-cache-Cb64Nqbt.mjs → schema-cache-BIo0Gi2H.mjs} +1 -1
  174. package/dist/schema-flags-DrqvwQNw.mjs +4 -0
  175. package/dist/{scim-CM8Xah56.mjs → scim-C4iRWNYB.mjs} +1 -1
  176. package/dist/{secrets-store-BEnXiYCC.mjs → secrets-store-DgtzZRze.mjs} +1 -1
  177. package/dist/security-insights-SlUGW3F_.mjs +62 -0
  178. package/dist/{security-txt-BF0PWAEW.mjs → security-txt-C3YS0REz.mjs} +1 -1
  179. package/dist/{session-B7vOqdZU.mjs → session-D2yuwO4i.mjs} +1 -1
  180. package/dist/{shared-CBMFY1VY.mjs → shared--uVkAAd7.mjs} +1 -1
  181. package/dist/{signed-url-VDDQlllt.mjs → signed-url-ClLk45_J.mjs} +1 -1
  182. package/dist/{smart-shield-DQku_wYi.mjs → smart-shield-Dn95hqUH.mjs} +1 -1
  183. package/dist/{snippets-B3FCEMuh.mjs → snippets-BNUKOajz.mjs} +1 -1
  184. package/dist/{spawn-9sE67p7c.mjs → spawn-DuT4snxu.mjs} +1 -1
  185. package/dist/{spectrum-nLirlVue.mjs → spectrum-Cj0BMtg2.mjs} +3 -3
  186. package/dist/{speed-C1hCyMPy.mjs → speed-BrVeZRyX.mjs} +1 -1
  187. package/dist/{sql-DVQOKThL.mjs → sql-BX1pBqj3.mjs} +2 -2
  188. package/dist/src-DPnUfK4c.mjs +131 -0
  189. package/dist/{ssl-CYDRgr24.mjs → ssl-Bx4LCutF.mjs} +3 -3
  190. package/dist/{startup-profile-BLvw_Wmc.mjs → startup-profile-DqaYNT0b.mjs} +1 -1
  191. package/dist/startup-profile-tZNb2HGz.mjs +2 -0
  192. package/dist/{state-B8n0QU04.mjs → state-BmzOLELo.mjs} +1 -1
  193. package/dist/state-Uwfrmw5I.mjs +2 -0
  194. package/dist/{stream-DHyejrI6.mjs → stream-BRzr6yh0.mjs} +1 -1
  195. package/dist/{tags-DOL6dKQE.mjs → tags-xVzjZxdt.mjs} +11 -5
  196. package/dist/{telemetry-DJ8-Q2pU.mjs → telemetry-CJ9URio3.mjs} +1 -1
  197. package/dist/telemetry-Pt5GpCKD.mjs +2 -0
  198. package/dist/tenant-custom-nameservers-M7Fxqh2W.mjs +8 -0
  199. package/dist/{tunnels-CMAmH4Vh.mjs → tunnels-DQVXKUKA.mjs} +3 -3
  200. package/dist/{turnstile-DTJjDMFp.mjs → turnstile-B_Ugzgom.mjs} +1 -1
  201. package/dist/ui-FYultowZ.mjs +2 -0
  202. package/dist/{update-check-DDGKWkmi.mjs → update-check-DHUo4FOJ.mjs} +1 -1
  203. package/dist/{update-check-BkCdHK-3.mjs → update-check-DRr0eRhB.mjs} +1 -1
  204. package/dist/update-check-worker.mjs +1 -1
  205. package/dist/{url-normalization-BbWOra1u.mjs → url-normalization-CZRQH_pJ.mjs} +1 -1
  206. package/dist/{url-scanner-Bj-eS_3C.mjs → url-scanner-BH4PLy16.mjs} +1 -1
  207. package/dist/{user-CMzTHHVX.mjs → user-Bn82Qw0Y.mjs} +10 -12
  208. package/dist/{vectorize-D4H7_KPs.mjs → vectorize-DoVVz_sh.mjs} +1 -1
  209. package/dist/version-Zr2oF8mY.mjs +2 -0
  210. package/dist/{waiting-rooms-CqMbVu9s.mjs → waiting-rooms-QUW131o3.mjs} +5 -3
  211. package/dist/{web-assets-BgfzyF8t.mjs → web-assets-CgQXsp8m.mjs} +2 -2
  212. package/dist/{web3-ByCe47FI.mjs → web3-TY9s6Swn.mjs} +3 -3
  213. package/dist/workers-B3uJqJKc.mjs +39 -0
  214. package/dist/{workers-builds-2N71_8MZ.mjs → workers-builds-BgGY0IGk.mjs} +2 -2
  215. package/dist/{workers-for-platforms-BMN4QXgT.mjs → workers-for-platforms-5RkV9MVp.mjs} +2 -2
  216. package/dist/workers-vpc-Bt4OQbwM.mjs +12 -0
  217. package/dist/{workflows-COiyqt-B.mjs → workflows-6m85DdqF.mjs} +7 -7
  218. package/dist/{wrangler-migration-CqSg8IDj.mjs → wrangler-migration-BbmGOu8l.mjs} +3 -3
  219. package/dist/{zaraz-DjwhCH8A.mjs → zaraz-8WSJ7l0L.mjs} +2 -2
  220. package/dist/{zero-trust-BmpuDOmH.mjs → zero-trust-DK0cqDZv.mjs} +483 -405
  221. package/dist/{zones-XYQiz5kF.mjs → zones-DTAcguf6.mjs} +3 -3
  222. package/package.json +14 -14
  223. package/dist/abuse-reports-BIS9MZn7.mjs +0 -24
  224. package/dist/ai-search-GRN_gXgU.mjs +0 -74
  225. package/dist/auth-Bls_1yRW.mjs +0 -2
  226. package/dist/billing-BhPoqyKC.mjs +0 -22
  227. package/dist/bot-management-BfjX5DuH.mjs +0 -9
  228. package/dist/browser-run-cxOd2cZE.mjs +0 -40
  229. package/dist/build-DCdLWwOg.mjs +0 -2
  230. package/dist/chunk-3PJ54H4K-CbRAWQWI.mjs +0 -363
  231. package/dist/containers-C_byVTZF.mjs +0 -380
  232. package/dist/custom-csrs-D0RnVoJ7.mjs +0 -10
  233. package/dist/custom-nameservers-Dn_9Ssti.mjs +0 -8
  234. package/dist/custom-pages-HqIQcb77.mjs +0 -20
  235. package/dist/d1-CopIY9RT.mjs +0 -89
  236. package/dist/email-domains-pWZi1M4q.mjs +0 -12
  237. package/dist/error-sanitization-rodO1WCL.mjs +0 -2
  238. package/dist/iam-6t7-ScrS.mjs +0 -48
  239. package/dist/k2-Bsm6rzNX.mjs +0 -10
  240. package/dist/local-ChR3YIMU.mjs +0 -2
  241. package/dist/login-ierSCYE6.mjs +0 -2
  242. package/dist/logpush-DgfiSd1b.mjs +0 -44
  243. package/dist/magic-cloud-networking-DP8fWC4a.mjs +0 -68
  244. package/dist/oauth-clients-B0voUiXM.mjs +0 -14
  245. package/dist/oauth-scopes-Bhns1ZHW.mjs +0 -4
  246. package/dist/organization-Cy55HoRR.mjs +0 -73
  247. package/dist/package-DK3JX4I3.mjs +0 -2
  248. package/dist/precursor-BKp5_Ag4.mjs +0 -4
  249. package/dist/rulesets-DBEvCNDS.mjs +0 -34
  250. package/dist/run-LOgTLpob.mjs +0 -2
  251. package/dist/schema-flags-BcbbCWR5.mjs +0 -4
  252. package/dist/security-insights-Be5GvdBA.mjs +0 -40
  253. package/dist/src-Bh2gHpI7.mjs +0 -131
  254. package/dist/startup-profile-ByxSdhEl.mjs +0 -2
  255. package/dist/state-BTOzaT5L.mjs +0 -2
  256. package/dist/telemetry-kjElc1zT.mjs +0 -2
  257. package/dist/tenant-2EdATz2Y.mjs +0 -10
  258. package/dist/tenant-custom-nameservers-DhEpJNST.mjs +0 -8
  259. package/dist/ui-7zujR-O7.mjs +0 -2
  260. package/dist/version-DIIJ2ixL.mjs +0 -2
  261. package/dist/workers-BiLsPkYD.mjs +0 -39
  262. package/dist/workers-vpc-3o7dMg7-.mjs +0 -12
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as l,r as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-SNVLBS1b.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/dns_firewall`,body:`json`};function g(e){return e.usage(`$0 dns-firewall create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as l,r as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-D0dXwuME.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/dns_firewall`,body:`json`};function h(e){return e.usage(`$0 dns-firewall create
3
3
 
4
4
  Create a DNS Firewall cluster`).option(`attack-mitigation-enabled`,{type:`boolean`,description:`When enabled, automatically mitigate random-prefix attacks to protect upstream DNS servers`}).option(`attack-mitigation-only-when-upstream-unhealthy`,{type:`boolean`,description:`Only mitigate attacks when upstream servers seem unhealthy`}).option(`deprecate-any-requests`,{type:`boolean`,description:`Whether to refuse to answer queries for the ANY type`}).option(`ecs-fallback`,{type:`boolean`,description:`Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent`}).option(`maximum-cache-ttl`,{type:`number`,description:`By default, Cloudflare attempts to cache responses for as long as
5
5
  indicated by the TTL received from upstream nameservers. This setting
@@ -28,9 +28,9 @@ responses (e.g., NXDOMAIN) from the upstream servers.
28
28
  This setting does not affect the TTL value in the DNS response
29
29
  Cloudflare returns to clients. Cloudflare will always forward the TTL
30
30
  value received from upstream nameservers.
31
- `}).option(`ratelimit`,{type:`number`,description:`Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.`}).option(`retries`,{type:`number`,description:`Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)`,default:2}).option(`upstream-ips`,{type:`string`,array:!0,description:`The upstream_ips field`}).option(`dns-firewall-ip-count`,{type:`number`,description:`Number of IPv4 addresses to assign to the DNS Firewall cluster. Only used during cluster creation and cannot be changed later.`,default:2}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create DNS Firewall Cluster`,builder:g,handler:async e=>c({command:`dns-firewall create`,classification:{safeFlags:[`attack-mitigation-enabled`,`attack-mitigation-only-when-upstream-unhealthy`,`deprecate-any-requests`,`ecs-fallback`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`],dns_firewall_ip_count:e[`dns-firewall-ip-count`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:u}));a(n,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await p(`name`,`DNS Firewall cluster name`)),e[`upstream-ips`]===void 0)throw Error(`--upstream-ips is required (or pass --body with this field set).`);let m=d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`],dns_firewall_ip_count:e[`dns-firewall-ip-count`]}),g=await s(`Creating`,async()=>c.send(h,{body:m,account_id:u}));a(g,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`};function y(e){return e.usage(`$0 dns-firewall delete <dns-firewall-id>
31
+ `}).option(`ratelimit`,{type:`number`,description:`Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.`}).option(`retries`,{type:`number`,description:`Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)`,default:2}).option(`upstream-ips`,{type:`string`,array:!0,description:`The upstream_ips field`}).option(`dns-firewall-ip-count`,{type:`number`,description:`Number of IPv4 addresses to assign to the DNS Firewall cluster. Only used during cluster creation and cannot be changed later.`,default:2}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create DNS Firewall Cluster`,builder:h,handler:async e=>c({command:`dns-firewall create`,classification:{safeFlags:[`attack-mitigation-enabled`,`attack-mitigation-only-when-upstream-unhealthy`,`deprecate-any-requests`,`ecs-fallback`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`],dns_firewall_ip_count:e[`dns-firewall-ip-count`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:u}));a(n,{successLabel:`Created`});return}let p=d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`],dns_firewall_ip_count:e[`dns-firewall-ip-count`]}),h=await s(`Creating`,async()=>c.send(m,{body:p,account_id:u}));a(h,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`};function v(e){return e.usage(`$0 dns-firewall delete <dns-firewall-id>
32
32
 
33
- Delete a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <dns-firewall-id>`,describe:`Delete DNS Firewall Cluster`,builder:y,handler:async e=>c({command:`dns-firewall delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Deleted`})})};var x={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`,body:`json`};function S(e){return e.usage(`$0 dns-firewall edit <dns-firewall-id>
33
+ Delete a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <dns-firewall-id>`,describe:`Delete DNS Firewall Cluster`,builder:v,handler:async e=>c({command:`dns-firewall delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Deleted`})})};var b={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`,body:`json`};function x(e){return e.usage(`$0 dns-firewall edit <dns-firewall-id>
34
34
 
35
35
  Modify the configuration of a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`attack-mitigation-enabled`,{type:`boolean`,description:`When enabled, automatically mitigate random-prefix attacks to protect upstream DNS servers`}).option(`attack-mitigation-only-when-upstream-unhealthy`,{type:`boolean`,description:`Only mitigate attacks when upstream servers seem unhealthy`}).option(`deprecate-any-requests`,{type:`boolean`,description:`Whether to refuse to answer queries for the ANY type`}).option(`ecs-fallback`,{type:`boolean`,description:`Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent`}).option(`maximum-cache-ttl`,{type:`number`,description:`By default, Cloudflare attempts to cache responses for as long as
36
36
  indicated by the TTL received from upstream nameservers. This setting
@@ -59,12 +59,12 @@ responses (e.g., NXDOMAIN) from the upstream servers.
59
59
  This setting does not affect the TTL value in the DNS response
60
60
  Cloudflare returns to clients. Cloudflare will always forward the TTL
61
61
  value received from upstream nameservers.
62
- `}).option(`ratelimit`,{type:`number`,description:`Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.`}).option(`retries`,{type:`number`,description:`Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)`}).option(`upstream-ips`,{type:`string`,array:!0,description:`The upstream_ips field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`edit <dns-firewall-id>`,describe:`Update DNS Firewall Cluster`,builder:S,handler:async e=>c({command:`dns-firewall edit`,classification:{safeFlags:[`attack-mitigation-enabled`,`attack-mitigation-only-when-upstream-unhealthy`,`deprecate-any-requests`,`ecs-fallback`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(x,{body:t,account_id:u,dns_firewall_id:e[`dns-firewall-id`]}));a(n,{successLabel:`Updated`});return}let p=d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`]}),m=await s(`Updating`,async()=>c.send(x,{body:p,account_id:u,dns_firewall_id:e[`dns-firewall-id`]}));a(m,{successLabel:`Updated`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`};function T(e){return e.usage(`$0 dns-firewall get <dns-firewall-id>
62
+ `}).option(`ratelimit`,{type:`number`,description:`Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.`}).option(`retries`,{type:`number`,description:`Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)`}).option(`upstream-ips`,{type:`string`,array:!0,description:`The upstream_ips field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`edit <dns-firewall-id>`,describe:`Update DNS Firewall Cluster`,builder:x,handler:async e=>c({command:`dns-firewall edit`,classification:{safeFlags:[`attack-mitigation-enabled`,`attack-mitigation-only-when-upstream-unhealthy`,`deprecate-any-requests`,`ecs-fallback`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(b,{body:t,account_id:u,dns_firewall_id:e[`dns-firewall-id`]}));a(n,{successLabel:`Updated`});return}let p=d({attack_mitigation:{enabled:e[`attack-mitigation-enabled`],only_when_upstream_unhealthy:e[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:e[`deprecate-any-requests`],ecs_fallback:e[`ecs-fallback`],maximum_cache_ttl:e[`maximum-cache-ttl`],minimum_cache_ttl:e[`minimum-cache-ttl`],name:f(e.name,`name`,`text`),negative_cache_ttl:e[`negative-cache-ttl`],ratelimit:e.ratelimit,retries:e.retries,upstream_ips:e[`upstream-ips`]}),m=await s(`Updating`,async()=>c.send(b,{body:p,account_id:u,dns_firewall_id:e[`dns-firewall-id`]}));a(m,{successLabel:`Updated`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}`};function w(e){return e.usage(`$0 dns-firewall get <dns-firewall-id>
63
63
 
64
- Show a single DNS Firewall cluster for an account`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <dns-firewall-id>`,describe:`DNS Firewall Cluster Details`,builder:T,handler:async e=>c({command:`dns-firewall get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-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(w,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall`,query:[`page`,`per_page`]};function O(e){return e.usage(`$0 dns-firewall list
64
+ Show a single DNS Firewall cluster for an account`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <dns-firewall-id>`,describe:`DNS Firewall Cluster Details`,builder:w,handler:async e=>c({command:`dns-firewall get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-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(C,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall`,query:[`page`,`per_page`]};function D(e){return e.usage(`$0 dns-firewall list
65
65
 
66
- List DNS Firewall clusters for an account`).option(`page`,{type:`number`,description:`Page number of paginated results`}).option(`per-page`,{type:`number`,description:`Number of clusters per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List DNS Firewall Clusters`,builder:O,handler:async e=>c({command:`dns-firewall list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf dns-firewall list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_firewall`,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(D,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var A={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}/reverse_dns`,body:`json`};function j(e){return e.usage(`$0 dns-firewall reverse-dns edit <dns-firewall-id>
66
+ List DNS Firewall clusters for an account`).option(`page`,{type:`number`,description:`Page number of paginated results`}).option(`per-page`,{type:`number`,description:`Number of clusters per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List DNS Firewall Clusters`,builder:D,handler:async e=>c({command:`dns-firewall list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf dns-firewall list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_firewall`,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(E,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var k={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}/reverse_dns`,body:`json`};function A(e){return e.usage(`$0 dns-firewall reverse-dns edit <dns-firewall-id>
67
67
 
68
- Update reverse DNS configuration (PTR records) for a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`ptr`,{type:`string`,description:`Map of cluster IP addresses to PTR record contents. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`edit <dns-firewall-id>`,describe:`Update DNS Firewall Cluster Reverse DNS`,builder:j,handler:async e=>c({command:`dns-firewall reverse-dns edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.ptr===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--ptr).`);if(e.dryRun){let t=await r();o({command:`cf dns-firewall reverse-dns edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}/reverse_dns`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({ptr:u(e.ptr,`ptr`)},[[`ptr`]]):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(A,{body:t,account_id:f,dns_firewall_id:e[`dns-firewall-id`]}));a(n,{successLabel:`Updated`});return}let p=d({ptr:u(e.ptr,`ptr`)},[[`ptr`]]),m=await s(`Updating`,async()=>c.send(A,{body:p,account_id:f,dns_firewall_id:e[`dns-firewall-id`]}));a(m,{successLabel:`Updated`})})};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}/reverse_dns`};function P(e){return e.usage(`$0 dns-firewall reverse-dns get <dns-firewall-id>
68
+ Update reverse DNS configuration (PTR records) for a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`ptr`,{type:`string`,description:`Map of cluster IP addresses to PTR record contents. Provide as a JSON object or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`edit <dns-firewall-id>`,describe:`Update DNS Firewall Cluster Reverse DNS`,builder:A,handler:async e=>c({command:`dns-firewall reverse-dns edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.body===void 0&&e.ptr===void 0)throw Error(`--body is required unless at least one JSON map flag is provided (--ptr).`);if(e.dryRun){let t=await r();o({command:`cf dns-firewall reverse-dns edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}/reverse_dns`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({ptr:u(e.ptr,`ptr`)},[[`ptr`]]):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(k,{body:t,account_id:f,dns_firewall_id:e[`dns-firewall-id`]}));a(n,{successLabel:`Updated`});return}let p=d({ptr:u(e.ptr,`ptr`)},[[`ptr`]]),m=await s(`Updating`,async()=>c.send(k,{body:p,account_id:f,dns_firewall_id:e[`dns-firewall-id`]}));a(m,{successLabel:`Updated`})})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_firewall/${t.dns_firewall_id}/reverse_dns`};function N(e){return e.usage(`$0 dns-firewall reverse-dns get <dns-firewall-id>
69
69
 
70
- Show reverse DNS configuration (PTR records) for a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <dns-firewall-id>`,describe:`Show DNS Firewall Cluster Reverse DNS`,builder:P,handler:async e=>c({command:`dns-firewall reverse-dns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall reverse-dns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}/reverse_dns`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-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(N,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Loaded`})})},I={command:`reverse-dns`,describe:`Operations for reverse-dns`,builder:e=>e.command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`dns-firewall`,describe:`dns-firewall`,builder:e=>e.command(_).command(b).command(C).command(E).command(k).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{L as default};
70
+ Show reverse DNS configuration (PTR records) for a DNS Firewall cluster`).positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get <dns-firewall-id>`,describe:`Show DNS Firewall Cluster Reverse DNS`,builder:N,handler:async e=>c({command:`dns-firewall reverse-dns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf dns-firewall reverse-dns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_firewall/${e[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(e[`dns-firewall-id`]))}/reverse_dns`,pathParams:{"dns-firewall-id":String(e[`dns-firewall-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(M,{account_id:l,dns_firewall_id:e[`dns-firewall-id`]}));a(u,{successLabel:`Loaded`})})},F={command:`reverse-dns`,describe:`Operations for reverse-dns`,builder:e=>e.command(j).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`dns-firewall`,describe:`dns-firewall`,builder:e=>e.command(g).command(y).command(S).command(T).command(O).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{I as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{i as n,n as r}from"./auth-CB9wjyad.mjs";import{a as i,i as a,t as o}from"./context-DCon1tRZ.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-_Jux05O5.mjs";import{t as u}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as d,n as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-SNVLBS1b.mjs";import{n as v,t as y}from"./raw-fetch-D3ydyJYW.mjs";var ee={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/dnssec`};function b(e){return e.usage(`$0 dns dnssec delete
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,i as a,t as o}from"./context-Dp4CXG22.mjs";import{t as s}from"./output-BJEgbI0G.mjs";import{t as c}from"./dry-run-gy0Hl9xo.mjs";import{t as l}from"./progress-DLri-rA7.mjs";import{t as u}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as d,n as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m,t as h}from"./input-validation-D7z60HJH.mjs";import{a as g,n as _}from"./prompt-D0dXwuME.mjs";import{n as v,t as y}from"./raw-fetch-DQeDx1wT.mjs";var ee={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/dnssec`};function b(e){return e.usage(`$0 dns dnssec delete
3
3
 
4
4
  Delete DNSSEC.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete`,describe:`Delete DNSSEC records`,builder:b,handler:async e=>u({command:`dns dnssec delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf dns dnssec delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await _({force:!!e.force}))return;let i=await l(`Deleting`,async()=>t.send(ee,{zone_id:n}));s(i,{successLabel:`Deleted`})})};var S={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/dnssec`,body:`json`};function te(e){return e.usage(`$0 dns dnssec edit
5
5
 
@@ -61,19 +61,23 @@ Scan for common DNS records on your domain and automatically add them to your zo
61
61
 
62
62
  Overwrite an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`).positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).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 qe={command:`update <dns-record-id>`,describe:`Overwrite DNS Record`,builder:Ke,handler:async e=>u({command:`dns records update`,classification:{safeFlags:[`include-shadow-metadata`,`dry-run`]}},e,async()=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){c({command:`cf dns records update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"dns-record-id":String(e[`dns-record-id`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?void 0:f(e.body)});return}let n=await r(e),i=await a({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=f(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let a=await l(`Updating`,async()=>n.send(Ge,{body:r,zone_id:i,dns_record_id:e[`dns-record-id`],...t}));s(a,{successLabel:`Updated`})}else if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Je={command:`records`,describe:`Operations for records`,builder:e=>e.command(N).command(I).command(be).command(Ce).command(Te).command(Oe).command(Ae).command(Ne).command(We).command(Ie).command(Re).command(Ve).command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var R={method:`PATCH`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/dns_settings`,body:`json`};function Ye(e){return e.usage(`$0 dns settings account edit
63
63
 
64
- Update DNS settings for an account or zone`).option(`enforce-dns-only`,{type:`boolean`,description:`When enabled, forces all proxied DNS records in the account to behave as DNS-only at the edge, regardless of each record's individual proxy setting. Note that this account-level override does not modify the records themselves; it only affects how they are served at the edge. See more on [Enforce DNS-only](https://developers.cloudflare.com/dns/proxy-status/enforce-dns-only).`}).option(`zone-defaults-flatten-all-cnames`,{type:`boolean`,description:`Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.`}).option(`zone-defaults-foundation-dns`,{type:`boolean`,description:`Deprecated. Use nameservers.type to configure Advanced Nameservers.`}).option(`zone-defaults-internal-dns-reference-zone-id`,{type:`string`,description:`The ID of the zone to fallback to.`}).option(`zone-defaults-multi-provider`,{type:`boolean`,description:`Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.`}).option(`zone-defaults-ns-ttl`,{type:`number`,description:`The time to live (TTL) of the zone's nameserver (NS) records.`}).option(`zone-defaults-secondary-overrides`,{type:`boolean`,description:`Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.`}).option(`zone-defaults-soa-expire`,{type:`number`,description:`Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.`}).option(`zone-defaults-soa-min-ttl`,{type:`number`,description:`The time to live (TTL) for negative caching of records within the zone.`}).option(`zone-defaults-soa-mname`,{type:`string`,description:`The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.`}).option(`zone-defaults-soa-refresh`,{type:`number`,description:`Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.`}).option(`zone-defaults-soa-retry`,{type:`number`,description:`Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.`}).option(`zone-defaults-soa-rname`,{type:`string`,description:`The email address of the zone administrator, with the first label representing the local part of the email address.`}).option(`zone-defaults-soa-ttl`,{type:`number`,description:`The time to live (TTL) of the SOA record itself.`}).option(`zone-defaults-zone-mode`,{type:`string`,description:`Whether the zone mode is a regular or CDN/DNS only zone.`,choices:[`standard`,`cdn_only`,`dns_only`]}).coerce(`zone-defaults-zone-mode`,e=>m(e,`zone-defaults-zone-mode`,`text`)).option(`zone-defaults-nameservers-type`,{type:`string`,description:`Nameserver type`,choices:[`cloudflare.standard`,`cloudflare.advanced`,`cloudflare.standard.random`,`custom.account`,`custom.tenant`]}).coerce(`zone-defaults-nameservers-type`,e=>m(e,`zone-defaults-nameservers-type`,`text`)).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 Xe={command:`edit`,describe:`Update DNS Settings`,builder:Ye,handler:async e=>u({command:`dns settings account edit`,classification:{safeFlags:[`enforce-dns-only`,`zone-defaults-flatten-all-cnames`,`zone-defaults-foundation-dns`,`zone-defaults-multi-provider`,`zone-defaults-secondary-overrides`,`zone-defaults-zone-mode`,`zone-defaults-nameservers-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf dns settings account edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/dns_settings`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?p({enforce_dns_only:e[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:e[`zone-defaults-flatten-all-cnames`],foundation_dns:e[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:m(e[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:e[`zone-defaults-multi-provider`],ns_ttl:e[`zone-defaults-ns-ttl`],secondary_overrides:e[`zone-defaults-secondary-overrides`],soa:{expire:e[`zone-defaults-soa-expire`],min_ttl:e[`zone-defaults-soa-min-ttl`],mname:m(e[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:e[`zone-defaults-soa-refresh`],retry:e[`zone-defaults-soa-retry`],rname:m(e[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:e[`zone-defaults-soa-ttl`]},zone_mode:e[`zone-defaults-zone-mode`],nameservers:{type:e[`zone-defaults-nameservers-type`]}}}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(R,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Updated`});return}let h=p({enforce_dns_only:e[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:e[`zone-defaults-flatten-all-cnames`],foundation_dns:e[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:m(e[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:e[`zone-defaults-multi-provider`],ns_ttl:e[`zone-defaults-ns-ttl`],secondary_overrides:e[`zone-defaults-secondary-overrides`],soa:{expire:e[`zone-defaults-soa-expire`],min_ttl:e[`zone-defaults-soa-min-ttl`],mname:m(e[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:e[`zone-defaults-soa-refresh`],retry:e[`zone-defaults-soa-retry`],rname:m(e[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:e[`zone-defaults-soa-ttl`]},zone_mode:e[`zone-defaults-zone-mode`],nameservers:{type:e[`zone-defaults-nameservers-type`]}}}),g=await l(`Updating`,async()=>n.send(R,{body:h,account_or_zone:u,account_or_zone_id:d}));s(g,{successLabel:`Updated`})})};var Ze={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/dns_settings`};function Qe(e){return e.usage(`$0 dns settings account get
64
+ Update DNS settings for an account or zone
65
65
 
66
- Show DNS settings for an account or zone`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $e={command:`get`,describe:`Show DNS Settings`,builder:Qe,handler:async e=>u({command:`dns settings account get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf dns settings account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/dns_settings`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(Ze,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/dns_settings/nameserver_sets`,body:`json`};function et(e){return e.usage(`$0 dns settings account nameserver-sets create
66
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`enforce-dns-only`,{type:`boolean`,description:`When enabled, forces all proxied DNS records in the account to behave as DNS-only at the edge, regardless of each record's individual proxy setting. Note that this account-level override does not modify the records themselves; it only affects how they are served at the edge. See more on [Enforce DNS-only](https://developers.cloudflare.com/dns/proxy-status/enforce-dns-only).`}).option(`zone-defaults-flatten-all-cnames`,{type:`boolean`,description:`Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.`}).option(`zone-defaults-foundation-dns`,{type:`boolean`,description:`Deprecated. Use nameservers.type to configure Advanced Nameservers.`}).option(`zone-defaults-internal-dns-reference-zone-id`,{type:`string`,description:`The ID of the zone to fallback to.`}).option(`zone-defaults-multi-provider`,{type:`boolean`,description:`Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.`}).option(`zone-defaults-ns-ttl`,{type:`number`,description:`The time to live (TTL) of the zone's nameserver (NS) records.`}).option(`zone-defaults-secondary-overrides`,{type:`boolean`,description:`Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.`}).option(`zone-defaults-soa-expire`,{type:`number`,description:`Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.`}).option(`zone-defaults-soa-min-ttl`,{type:`number`,description:`The time to live (TTL) for negative caching of records within the zone.`}).option(`zone-defaults-soa-mname`,{type:`string`,description:`The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.`}).option(`zone-defaults-soa-refresh`,{type:`number`,description:`Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.`}).option(`zone-defaults-soa-retry`,{type:`number`,description:`Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.`}).option(`zone-defaults-soa-rname`,{type:`string`,description:`The email address of the zone administrator, with the first label representing the local part of the email address.`}).option(`zone-defaults-soa-ttl`,{type:`number`,description:`The time to live (TTL) of the SOA record itself.`}).option(`zone-defaults-zone-mode`,{type:`string`,description:`Whether the zone mode is a regular or CDN/DNS only zone.`,choices:[`standard`,`cdn_only`,`dns_only`]}).coerce(`zone-defaults-zone-mode`,e=>m(e,`zone-defaults-zone-mode`,`text`)).option(`zone-defaults-nameservers-type`,{type:`string`,description:`Nameserver type`,choices:[`cloudflare.standard`,`cloudflare.advanced`,`cloudflare.standard.random`,`custom.account`,`custom.tenant`]}).coerce(`zone-defaults-nameservers-type`,e=>m(e,`zone-defaults-nameservers-type`,`text`)).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 Xe={command:`edit`,describe:`Update DNS Settings`,builder:Ye,handler:async e=>u({command:`dns settings account edit`,classification:{safeFlags:[`enforce-dns-only`,`zone-defaults-flatten-all-cnames`,`zone-defaults-foundation-dns`,`zone-defaults-multi-provider`,`zone-defaults-secondary-overrides`,`zone-defaults-zone-mode`,`zone-defaults-nameservers-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf dns settings account edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/dns_settings`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:e.body===void 0?p({enforce_dns_only:e[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:e[`zone-defaults-flatten-all-cnames`],foundation_dns:e[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:m(e[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:e[`zone-defaults-multi-provider`],ns_ttl:e[`zone-defaults-ns-ttl`],secondary_overrides:e[`zone-defaults-secondary-overrides`],soa:{expire:e[`zone-defaults-soa-expire`],min_ttl:e[`zone-defaults-soa-min-ttl`],mname:m(e[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:e[`zone-defaults-soa-refresh`],retry:e[`zone-defaults-soa-retry`],rname:m(e[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:e[`zone-defaults-soa-ttl`]},zone_mode:e[`zone-defaults-zone-mode`],nameservers:{type:e[`zone-defaults-nameservers-type`]}}}):f(e.body)});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();if(u===`zones`?e.zoneId=d:e.accountId=d,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(R,{body:t,account_or_zone:u,account_or_zone_id:d}));s(r,{successLabel:`Updated`});return}let h=p({enforce_dns_only:e[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:e[`zone-defaults-flatten-all-cnames`],foundation_dns:e[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:m(e[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:e[`zone-defaults-multi-provider`],ns_ttl:e[`zone-defaults-ns-ttl`],secondary_overrides:e[`zone-defaults-secondary-overrides`],soa:{expire:e[`zone-defaults-soa-expire`],min_ttl:e[`zone-defaults-soa-min-ttl`],mname:m(e[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:e[`zone-defaults-soa-refresh`],retry:e[`zone-defaults-soa-retry`],rname:m(e[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:e[`zone-defaults-soa-ttl`]},zone_mode:e[`zone-defaults-zone-mode`],nameservers:{type:e[`zone-defaults-nameservers-type`]}}}),g=await l(`Updating`,async()=>n.send(R,{body:h,account_or_zone:u,account_or_zone_id:d}));s(g,{successLabel:`Updated`})})};var Ze={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/dns_settings`};function Qe(e){return e.usage(`$0 dns settings account get
67
67
 
68
- Creates a named Custom Nameserver Set. Only the customer-defined name can be changed later. To change nameservers or addresses, create a new set, move any zone assignments, and delete the old set.`).option(`advanced`,{type:`boolean`,description:`Whether to allocate the nameservers from distinct Advanced anycast groups.`,default:!1}).option(`ip-set`,{type:`number`,description:"Selects the account-specific IP set that supplies the nameserver addresses. Nameserver sets with the same `ip_set` and `advanced` value may reuse addresses; otherwise, they use disjoint address groups.",default:1}).option(`name`,{type:`string`,description:`Customer-defined name, unique within the account by exact string equality (case-sensitive, with no Unicode normalization). Must be valid UTF-8 and at most 255 UTF-8 bytes, not 255 characters. Only graphical Unicode characters are allowed; leading or trailing whitespace is rejected. The name can be changed without changing the set's nameservers or addresses.`}).option(`nameservers`,{type:`string`,description:`Lists each nameserver and the number of addresses to allocate to it. Requires a unique name for each entry in the set. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const tt={command:`create`,describe:`Create Custom Nameserver Set`,builder:et,handler:async e=>u({command:`dns settings account nameserver-sets create`,classification:{safeFlags:[`advanced`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf dns settings account nameserver-sets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_settings/nameserver_sets`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({advanced:e.advanced,ip_set:e[`ip-set`],name:m(e.name,`name`,`text`),nameservers:d(e.nameservers,`nameservers`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(z,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await g(`name`,`Customer-defined name, unique within the account by exact string equality (case-sensitive, with no Unicode normalization). Must be valid UTF-8 and at most 255 UTF-8 bytes, not 255 characters. Only graphical Unicode characters are allowed; leading or trailing whitespace is rejected. The name can be changed without changing the set's nameservers or addresses.`)),e.nameservers===void 0)throw Error(`--nameservers is required (or pass --body with this field set).`);let u=p({advanced:e.advanced,ip_set:e[`ip-set`],name:m(e.name,`name`,`text`),nameservers:d(e.nameservers,`nameservers`)}),h=await l(`Creating`,async()=>n.send(z,{body:u,account_id:a}));s(h,{successLabel:`Created`})})};var nt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dns_settings/nameserver_sets/${t.nameserver_set_id}`};function rt(e){return e.usage(`$0 dns settings account nameserver-sets delete <nameserver-set-id>
68
+ Show DNS settings for an account or zone
69
69
 
70
- Deletes an unassigned Custom Nameserver Set.`).positional(`nameserver-set-id`,{type:`string`,description:`Identifier for a nameserver set.`,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 it={command:`delete <nameserver-set-id>`,describe:`Delete Custom Nameserver Set`,builder:rt,handler:async e=>u({command:`dns settings account nameserver-sets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf dns settings account nameserver-sets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_settings/nameserver_sets/${e[`nameserver-set-id`]==null?`<nameserver-set-id>`:encodeURIComponent(String(e[`nameserver-set-id`]))}`,pathParams:{"nameserver-set-id":String(e[`nameserver-set-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(nt,{account_id:a,nameserver_set_id:e[`nameserver-set-id`]}));s(u,{successLabel:`Deleted`})})};var B={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dns_settings/nameserver_sets/${t.nameserver_set_id}`,body:`json`};function at(e){return e.usage(`$0 dns settings account nameserver-sets edit <nameserver-set-id>
70
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $e={command:`get`,describe:`Show DNS Settings`,builder:Qe,handler:async e=>u({command:`dns settings account get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf dns settings account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/dns_settings`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(Ze,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/dns_settings/nameserver_sets`,body:`json`};function et(e){return e.usage(`$0 dns settings account nameserver-sets create
71
+
72
+ Creates a named Custom Nameserver Set. Only the customer-defined name can be changed later. To change nameservers or addresses, create a new set, move any zone assignments, and delete the old set. For details, refer to [Nameserver sets](https://developers.cloudflare.com/dns/nameservers/custom-nameservers/nameserver-sets/).`).option(`advanced`,{type:`boolean`,description:`Whether to allocate the nameservers from distinct Advanced anycast groups.`,default:!1}).option(`ip-set`,{type:`number`,description:"Selects the account-specific IP set that supplies the nameserver addresses. Nameserver sets with the same `ip_set` and `advanced` value may reuse addresses; otherwise, they use disjoint address groups.",default:1}).option(`name`,{type:`string`,description:`Customer-defined name, unique within the account by exact string equality (case-sensitive, with no Unicode normalization). Must be valid UTF-8 and at most 255 UTF-8 bytes, not 255 characters. Only graphical Unicode characters are allowed; leading or trailing whitespace is rejected. The name can be changed without changing the set's nameservers or addresses.`}).option(`nameservers`,{type:`string`,description:`Lists each nameserver and the number of addresses to allocate to it. Requires a unique name for each entry in the set. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const tt={command:`create`,describe:`Create Custom Nameserver Set`,builder:et,handler:async e=>u({command:`dns settings account nameserver-sets create`,classification:{safeFlags:[`advanced`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf dns settings account nameserver-sets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_settings/nameserver_sets`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({advanced:e.advanced,ip_set:e[`ip-set`],name:m(e.name,`name`,`text`),nameservers:d(e.nameservers,`nameservers`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(z,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await g(`name`,`Customer-defined name, unique within the account by exact string equality (case-sensitive, with no Unicode normalization). Must be valid UTF-8 and at most 255 UTF-8 bytes, not 255 characters. Only graphical Unicode characters are allowed; leading or trailing whitespace is rejected. The name can be changed without changing the set's nameservers or addresses.`)),e.nameservers===void 0)throw Error(`--nameservers is required (or pass --body with this field set).`);let u=p({advanced:e.advanced,ip_set:e[`ip-set`],name:m(e.name,`name`,`text`),nameservers:d(e.nameservers,`nameservers`)}),h=await l(`Creating`,async()=>n.send(z,{body:u,account_id:a}));s(h,{successLabel:`Created`})})};var nt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dns_settings/nameserver_sets/${t.nameserver_set_id}`};function rt(e){return e.usage(`$0 dns settings account nameserver-sets delete <nameserver-set-id>
73
+
74
+ Deletes an unassigned Custom Nameserver Set. For details, refer to [Nameserver sets](https://developers.cloudflare.com/dns/nameservers/custom-nameservers/nameserver-sets/).`).positional(`nameserver-set-id`,{type:`string`,description:`Identifier for a nameserver set.`,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 it={command:`delete <nameserver-set-id>`,describe:`Delete Custom Nameserver Set`,builder:rt,handler:async e=>u({command:`dns settings account nameserver-sets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf dns settings account nameserver-sets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_settings/nameserver_sets/${e[`nameserver-set-id`]==null?`<nameserver-set-id>`:encodeURIComponent(String(e[`nameserver-set-id`]))}`,pathParams:{"nameserver-set-id":String(e[`nameserver-set-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await _({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send(nt,{account_id:a,nameserver_set_id:e[`nameserver-set-id`]}));s(u,{successLabel:`Deleted`})})};var B={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/dns_settings/nameserver_sets/${t.nameserver_set_id}`,body:`json`};function at(e){return e.usage(`$0 dns settings account nameserver-sets edit <nameserver-set-id>
71
75
 
72
76
  Renames a Custom Nameserver Set owned by the account. Only name may be supplied; immutable and unknown fields are rejected even if unchanged. An empty object or the existing name is a successful no-op. Requires the account-scoped creation entitlements for the existing set.`).positional(`nameserver-set-id`,{type:`string`,description:`Identifier for a nameserver set.`,demandOption:!0}).option(`name`,{type:`string`,description:`Customer-defined name, unique within the account by exact string equality (case-sensitive, with no Unicode normalization). Must be valid UTF-8 and at most 255 UTF-8 bytes, not 255 characters. Only graphical Unicode characters are allowed; leading or trailing whitespace is rejected. The name can be changed without changing the set's nameservers or addresses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Updates only the customer-defined name. All other fields are rejected, even if unchanged. An empty object or the current name succeeds without changing the set. A null name is invalid. Requires the account-scoped creation entitlements, including eligibility for the set's current IP set and the Advanced entitlement for an Advanced set.`})}const ot={command:`edit <nameserver-set-id>`,describe:`Update Custom Nameserver Set`,builder:at,handler:async e=>u({command:`dns settings account nameserver-sets edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf dns settings account nameserver-sets edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_settings/nameserver_sets/${e[`nameserver-set-id`]==null?`<nameserver-set-id>`:encodeURIComponent(String(e[`nameserver-set-id`]))}`,pathParams:{"nameserver-set-id":String(e[`nameserver-set-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Updating`,async()=>n.send(B,{body:t,account_id:a,nameserver_set_id:e[`nameserver-set-id`]}));s(r,{successLabel:`Updated`});return}let u=p({name:m(e.name,`name`,`text`)}),d=await l(`Updating`,async()=>n.send(B,{body:u,account_id:a,nameserver_set_id:e[`nameserver-set-id`]}));s(d,{successLabel:`Updated`})})};var st={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_settings/nameserver_sets/${t.nameserver_set_id}`};function ct(e){return e.usage(`$0 dns settings account nameserver-sets get <nameserver-set-id>
73
77
 
74
- Gets a Custom Nameserver Set owned by an account.`).positional(`nameserver-set-id`,{type:`string`,description:`Identifier for a nameserver set.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lt={command:`get <nameserver-set-id>`,describe:`Get Custom Nameserver Set`,builder:ct,handler:async e=>u({command:`dns settings account nameserver-sets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf dns settings account nameserver-sets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_settings/nameserver_sets/${e[`nameserver-set-id`]==null?`<nameserver-set-id>`:encodeURIComponent(String(e[`nameserver-set-id`]))}`,pathParams:{"nameserver-set-id":String(e[`nameserver-set-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(st,{account_id:a,nameserver_set_id:e[`nameserver-set-id`]}));s(u,{successLabel:`Loaded`})})};var ut={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_settings/nameserver_sets`,query:[`page`,`per_page`]};function dt(e){return e.usage(`$0 dns settings account nameserver-sets list
78
+ Gets a Custom Nameserver Set owned by an account. For details, refer to [Nameserver sets](https://developers.cloudflare.com/dns/nameservers/custom-nameservers/nameserver-sets/).`).positional(`nameserver-set-id`,{type:`string`,description:`Identifier for a nameserver set.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const lt={command:`get <nameserver-set-id>`,describe:`Get Custom Nameserver Set`,builder:ct,handler:async e=>u({command:`dns settings account nameserver-sets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf dns settings account nameserver-sets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_settings/nameserver_sets/${e[`nameserver-set-id`]==null?`<nameserver-set-id>`:encodeURIComponent(String(e[`nameserver-set-id`]))}`,pathParams:{"nameserver-set-id":String(e[`nameserver-set-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(st,{account_id:a,nameserver_set_id:e[`nameserver-set-id`]}));s(u,{successLabel:`Loaded`})})};var ut={method:`GET`,path:t=>e`/accounts/${t.account_id}/dns_settings/nameserver_sets`,query:[`page`,`per_page`]};function dt(e){return e.usage(`$0 dns settings account nameserver-sets list
75
79
 
76
- Lists an account's Custom Nameserver Sets.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ft={command:`list`,describe:`List Custom Nameserver Sets`,builder:dt,handler:async e=>u({command:`dns settings account nameserver-sets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf dns settings account nameserver-sets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/nameserver_sets`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(ut,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},pt={command:`nameserver-sets`,describe:`Operations for settings.account.nameserver-sets`,builder:e=>e.command(tt).command(it).command(ot).command(lt).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/dns_settings/views`,body:`json`};function mt(e){return e.usage(`$0 dns settings account views create
80
+ Lists an account's Custom Nameserver Sets. For details, refer to [Nameserver sets](https://developers.cloudflare.com/dns/nameservers/custom-nameservers/nameserver-sets/).`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ft={command:`list`,describe:`List Custom Nameserver Sets`,builder:dt,handler:async e=>u({command:`dns settings account nameserver-sets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf dns settings account nameserver-sets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/nameserver_sets`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(ut,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},pt={command:`nameserver-sets`,describe:`Operations for settings.account.nameserver-sets`,builder:e=>e.command(tt).command(it).command(ot).command(lt).command(ft).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/dns_settings/views`,body:`json`};function mt(e){return e.usage(`$0 dns settings account views create
77
81
 
78
82
  Create Internal DNS View for an account`).option(`name`,{type:`string`,description:`The name of the view.`}).option(`zones`,{type:`string`,array:!0,description:`The list of zones linked to this view.`}).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 ht={command:`create`,describe:`Create Internal DNS View`,builder:mt,handler:async e=>u({command:`dns settings account views create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf dns settings account views create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/dns_settings/views`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),zones:e.zones}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(V,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await g(`name`,`The name of the view.`)),e.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let u=p({name:m(e.name,`name`,`text`),zones:e.zones}),d=await l(`Creating`,async()=>n.send(V,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var gt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/dns_settings/views/${t.view_id}`};function _t(e){return e.usage(`$0 dns settings account views delete <view-id>
79
83
 
@@ -85,7 +89,9 @@ Get DNS Internal View`).positional(`view-id`,{type:`string`,description:`Identif
85
89
 
86
90
  List DNS Internal Views for an Account`).option(`name`,{type:`string`,description:"Exact value of the DNS view name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS view name.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS view name.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS view name.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS view name.`}).option(`zone-id`,{type:`string`,description:`A zone ID that exists in the zones list for the view.`}).option(`zone-name`,{type:`string`,description:`A zone name that exists in the zones list for the view.`}).option(`match`,{type:`string`,description:"Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`order`,{type:`string`,description:`Field to order DNS views by.`,choices:[`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order DNS views in.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Et={command:`list`,describe:`List Internal DNS Views`,builder:Tt,handler:async e=>u({command:`dns settings account views list`,classification:{safeFlags:[`match`,`order`,`direction`,`dry-run`]}},e,async()=>{let n={name:e.name,"name.exact":e[`name-exact`],"name.contains":e[`name-contains`],"name.startswith":e[`name-startswith`],"name.endswith":e[`name-endswith`],zone_id:e[`zone-id`],zone_name:e[`zone-name`],match:e.match,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();c({command:`cf dns settings account views list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/views`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(wt,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Dt={command:`views`,describe:`Operations for settings.account.views`,builder:e=>e.command(ht).command(vt).command(bt).command(Ct).command(Et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ot={command:`account`,describe:`Operations for settings.account`,builder:e=>e.command(Xe).command($e).command(pt).command(Dt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},kt={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var At={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/dns_records/usage`};function jt(e){return e.usage(`$0 dns usage account get
87
91
 
88
- Get the current DNS record usage and quota for an account or zone. May include internal DNS usage and quota.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`get`,describe:`Get DNS Record Usage for account or zone`,builder:jt,handler:async e=>u({command:`dns usage account get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf dns usage account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/dns_records/usage`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(At,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})},Nt={command:`account`,describe:`Operations for usage.account`,builder:e=>e.command(Mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pt={command:`usage`,describe:`Operations for usage`,builder:e=>e.command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/secondary_dns/acls`,body:`json`};function Ft(e){return e.usage(`$0 dns zone-transfers acls create
92
+ Get the current DNS record usage and quota for an account or zone. May include internal DNS usage and quota.
93
+
94
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Mt={command:`get`,describe:`Get DNS Record Usage for account or zone`,builder:jt,handler:async e=>u({command:`dns usage account get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf dns usage account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/dns_records/usage`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(At,{account_or_zone:u,account_or_zone_id:d}));s(f,{successLabel:`Loaded`})})},Nt={command:`account`,describe:`Operations for usage.account`,builder:e=>e.command(Mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pt={command:`usage`,describe:`Operations for usage`,builder:e=>e.command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/secondary_dns/acls`,body:`json`};function Ft(e){return e.usage(`$0 dns zone-transfers acls create
89
95
 
90
96
  Create ACL.`).option(`ip-range`,{type:`string`,description:`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`}).option(`name`,{type:`string`,description:`The name of the acl.`}).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 It={command:`create`,describe:`Create ACL`,builder:Ft,handler:async e=>u({command:`dns zone-transfers acls create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf dns zone-transfers acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/secondary_dns/acls`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({ip_range:m(e[`ip-range`],`ip-range`,`text`),name:m(e.name,`name`,`text`)}):f(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=f(e.body),r=await l(`Creating`,async()=>n.send(U,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e[`ip-range`]===void 0&&(e[`ip-range`]=await g(`ip-range`,`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`)),e.name===void 0&&(e.name=await g(`name`,`The name of the acl.`));let u=p({ip_range:m(e[`ip-range`],`ip-range`,`text`),name:m(e.name,`name`,`text`)}),d=await l(`Creating`,async()=>n.send(U,{body:u,account_id:a}));s(d,{successLabel:`Created`})})};var Lt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/secondary_dns/acls/${t.acl_id}`};function Rt(e){return e.usage(`$0 dns zone-transfers acls delete <acl-id>
91
97
 
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{n as e}from"./request-headers-Cn01EsbI.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./run-Br8sYjNF.mjs";const r=`https://developers.cloudflare.com`;function i(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function a(e){return i(e)?e.success===!1?e.error===void 0||typeof e.error==`string`:e.success===!0&&i(e.result)&&Array.isArray(e.result.chunks)&&e.result.chunks.every(e=>{if(!i(e)||!i(e.item)||typeof e.item.key!=`string`||e.item.key.length===0)return!1;let t=e.item.metadata;return t===void 0||i(t)&&(t.title===void 0||typeof t.title==`string`)&&(t.description===void 0||typeof t.description==`string`)}):!1}function o(e){let t;try{t=new URL(e,`${r}/`)}catch{throw Error(`Cloudflare docs search returned an invalid URL.`)}if(t.origin!==r||t.username||t.password)throw Error(`Cloudflare docs search returned an invalid URL.`);return t.href}async function s(t){let n=AbortSignal.timeout(3e4),r;try{r=await fetch(`https://ai-search.developers.cloudflare.com/api/ai-search/search`,{method:`POST`,headers:{...e(),"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({messages:[{role:`user`,content:t}],stream:!1,ai_search_options:{retrieval:{metadata_only:!0,max_num_results:5}}}),signal:n})}catch(e){throw Error(n.aborted?`Cloudflare docs search timed out. Try again.`:`Unable to reach Cloudflare docs search. Check your connection and try again.`,{cause:e})}if(!r.ok)throw Error(`Cloudflare docs search failed (HTTP ${r.status}).`);let i;try{i=await r.json()}catch(e){throw Error(n.aborted?`Cloudflare docs search timed out. Try again.`:`Cloudflare docs search returned an invalid JSON response.`,{cause:e})}if(!a(i))throw Error(`Cloudflare docs search returned an invalid response.`);if(!i.success)throw Error(`Cloudflare docs search failed: ${i.error??`Unknown error`}`);return i.result.chunks.slice(0,5).map(({item:e})=>({title:e.metadata?.title??`Untitled`,description:e.metadata?.description??``,url:o(e.key)}))}const c={command:`search <query>`,describe:`Search live Cloudflare documentation, guides, tutorials, and examples`,builder:e=>e.positional(`query`,{describe:`Search terms or a question about Cloudflare`,type:`string`,demandOption:!0,coerce:e=>{let t=e.trim();if(!t)throw Error(`query must not be empty.`);return t}}).example(`cf docs search "schedule a worker"`,`Find guides and examples`).epilogue(`Returns up to five ranked JSON results with title, description, and url. No Cloudflare login is required.
2
+ import{n as e}from"./request-headers-CoxHUNcB.mjs";import{t}from"./output-BJEgbI0G.mjs";import{t as n}from"./run-Ciw_GIrC.mjs";const r=`https://developers.cloudflare.com`;function i(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function a(e){return i(e)?e.success===!1?e.error===void 0||typeof e.error==`string`:e.success===!0&&i(e.result)&&Array.isArray(e.result.chunks)&&e.result.chunks.every(e=>{if(!i(e)||!i(e.item)||typeof e.item.key!=`string`||e.item.key.length===0)return!1;let t=e.item.metadata;return t===void 0||i(t)&&(t.title===void 0||typeof t.title==`string`)&&(t.description===void 0||typeof t.description==`string`)}):!1}function o(e){let t;try{t=new URL(e,`${r}/`)}catch{throw Error(`Cloudflare docs search returned an invalid URL.`)}if(t.origin!==r||t.username||t.password)throw Error(`Cloudflare docs search returned an invalid URL.`);return t.href}async function s(t){let n=AbortSignal.timeout(3e4),r;try{r=await fetch(`https://ai-search.developers.cloudflare.com/api/ai-search/search`,{method:`POST`,headers:{...e(),"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({messages:[{role:`user`,content:t}],stream:!1,ai_search_options:{retrieval:{metadata_only:!0,max_num_results:5}}}),signal:n})}catch(e){throw Error(n.aborted?`Cloudflare docs search timed out. Try again.`:`Unable to reach Cloudflare docs search. Check your connection and try again.`,{cause:e})}if(!r.ok)throw Error(`Cloudflare docs search failed (HTTP ${r.status}).`);let i;try{i=await r.json()}catch(e){throw Error(n.aborted?`Cloudflare docs search timed out. Try again.`:`Cloudflare docs search returned an invalid JSON response.`,{cause:e})}if(!a(i))throw Error(`Cloudflare docs search returned an invalid response.`);if(!i.success)throw Error(`Cloudflare docs search failed: ${i.error??`Unknown error`}`);return i.result.chunks.slice(0,5).map(({item:e})=>({title:e.metadata?.title??`Untitled`,description:e.metadata?.description??``,url:o(e.key)}))}const c={command:`search <query>`,describe:`Search live Cloudflare documentation, guides, tutorials, and examples`,builder:e=>e.positional(`query`,{describe:`Search terms or a question about Cloudflare`,type:`string`,demandOption:!0,coerce:e=>{let t=e.trim();if(!t)throw Error(`query must not be empty.`);return t}}).example(`cf docs search "schedule a worker"`,`Find guides and examples`).epilogue(`Returns up to five ranked JSON results with title, description, and url. No Cloudflare login is required.
3
3
  Fetch a result's URL with Accept: text/markdown to read the full page as Markdown.`),handler:e=>n({command:`docs search`,recordArgs:!1,searchQuery:e.query},e,async()=>{t(await s(e.query))})},l={command:`docs`,describe:`Search live Cloudflare documentation`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{n as e,t}from"./rolldown-runtime-BNtqjh-B.mjs";import{a as n,r,t as i}from"./chunk-U6NEESU5-DqqRCaWH.mjs";import{N as a}from"./chunk-2HLTAS5V-B92NbX1j.mjs";import{createRequire as o}from"node:module";import*as s from"node:path";import*as c from"node:fs/promises";var l=/* @__PURE__ */ t(((e,t)=>{t.exports={name:`dotenv`,version:`16.3.1`,description:`Loads environment variables from .env file`,main:`lib/main.js`,types:`lib/main.d.ts`,exports:{".":{types:`./lib/main.d.ts`,require:`./lib/main.js`,default:`./lib/main.js`},"./config":`./config.js`,"./config.js":`./config.js`,"./lib/env-options":`./lib/env-options.js`,"./lib/env-options.js":`./lib/env-options.js`,"./lib/cli-options":`./lib/cli-options.js`,"./lib/cli-options.js":`./lib/cli-options.js`,"./package.json":`./package.json`},scripts:{"dts-check":`tsc --project tests/types/tsconfig.json`,lint:`standard`,"lint-readme":`standard-markdown`,pretest:`npm run lint && npm run dts-check`,test:`tap tests/*.js --100 -Rspec`,prerelease:`npm test`,release:`standard-version`},repository:{type:`git`,url:`git://github.com/motdotla/dotenv.git`},funding:`https://github.com/motdotla/dotenv?sponsor=1`,keywords:[`dotenv`,`env`,`.env`,`environment`,`variables`,`config`,`settings`],readmeFilename:`README.md`,license:`BSD-2-Clause`,devDependencies:{"@definitelytyped/dtslint":`^0.0.133`,"@types/node":`^18.11.3`,decache:`^4.6.1`,sinon:`^14.0.1`,standard:`^17.0.0`,"standard-markdown":`^7.1.0`,"standard-version":`^9.5.0`,tap:`^16.3.0`,tar:`^6.1.11`,typescript:`^4.8.4`},engines:{node:`>=12`},browser:{fs:!1}}})),u=/* @__PURE__ */ t(((t,n)=>{let r=e(`fs`),i=e(`path`),a=e(`os`),o=e(`crypto`),s=l().version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function u(e){let t={},n=e.toString();n=n.replace(/\r\n?/gm,`
2
+ import{n as e,t}from"./rolldown-runtime-BNtqjh-B.mjs";import{a as n,r,t as i}from"./chunk-U6NEESU5-DqqRCaWH.mjs";import{N as a}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{createRequire as o}from"node:module";import*as s from"node:path";import*as c from"node:fs/promises";var l=/* @__PURE__ */ t(((e,t)=>{t.exports={name:`dotenv`,version:`16.3.1`,description:`Loads environment variables from .env file`,main:`lib/main.js`,types:`lib/main.d.ts`,exports:{".":{types:`./lib/main.d.ts`,require:`./lib/main.js`,default:`./lib/main.js`},"./config":`./config.js`,"./config.js":`./config.js`,"./lib/env-options":`./lib/env-options.js`,"./lib/env-options.js":`./lib/env-options.js`,"./lib/cli-options":`./lib/cli-options.js`,"./lib/cli-options.js":`./lib/cli-options.js`,"./package.json":`./package.json`},scripts:{"dts-check":`tsc --project tests/types/tsconfig.json`,lint:`standard`,"lint-readme":`standard-markdown`,pretest:`npm run lint && npm run dts-check`,test:`tap tests/*.js --100 -Rspec`,prerelease:`npm test`,release:`standard-version`},repository:{type:`git`,url:`git://github.com/motdotla/dotenv.git`},funding:`https://github.com/motdotla/dotenv?sponsor=1`,keywords:[`dotenv`,`env`,`.env`,`environment`,`variables`,`config`,`settings`],readmeFilename:`README.md`,license:`BSD-2-Clause`,devDependencies:{"@definitelytyped/dtslint":`^0.0.133`,"@types/node":`^18.11.3`,decache:`^4.6.1`,sinon:`^14.0.1`,standard:`^17.0.0`,"standard-markdown":`^7.1.0`,"standard-version":`^9.5.0`,tap:`^16.3.0`,tar:`^6.1.11`,typescript:`^4.8.4`},engines:{node:`>=12`},browser:{fs:!1}}})),u=/* @__PURE__ */ t(((t,n)=>{let r=e(`fs`),i=e(`path`),a=e(`os`),o=e(`crypto`),s=l().version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function u(e){let t={},n=e.toString();n=n.replace(/\r\n?/gm,`
3
3
  `);let r;for(;(r=c.exec(n))!=null;){let e=r[1],n=r[2]||``;n=n.trim();let i=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/gm,`$2`),i===`"`&&(n=n.replace(/\\n/g,`
4
4
  `),n=n.replace(/\\r/g,`\r`)),t[e]=n}return t}function d(e){let t=_(e),n=w.configDotenv({path:t});if(!n.parsed)throw Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);let r=h(e).split(`,`),i=r.length,a;for(let e=0;e<i;e++)try{let t=g(n,r[e].trim());a=w.decrypt(t.ciphertext,t.key);break}catch(t){if(e+1>=i)throw t}return w.parse(a)}function f(e){console.log(`[dotenv@${s}][INFO] ${e}`)}function p(e){console.log(`[dotenv@${s}][WARN] ${e}`)}function m(e){console.log(`[dotenv@${s}][DEBUG] ${e}`)}function h(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:``}function g(e,t){let n;try{n=new URL(t)}catch(e){throw e.code===`ERR_INVALID_URL`?Error(`INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development`):e}let r=n.password;if(!r)throw Error(`INVALID_DOTENV_KEY: Missing key part`);let i=n.searchParams.get(`environment`);if(!i)throw Error(`INVALID_DOTENV_KEY: Missing environment part`);let a=`DOTENV_VAULT_${i.toUpperCase()}`,o=e.parsed[a];if(!o)throw Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);return{ciphertext:o,key:r}}function _(e){let t=i.resolve(process.cwd(),`.env`);return e&&e.path&&e.path.length>0&&(t=e.path),t.endsWith(`.vault`)?t:`${t}.vault`}function v(e){return e[0]===`~`?i.join(a.homedir(),e.slice(1)):e}function y(e){f(`Loading env from encrypted .env.vault`);let t=w._parseVault(e),n=process.env;return e&&e.processEnv!=null&&(n=e.processEnv),w.populate(n,t,e),{parsed:t}}function b(e){let t=i.resolve(process.cwd(),`.env`),n=`utf8`,a=!!(e&&e.debug);e&&(e.path!=null&&(t=v(e.path)),e.encoding!=null&&(n=e.encoding));try{let i=w.parse(r.readFileSync(t,{encoding:n})),a=process.env;return e&&e.processEnv!=null&&(a=e.processEnv),w.populate(a,i,e),{parsed:i}}catch(e){return a&&m(`Failed to load ${t} ${e.message}`),{error:e}}}function x(e){let t=_(e);return h(e).length===0?w.configDotenv(e):r.existsSync(t)?w._configVault(e):(p(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),w.configDotenv(e))}function S(e,t){let n=Buffer.from(t.slice(-64),`hex`),r=Buffer.from(e,`base64`),i=r.slice(0,12),a=r.slice(-16);r=r.slice(12,-16);try{let e=o.createDecipheriv(`aes-256-gcm`,n,i);return e.setAuthTag(a),`${e.update(r)}${e.final()}`}catch(e){let t=e instanceof RangeError,n=e.message===`Invalid key length`,r=e.message===`Unsupported state or unable to authenticate data`;throw t||n?Error(`INVALID_DOTENV_KEY: It must be 64 characters long (or more)`):r?Error(`DECRYPTION_FAILED: Please check your DOTENV_KEY`):(console.error(`Error: `,e.code),console.error(`Error: `,e.message),e)}}function C(e,t,n={}){let r=!!(n&&n.debug),i=!!(n&&n.override);if(typeof t!=`object`)throw Error(`OBJECT_REQUIRED: Please check the processEnv argument being passed to populate`);for(let n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(i===!0&&(e[n]=t[n]),r&&m(i===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}let w={configDotenv:b,_configVault:y,_parseVault:d,config:x,decrypt:S,parse:u,populate:C};n.exports.configDotenv=w.configDotenv,n.exports._configVault=w._configVault,n.exports._parseVault=w._parseVault,n.exports.config=w.config,n.exports.decrypt=w.decrypt,n.exports.parse=w.parse,n.exports.populate=w.populate,n.exports=w})),d=u();o(import.meta.url||(typeof __filename==`string`?__filename:`/`));var f=i({"../../node_modules/.pnpm/dotenv-expand@13.0.0/node_modules/dotenv-expand/lib/main.js"(e,t){function n(e){return e.replace(/\\\$/g,`$`)}r(n,`_resolveEscapeSequences`);function i(e,t,n){let r={...n,...t},i=/(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g,a=e,o,s=/* @__PURE__ */ new Set;for(;(o=i.exec(a))!==null;){s.add(a);let[e,t,c]=o,l=t||c,u=l.match(/(:\+|\+|:-|-)/),d=u?u[0]:null,f=l.split(d),p,m,h=f.shift();if([`:+`,`+`].includes(d)?(p=r[h]?f.join(d):``,m=null):(p=f.join(d),m=r[h]),a=m?s.has(m)?a.replace(e,p):a.replace(e,m):a.replace(e,p),a===n[h])break;i.lastIndex=0}return a}r(i,`expandValue`);function a(e){let t={},r=process.env;e&&e.processEnv!=null&&(r=e.processEnv);for(let a in e.parsed){let o=e.parsed[a];o=r[a]&&r[a]!==o?r[a]:i(o,r,t),e.parsed[a]=n(o),t[a]=n(o)}for(let t in e.parsed)r[t]=e.parsed[t];return e}r(a,`expand`),t.exports.expand=a}}),p=n(f());function m(){let e=/* @__PURE__ */ new Map,t={},n=/* @__PURE__ */ r(e=>typeof e==`string`?e.toLowerCase():e,`canonical`);return new Proxy(t,{get(t,r,i){let a=e.get(n(r));return a===void 0?void 0:Reflect.get(t,a,i)},set(t,r,i,a){let o=n(r),s=e.get(o);return s!==void 0&&s!==r&&Reflect.deleteProperty(t,s),e.set(o,r),Reflect.set(t,r,i,a)},has(t,r){let i=e.get(n(r));return i!==void 0&&Reflect.has(t,i)},getOwnPropertyDescriptor(t,r){let i=e.get(n(r));return i===void 0?void 0:Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(t,r,i){let a=n(r),o=e.get(a);return o!==void 0&&o!==r&&Reflect.deleteProperty(t,o),e.set(a,r),Reflect.defineProperty(t,r,i)},deleteProperty(t,r){let i=n(r),a=e.get(i);return e.delete(i),a===void 0?Reflect.deleteProperty(t,r):Reflect.deleteProperty(t,a)}})}r(m,`caseInsensitiveEnv`);function h(e,t=process.env){return g((0,d.parse)(e),t)}r(h,`parseAndExpandDotEnv`);function g(e,t){let n={...e},r=Object.keys(n),i=C(t);(0,p.expand)({parsed:n,processEnv:C(t)});for(let e of r)Object.hasOwn(i,e)&&(n[e]=i[e]);return n}r(g,`expandParsedDotEnv`);function _(e,t){return e===!1?[]:[`.env`,`.env.local`,...t===void 0?[]:[`.env.${t}`,`.env.${t}.local`]].map(t=>s.resolve(e,t))}r(_,`getEnvPaths`);function v(e,t){return e===!1?[]:[...t===void 0?[]:[`.dev.vars.${t}`],`.dev.vars`].map(t=>s.resolve(e,t))}r(v,`getDevVarsCandidatePaths`);async function y(e,t){if(t===`local`)throw Error(`"local" cannot be used as a mode name because it conflicts with the .local postfix for .env files.`);let n=_(e,t),r={},i={};for(let e of n){let t=await x(e,d.parse);if(t!==void 0)for(let[e,n]of Object.entries(t.values))r[e]=n,i[e]={type:`file`,path:t.path}}let a=C(process.env),o=g(r,a),s={...i};for(let[e,t]of Object.entries(a))o[e]=t,s[e]={type:`process`};return{values:o,sources:s}}r(y,`loadEnv`);async function b(e,t){let n=v(e,t);for(let e of n){let t=await x(e,d.parse);if(t!==void 0)return t.values}}r(b,`loadDevVars`);async function x(e,t){try{let n=await c.stat(e);return!n.isFile()&&!n.isFIFO()?void 0:{path:e,values:t(await c.readFile(e,`utf8`))}}catch(e){if(S(e))return;throw e}}r(x,`tryParseFile`);function S(e){return e instanceof Error&&`code`in e&&(e.code===`ENOENT`||e.code===`ENOTDIR`)}r(S,`isMissingFileError`);function C(e){let t=process.platform===`win32`?m():{};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}r(C,`copyProcessEnv`);const w=`CLOUDFLARE_DEPENDENCIES_INSTRUMENTATION`;function T(e){let t=process.env[w];if(t===void 0)return e;let n=t.toLowerCase();if(n!==`true`&&n!==`false`)throw new a(`Expected ${w} to be "true" or "false", but got ${JSON.stringify(t)}`,{telemetryMessage:!1});return{...e,dependencies_instrumentation:{...e.dependencies_instrumentation,enabled:n===`true`}}}const E=/* @__PURE__ */ new Set([`CLOUDFLARE_ACCESS_CLIENT_ID`,`CLOUDFLARE_ACCESS_CLIENT_SECRET`,`CLOUDFLARE_ACCOUNT_ID`,`CLOUDFLARE_API_TOKEN`,`CLOUDFLARE_COMPLIANCE_REGION`,w,`CLOUDFLARE_ZONE_ID`,`WRANGLER_API_ENVIRONMENT`]);function D(e){return E.has(e)}async function O(e={}){if(e.local)return()=>{};let t=await y(process.cwd(),e.mode),n=[];for(let[e,r]of Object.entries(t.values))D(e)&&t.sources[e]?.type===`file`&&(process.env[e]=r,n.push(e));return()=>{for(let e of n)delete process.env[e]}}async function k(e,t){let n=await O(e);try{return await t()}finally{n()}}const A=/* @__PURE__ */ new Set(/* @__PURE__ */ `access curl.access login.access rdp.access smb.access ssh.access ssh-config.access ssh-gen.access tcp.access token.build.dev.docs.docs search.init.init workers.migrate.tunnels diag.tunnels login.tunnels quick-start.tunnels ready.tunnels tail.workers check.workers types.deploy.previews deploy.tunnels run.workers triggers deploy.workers versions create`.split(`.`));function j(e,t){return!t&&!A.has(e)}export{h as a,T as i,j as n,u as o,k as r,O as t};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/durable_objects/namespaces`,query:[`page`,`per_page`]};function u(e){return e.usage(`$0 durable-objects namespaces list
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/durable_objects/namespaces`,query:[`page`,`per_page`]};function u(e){return e.usage(`$0 durable-objects namespaces list
3
3
 
4
4
  Returns the Durable Object namespaces owned by an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`list`,describe:`List Durable Object Namespaces`,builder:u,handler:async e=>c({command:`durable-objects namespaces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf durable-objects namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/durable_objects/namespaces`,pathParams:{},query:c,bodyKind:`none`});return}let u=await n(e),d=e.local?t:await i();e.accountId=d;let f=await s(`Loading`,async()=>u.send(l,{account_id:d,...c}));a(f,{successLabel:`Loaded`})})};var f={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/durable_objects/namespaces/${t.id}/objects`,query:[`limit`,`cursor`]};function p(e){return e.usage(`$0 durable-objects namespaces objects list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-CB9wjyad.mjs";import{i as n}from"./context-DCon1tRZ.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-_Jux05O5.mjs";import{t as o}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";var l={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/email/auth/dmarc-reports`,body:`json`};function u(e){return e.usage("$0 email-auth dmarc-reports edit\n\nUpdates the DMARC report configuration for a zone. At least one of `enabled` or `skip_wizard` must be provided. When enabling, the handler will ensure the DMARC RUA record exists in DNS.").option(`enabled`,{type:`boolean`,description:`Enable or disable DMARC reports for this zone`}).option(`skip-wizard`,{type:`boolean`,description:`Skip the DMARC setup wizard`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for PATCH /dmarc-reports`})}const d={command:`edit`,describe:`Configure DMARC Reports`,builder:u,handler:async e=>o({command:`email-auth dmarc-reports edit`,classification:{safeFlags:[`enabled`,`skip-wizard`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf email-auth dmarc-reports edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({enabled:e.enabled,skip_wizard:e[`skip-wizard`]}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(l,{body:t,zone_id:u}));r(n,{successLabel:`Updated`});return}let d=c({enabled:e.enabled,skip_wizard:e[`skip-wizard`]}),f=await a(`Updating`,async()=>o.send(l,{body:d,zone_id:u}));r(f,{successLabel:`Updated`})})};var f={method:`GET`,path:t=>e`/zones/${t.zone_id}/email/auth/dmarc-reports`};function p(e){return e.usage(`$0 email-auth dmarc-reports get
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as s,t as c}from"./body-parser-BKcZS9iJ.mjs";var l={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/email/auth/dmarc-reports`,body:`json`};function u(e){return e.usage("$0 email-auth dmarc-reports edit\n\nUpdates the DMARC report configuration for a zone. At least one of `enabled` or `skip_wizard` must be provided. When enabling, the handler will ensure the DMARC RUA record exists in DNS.").option(`enabled`,{type:`boolean`,description:`Enable or disable DMARC reports for this zone`}).option(`skip-wizard`,{type:`boolean`,description:`Skip the DMARC setup wizard`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for PATCH /dmarc-reports`})}const d={command:`edit`,describe:`Configure DMARC Reports`,builder:u,handler:async e=>o({command:`email-auth dmarc-reports edit`,classification:{safeFlags:[`enabled`,`skip-wizard`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf email-auth dmarc-reports edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({enabled:e.enabled,skip_wizard:e[`skip-wizard`]}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(l,{body:t,zone_id:u}));r(n,{successLabel:`Updated`});return}let d=c({enabled:e.enabled,skip_wizard:e[`skip-wizard`]}),f=await a(`Updating`,async()=>o.send(l,{body:d,zone_id:u}));r(f,{successLabel:`Updated`})})};var f={method:`GET`,path:t=>e`/zones/${t.zone_id}/email/auth/dmarc-reports`};function p(e){return e.usage(`$0 email-auth dmarc-reports get
3
3
 
4
4
  Retrieves the current DMARC report configuration and status for a zone. Returns the RUA prefix, enabled status, approved sources, and DNS records.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get`,describe:`Get DMARC Report Status`,builder:p,handler:async e=>o({command:`email-auth dmarc-reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf email-auth dmarc-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/auth/dmarc-reports`,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(f,{zone_id:s}));r(c,{successLabel:`Loaded`})})},h={command:`dmarc-reports`,describe:`Operations for dmarc-reports`,builder:e=>e.command(d).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var g={method:`GET`,path:t=>e`/zones/${t.zone_id}/email/auth/spf/inspect`,query:[`id`]};function _(e){return e.usage(`$0 email-auth spf inspect
5
5
 
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-D0dXwuME.mjs";var m={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/domain-changes`,query:[`per_page`,`cursor`,`modified_since`],joined:[`per_page`,`cursor`,`modified_since`],errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function h(e){return e.usage(`$0 email-domains changes
3
+
4
+ Returns retained domain-specific state changes and completed-removal tombstones in a transaction-safe opaque order. The top-level platform field is the current shared gate and must be combined with each domain's state. Store next_cursor after processing every response, and continue immediately while has_more is true. To take a checkpoint, request this operation with modified_since set to the current time, follow has_more to the end, and save the final next_cursor; it replays every change committed after the first of those requests. Initial bootstrap and error 2086 recovery take a checkpoint, list the full inventory, then replay from the saved checkpoint, so changes made during the inventory are not lost. Only a tombstone proves that a domain was removed. Available only to the configured OpenAI pilot account behind a default-off gate; while the gate is off, the pilot account gets 503 with error 2090 and Retry-After, and existing domains are unaffected. Unsupported methods return 405 with error 2091. Authentication failures may use the gateway error envelope.`).option(`per-page`,{type:`number`,description:`Maximum changes to return in one page.`}).option(`cursor`,{type:`string`,description:`Opaque cursor returned by the previous change page. Omit it for the first page.`}).option(`modified-since`,{type:`string`,description:`Optional RFC 3339 lower bound for the first request only. Values outside the retained history return error 2086. A value up to one minute ahead of the server clock is read as the current time; a later value returns 400.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`changes`,describe:`List Email Domain changes`,builder:h,handler:async e=>c({command:`email-domains changes`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={per_page:e[`per-page`],cursor:e.cursor,modified_since:e[`modified-since`]};if(e.dryRun){let e=await r();o({command:`cf email-domains changes`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/domain-changes`,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(m,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/domains`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function v(e){return e.usage(`$0 email-domains create
5
+
6
+ Creates a candidate and four DNS instructions. Rejects hostnames with more than 16 labels or whose assigned Return-Path exceeds 201 ASCII characters; error 2077 names the hostname rule that failed. Creation follows read-only checks of the saved provider bundle and published exclusion. Hostnames inside an active full Cloudflare DNS zone, including zones under a PSL private suffix such as workers.dev, or held by another enrollment, return the generic hostname conflict error 2083. While an earlier enrollment of this account with the same hostname or client_reference is being deleted, create returns error 2084 with Retry-After set to the expected completion time. No per-domain provider DNS writes occur. Customer DNS observations remain pending and mail remains inactive. Unverified candidates may share a hostname. Supply an account-unique client_reference to retry the same enrollment safely; reuse with a different hostname returns error 2089. A full domain quota returns error 2081 and frees only when domains are deleted or candidates expire, so it is not retryable; the create rate limit returns 429 with error 2088 and Retry-After. Requests rejected before the Cloudflare zone check do not count toward the rate limit. Final public-DNS, namespace protection and runtime readiness are separate gates. Available only to the configured OpenAI pilot account behind a default-off gate; while the gate is off, the pilot account gets 503 with error 2090 and Retry-After, and existing domains are unaffected. Unsupported methods return 405 with error 2091. Authentication failures may use the gateway error envelope.`).option(`client-reference`,{type:`string`,description:`Opaque reference for one customer enrollment. Reuse it with the same hostname to retry Create safely. Distinct references can enroll the same unverified hostname; a hostname alone never identifies a customer.`}).option(`hostname`,{type:`string`,description:`Exact external hostname to enroll. After ASCII conversion, the assigned Return-Path hostname must be at most 201 characters (191 for the current cf-bounce. prefix). Wildcards, provider-zone names, and hostnames inside an existing Cloudflare-managed DNS zone are rejected.`}).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 an Email Domain`,builder:v,handler:async e=>c({command:`email-domains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/domains`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({client_reference:d(e[`client-reference`],`client-reference`,`text`),hostname:d(e.hostname,`hostname`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(_,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await f(`hostname`,`Exact external hostname to enroll. After ASCII conversion, the assigned Return-Path hostname must be at most 201 characters (191 for the current cf-bounce. prefix). Wildcards, provider-zone names, and hostnames inside an existing Cloudflare-managed DNS zone are rejected.`));let m=u({client_reference:d(e[`client-reference`],`client-reference`,`text`),hostname:d(e.hostname,`hostname`,`text`)}),h=await s(`Creating`,async()=>c.send(_,{body:m,account_id:p}));a(h,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email/domains/${t.email_domain_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function x(e){return e.usage(`$0 email-domains delete <email-domain-id>
7
+
8
+ Requires an empty body. Unclaimed, unpublished candidates are removed immediately after token retirement. Acquired or published resources retain deleting state and claims until the deletion worker acknowledges safe revocation and token retirement: deletion completes after the last authorization FWDR may still hold has expired, up to about 31 minutes after the request. Until then the hostname and client_reference cannot be enrolled again. Repeated requests while deleting are idempotent. Retry-After is the expected time until GET returns 404; follow the Location header after it. Available only to the configured OpenAI pilot account behind a default-off gate; while the gate is off, the pilot account gets 503 with error 2090 and Retry-After, and existing domains are unaffected. Unsupported methods return 405 with error 2091. Authentication failures may use the gateway error envelope.`).positional(`email-domain-id`,{type:`string`,description:`Email domain ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <email-domain-id>`,describe:`Delete an Email Domain`,builder:x,handler:async e=>c({command:`email-domains 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-domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/domains/${e[`email-domain-id`]==null?`<email-domain-id>`:encodeURIComponent(String(e[`email-domain-id`]))}`,pathParams:{"email-domain-id":String(e[`email-domain-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(b,{account_id:l,email_domain_id:e[`email-domain-id`]}));a(u,{successLabel:`Deleted`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/domains/${t.email_domain_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function w(e){return e.usage(`$0 email-domains get <email-domain-id>
9
+
10
+ Returns domain status and its four assigned DNS records. Shared provider health is reported by the capability states rather than duplicated on each DNS record. Expired unclaimed candidates and completed deletions return 404. Available only to the configured OpenAI pilot account behind a default-off gate; while the gate is off, the pilot account gets 503 with error 2090 and Retry-After, and existing domains are unaffected. Unsupported methods return 405 with error 2091. Authentication failures may use the gateway error envelope.`).positional(`email-domain-id`,{type:`string`,description:`Email domain ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <email-domain-id>`,describe:`Get an Email Domain`,builder:w,handler:async e=>c({command:`email-domains get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/domains/${e[`email-domain-id`]==null?`<email-domain-id>`:encodeURIComponent(String(e[`email-domain-id`]))}`,pathParams:{"email-domain-id":String(e[`email-domain-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(C,{account_id:l,email_domain_id:e[`email-domain-id`]}));a(u,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/domains`,query:[`per_page`,`cursor`,`hostname`,`include`],joined:[`per_page`,`cursor`,`hostname`,`include`],errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function D(e){return e.usage(`$0 email-domains list
11
+
12
+ Returns account-scoped domain status. DNS records are omitted unless requested; exact hostname filtering may return several candidates; retain the EmailDomain ID for each enrollment. Available only to the configured OpenAI pilot account behind a default-off gate; while the gate is off, the pilot account gets 503 with error 2090 and Retry-After, and existing domains are unaffected. Unsupported methods return 405 with error 2091. Authentication failures may use the gateway error envelope.`).option(`per-page`,{type:`number`,description:`Per page`}).option(`cursor`,{type:`string`,description:`Opaque cursor returned by the previous page. Omit it for the first page.`}).option(`hostname`,{type:`string`,description:`Exact hostname filter for recovering an ambiguous create response.`}).option(`include`,{type:`string`,description:`Include DNS instructions on each list result.`,choices:[`dns_records`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List Email Domains`,builder:D,handler:async e=>c({command:`email-domains list`,classification:{safeFlags:[`include`,`dry-run`]}},e,async()=>{let c={per_page:e[`per-page`],cursor:e.cursor,hostname:e.hostname,include:e.include};if(e.dryRun){let e=await r();o({command:`cf email-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/domains`,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(E,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var k={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/domains/${t.email_domain_id}/verify`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function A(e){return e.usage(`$0 email-domains verify <email-domain-id>
13
+
14
+ Requires an empty body. Schedules an expedited check and coalesces queued or leased work. It does not accept verification results, bypass activation gates, or perform customer DNS checks synchronously. Follow the Location header after Retry-After seconds until verification.observed_at appears or advances beyond the value in this 202 response; status may remain unchanged. Candidate expiry returns 404. A repeat within 30 seconds returns error 2082 with the remaining cooldown in Retry-After. Only a request that schedules a check counts toward the account rate limit, error 2088. Available only to the configured OpenAI pilot account behind a default-off gate; while the gate is off, the pilot account gets 503 with error 2090 and Retry-After, and existing domains are unaffected. Unsupported methods return 405 with error 2091. Authentication failures may use the gateway error envelope.`).positional(`email-domain-id`,{type:`string`,description:`Email domain ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`verify <email-domain-id>`,describe:`Verify an Email Domain`,builder:A,handler:async e=>c({command:`email-domains verify`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf email-domains verify`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/domains/${e[`email-domain-id`]==null?`<email-domain-id>`:encodeURIComponent(String(e[`email-domain-id`]))}/verify`,pathParams:{"email-domain-id":String(e[`email-domain-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(k,{account_id:l,email_domain_id:e[`email-domain-id`]}));a(u,{successLabel:`Created`})})},M={command:`email-domains`,describe:`email-domains`,builder:e=>e.command(g).command(y).command(S).command(T).command(O).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,i,t as a}from"./context-DCon1tRZ.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-_Jux05O5.mjs";import{t as l}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as u,n as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-SNVLBS1b.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/routing/addresses`,body:`json`,errors:{422:`UnprocessableEntityError`}};function v(e){return e.usage(`$0 email-routing addresses create
2
+ import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,t as f}from"./body-parser-BKcZS9iJ.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-D0dXwuME.mjs";var _={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/routing/addresses`,body:`json`,errors:{422:`UnprocessableEntityError`}};function v(e){return e.usage(`$0 email-routing addresses create
3
3
 
4
4
  Create a destination address to forward your emails to. Destination addresses need to be verified before they can be used.`).option(`email`,{type:`string`,description:`The contact email address of the user.`}).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 a destination address`,builder:v,handler:async e=>l({command:`email-routing addresses create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-routing addresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/routing/addresses`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({email:p(e.email,`email`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(_,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e.email===void 0&&(e.email=await m(`email`,`The contact email address of the user.`));let u=f({email:p(e.email,`email`,`text`)}),h=await c(`Creating`,async()=>i.send(_,{body:u,account_id:l}));o(h,{successLabel:`Created`})})};var b={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email/routing/addresses/${t.destination_address_identifier}`,errors:{404:`NotFoundError`}};function x(e){return e.usage(`$0 email-routing addresses delete <destination-address-identifier>
5
5
 
@@ -29,7 +29,9 @@ Deletes a routing rule so matching incoming messages are no longer forwarded by
29
29
 
30
30
  Get information for a specific routing rule already created.`).positional(`rule-identifier`,{type:`string`,description:`Routing rule identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`get <rule-identifier>`,describe:`Get routing rule`,builder:de,handler:async e=>l({command:`email-routing rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf email-routing rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/${e[`rule-identifier`]==null?`<rule-identifier>`:encodeURIComponent(String(e[`rule-identifier`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"rule-identifier":String(e[`rule-identifier`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(ue,{zone_id:r,rule_identifier:e[`rule-identifier`]}));o(a,{successLabel:`Loaded`})})};var pe={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/email/routing/rules`,query:[`page`,`per_page`,`enabled`],errors:{403:`ForbiddenError`}};function me(e){return e.usage(`$0 email-routing rules list-account
31
31
 
32
- Lists existing routing rules across all zones in the account or zone.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`enabled`,{type:`string`,description:`Filter by enabled routing rules.`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`list-account`,describe:`List account or zone routing rules`,builder:me,handler:async e=>l({command:`email-routing rules list-account`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`],enabled:e.enabled};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 email-routing rules list-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/email/routing/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(pe,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/routing/rules/plan`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,422:`UnprocessableEntityError`}};function ge(e){return e.usage(`$0 email-routing rules plan
32
+ Lists existing routing rules across all zones in the account or zone.
33
+
34
+ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`enabled`,{type:`string`,description:`Filter by enabled routing rules.`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`list-account`,describe:`List account or zone routing rules`,builder:me,handler:async e=>l({command:`email-routing rules list-account`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{let l={page:e.page,per_page:e[`per-page`],enabled:e.enabled};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 email-routing rules list-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/email/routing/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(pe,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/routing/rules/plan`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,422:`UnprocessableEntityError`}};function ge(e){return e.usage(`$0 email-routing rules plan
33
35
 
34
36
  Computes the Email Routing rule changes that would be needed to reconcile a Wrangler-managed desired ruleset. This endpoint is read-only and does not create, update, or delete rules.`).option(`catch-all-rules`,{type:`string`,description:`Desired catch-all Email Routing rules managed by the deploying Worker. Provide as a JSON array of objects or @path/to/file.json.`}).option(`owner-worker-tag`,{type:`string`,description:"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n"}).option(`rules`,{type:`string`,description:`Desired normal Email Routing rules managed by the deploying Worker. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _e={command:`plan`,describe:`Plan account routing rule changes`,builder:ge,handler:async e=>l({command:`email-routing rules plan`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-routing rules plan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/routing/rules/plan`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({catch_all_rules:u(e[`catch-all-rules`],`catch-all-rules`),owner_worker_tag:p(e[`owner-worker-tag`],`owner-worker-tag`,`text`),rules:u(e.rules,`rules`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(Y,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e[`owner-worker-tag`]===void 0&&(e[`owner-worker-tag`]=await m(`owner-worker-tag`,"Public tag (script_tag) of the Worker that owns this rule. Required when `source` is `wrangler`. "));let h=f({catch_all_rules:u(e[`catch-all-rules`],`catch-all-rules`),owner_worker_tag:p(e[`owner-worker-tag`],`owner-worker-tag`,`text`),rules:u(e.rules,`rules`)}),g=await c(`Creating`,async()=>i.send(Y,{body:h,account_id:l}));o(g,{successLabel:`Created`})})};var X={method:`PUT`,path:t=>e`/zones/${t.zone_id}/email/routing/rules/${t.rule_identifier}`,body:`json`,errors:{400:`BadRequestError`,422:`UnprocessableEntityError`}};function ve(e){return e.usage(`$0 email-routing rules update <rule-identifier>
35
37
 
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-BNmz58v4.mjs";import{n}from"./auth-CB9wjyad.mjs";import{a as r,t as i}from"./context-DCon1tRZ.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-_Jux05O5.mjs";import{t as c}from"./run-Br8sYjNF.mjs";import"./telemetry-kjElc1zT.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-SNVLBS1b.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-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-D0dXwuME.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.`}))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
5
5
 
6
- 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>
6
+ 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. The API also rejects a pattern that equals a domain onboarded to the account, ignoring case."}).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. The API also rejects a pattern that equals a domain onboarded to the account, ignoring case.")),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>
7
7
 
8
8
  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.`}))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>
9
9
 
10
- 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>
10
+ 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. The API also rejects a pattern that equals a domain onboarded to the account, ignoring case."}).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>
11
11
 
12
12
  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
13
13
 
14
14
  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>
15
15
 
16
- 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
16
+ 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. The API also rejects a pattern that equals a domain onboarded to the account, ignoring case."}).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. The API also rejects a pattern that equals a domain onboarded to the account, ignoring case.")),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
17
17
 
18
18
  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
19
19