cf 1.0.0-beta.12 → 1.0.0-beta.13
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.
- package/dist/_meta/commands.json +3119 -2067
- package/dist/_meta/hand-written-commands.json +14 -1
- package/dist/_meta/schemas.json +1856 -1132
- package/dist/{abuse-reports-Cy9RcWPu.mjs → abuse-reports-BjU1s8cf.mjs} +10 -10
- package/dist/{access-DwJm1qet.mjs → access-C_G2MZnA.mjs} +1 -1
- package/dist/account-tags-CaXDDeZ4.mjs +15 -0
- package/dist/{accounts-BSd4b-1j.mjs → accounts-BALwxDQY.mjs} +70 -77
- package/dist/{acm-BfI0p2sX.mjs → acm-CP9EaXQN.mjs} +1 -1
- package/dist/{addressing-lfeJf7YB.mjs → addressing-DRlaxqrI.mjs} +1 -1
- package/dist/{agent-memory-CP1qpn-y.mjs → agent-memory-vGhlfZBx.mjs} +1 -1
- package/dist/{ai-jFzFBANM.mjs → ai-CJtbWfB9.mjs} +18 -16
- package/dist/{ai-audit-B_tSl78A.mjs → ai-audit-C0BJNqZZ.mjs} +1 -1
- package/dist/ai-gateway-BQtv3U3x.mjs +80 -0
- package/dist/ai-search-DGU1Y5By.mjs +79 -0
- package/dist/{ai-security-CKGE547U.mjs → ai-security-CFTaYk_X.mjs} +1 -1
- package/dist/{alerting-CuxoqG3S.mjs → alerting-1hun27JC.mjs} +3 -3
- package/dist/analytics-DXUSjvzT.mjs +17 -0
- package/dist/{analytics_engine-BoapM9wd.mjs → analytics_engine-CQsnL09C.mjs} +1 -1
- package/dist/{api-security-Nk_bg-Kg.mjs → api-security-BXhrfR6-.mjs} +4 -4
- package/dist/argo-LPUCTnee.mjs +14 -0
- package/dist/{artifacts-BS6cEqCB.mjs → artifacts-Dt6easua.mjs} +1 -1
- package/dist/{audit-logs-x5tLqeX2.mjs → audit-logs-CVznAM2Z.mjs} +1 -1
- package/dist/{auth-AobvBmz4.mjs → auth-CGLsxbc6.mjs} +1 -1
- package/dist/auth-CrmVwfpJ.mjs +2 -0
- package/dist/{auth-CKotxfap.mjs → auth-eQr-kQCH.mjs} +1 -1
- package/dist/{auth-token-CtguMdmF.mjs → auth-token-pNQrX_9O.mjs} +1 -1
- package/dist/{autoconfig-PfnbLuEO.mjs → autoconfig-sD7Frryg.mjs} +151 -151
- package/dist/{basin-catalog-Ddi-t3q9.mjs → basin-catalog-ZQICw-zF.mjs} +1 -1
- package/dist/{billing-CDMc4tvX.mjs → billing-Dy1-dV_B.mjs} +2 -2
- package/dist/{bot-management-UrCM3P8K.mjs → bot-management-DTgPwL7O.mjs} +1 -1
- package/dist/{botnet-feed-CVwRm42k.mjs → botnet-feed-xb98Cj3Y.mjs} +1 -1
- package/dist/{brand-protection-DfNf5REj.mjs → brand-protection-Ck3okE2k.mjs} +1 -1
- package/dist/browser-run-DJGJSzFX.mjs +42 -0
- package/dist/build-B1L6xrgC.mjs +2 -0
- package/dist/{build-BKPVP5ip.mjs → build-HmSXqjGn.mjs} +1 -1
- package/dist/{builds-BG5DHqU3.mjs → builds-CYxcZtkG.mjs} +3 -3
- package/dist/{cache-C05hHXUp.mjs → cache-D9tSfovH.mjs} +1 -1
- package/dist/{certificate-authorities-DyCFmZwR.mjs → certificate-authorities-CpiveTFC.mjs} +1 -1
- package/dist/cf-BxsXrVeh.mjs +18 -0
- package/dist/chunk-DSGVRFIS-C1_SEtRK.mjs +2 -0
- package/dist/{chunk-FT2NMTJB-DQ7s3x7Q.mjs → chunk-NDZDTP46-Bjx_wtJe.mjs} +3 -3
- package/dist/{chunk-AUSY7DKT-BJX6Fdc4.mjs → chunk-TAK63GWY-DdMktrgc.mjs} +9 -2
- package/dist/{cli-D9qlPB-6.mjs → cli-DeJc9U8z.mjs} +1 -1
- package/dist/{client-certificates-B-m8rfM9.mjs → client-certificates-CF6YZyvP.mjs} +1 -1
- package/dist/{client-side-security-M4oIUqID.mjs → client-side-security-BLoe9kS5.mjs} +1 -1
- package/dist/{cloud-connector-B63Dwn6n.mjs → cloud-connector-DXRUHsjt.mjs} +1 -1
- package/dist/cloudflared--1Ws1RJy.mjs +2 -0
- package/dist/{cloudforce-one-Dlc1GNFy.mjs → cloudforce-one-CBLxXi6v.mjs} +162 -162
- package/dist/{command-BQpXcGKV.mjs → command-83uVfXh9.mjs} +1 -1
- package/dist/{command-BWlpCtHe.mjs → command-BDe67N_n.mjs} +1 -1
- package/dist/{command-CXxh5Hce.mjs → command-BlIb6RR2.mjs} +1 -1
- package/dist/{command-ZBQ1WITj.mjs → command-Bpzp8Mz2.mjs} +1 -1
- package/dist/{command-CKQlxypn.mjs → command-BvfKhMl7.mjs} +1 -1
- package/dist/command-CG6RvZs0.mjs +2 -0
- package/dist/{command-CRl00uA2.mjs → command-CcuLC6CJ.mjs} +1 -1
- package/dist/{command-CUkXxZsc.mjs → command-Cu7dcaHT.mjs} +1 -1
- package/dist/{command-SS1z_t68.mjs → command-D3fyhdy-.mjs} +1 -1
- package/dist/{command-DyE8v4sd.mjs → command-DUhX8Dcr.mjs} +1 -1
- package/dist/{command-VuxpEvmH.mjs → command-Dh7RmjFu.mjs} +1 -1
- package/dist/{command-DEQSv-S1.mjs → command-DwXiDOeH.mjs} +1 -1
- package/dist/{command-BlGILcTA.mjs → command-UiHLJ8Ji.mjs} +1 -1
- package/dist/{command-Rv2MR-eh.mjs → command-_rqD0hXF.mjs} +1 -1
- package/dist/{command-DBaNgfA4.mjs → command-oNVwyjGB.mjs} +1 -1
- package/dist/{completions-lf50FBGm.mjs → completions-D06AO7A8.mjs} +11 -11
- package/dist/{connector-interrupts-DHN1KtUE.mjs → connector-interrupts-DelTmNyw.mjs} +1 -1
- package/dist/{connector-telemetry-events-CHg7FmXh.mjs → connector-telemetry-events-BwxR3G8d.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-CSifYi9r.mjs → connector-telemetry-snapshots-Bqq-hrpJ.mjs} +1 -1
- package/dist/{connectors-0UwPUav-.mjs → connectors-D-m3rEpk.mjs} +1 -1
- package/dist/{containers-DuIsM7lM.mjs → containers-CVNfEjJs.mjs} +3 -3
- package/dist/{containers-DRzgE46U.mjs → containers-DeoZyeQe.mjs} +25 -25
- package/dist/{content-scan-COyTz0Wb.mjs → content-scan-W0BNzbQp.mjs} +1 -1
- package/dist/{context-Bwkz4Lm_.mjs → context-q7UaYK69.mjs} +2 -2
- package/dist/{cps-B7_BJaAU.mjs → cps-BZ6hqRb5.mjs} +1 -1
- package/dist/{csamScanner-jez2EYXC.mjs → csamScanner-Bo1t3CLh.mjs} +1 -1
- package/dist/{ct-alerting-CACDrY0E.mjs → ct-alerting-E03faC7p.mjs} +1 -1
- package/dist/{custom-certificates-BBd92YlF.mjs → custom-certificates-CUySSPzi.mjs} +3 -3
- package/dist/{custom-csrs-DTwBiNMX.mjs → custom-csrs-gNpWkJPQ.mjs} +1 -1
- package/dist/{custom-hostnames-DIWlqvN9.mjs → custom-hostnames-abGBAbx7.mjs} +4 -4
- package/dist/{custom-nameservers-DISy8v8u.mjs → custom-nameservers-BgNXol1P.mjs} +1 -1
- package/dist/{custom-pages-BHXO_NFv.mjs → custom-pages-DMKX3aoD.mjs} +1 -1
- package/dist/{d1-MvAQMvvo.mjs → d1-CE08YqYk.mjs} +26 -22
- package/dist/{dcv-delegation-Buq0hcm_.mjs → dcv-delegation-B5YUEWu0.mjs} +1 -1
- package/dist/deploy-CWNm1-5v.mjs +2 -0
- package/dist/deploy-context-Dr6bxNcB.mjs +56 -0
- package/dist/deploy-input-Cc0_2QlW.mjs +2 -0
- package/dist/{dev-D8FGPKRt.mjs → dev-ZA8itQE7.mjs} +1 -1
- package/dist/{diagnostics-ChDfJ-Gv.mjs → diagnostics-UMbG6m4n.mjs} +1 -1
- package/dist/dialog-D4Y9ocuF.mjs +2 -0
- package/dist/{dist-CYFkGHYv.mjs → dist-BHEmAAHr.mjs} +4 -4
- package/dist/dist-uRuGmkMB.mjs +60 -0
- package/dist/{dls-8D00tqvC.mjs → dls-DIl16mLp.mjs} +1 -1
- package/dist/{dns-C-A5pwf3.mjs → dns-QUpgljRG.mjs} +5 -5
- package/dist/{dns-firewall-DIiF4pro.mjs → dns-firewall-BZwJXHLj.mjs} +1 -1
- package/dist/dry-run-DRj2_uV3.mjs +2 -0
- package/dist/{durable-objects-CnIqbj84.mjs → durable-objects-BCj4ykpU.mjs} +1 -1
- package/dist/{email-auth-v97Md32E.mjs → email-auth-DlHIYhCk.mjs} +1 -1
- package/dist/{email-routing-I29RG4hb.mjs → email-routing-UKVS4DYy.mjs} +1 -1
- package/dist/{email-security-BCarmbky.mjs → email-security-CZjfRIg0.mjs} +8 -8
- package/dist/{email-sending-CsHk2HAJ.mjs → email-sending-Dquc880C.mjs} +1 -1
- package/dist/{error-sanitization-BWnGnB73.mjs → error-sanitization-DE_zSrXw.mjs} +1 -1
- package/dist/error-sanitization-DOCQ9Ykh.mjs +2 -0
- package/dist/{fieldExtractors-GIVe9jZa.mjs → fieldExtractors-BbwDRquU.mjs} +1 -1
- package/dist/{firewall-DpgFqJr3.mjs → firewall--mTfDnCJ.mjs} +3 -3
- package/dist/{flagship-BVaXXlsX.mjs → flagship-cfoSwwM9.mjs} +1 -1
- package/dist/{fraud-B5GQdEF2.mjs → fraud-Dcsq3EYK.mjs} +1 -1
- package/dist/{google-tag-gateway-C4O61lp-.mjs → google-tag-gateway-DPKSkZQi.mjs} +1 -1
- package/dist/{healthchecks-BwYMnKSF.mjs → healthchecks-D78hIIBC.mjs} +1 -1
- package/dist/{hostnames-DhrGRFeI.mjs → hostnames-sF999-6H.mjs} +1 -1
- package/dist/{hyperdrive-DAA8Fazg.mjs → hyperdrive-qWACKfA4.mjs} +2 -2
- package/dist/{iam-sRKDU2Z3.mjs → iam-Bvg_PayW.mjs} +1 -1
- package/dist/{images-DXdekLVs.mjs → images-DI_lEZ4L.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/init-1w_mcgk3.mjs +43 -0
- package/dist/{intel-CnVeSjIS.mjs → intel-BxElBUMP.mjs} +1 -1
- package/dist/interactive-BW9T1D1q.mjs +48 -0
- package/dist/interactive-DGUWZ2Gk.mjs +2 -0
- package/dist/{ips-COCUG8mk.mjs → ips-DWoaKxi7.mjs} +1 -1
- package/dist/k2-tFjaftl-.mjs +11 -0
- package/dist/{keyless-certificates-l2_S__h3.mjs → keyless-certificates-BrvxHU4J.mjs} +1 -1
- package/dist/{keys-CDZreums.mjs → keys-DcwTYKRf.mjs} +1 -1
- package/dist/{kv-DkpKVimq.mjs → kv-htXS-7uP.mjs} +2 -2
- package/dist/{lazy-command-_vZGz6mv.mjs → lazy-command-BDiIwpss.mjs} +1 -1
- package/dist/{leaked-credential-checks-edbapECI.mjs → leaked-credential-checks-bvGrLOmQ.mjs} +1 -1
- package/dist/{load-balancers-C5YMvhXD.mjs → load-balancers-BNTUt4yG.mjs} +1 -1
- package/dist/local-DlDumOSC.mjs +2 -0
- package/dist/{local-C0lQ9sTg.mjs → local-DlT72Xpn.mjs} +1 -1
- package/dist/{local-runtime-DtnWXN0a.mjs → local-runtime-CokO6qaX.mjs} +1 -1
- package/dist/{login-BrjOuHKu.mjs → login-BGF_I_LT.mjs} +1 -1
- package/dist/{login-DeOM4v0L.mjs → login-Ccw-mYwT.mjs} +1 -1
- package/dist/{logo-matches-CF8321pb.mjs → logo-matches-tE8LTKgg.mjs} +1 -1
- package/dist/{logos-Bd8xNRKW.mjs → logos-Bj845Mcw.mjs} +1 -1
- package/dist/{logpush-BYk3qqwY.mjs → logpush-Cs8JdvKi.mjs} +7 -7
- package/dist/{logs-Jcj2NN8H.mjs → logs-C92XZvNu.mjs} +1 -1
- package/dist/{magic-cloud-networking-Dgdb9H0f.mjs → magic-cloud-networking-hNp5MMw-.mjs} +1 -1
- package/dist/{magic-network-monitoring-CxVU4MZB.mjs → magic-network-monitoring-68GuWAnv.mjs} +1 -1
- package/dist/{magic-transit-KDyfUgTv.mjs → magic-transit-DNd7gu4j.mjs} +6 -6
- package/dist/{managed-defense-CxaDeNUd.mjs → managed-defense-B_wCAuFD.mjs} +1 -1
- package/dist/{managed-transforms-C7rT5E-x.mjs → managed-transforms-DZdxHPOh.mjs} +1 -1
- package/dist/{matches-BtKqG8T9.mjs → matches-B65CkflD.mjs} +1 -1
- package/dist/{mcp-QDd1Iyc0.mjs → mcp-DrJW5ayK.mjs} +4 -4
- package/dist/mesh-DfVzYTn1.mjs +26 -0
- package/dist/{migrate-DHlfR_gZ.mjs → migrate-CZNq63Uj.mjs} +1 -1
- package/dist/{monetization-pLalYYMI.mjs → monetization-BGaI8CMO.mjs} +1 -1
- package/dist/{mtls-certificates-DYA9Wu-c.mjs → mtls-certificates-BsU2emDD.mjs} +2 -2
- package/dist/{network-DrJxPWXQ.mjs → network-BEMD8P0U.mjs} +1 -1
- package/dist/{network-interconnects-D73MlYG8.mjs → network-interconnects-DMu_fcbo.mjs} +2 -7
- package/dist/o11y-C1a4gDGF.mjs +93 -0
- package/dist/{oauth-B08YQ4xq.mjs → oauth-Bj5Ne1o8.mjs} +1 -1
- package/dist/{oauth-clients-CkPDLFd-.mjs → oauth-clients-p4Etdqy_.mjs} +1 -1
- package/dist/{oauth-TGbM1Q0V.mjs → oauth-mspHHU5U.mjs} +1 -1
- package/dist/{oauth-scopes-VgliqcQe.mjs → oauth-scopes-B2IabFza.mjs} +1 -1
- package/dist/{organization-DIwqRBBV.mjs → organization-CdXt7AVZ.mjs} +1 -1
- package/dist/{organizations-Dk0D9ukm.mjs → organizations-5S6xEp7T.mjs} +1 -1
- package/dist/{origin-ca-certificates-BSFqMTn-.mjs → origin-ca-certificates-_VJAoK1D.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-BOKWKDTY.mjs → origin-post-quantum-encryption-GcldDsT2.mjs} +1 -1
- package/dist/{origin-tls-client-auth-BzE3WpcN.mjs → origin-tls-client-auth-DZHld9fA.mjs} +3 -3
- package/dist/{output-BGqhvqe2.mjs → output-BOe-3AQG.mjs} +1 -1
- package/dist/{page-rules-BKaU37cM.mjs → page-rules-o1tAMMsD.mjs} +1 -1
- package/dist/{pages-2Xg-lrMf.mjs → pages-CmiOhjSl.mjs} +4 -4
- package/dist/pay-per-crawl-BsnOxGYU.mjs +38 -0
- package/dist/pay-per-use-BXWMCSyE.mjs +33 -0
- package/dist/{pipelines-BM-T7mMK.mjs → pipelines-DWLQC0F6.mjs} +2 -2
- package/dist/{precursor-DmQ32-Sp.mjs → precursor-B6DjBib6.mjs} +1 -1
- package/dist/{previews-DDQ9ACDJ.mjs → previews-dUKEBGSM.mjs} +1 -1
- package/dist/process-2wmDCy17.mjs +2 -0
- package/dist/{progress-BYVZuEcG.mjs → progress-BtkTVcHI.mjs} +1 -1
- package/dist/prompt-RlgRrmbm.mjs +3 -0
- package/dist/{queries-DPBkVynK.mjs → queries-yLwoJRHV.mjs} +1 -1
- package/dist/{queues-CCXRs98q.mjs → queues-CnJRaE1o.mjs} +1 -1
- package/dist/{r2-BKuBSW8h.mjs → r2-CuC6-zQX.mjs} +48 -45
- package/dist/{radar-Gv1yFoRX.mjs → radar-DrQLcbkq.mjs} +1 -1
- package/dist/{raw-fetch-DyYWa923.mjs → raw-fetch-B4NvWuZD.mjs} +1 -1
- package/dist/{realtime-CVl-rvgx.mjs → realtime-CjsnzHxD.mjs} +1 -1
- package/dist/{registrar-swlnh22i.mjs → registrar-BgOsxTnX.mjs} +1 -1
- package/dist/{registrar-sandbox-cmOYDnkp.mjs → registrar-sandbox-3ikBD9fB.mjs} +1 -1
- package/dist/{registry-C20J1MW0.mjs → registry-CHowrQsZ.mjs} +1 -1
- package/dist/{reporting-Bgwsvol1.mjs → reporting-hE127s5r.mjs} +1 -1
- package/dist/{request-headers-CUee83pa.mjs → request-headers-DiJeDAn1.mjs} +1 -1
- package/dist/{request-tracers-BBiJvVDz.mjs → request-tracers-BCwLxmPN.mjs} +1 -1
- package/dist/{resolve-DvxgnWjL.mjs → resolve-CaTBV-c6.mjs} +1 -1
- package/dist/resolve-DCGSzUDQ.mjs +2 -0
- package/dist/{resource-sharing-C1JiYLbl.mjs → resource-sharing-2qvWUuMa.mjs} +11 -11
- package/dist/{resource-tagging-C9VOSlDR.mjs → resource-tagging-Dwx7iL3v.mjs} +1 -1
- package/dist/{rules-BDunCGMj.mjs → rules-DxVQ6jIg.mjs} +1 -1
- package/dist/rulesets-Cdh8YjI9.mjs +37 -0
- package/dist/{rum-B7XiECe9.mjs → rum-a4CMq4Qu.mjs} +1 -1
- package/dist/{run-CrZgB8L_.mjs → run-BvHwWWUX.mjs} +1 -1
- package/dist/run-CkbrPJPx.mjs +2 -0
- package/dist/{schema-DC0kdqgV.mjs → schema-elj12WOx.mjs} +1 -1
- package/dist/{schema-flags-BUZR9SLd.mjs → schema-flags-BzoBGPWk.mjs} +1 -1
- package/dist/{scim-CORcs2wK.mjs → scim-B8XlXl8v.mjs} +1 -1
- package/dist/{secrets-store-BoZQaFey.mjs → secrets-store-Cqhedh_i.mjs} +2 -2
- package/dist/{security-insights-DblK_6sg.mjs → security-insights-le2-DteL.mjs} +1 -1
- package/dist/{security-txt-Dl7RPnRb.mjs → security-txt-cCArWXur.mjs} +1 -1
- package/dist/{session-BWe9et4K.mjs → session-C1BhT1ZJ.mjs} +1 -1
- package/dist/shared-BPjcpXuA.mjs +2 -0
- package/dist/{smart-shield-DX0-8ruu.mjs → smart-shield-Csyh8hwB.mjs} +1 -1
- package/dist/{snippets-BFN-Lg3K.mjs → snippets-DUWx25q6.mjs} +1 -1
- package/dist/spawn-IysxuTNW.mjs +10 -0
- package/dist/{spectrum-HYWLWB0X.mjs → spectrum-Da3UYSOR.mjs} +1 -1
- package/dist/{speed-Dj0YhfRe.mjs → speed-NxlMnB2e.mjs} +1 -1
- package/dist/sql-CNdHAlQ8.mjs +4 -0
- package/dist/src-JfLDUxFr.mjs +125 -0
- package/dist/{ssl-BQL1fNtD.mjs → ssl-BtaX2WEJ.mjs} +1 -1
- package/dist/startup-profile-B2l0ChVu.mjs +2 -0
- package/dist/{startup-profile-0X5ebbng.mjs → startup-profile-CdJWgNjd.mjs} +1 -1
- package/dist/{state-Dy6-rKNd.mjs → state-BDSvdSdP.mjs} +1 -1
- package/dist/state-JB4_BU1o.mjs +2 -0
- package/dist/{stream-DKv2TtZN.mjs → stream-C1Ijjzn4.mjs} +3 -3
- package/dist/{submit-Byt2KBGI.mjs → submit-MdkuU_Pt.mjs} +1 -1
- package/dist/{tags-BIBsdG68.mjs → tags-CA1xMM96.mjs} +1 -1
- package/dist/telemetry-BsYO3nxG.mjs +2 -0
- package/dist/{telemetry-bu3txnIR.mjs → telemetry-Cm39QJ-M.mjs} +1 -1
- package/dist/{tenant-Bs4Ac4n3.mjs → tenant-BB6Oszcl.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-DcaELeCE.mjs → tenant-custom-nameservers-BsbgYAEo.mjs} +1 -1
- package/dist/{tools-BbTX7rlM.mjs → tools-CSc5DmFi.mjs} +1 -1
- package/dist/{tunnels-DWcrz9Sf.mjs → tunnels-CRFtyHWz.mjs} +4 -4
- package/dist/{turnstile-2MIGp2ce.mjs → turnstile-DBXWo_Xe.mjs} +1 -1
- package/dist/update-check-C2oVEbXx.mjs +2 -0
- package/dist/{update-check-CfB0PNTY.mjs → update-check-CMXSdres.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-B8udoxlx.mjs → url-info-t-XAs0Mk.mjs} +1 -1
- package/dist/{url-normalization-C6AdWtaE.mjs → url-normalization-Cs4F8e0a.mjs} +1 -1
- package/dist/{url-scanner-Dg0c_yVb.mjs → url-scanner-CBIoDbTx.mjs} +1 -1
- package/dist/{user-BLZ-0Bgv.mjs → user-CevdOMoa.mjs} +3 -3
- package/dist/values-CjNlkbIh.mjs +4 -0
- package/dist/{vectorize-DEUSEQXY.mjs → vectorize-9d9tPmg5.mjs} +1 -1
- package/dist/version-BdVUXLnK.mjs +2 -0
- package/dist/{waiting-rooms-BycGk2Y0.mjs → waiting-rooms--5WmrWb3.mjs} +1 -1
- package/dist/{web-assets-CLZdWOmN.mjs → web-assets-BHot_MU8.mjs} +1 -1
- package/dist/{web3-DjeavuLg.mjs → web3-CYfWAF6b.mjs} +1 -1
- package/dist/{workers-C_SfyU-v.mjs → workers-S17M0n3h.mjs} +23 -21
- package/dist/{workers-builds-COn5Ne5G.mjs → workers-builds-Dw7ho3So.mjs} +2 -2
- package/dist/{workers-for-platforms-tchCXwNF.mjs → workers-for-platforms-A3yjyLh3.mjs} +4 -6
- package/dist/{workers-vpc-CKts8Av0.mjs → workers-vpc-BZ2xXtC3.mjs} +1 -1
- package/dist/{workflows-BibtWuOx.mjs → workflows-BgGrVpSR.mjs} +1 -1
- package/dist/{wrangler-migration-BpJqCFAa.mjs → wrangler-migration-C6FKHER1.mjs} +1 -1
- package/dist/{zaraz-BvQZB0YY.mjs → zaraz-BsD2dMI3.mjs} +1 -1
- package/dist/{zero-trust-FStq4uhn.mjs → zero-trust-CA3iGQbG.mjs} +413 -397
- package/dist/{zone-tymlghWb.mjs → zone-D2M4EZD0.mjs} +1 -1
- package/dist/{zones-Bz6dgT9_.mjs → zones-BoOC_JzC.mjs} +1 -1
- package/package.json +25 -26
- package/dist/account-tags-d0RkEw6s.mjs +0 -15
- package/dist/ai-gateway-CJaUlfGc.mjs +0 -82
- package/dist/ai-search-PTlpY1T9.mjs +0 -79
- package/dist/analytics-NPND7aHB.mjs +0 -20
- package/dist/argo-DYfLQhd2.mjs +0 -10
- package/dist/auth-CBtzZ3Sw.mjs +0 -2
- package/dist/browser-run-DVaiBLYX.mjs +0 -46
- package/dist/build-C4giET85.mjs +0 -2
- package/dist/cf-B9aqZZKD.mjs +0 -18
- package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +0 -2
- package/dist/cloudflared-B48cfu95.mjs +0 -2
- package/dist/command-CzvlHvov.mjs +0 -2
- package/dist/deploy-BS47vZvJ.mjs +0 -2
- package/dist/deploy-context-Cfushp8j.mjs +0 -56
- package/dist/deploy-input-BAhS5LYx.mjs +0 -2
- package/dist/dialog-CL1Zy4pn.mjs +0 -2
- package/dist/dist-8rP3V95o.mjs +0 -57
- package/dist/dry-run-DmsbOMF1.mjs +0 -2
- package/dist/error-sanitization-C_a2LxOK.mjs +0 -2
- package/dist/init-j47MT4Qe.mjs +0 -39
- package/dist/interactive-Dqv0RWVU.mjs +0 -42
- package/dist/interactive-Wpd3FcDc.mjs +0 -2
- package/dist/k2-CmHkArHL.mjs +0 -13
- package/dist/local-D5L5Bwju.mjs +0 -2
- package/dist/mesh-DtrIzl5z.mjs +0 -26
- package/dist/observability-CvN9oxAo.mjs +0 -80
- package/dist/pay-per-crawl-5-KTQXRr.mjs +0 -65
- package/dist/pay-per-use-sGebKzNK.mjs +0 -6
- package/dist/prompt-F5wxc8zq.mjs +0 -3
- package/dist/resolve-qwL1LmKN.mjs +0 -2
- package/dist/rulesets-BMGxrnv9.mjs +0 -37
- package/dist/run-nNxXb_Cv.mjs +0 -2
- package/dist/shared-0N31BXkY.mjs +0 -2
- package/dist/spawn-DZ9A-xXb.mjs +0 -10
- package/dist/src-CAiZlihY.mjs +0 -117
- package/dist/startup-profile-CXnsF4c7.mjs +0 -2
- package/dist/state-BA2CanJ_.mjs +0 -2
- package/dist/telemetry-DBXOMuLh.mjs +0 -2
- package/dist/update-check-B-CvDAUz.mjs +0 -2
- package/dist/values-BUK-m0Jg.mjs +0 -4
- package/dist/version-BZNc7Y3t.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,i,t as a}from"./context-q7UaYK69.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-BtkTVcHI.mjs";import{t as l}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-RlgRrmbm.mjs";import{t as _}from"./cli-types-9oYmRTHJ.mjs";import{n as ee,t as te}from"./raw-fetch-B4NvWuZD.mjs";function v(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 y={command:`delete`,describe:`Delete DNSSEC records`,builder:v,handler:async e=>l({command:`dns dnssec delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}let a=await c(`Deleting`,async()=>t.dns.dnssec.delete({zone_id:r}));o(a,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 dns dnssec edit
|
|
@@ -41,7 +41,7 @@ Retrieves details for a specific DNS record in the zone.`).positional(`dns-recor
|
|
|
41
41
|
|
|
42
42
|
You can upload your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. It assumes that cURL is called from a location with bind_config.txt (valid BIND config) present. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.`).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`proxied`,{type:`string`,description:"Whether or not proxiable records should receive the performance and security benefits of Cloudflare. The value should be either `true` or `false`."})}const V={command:`import`,describe:`Import DNS Records`,builder:B,handler:async e=>l({command:`dns records import`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns records import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/import`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,proxied:e.proxied}});return}let r=await n(e);if(e.zoneId=await i({zone:e.zone},r,{quiet:e.quiet}),e.file!==void 0||e.body!==void 0||e.proxied!==void 0){let n=new FormData;if(e.file){let t=m(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);e.proxied!==void 0&&n.append(`proxied`,String(p(e.proxied,`proxied`,`text`)??``));let i=await c(`Creating`,async()=>t(r,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n}));o(i,{successLabel:`Created`});return}if(e.body){let n=p(e.body,`body`,`binary`),i=await c(`Creating`,async()=>t(r,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n,headers:{"Content-Type":`multipart/form-data`}}));o(i,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function H(e){return e.usage(`$0 dns records list
|
|
43
43
|
|
|
44
|
-
List, search, sort, and filter a zones' DNS records.`).option(`name`,{type:`string`,description:"Exact value of the DNS record name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS record name. Name filters are case-insensitive.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS record name. Name filters are case-insensitive.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS record name. Name filters are case-insensitive.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS record name. Name filters are case-insensitive.`}).option(`type`,{type:`string`,description:`Record type.`,choices:[`A`,`AAAA`,`CAA`,`CERT`,`CNAME`,`DNSKEY`,`DS`,`HTTPS`,`LOC`,`MX`,`NAPTR`,`NS`,`OPENPGPKEY`,`PTR`,`SMIMEA`,`SRV`,`SSHFP`,`SVCB`,`TLSA`,`TXT`,`URI`]}).option(`content`,{type:`string`,description:"Exact value of the DNS record content. This is a convenience alias for `content.exact`."}).option(`content-exact`,{type:`string`,description:`Exact value of the DNS record content. Content filters are case-insensitive.`}).option(`content-contains`,{type:`string`,description:`Substring of the DNS record content. Content filters are case-insensitive.`}).option(`content-startswith`,{type:`string`,description:`Prefix of the DNS record content. Content filters are case-insensitive.`}).option(`content-endswith`,{type:`string`,description:`Suffix of the DNS record content. Content filters are case-insensitive.`}).option(`proxied`,{type:`boolean`,description:`Whether the record is receiving the performance and security benefits of Cloudflare.`}).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. Note that the interaction between tag filters is controlled by the `tag-match` parameter instead.",choices:[`any`,`all`]}).option(`comment`,{type:`string`,description:"Exact value of the DNS record comment. This is a convenience alias for `comment.exact`."}).option(`comment-present`,{type:`string`,description:`If this parameter is present, only records *with* a comment are returned.`}).option(`comment-absent`,{type:`string`,description:`If this parameter is present, only records *without* a comment are returned.`}).option(`comment-exact`,{type:`string`,description:`Exact value of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-contains`,{type:`string`,description:`Substring of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-startswith`,{type:`string`,description:`Prefix of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-endswith`,{type:`string`,description:`Suffix of the DNS record comment. Comment filters are case-insensitive.`}).option(`tag`,{type:`string`,description:"Condition on the DNS record tag.\n\nParameter values can be of the form `<tag-name>:<tag-value>` to search for an exact `name:value` pair, or just `<tag-name>` to search for records with a specific tag name regardless of its value.\n\nThis is a convenience shorthand for the more powerful `tag.<predicate>` parameters.\nExamples:\n- `tag=important` is equivalent to `tag.present=important`\n- `tag=team:DNS` is equivalent to `tag.exact=team:DNS`"}).option(`tag-present`,{type:`string`,description:`Name of a tag which must be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-absent`,{type:`string`,description:`Name of a tag which must *not* be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-exact`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value is `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-contains`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value contains `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-startswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value starts with `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-endswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value ends with `<tag-value>`. Tag filters are case-insensitive."}).option(`search`,{type:`string`,description:"Allows searching in multiple properties of a DNS record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is subject to change in the future. This parameter works independently of the `match` setting. For automated searches, please use the other available parameters."}).option(`tag-match`,{type:`string`,description:"Whether to match all tag search requirements or at least one (any). If set to `all`, acts like a logical AND between tag filters. If set to `any`, acts like a logical OR instead. Note that the regular `match` parameter is still used to combine the resulting condition with other filters that aren't related to tags.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of DNS records per page.`}).option(`order`,{type:`string`,description:`Field to order DNS records by.`,choices:[`type`,`name`,`content`,`ttl`,`proxied`]}).option(`direction`,{type:`string`,description:`Direction to order DNS records in.`,choices:[`asc`,`desc`]}).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(`shadowed-by-name`,{type:`string`,description:"Filters to records at or below the
|
|
44
|
+
List, search, sort, and filter a zones' DNS records.`).option(`name`,{type:`string`,description:"Exact value of the DNS record name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS record name. Name filters are case-insensitive.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS record name. Name filters are case-insensitive.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS record name. Name filters are case-insensitive.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS record name. Name filters are case-insensitive.`}).option(`type`,{type:`string`,description:`Record type.`,choices:[`A`,`AAAA`,`CAA`,`CERT`,`CNAME`,`DNSKEY`,`DS`,`HTTPS`,`LOC`,`MX`,`NAPTR`,`NS`,`OPENPGPKEY`,`PTR`,`SMIMEA`,`SRV`,`SSHFP`,`SVCB`,`TLSA`,`TXT`,`URI`]}).option(`content`,{type:`string`,description:"Exact value of the DNS record content. This is a convenience alias for `content.exact`."}).option(`content-exact`,{type:`string`,description:`Exact value of the DNS record content. Content filters are case-insensitive.`}).option(`content-contains`,{type:`string`,description:`Substring of the DNS record content. Content filters are case-insensitive.`}).option(`content-startswith`,{type:`string`,description:`Prefix of the DNS record content. Content filters are case-insensitive.`}).option(`content-endswith`,{type:`string`,description:`Suffix of the DNS record content. Content filters are case-insensitive.`}).option(`proxied`,{type:`boolean`,description:`Whether the record is receiving the performance and security benefits of Cloudflare.`}).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. Note that the interaction between tag filters is controlled by the `tag-match` parameter instead.",choices:[`any`,`all`]}).option(`comment`,{type:`string`,description:"Exact value of the DNS record comment. This is a convenience alias for `comment.exact`."}).option(`comment-present`,{type:`string`,description:`If this parameter is present, only records *with* a comment are returned.`}).option(`comment-absent`,{type:`string`,description:`If this parameter is present, only records *without* a comment are returned.`}).option(`comment-exact`,{type:`string`,description:`Exact value of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-contains`,{type:`string`,description:`Substring of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-startswith`,{type:`string`,description:`Prefix of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-endswith`,{type:`string`,description:`Suffix of the DNS record comment. Comment filters are case-insensitive.`}).option(`tag`,{type:`string`,description:"Condition on the DNS record tag.\n\nParameter values can be of the form `<tag-name>:<tag-value>` to search for an exact `name:value` pair, or just `<tag-name>` to search for records with a specific tag name regardless of its value.\n\nThis is a convenience shorthand for the more powerful `tag.<predicate>` parameters.\nExamples:\n- `tag=important` is equivalent to `tag.present=important`\n- `tag=team:DNS` is equivalent to `tag.exact=team:DNS`"}).option(`tag-present`,{type:`string`,description:`Name of a tag which must be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-absent`,{type:`string`,description:`Name of a tag which must *not* be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-exact`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value is `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-contains`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value contains `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-startswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value starts with `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-endswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value ends with `<tag-value>`. Tag filters are case-insensitive."}).option(`search`,{type:`string`,description:"Allows searching in multiple properties of a DNS record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is subject to change in the future. This parameter works independently of the `match` setting. For automated searches, please use the other available parameters."}).option(`tag-match`,{type:`string`,description:"Whether to match all tag search requirements or at least one (any). If set to `all`, acts like a logical AND between tag filters. If set to `any`, acts like a logical OR instead. Note that the regular `match` parameter is still used to combine the resulting condition with other filters that aren't related to tags.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of DNS records per page.`}).option(`order`,{type:`string`,description:`Field to order DNS records by.`,choices:[`type`,`name`,`content`,`ttl`,`proxied`]}).option(`direction`,{type:`string`,description:`Direction to order DNS records in.`,choices:[`asc`,`desc`]}).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(`shadowed-by-name`,{type:`string`,description:"Filters the response to records at or below the specified NS delegation name. NS, DS, and NSEC records at the delegation name are excluded because they are not shadowed by that delegation. Those record types are included only when they exist below the delegation. The value must be a non-apex subdomain of the zone. Requires `include_shadow_metadata=true`. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`shadowing-name`,{type:`string`,description:`Returns NS records that shadow the given name, searching at the name itself and each of its ancestor names within the zone, excluding the zone apex. The value must be a subdomain of the zone; the zone apex is not accepted. 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})}const U={command:`list`,describe:`List DNS Records`,builder:_(H),handler:async e=>l({command:`dns records list`,classification:{safeFlags:[`type`,`proxied`,`match`,`tag-match`,`order`,`direction`,`include-shadow-metadata`,`dry-run`]}},e,async()=>{let t={name:e.name,"name.exact":e[`name-exact`],"name.contains":e[`name-contains`],"name.startswith":e[`name-startswith`],"name.endswith":e[`name-endswith`],type:e.type,content:e.content,"content.exact":e[`content-exact`],"content.contains":e[`content-contains`],"content.startswith":e[`content-startswith`],"content.endswith":e[`content-endswith`],proxied:e.proxied,match:e.match,comment:e.comment,"comment.present":e[`comment-present`],"comment.absent":e[`comment-absent`],"comment.exact":e[`comment-exact`],"comment.contains":e[`comment-contains`],"comment.startswith":e[`comment-startswith`],"comment.endswith":e[`comment-endswith`],tag:e.tag,"tag.present":e[`tag-present`],"tag.absent":e[`tag-absent`],"tag.exact":e[`tag-exact`],"tag.contains":e[`tag-contains`],"tag.startswith":e[`tag-startswith`],"tag.endswith":e[`tag-endswith`],search:e.search,tag_match:e[`tag-match`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,include_shadow_metadata:e[`include-shadow-metadata`],shadowed_by_name:e[`shadowed-by-name`],shadowing_name:e[`shadowing-name`]};if(e.dryRun){s({command:`cf dns records list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.dns.records.list({zone_id:a,...t}));o(l,{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 dns records scan-list
|
|
45
45
|
|
|
46
46
|
Retrieves the list of DNS records discovered up to this point by the asynchronous scan. These records are temporary until explicitly accepted or rejected via \`POST /scan/review\`. Additional records may be discovered by the scan later.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`scan-list`,describe:`List Scanned DNS Records`,builder:W,handler:async e=>l({command:`dns records scan-list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns records scan-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan/review`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},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.dns.records.scanList({zone_id:r}));o(a,{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 dns records scan-review
|
|
47
47
|
|
|
@@ -57,7 +57,7 @@ Update DNS settings for an account or zone`).option(`enforce-dns-only`,{type:`bo
|
|
|
57
57
|
|
|
58
58
|
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 se={command:`get`,describe:`Show DNS Settings`,builder:oe,handler:async t=>l({command:`dns settings account get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf dns settings account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/dns_settings`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(t),u=t.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();u===`zones`?t.zoneId=d:t.accountId=d;let f=await c(`Loading`,async()=>l.dns.settings.account.get({account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 dns settings account nameserver-sets create
|
|
59
59
|
|
|
60
|
-
Creates an immutable Custom Nameserver Set. To change a set, create a new one, 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.
|
|
60
|
+
Creates an immutable Custom Nameserver Set. To change a set, create a new one, 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(`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 le={command:`create`,describe:`Create Custom Nameserver Set`,builder:ce,handler:async t=>l({command:`dns settings account nameserver-sets create`,classification:{safeFlags:[`advanced`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns settings account nameserver-sets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/nameserver_sets`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({advanced:t.advanced,ip_set:t[`ip-set`],nameservers:d(t.nameservers,`nameservers`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.dns.settings.account.nameserverSets.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}if(t.nameservers===void 0)throw Error(`--nameservers is required (or pass --body with this field set).`);let p=f({advanced:t.advanced,ip_set:t[`ip-set`],nameservers:d(t.nameservers,`nameservers`)}),m=await c(`Creating`,async()=>i.dns.settings.account.nameserverSets.create({...p,account_id:l}));o(m,{successLabel:`Created`})})};function ue(e){return e.usage(`$0 dns settings account nameserver-sets delete <nameserver-set-id>
|
|
61
61
|
|
|
62
62
|
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 de={command:`delete <nameserver-set-id>`,describe:`Delete Custom Nameserver Set`,builder:ue,handler:async t=>l({command:`dns settings account nameserver-sets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns settings account nameserver-sets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/nameserver_sets/${t[`nameserver-set-id`]==null?`<nameserver-set-id>`:encodeURIComponent(String(t[`nameserver-set-id`]))}`,pathParams:{"nameserver-set-id":String(t[`nameserver-set-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
|
|
63
63
|
`);return}let u=await c(`Deleting`,async()=>i.dns.settings.account.nameserverSets.delete({account_id:l,nameserver_set_id:t[`nameserver-set-id`]}));o(u,{successLabel:`Deleted`})})};function fe(e){return e.usage(`$0 dns settings account nameserver-sets get <nameserver-set-id>
|
|
@@ -132,7 +132,7 @@ List Peers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show wh
|
|
|
132
132
|
|
|
133
133
|
Modify Peer.`).positional(`peer-id`,{type:`string`,description:`Peer ID`,demandOption:!0}).option(`ip`,{type:`string`,description:`IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to.`}).option(`ixfr-enable`,{type:`boolean`,description:`Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones.`}).option(`name`,{type:`string`,description:`The name of the peer.`}).option(`port`,{type:`number`,description:`DNS port of primary or secondary nameserver, depending on what zone this peer is linked to.`}).option(`tsig-id`,{type:`string`,description:`TSIG authentication will be used for zone transfer if configured.`}).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 At={command:`update <peer-id>`,describe:`Update Peer`,builder:kt,handler:async t=>l({command:`dns zone-transfers peers update`,classification:{safeFlags:[`ixfr-enable`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers peers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/peers/${t[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(t[`peer-id`]))}`,pathParams:{"peer-id":String(t[`peer-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({ip:p(t.ip,`ip`,`text`),ixfr_enable:t[`ixfr-enable`],name:p(t.name,`name`,`text`),port:t.port,tsig_id:p(t[`tsig-id`],`tsig-id`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.dns.zoneTransfers.peers.update({body:e,account_id:l,peer_id:t[`peer-id`]}));o(n,{successLabel:`Updated`});return}t.name===void 0&&(t.name=await h(`name`,`The name of the peer.`));let d=f({ip:p(t.ip,`ip`,`text`),ixfr_enable:t[`ixfr-enable`],name:p(t.name,`name`,`text`),port:t.port,tsig_id:p(t[`tsig-id`],`tsig-id`,`text`)}),m=await c(`Updating`,async()=>i.dns.zoneTransfers.peers.update({body:d,account_id:l,peer_id:t[`peer-id`]}));o(m,{successLabel:`Updated`})})},jt={command:`peers`,describe:`Operations for zone-transfers.peers`,builder:e=>e.command(St).command(wt).command(Et).command(Ot).command(At).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mt(e){return e.usage(`$0 dns zone-transfers tsigs create
|
|
134
134
|
|
|
135
|
-
Create TSIG.`).option(`algo`,{type:`string`,description:`TSIG algorithm.`}).option(`name`,{type:`string`,description:`TSIG key name.`}).option(`secret`,{type:`string`,description:`TSIG secret.`}).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 Nt={command:`create`,describe:`Create TSIG`,builder:Mt,handler:async t=>l({command:`dns zone-transfers tsigs create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:e,account_id:l}));o(n,{successLabel:`Created`});return}t.algo===void 0&&(t.algo=await h(`algo`,`TSIG algorithm.`)),t.name===void 0&&(t.name=await h(`name`,`TSIG key name.`)),t.secret===void 0&&(t.secret=await h(`secret`,`TSIG secret.`,{kind:`secret`}));let d=f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}),m=await c(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:d,account_id:l}));o(m,{successLabel:`Created`})})};function $(e){return e.usage(`$0 dns zone-transfers tsigs delete <tsig-id>
|
|
135
|
+
Create TSIG.`).option(`algo`,{type:`string`,description:`TSIG algorithm.`}).option(`name`,{type:`string`,description:`TSIG key name.`}).option(`secret`,{type:`string`,description:`TSIG secret.`}).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 Nt={command:`create`,describe:`Create TSIG`,builder:Mt,handler:async t=>l({command:`dns zone-transfers tsigs create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}):u(t.body),sensitiveBodyPaths:[[`secret`]]});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:e,account_id:l}));o(n,{successLabel:`Created`});return}t.algo===void 0&&(t.algo=await h(`algo`,`TSIG algorithm.`)),t.name===void 0&&(t.name=await h(`name`,`TSIG key name.`)),t.secret===void 0&&(t.secret=await h(`secret`,`TSIG secret.`,{kind:`secret`}));let d=f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}),m=await c(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:d,account_id:l}));o(m,{successLabel:`Created`})})};function $(e){return e.usage(`$0 dns zone-transfers tsigs delete <tsig-id>
|
|
136
136
|
|
|
137
137
|
Delete TSIG.`).positional(`tsig-id`,{type:`string`,description:`Tsig 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 Pt={command:`delete <tsig-id>`,describe:`Delete TSIG`,builder:$,handler:async t=>l({command:`dns zone-transfers tsigs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs/${t[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(t[`tsig-id`]))}`,pathParams:{"tsig-id":String(t[`tsig-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
|
|
138
138
|
`);return}let u=await c(`Deleting`,async()=>i.dns.zoneTransfers.tsigs.delete({account_id:l,tsig_id:t[`tsig-id`]}));o(u,{successLabel:`Deleted`})})};function Ft(e){return e.usage(`$0 dns zone-transfers tsigs get <tsig-id>
|
|
@@ -141,4 +141,4 @@ Get TSIG.`).positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOpti
|
|
|
141
141
|
|
|
142
142
|
List TSIGs.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rt={command:`list`,describe:`List TSIGs`,builder:Lt,handler:async t=>l({command:`dns zone-transfers tsigs list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.dns.zoneTransfers.tsigs.list({account_id:l}));o(u,{successLabel:`Loaded`})})};function zt(e){return e.usage(`$0 dns zone-transfers tsigs update <tsig-id>
|
|
143
143
|
|
|
144
|
-
Modify TSIG.`).positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`algo`,{type:`string`,description:`TSIG algorithm.`}).option(`name`,{type:`string`,description:`TSIG key name.`}).option(`secret`,{type:`string`,description:`TSIG secret.`}).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 Bt={command:`update <tsig-id>`,describe:`Update TSIG`,builder:zt,handler:async t=>l({command:`dns zone-transfers tsigs update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs/${t[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(t[`tsig-id`]))}`,pathParams:{"tsig-id":String(t[`tsig-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:e,account_id:l,tsig_id:t[`tsig-id`]}));o(n,{successLabel:`Updated`});return}t.algo===void 0&&(t.algo=await h(`algo`,`TSIG algorithm.`)),t.name===void 0&&(t.name=await h(`name`,`TSIG key name.`)),t.secret===void 0&&(t.secret=await h(`secret`,`TSIG secret.`,{kind:`secret`}));let d=f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}),m=await c(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:d,account_id:l,tsig_id:t[`tsig-id`]}));o(m,{successLabel:`Updated`})})},Vt={command:`tsigs`,describe:`Operations for zone-transfers.tsigs`,builder:e=>e.command(Nt).command(Pt).command(It).command(Rt).command(Bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ht={command:`zone-transfers`,describe:`Operations for zone-transfers`,builder:e=>e.command(We).command(qe).command(nt).command(bt).command(jt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ut={command:`dns`,describe:`dns`,builder:e=>e.command(D).command(re).command(ke).command(Ne).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ut as default};
|
|
144
|
+
Modify TSIG.`).positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`algo`,{type:`string`,description:`TSIG algorithm.`}).option(`name`,{type:`string`,description:`TSIG key name.`}).option(`secret`,{type:`string`,description:`TSIG secret.`}).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 Bt={command:`update <tsig-id>`,describe:`Update TSIG`,builder:zt,handler:async t=>l({command:`dns zone-transfers tsigs update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs/${t[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(t[`tsig-id`]))}`,pathParams:{"tsig-id":String(t[`tsig-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}):u(t.body),sensitiveBodyPaths:[[`secret`]]});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:e,account_id:l,tsig_id:t[`tsig-id`]}));o(n,{successLabel:`Updated`});return}t.algo===void 0&&(t.algo=await h(`algo`,`TSIG algorithm.`)),t.name===void 0&&(t.name=await h(`name`,`TSIG key name.`)),t.secret===void 0&&(t.secret=await h(`secret`,`TSIG secret.`,{kind:`secret`}));let d=f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}),m=await c(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:d,account_id:l,tsig_id:t[`tsig-id`]}));o(m,{successLabel:`Updated`})})},Vt={command:`tsigs`,describe:`Operations for zone-transfers.tsigs`,builder:e=>e.command(Nt).command(Pt).command(It).command(Rt).command(Bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ht={command:`zone-transfers`,describe:`Operations for zone-transfers`,builder:e=>e.command(We).command(qe).command(nt).command(bt).command(jt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ut={command:`dns`,describe:`dns`,builder:e=>e.command(D).command(re).command(ke).command(Ne).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ut as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-RlgRrmbm.mjs";function p(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
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./output-BOe-3AQG.mjs";function t(e,t){let n=(e,t)=>{let r=t[0];if(r===void 0||typeof e!=`object`||!e)return e;if(Array.isArray(e))return e.map(e=>n(e,t));let i=e[r];return i===void 0?e:{...e,[r]:t.length===1?`<redacted>`:n(i,t.slice(1))}},r=e;for(let e of t)r=n(r,e);return r}function n({sensitiveBodyPaths:n,...r}){if(!n?.length){e(r);return}e({...r,body:t(r.body,n)})}export{n as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";function c(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 l={command:`list`,describe:`List Durable Object Namespaces`,builder:c,handler:async c=>s({command:`durable-objects namespaces list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({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:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.durableObjects.namespaces.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function u(e){return e.usage(`$0 durable-objects namespaces objects list
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";function c(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 l={command:`edit`,describe:`Configure DMARC Reports`,builder:c,handler:async c=>a({command:`email-auth dmarc-reports edit`,classification:{safeFlags:[`enabled`,`skip-wizard`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf email-auth dmarc-reports edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({enabled:c.enabled,skip_wizard:c[`skip-wizard`]}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body),t=await i(`Updating`,async()=>a.emailAuth.dmarcReports.edit({...e,zone_id:l}));n(t,{successLabel:`Updated`});return}let u=s({enabled:c.enabled,skip_wizard:c[`skip-wizard`]}),d=await i(`Updating`,async()=>a.emailAuth.dmarcReports.edit({...u,zone_id:l}));n(d,{successLabel:`Updated`})})};function u(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 d={command:`get`,describe:`Get DMARC Report Status`,builder:u,handler:async o=>a({command:`email-auth dmarc-reports get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf email-auth dmarc-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.emailAuth.dmarcReports.get({zone_id:s}));n(c,{successLabel:`Loaded`})})},f={command:`dmarc-reports`,describe:`Operations for dmarc-reports`,builder:e=>e.command(l).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function p(e){return e.usage(`$0 email-auth spf inspect
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,i as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-RlgRrmbm.mjs";import{t as g}from"./cli-types-9oYmRTHJ.mjs";function _(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 v={command:`create`,describe:`Create a destination address`,builder:_,handler:async r=>c({command:`email-routing addresses create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf email-routing addresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/routing/addresses`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({email:f(r.email,`email`,`text`)}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.emailRouting.addresses.create({...e,account_id:u}));a(t,{successLabel:`Created`});return}r.email===void 0&&(r.email=await p(`email`,`The contact email address of the user.`));let m=d({email:f(r.email,`email`,`text`)}),h=await s(`Creating`,async()=>c.emailRouting.addresses.create({...m,account_id:u}));a(h,{successLabel:`Created`})})};function y(e){return e.usage(`$0 email-routing addresses delete <destination-address-identifier>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-RlgRrmbm.mjs";import{t as h}from"./cli-types-9oYmRTHJ.mjs";function g(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 ee={command:`batch`,describe:`Batch allow policy operations`,builder:g,handler:async d=>s({command:`email-security allow-policies batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf email-security allow-policies batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/allow_policies/batch`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,!await m({force:!!d.force,message:`This operation may delete the selected allow policies and restore normal security scanning and disposition actions for matching emails.`})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}if(d.body){let e=c(d.body),t=await o(`Deleting`,async()=>s.emailSecurity.allowPolicies.batch({...e,account_id:f}));i(t,{successLabel:`Deleted`});return}if(d.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(d.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(d.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(d.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}),h=await o(`Deleting`,async()=>s.emailSecurity.allowPolicies.batch({...p,account_id:f}));i(h,{successLabel:`Deleted`})})};function te(e){return e.usage(`$0 email-security allow-policies create
|
|
@@ -37,7 +37,7 @@ Replaces an existing blocked sender pattern in full. Unlike PATCH, every field i
|
|
|
37
37
|
|
|
38
38
|
Cancels the job, marking it as cancelled and stopping any pending message processing. The job record remains visible in list and detail endpoints.`).positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job to cancel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`cancel <job-id>`,describe:`Cancel a bulk action job`,builder:J,handler:async c=>s({command:`email-security bulk-actions cancel`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security bulk-actions cancel`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/bulk/${c[`job-id`]==null?`<job-id>`:encodeURIComponent(String(c[`job-id`]))}/cancel`,pathParams:{"job-id":String(c[`job-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Creating`,async()=>s.emailSecurity.bulkActions.cancel({account_id:l,job_id:c[`job-id`]}));i(u,{successLabel:`Created`})})};function X(e){return e.usage(`$0 email-security bulk-actions create
|
|
39
39
|
|
|
40
|
-
Creates a new bulk action job to move or release messages that match the provided search parameters. To move or release an explicit list of known messages instead of a search, use the move or release endpoints.`).option(`action`,{type:`string`,description:`The action the job performs on every message matching the search parameters.`,choices:[`MOVE`,`RELEASE`]}).option(`comment`,{type:`string`,description:`Optional note describing the job.`}).option(`search-params-action-log`,{type:`boolean`,description:"Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026.",default:!1}).option(`search-params-alert-id`,{type:`string`,description:`Alert ID of the detection to filter by.`}).option(`search-params-detections-only`,{type:`boolean`,description:`Whether to include only detections in search results.`,default:!0}).option(`search-params-domain`,{type:`string`,description:`Match messages that mention this domain — sender domain, recipient domain, or a domain in a link.`}).option(`search-params-end`,{type:`string`,description:`End of search date range.`}).option(`search-params-exact-subject`,{type:`string`,description:`Match messages whose subject line equals this value exactly.`}).option(`search-params-message-action`,{type:`string`,description:`Message actions to filter by.`,choices:[`PREVIEW`,`QUARANTINE_RELEASED`,`MOVED`]}).option(`search-params-message-id`,{type:`string`,description:`Message-ID header value to filter by.`}).option(`search-params-metric`,{type:`string`,description:`Metric name to filter the search by.`}).option(`search-params-query`,{type:`string`,description:`Space-delimited search term. Case-insensitive.`}).option(`search-params-recipient`,{type:`string`,description:`Match messages whose recipient is this email address or domain.`}).option(`search-params-sender`,{type:`string`,description:`Match messages whose sender is this email address or domain.`}).option(`search-params-smtp-helo-ip`,{type:`string`,description:`Matches messages whose SMTP HELO server IP address equals this value.`}).option(`search-params-start`,{type:`string`,description:`Beginning of search date range.`}).option(`search-params-subject`,{type:`string`,description:`Match messages whose subject contains these keywords, in any order.`}).option(`search-params-submissions`,{type:`boolean`,description:`Whether to search reclassification submissions instead of original messages.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`create`,describe:`Create a bulk action job`,builder:X,handler:async l=>s({command:`email-security bulk-actions create`,classification:{safeFlags:[`action`,`search-params-action-log`,`search-params-detections-only`,`search-params-message-action`,`search-params-submissions`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security bulk-actions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/bulk`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({action:d(l.action,`action`,`text`),comment:d(l.comment,`comment`,`text`),search_params:{action_log:l[`search-params-action-log`],alert_id:d(l[`search-params-alert-id`],`search-params-alert-id`,`text`),detections_only:l[`search-params-detections-only`],domain:d(l[`search-params-domain`],`search-params-domain`,`text`),end:d(l[`search-params-end`],`search-params-end`,`text`),exact_subject:d(l[`search-params-exact-subject`],`search-params-exact-subject`,`text`),message_action:d(l[`search-params-message-action`],`search-params-message-action`,`text`),message_id:d(l[`search-params-message-id`],`search-params-message-id`,`text`),metric:d(l[`search-params-metric`],`search-params-metric`,`text`),query:d(l[`search-params-query`],`search-params-query`,`text`),recipient:d(l[`search-params-recipient`],`search-params-recipient`,`text`),sender:d(l[`search-params-sender`],`search-params-sender`,`text`),smtp_helo_ip:d(l[`search-params-smtp-helo-ip`],`search-params-smtp-helo-ip`,`text`),start:d(l[`search-params-start`],`search-params-start`,`text`),subject:d(l[`search-params-subject`],`search-params-subject`,`text`),submissions:l[`search-params-submissions`]}}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.bulkActions.create({...e,account_id:f}));i(t,{successLabel:`Created`});return}l.action===void 0&&(l.action=await p(`action`,`The action the job performs on every message matching the search parameters.`,[`MOVE`,`RELEASE`]));let m=u({action:d(l.action,`action`,`text`),comment:d(l.comment,`comment`,`text`),search_params:{action_log:l[`search-params-action-log`],alert_id:d(l[`search-params-alert-id`],`search-params-alert-id`,`text`),detections_only:l[`search-params-detections-only`],domain:d(l[`search-params-domain`],`search-params-domain`,`text`),end:d(l[`search-params-end`],`search-params-end`,`text`),exact_subject:d(l[`search-params-exact-subject`],`search-params-exact-subject`,`text`),message_action:d(l[`search-params-message-action`],`search-params-message-action`,`text`),message_id:d(l[`search-params-message-id`],`search-params-message-id`,`text`),metric:d(l[`search-params-metric`],`search-params-metric`,`text`),query:d(l[`search-params-query`],`search-params-query`,`text`),recipient:d(l[`search-params-recipient`],`search-params-recipient`,`text`),sender:d(l[`search-params-sender`],`search-params-sender`,`text`),smtp_helo_ip:d(l[`search-params-smtp-helo-ip`],`search-params-smtp-helo-ip`,`text`),start:d(l[`search-params-start`],`search-params-start`,`text`),subject:d(l[`search-params-subject`],`search-params-subject`,`text`),submissions:l[`search-params-submissions`]}}),h=await o(`Creating`,async()=>s.emailSecurity.bulkActions.create({...m,account_id:f}));i(h,{successLabel:`Created`})})};function Q(e){return e.usage("$0 email-security bulk-actions delete <job-id>\n\nDeletes the job, removing it from all list and detail endpoints. Only jobs in a terminal state (`COMPLETED`, `CANCELLED`, or `FAILED`) can be deleted. To stop an in-progress job without removing it, use the cancel endpoint instead.").positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ne={command:`delete <job-id>`,describe:`Delete a bulk action job`,builder:Q,handler:async c=>s({command:`email-security bulk-actions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security bulk-actions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/bulk/${c[`job-id`]==null?`<job-id>`:encodeURIComponent(String(c[`job-id`]))}`,pathParams:{"job-id":String(c[`job-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force,message:`This operation permanently deletes the completed, cancelled, or failed bulk action job from all list and detail endpoints.`})){process.stderr.write(`Aborted.
|
|
40
|
+
Creates a new bulk action job to move or release messages that match the provided search parameters. To move or release an explicit list of known messages instead of a search, use the move or release endpoints.`).option(`action`,{type:`string`,description:`The action the job performs on every message matching the search parameters.`,choices:[`MOVE`,`RELEASE`]}).option(`comment`,{type:`string`,description:`Optional note describing the job.`}).option(`destination`,{type:`string`,description:`Required when action is 'MOVE'.`,choices:[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]}).option(`expected-disposition`,{type:`string`,description:`Nonfunctional field. End of life: December 1, 2026.`,choices:[`MALICIOUS`,`MALICIOUS-BEC`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`ENCRYPTED`,`EXTERNAL`,`UNKNOWN`,`NONE`]}).option(`search-params-action-log`,{type:`boolean`,description:"Deprecated, use `GET /investigate/{investigate_id}/action_log` instead. End of life: November 1, 2026.",default:!1}).option(`search-params-alert-id`,{type:`string`,description:`Alert ID of the detection to filter by.`}).option(`search-params-delivery-status`,{type:`string`,description:`Delivery status to filter by.`,choices:[`delivered`,`moved`,`quarantined`,`rejected`,`deferred`,`bounced`,`queued`,`move_failed`]}).option(`search-params-detections-only`,{type:`boolean`,description:`Whether to include only detections in search results.`,default:!0}).option(`search-params-domain`,{type:`string`,description:`Match messages that mention this domain — sender domain, recipient domain, or a domain in a link.`}).option(`search-params-end`,{type:`string`,description:`End of search date range.`}).option(`search-params-exact-subject`,{type:`string`,description:`Match messages whose subject line equals this value exactly.`}).option(`search-params-final-disposition`,{type:`string`,description:`Dispositions to filter by.`,choices:[`MALICIOUS`,`MALICIOUS-BEC`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`ENCRYPTED`,`EXTERNAL`,`UNKNOWN`,`NONE`]}).option(`search-params-message-action`,{type:`string`,description:`Message actions to filter by.`,choices:[`PREVIEW`,`QUARANTINE_RELEASED`,`MOVED`]}).option(`search-params-message-id`,{type:`string`,description:`Message-ID header value to filter by.`}).option(`search-params-metric`,{type:`string`,description:`Metric name to filter the search by.`}).option(`search-params-query`,{type:`string`,description:`Space-delimited search term. Case-insensitive.`}).option(`search-params-recipient`,{type:`string`,description:`Match messages whose recipient is this email address or domain.`}).option(`search-params-sender`,{type:`string`,description:`Match messages whose sender is this email address or domain.`}).option(`search-params-smtp-helo-ip`,{type:`string`,description:`Matches messages whose SMTP HELO server IP address equals this value.`}).option(`search-params-start`,{type:`string`,description:`Beginning of search date range.`}).option(`search-params-subject`,{type:`string`,description:`Match messages whose subject contains these keywords, in any order.`}).option(`search-params-submissions`,{type:`boolean`,description:`Whether to search reclassification submissions instead of original messages.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`create`,describe:`Create a bulk action job`,builder:X,handler:async l=>s({command:`email-security bulk-actions create`,classification:{safeFlags:[`action`,`destination`,`expected-disposition`,`search-params-action-log`,`search-params-delivery-status`,`search-params-detections-only`,`search-params-final-disposition`,`search-params-message-action`,`search-params-submissions`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security bulk-actions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/bulk`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({action:d(l.action,`action`,`text`),comment:d(l.comment,`comment`,`text`),destination:d(l.destination,`destination`,`text`),expected_disposition:d(l[`expected-disposition`],`expected-disposition`,`text`),search_params:{action_log:l[`search-params-action-log`],alert_id:d(l[`search-params-alert-id`],`search-params-alert-id`,`text`),delivery_status:d(l[`search-params-delivery-status`],`search-params-delivery-status`,`text`),detections_only:l[`search-params-detections-only`],domain:d(l[`search-params-domain`],`search-params-domain`,`text`),end:d(l[`search-params-end`],`search-params-end`,`text`),exact_subject:d(l[`search-params-exact-subject`],`search-params-exact-subject`,`text`),final_disposition:d(l[`search-params-final-disposition`],`search-params-final-disposition`,`text`),message_action:d(l[`search-params-message-action`],`search-params-message-action`,`text`),message_id:d(l[`search-params-message-id`],`search-params-message-id`,`text`),metric:d(l[`search-params-metric`],`search-params-metric`,`text`),query:d(l[`search-params-query`],`search-params-query`,`text`),recipient:d(l[`search-params-recipient`],`search-params-recipient`,`text`),sender:d(l[`search-params-sender`],`search-params-sender`,`text`),smtp_helo_ip:d(l[`search-params-smtp-helo-ip`],`search-params-smtp-helo-ip`,`text`),start:d(l[`search-params-start`],`search-params-start`,`text`),subject:d(l[`search-params-subject`],`search-params-subject`,`text`),submissions:l[`search-params-submissions`]}}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.bulkActions.create({...e,account_id:f}));i(t,{successLabel:`Created`});return}l.action===void 0&&(l.action=await p(`action`,`The action the job performs on every message matching the search parameters.`,[`MOVE`,`RELEASE`]));let m=u({action:d(l.action,`action`,`text`),comment:d(l.comment,`comment`,`text`),destination:d(l.destination,`destination`,`text`),expected_disposition:d(l[`expected-disposition`],`expected-disposition`,`text`),search_params:{action_log:l[`search-params-action-log`],alert_id:d(l[`search-params-alert-id`],`search-params-alert-id`,`text`),delivery_status:d(l[`search-params-delivery-status`],`search-params-delivery-status`,`text`),detections_only:l[`search-params-detections-only`],domain:d(l[`search-params-domain`],`search-params-domain`,`text`),end:d(l[`search-params-end`],`search-params-end`,`text`),exact_subject:d(l[`search-params-exact-subject`],`search-params-exact-subject`,`text`),final_disposition:d(l[`search-params-final-disposition`],`search-params-final-disposition`,`text`),message_action:d(l[`search-params-message-action`],`search-params-message-action`,`text`),message_id:d(l[`search-params-message-id`],`search-params-message-id`,`text`),metric:d(l[`search-params-metric`],`search-params-metric`,`text`),query:d(l[`search-params-query`],`search-params-query`,`text`),recipient:d(l[`search-params-recipient`],`search-params-recipient`,`text`),sender:d(l[`search-params-sender`],`search-params-sender`,`text`),smtp_helo_ip:d(l[`search-params-smtp-helo-ip`],`search-params-smtp-helo-ip`,`text`),start:d(l[`search-params-start`],`search-params-start`,`text`),subject:d(l[`search-params-subject`],`search-params-subject`,`text`),submissions:l[`search-params-submissions`]}}),h=await o(`Creating`,async()=>s.emailSecurity.bulkActions.create({...m,account_id:f}));i(h,{successLabel:`Created`})})};function Q(e){return e.usage("$0 email-security bulk-actions delete <job-id>\n\nDeletes the job, removing it from all list and detail endpoints. Only jobs in a terminal state (`COMPLETED`, `CANCELLED`, or `FAILED`) can be deleted. To stop an in-progress job without removing it, use the cancel endpoint instead.").positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ne={command:`delete <job-id>`,describe:`Delete a bulk action job`,builder:Q,handler:async c=>s({command:`email-security bulk-actions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security bulk-actions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/bulk/${c[`job-id`]==null?`<job-id>`:encodeURIComponent(String(c[`job-id`]))}`,pathParams:{"job-id":String(c[`job-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force,message:`This operation permanently deletes the completed, cancelled, or failed bulk action job from all list and detail endpoints.`})){process.stderr.write(`Aborted.
|
|
41
41
|
`);return}let u=await o(`Deleting`,async()=>s.emailSecurity.bulkActions.delete({account_id:l,job_id:c[`job-id`]}));i(u,{successLabel:`Deleted`})})};function re(e){return e.usage(`$0 email-security bulk-actions get <job-id>
|
|
42
42
|
|
|
43
43
|
Returns the status and details of a specific bulk action job.`).positional(`job-id`,{type:`string`,description:`Identifier of the bulk action job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <job-id>`,describe:`Get bulk action job details`,builder:re,handler:async c=>s({command:`email-security bulk-actions get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security bulk-actions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/bulk/${c[`job-id`]==null?`<job-id>`:encodeURIComponent(String(c[`job-id`]))}`,pathParams:{"job-id":String(c[`job-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.bulkActions.get({account_id:l,job_id:c[`job-id`]}));i(u,{successLabel:`Loaded`})})};function ae(e){return e.usage(`$0 email-security bulk-actions list
|
|
@@ -63,27 +63,27 @@ Returns a paginated list of content policies. These policies match against the s
|
|
|
63
63
|
Executes multiple domain operations in a single request. All four operation arrays (deletes, patches, puts, posts) are required and executed in order. Send empty arrays for unused operations.`).option(`deletes`,{type:`string`,description:`IDs of the domains to remove protection from. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`Partial updates to apply — each entry carries the domain's ID and only the fields to change. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`Domains to add protection for. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`Full replacements to apply — each entry carries the domain's ID and every field of its new value. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`batch`,describe:`Batch domain operations`,builder:we,handler:async d=>s({command:`email-security domains batch`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf email-security domains batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains/batch`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,!await m({force:!!d.force,message:`This operation may permanently delete protection for the selected email domains. Emails for those domains will no longer be processed by Email Security.`})){process.stderr.write(`Aborted.
|
|
64
64
|
`);return}if(d.body){let e=c(d.body),t=await o(`Deleting`,async()=>s.emailSecurity.domains.batch({...e,account_id:f}));i(t,{successLabel:`Deleted`});return}if(d.deletes===void 0)throw Error(`--deletes is required (or pass --body with this field set).`);if(d.patches===void 0)throw Error(`--patches is required (or pass --body with this field set).`);if(d.posts===void 0)throw Error(`--posts is required (or pass --body with this field set).`);if(d.puts===void 0)throw Error(`--puts is required (or pass --body with this field set).`);let p=u({deletes:l(d.deletes,`deletes`),patches:l(d.patches,`patches`),posts:l(d.posts,`posts`),puts:l(d.puts,`puts`)}),h=await o(`Deleting`,async()=>s.emailSecurity.domains.batch({...p,account_id:f}));i(h,{successLabel:`Deleted`})})};function Ee(e){return e.usage(`$0 email-security domains create
|
|
65
65
|
|
|
66
|
-
Protects a new email domain by adding it to Email Security. Accepts a flat configuration object covering all delivery modes. Returns the newly created domain configuration.`).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`domain`,{type:`string`,description:`The email domain to protect.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).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 De={command:`create`,describe:`Add a new email domain`,builder:Ee,handler:async l=>s({command:`email-security domains create`,classification:{safeFlags:[`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({allowed_delivery_modes:l[`allowed-delivery-modes`],domain:d(l.domain,`domain`,`text`),drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.domains.create({body:e,account_id:p}));i(t,{successLabel:`Created`});return}if(l[`allowed-delivery-modes`]===void 0)throw Error(`--allowed-delivery-modes is required (or pass --body with this field set).`);if(l.domain===void 0&&(l.domain=await f(`domain`,`The email domain to protect.`)),l[`drop-dispositions`]===void 0)throw Error(`--drop-dispositions is required (or pass --body with this field set).`);if(l[`ip-restrictions`]===void 0)throw Error(`--ip-restrictions is required (or pass --body with this field set).`);if(l.regions===void 0)throw Error(`--regions is required (or pass --body with this field set).`);let m=u({allowed_delivery_modes:l[`allowed-delivery-modes`],domain:d(l.domain,`domain`,`text`),drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}),h=await o(`Creating`,async()=>s.emailSecurity.domains.create({body:m,account_id:p}));i(h,{successLabel:`Created`})})};function Oe(e){return e.usage(`$0 email-security domains delete <domain-id>
|
|
66
|
+
Protects a new email domain by adding it to Email Security. Accepts a flat configuration object covering all delivery modes. Returns the newly created domain configuration.`).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`domain`,{type:`string`,description:`The email domain to protect.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`folder`,{type:`string`,description:`The mailbox folder to scan, for API-scanning domains.`,choices:[`AllItems`,`Inbox`]}).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).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 De={command:`create`,describe:`Add a new email domain`,builder:Ee,handler:async l=>s({command:`email-security domains create`,classification:{safeFlags:[`folder`,`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({allowed_delivery_modes:l[`allowed-delivery-modes`],domain:d(l.domain,`domain`,`text`),drop_dispositions:l[`drop-dispositions`],folder:d(l.folder,`folder`,`text`),integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.domains.create({body:e,account_id:p}));i(t,{successLabel:`Created`});return}if(l[`allowed-delivery-modes`]===void 0)throw Error(`--allowed-delivery-modes is required (or pass --body with this field set).`);if(l.domain===void 0&&(l.domain=await f(`domain`,`The email domain to protect.`)),l[`drop-dispositions`]===void 0)throw Error(`--drop-dispositions is required (or pass --body with this field set).`);if(l[`ip-restrictions`]===void 0)throw Error(`--ip-restrictions is required (or pass --body with this field set).`);if(l.regions===void 0)throw Error(`--regions is required (or pass --body with this field set).`);let m=u({allowed_delivery_modes:l[`allowed-delivery-modes`],domain:d(l.domain,`domain`,`text`),drop_dispositions:l[`drop-dispositions`],folder:d(l.folder,`folder`,`text`),integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}),h=await o(`Creating`,async()=>s.emailSecurity.domains.create({body:m,account_id:p}));i(h,{successLabel:`Created`})})};function Oe(e){return e.usage(`$0 email-security domains delete <domain-id>
|
|
67
67
|
|
|
68
68
|
Removes email security protection from a domain. After deletion, emails for this domain will no longer be processed by Email Security. This action cannot be undone.`).positional(`domain-id`,{type:`string`,description:`Domain 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 ke={command:`delete <domain-id>`,describe:`Unprotect an email domain`,builder:Oe,handler:async c=>s({command:`email-security domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains/${c[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(c[`domain-id`]))}`,pathParams:{"domain-id":String(c[`domain-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force,message:`This operation permanently deletes protection for the email domain. Emails for this domain will no longer be processed by Email Security.`})){process.stderr.write(`Aborted.
|
|
69
69
|
`);return}let u=await o(`Deleting`,async()=>s.emailSecurity.domains.delete({account_id:l,domain_id:c[`domain-id`]}));i(u,{successLabel:`Deleted`})})};function Ae(e){return e.usage(`$0 email-security domains edit <domain-id>
|
|
70
70
|
|
|
71
|
-
Updates configuration for a protected email domain. Only provided fields will be modified. Changes affect delivery mode, security settings, and regional processing.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).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 je={command:`edit <domain-id>`,describe:`Update an email domain`,builder:Ae,handler:async l=>s({command:`email-security domains edit`,classification:{safeFlags:[`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains/${l[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(l[`domain-id`]))}`,pathParams:{"domain-id":String(l[`domain-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.domains.edit({body:e,account_id:f,domain_id:l[`domain-id`]}));i(t,{successLabel:`Updated`});return}let p=u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}),m=await o(`Updating`,async()=>s.emailSecurity.domains.edit({body:p,account_id:f,domain_id:l[`domain-id`]}));i(m,{successLabel:`Updated`})})};function Me(e){return e.usage(`$0 email-security domains get <domain-id>
|
|
71
|
+
Updates configuration for a protected email domain. Only provided fields will be modified. Changes affect delivery mode, security settings, and regional processing.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`folder`,{type:`string`,description:`The mailbox folder to scan, for API-scanning domains.`,choices:[`AllItems`,`Inbox`]}).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).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 je={command:`edit <domain-id>`,describe:`Update an email domain`,builder:Ae,handler:async l=>s({command:`email-security domains edit`,classification:{safeFlags:[`folder`,`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains/${l[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(l[`domain-id`]))}`,pathParams:{"domain-id":String(l[`domain-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],folder:d(l.folder,`folder`,`text`),integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.domains.edit({body:e,account_id:f,domain_id:l[`domain-id`]}));i(t,{successLabel:`Updated`});return}let p=u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],folder:d(l.folder,`folder`,`text`),integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}),m=await o(`Updating`,async()=>s.emailSecurity.domains.edit({body:p,account_id:f,domain_id:l[`domain-id`]}));i(m,{successLabel:`Updated`})})};function Me(e){return e.usage(`$0 email-security domains get <domain-id>
|
|
72
72
|
|
|
73
73
|
Retrieves detailed information for a specific protected email domain including its delivery configuration, SPF/DMARC status, and authorization state.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ne={command:`get <domain-id>`,describe:`Get an email domain`,builder:Me,handler:async c=>s({command:`email-security domains get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains/${c[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(c[`domain-id`]))}`,pathParams:{"domain-id":String(c[`domain-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.domains.get({account_id:l,domain_id:c[`domain-id`]}));i(u,{successLabel:`Loaded`})})};function Pe(e){return e.usage(`$0 email-security domains list
|
|
74
74
|
|
|
75
75
|
Returns a paginated list of email domains protected by Email Security. Includes domain configuration, delivery modes, and authorization status. Supports filtering by delivery mode and integration ID.`).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:[`domain`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`allowed-delivery-mode`,{type:`string`,description:`Delivery mode to filter by.`,choices:[`DIRECT`,`BCC`,`JOURNAL`,`API`,`RETRO_SCAN`]}).option(`domain`,{type:`string`,description:`Domain names to filter by.`}).option(`active-delivery-mode`,{type:`string`,description:`Currently active delivery mode to filter by.`,choices:[`DIRECT`,`BCC`,`JOURNAL`,`API`,`RETRO_SCAN`]}).option(`integration-id`,{type:`string`,description:`Integration ID to filter by.`}).option(`status`,{type:`string`,description:`Filters response to domains with the provided status.`,choices:[`PENDING`,`ACTIVE`,`FAILED`,`TIMEOUT`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fe={command:`list`,describe:`List protected email domains`,builder:h(Pe),handler:async c=>s({command:`email-security domains list`,classification:{safeFlags:[`order`,`direction`,`allowed-delivery-mode`,`active-delivery-mode`,`status`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search,order:c.order,direction:c.direction,allowed_delivery_mode:c[`allowed-delivery-mode`],domain:c.domain,active_delivery_mode:c[`active-delivery-mode`],integration_id:c[`integration-id`],status:c.status};if(c.dryRun){let e=await n();a({command:`cf email-security domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.emailSecurity.domains.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function Ie(e){return e.usage(`$0 email-security domains update <domain-id>
|
|
76
76
|
|
|
77
|
-
Replaces all mutable fields of a protected email domain in a single atomic operation. Unlike PATCH, all non-computed fields are required.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for replacing an email domain. The `domain` field is intentionally absent — the domain name is immutable after creation. "})}const Le={command:`update <domain-id>`,describe:`Replace an email domain`,builder:Ie,handler:async l=>s({command:`email-security domains update`,classification:{safeFlags:[`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains/${l[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(l[`domain-id`]))}`,pathParams:{"domain-id":String(l[`domain-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.domains.update({body:e,account_id:f,domain_id:l[`domain-id`]}));i(t,{successLabel:`Updated`});return}if(l[`allowed-delivery-modes`]===void 0)throw Error(`--allowed-delivery-modes is required (or pass --body with this field set).`);if(l[`drop-dispositions`]===void 0)throw Error(`--drop-dispositions is required (or pass --body with this field set).`);if(l[`ip-restrictions`]===void 0)throw Error(`--ip-restrictions is required (or pass --body with this field set).`);if(l.regions===void 0)throw Error(`--regions is required (or pass --body with this field set).`);let p=u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}),m=await o(`Updating`,async()=>s.emailSecurity.domains.update({body:p,account_id:f,domain_id:l[`domain-id`]}));i(m,{successLabel:`Updated`})})};function Re(e){return e.usage(`$0 email-security domains verification get <domain-id>
|
|
77
|
+
Replaces all mutable fields of a protected email domain in a single atomic operation. Unlike PATCH, all non-computed fields are required.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`allowed-delivery-modes`,{type:`string`,array:!0,description:`Delivery modes to onboard the domain through.`}).option(`drop-dispositions`,{type:`string`,array:!0,description:'Dispositions to drop instead of delivering, e.g. `["MALICIOUS", "SPAM"]`.'}).option(`folder`,{type:`string`,description:`The mailbox folder to scan, for API-scanning domains.`,choices:[`AllItems`,`Inbox`]}).option(`integration-id`,{type:`string`,description:`Identifier of the CASB integration that authorizes this domain. The integration also enables API scanning, post-delivery actions, and directory sync.`}).option(`ip-restrictions`,{type:`string`,array:!0,description:`Source IP ranges mail is accepted from. Any other source is rejected.`}).option(`lookback-hops`,{type:`number`,description:`Number of hops to trace back through received headers when reconstructing the original message (1-20).`}).option(`regions`,{type:`string`,array:!0,description:'Regions that process messages for this domain, e.g. `["GLOBAL"]` or `["US"]`.'}).option(`require-tls-inbound`,{type:`boolean`,description:`Require TLS on inbound connections.`}).option(`require-tls-outbound`,{type:`boolean`,description:`Require TLS on outbound connections.`}).option(`transport`,{type:`string`,description:"The mail transport hostname for MX/Inline delivery — the MX record Cloudflare delivers email to (e.g. `mx.example.com`)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for replacing an email domain. The `domain` field is intentionally absent — the domain name is immutable after creation. "})}const Le={command:`update <domain-id>`,describe:`Replace an email domain`,builder:Ie,handler:async l=>s({command:`email-security domains update`,classification:{safeFlags:[`folder`,`require-tls-inbound`,`require-tls-outbound`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security domains update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains/${l[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(l[`domain-id`]))}`,pathParams:{"domain-id":String(l[`domain-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],folder:d(l.folder,`folder`,`text`),integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.domains.update({body:e,account_id:f,domain_id:l[`domain-id`]}));i(t,{successLabel:`Updated`});return}if(l[`allowed-delivery-modes`]===void 0)throw Error(`--allowed-delivery-modes is required (or pass --body with this field set).`);if(l[`drop-dispositions`]===void 0)throw Error(`--drop-dispositions is required (or pass --body with this field set).`);if(l[`ip-restrictions`]===void 0)throw Error(`--ip-restrictions is required (or pass --body with this field set).`);if(l.regions===void 0)throw Error(`--regions is required (or pass --body with this field set).`);let p=u({allowed_delivery_modes:l[`allowed-delivery-modes`],drop_dispositions:l[`drop-dispositions`],folder:d(l.folder,`folder`,`text`),integration_id:d(l[`integration-id`],`integration-id`,`text`),ip_restrictions:l[`ip-restrictions`],lookback_hops:l[`lookback-hops`],regions:l.regions,require_tls_inbound:l[`require-tls-inbound`],require_tls_outbound:l[`require-tls-outbound`],transport:d(l.transport,`transport`,`text`)}),m=await o(`Updating`,async()=>s.emailSecurity.domains.update({body:p,account_id:f,domain_id:l[`domain-id`]}));i(m,{successLabel:`Updated`})})};function Re(e){return e.usage(`$0 email-security domains verification get <domain-id>
|
|
78
78
|
|
|
79
79
|
Returns the DNS TXT record information when the domain ownership isn't verified through Cloudflare zone ownership or CASB integration.`).positional(`domain-id`,{type:`string`,description:`Domain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ze={command:`get <domain-id>`,describe:`Get domain verification details`,builder:Re,handler:async c=>s({command:`email-security domains verification get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security domains verification get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/domains/${c[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(c[`domain-id`]))}/verification`,pathParams:{"domain-id":String(c[`domain-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.domains.verification.get({account_id:l,domain_id:c[`domain-id`]}));i(u,{successLabel:`Loaded`})})},Be={command:`verification`,describe:`Operations for domains.verification`,builder:e=>e.command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ve={command:`domains`,describe:`Operations for domains`,builder:e=>e.command(Te).command(De).command(ke).command(je).command(Ne).command(Fe).command(Le).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function He(e){return e.usage(`$0 email-security impersonation-registry create
|
|
80
80
|
|
|
81
|
-
Creates a new entry in the impersonation registry to protect against impersonation. Emails attempting to impersonate this identity will be flagged. Supports regex patterns for flexible email matching.`).option(`comments`,{type:`string`,description:`Optional note describing the entry.`}).option(`directory-id`,{type:`number`,description:`Identifier of the directory the entry was synced from, when directory-synced.`}).option(`directory-node-id`,{type:`number`,description:`Identifier of the directory node the entry was synced from, when directory-synced.`}).option(`email`,{type:`string`,description:`Email address (or pattern) of the protected identity.`}).option(`external-directory-node-id`,{type:`string`,description:`Deprecated. External identifier of the directory node.`}).option(`is-email-regex`,{type:`boolean`,description:"Whether `email` is a regular expression instead of a literal address."}).option(`name`,{type:`string`,description:`Display name of the protected identity.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an impersonation registry entry.`})}const Ue={command:`create`,describe:`Create impersonation registry entry`,builder:He,handler:async l=>s({command:`email-security impersonation-registry create`,classification:{safeFlags:[`is-email-regex`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security impersonation-registry create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/impersonation_registry`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.impersonationRegistry.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}if(l.email===void 0&&(l.email=await f(`email`,`Email address (or pattern) of the protected identity.`)),l[`is-email-regex`]===void 0)throw Error(`--is-email-regex is required (or pass --body with this field set).`);l.name===void 0&&(l.name=await f(`name`,`Display name of the protected identity.`));let m=u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`)}),h=await o(`Creating`,async()=>s.emailSecurity.impersonationRegistry.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function We(e){return e.usage(`$0 email-security impersonation-registry delete <impersonation-registry-id>
|
|
81
|
+
Creates a new entry in the impersonation registry to protect against impersonation. Emails attempting to impersonate this identity will be flagged. Supports regex patterns for flexible email matching.`).option(`comments`,{type:`string`,description:`Optional note describing the entry.`}).option(`directory-id`,{type:`number`,description:`Identifier of the directory the entry was synced from, when directory-synced.`}).option(`directory-node-id`,{type:`number`,description:`Identifier of the directory node the entry was synced from, when directory-synced.`}).option(`email`,{type:`string`,description:`Email address (or pattern) of the protected identity.`}).option(`external-directory-node-id`,{type:`string`,description:`Deprecated. External identifier of the directory node.`}).option(`is-email-regex`,{type:`boolean`,description:"Whether `email` is a regular expression instead of a literal address."}).option(`name`,{type:`string`,description:`Display name of the protected identity.`}).option(`provenance`,{type:`string`,description:`Source the entry was created from.`,choices:[`A1S_INTERNAL`,`SNOOPY-CASB_OFFICE_365`,`SNOOPY-OFFICE_365`,`SNOOPY-GOOGLE_DIRECTORY`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create an impersonation registry entry.`})}const Ue={command:`create`,describe:`Create impersonation registry entry`,builder:He,handler:async l=>s({command:`email-security impersonation-registry create`,classification:{safeFlags:[`is-email-regex`,`provenance`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security impersonation-registry create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/impersonation_registry`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`),provenance:d(l.provenance,`provenance`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.impersonationRegistry.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}if(l.email===void 0&&(l.email=await f(`email`,`Email address (or pattern) of the protected identity.`)),l[`is-email-regex`]===void 0)throw Error(`--is-email-regex is required (or pass --body with this field set).`);l.name===void 0&&(l.name=await f(`name`,`Display name of the protected identity.`));let m=u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`),provenance:d(l.provenance,`provenance`,`text`)}),h=await o(`Creating`,async()=>s.emailSecurity.impersonationRegistry.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function We(e){return e.usage(`$0 email-security impersonation-registry delete <impersonation-registry-id>
|
|
82
82
|
|
|
83
83
|
Removes an entry from the impersonation registry. After deletion, this identity will no longer be protected from impersonation.`).positional(`impersonation-registry-id`,{type:`string`,description:`Impersonation registry entry 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 Ge={command:`delete <impersonation-registry-id>`,describe:`Delete an impersonation registry entry`,builder:We,handler:async c=>s({command:`email-security impersonation-registry delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security impersonation-registry delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/impersonation_registry/${c[`impersonation-registry-id`]==null?`<impersonation-registry-id>`:encodeURIComponent(String(c[`impersonation-registry-id`]))}`,pathParams:{"impersonation-registry-id":String(c[`impersonation-registry-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force,message:`This operation deletes the impersonation registry entry and stops protecting the identity from impersonation.`})){process.stderr.write(`Aborted.
|
|
84
84
|
`);return}let u=await o(`Deleting`,async()=>s.emailSecurity.impersonationRegistry.delete({account_id:l,impersonation_registry_id:c[`impersonation-registry-id`]}));i(u,{successLabel:`Deleted`})})};function Ke(e){return e.usage(`$0 email-security impersonation-registry edit <impersonation-registry-id>
|
|
85
85
|
|
|
86
|
-
Updates an existing impersonation registry entry. Only provided fields will be modified. Directory-synced entries can't be updated.`).positional(`impersonation-registry-id`,{type:`string`,description:`Impersonation registry entry identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`Optional note describing the entry.`}).option(`directory-id`,{type:`number`,description:`Identifier of the directory the entry was synced from, when directory-synced.`}).option(`directory-node-id`,{type:`number`,description:`Identifier of the directory node the entry was synced from, when directory-synced.`}).option(`email`,{type:`string`,description:`Email address (or pattern) of the protected identity.`}).option(`external-directory-node-id`,{type:`string`,description:`Deprecated. External identifier of the directory node.`}).option(`is-email-regex`,{type:`boolean`,description:"Whether `email` is a regular expression instead of a literal address."}).option(`name`,{type:`string`,description:`Display name of the protected identity.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update an impersonation registry entry.`})}const qe={command:`edit <impersonation-registry-id>`,describe:`Update an impersonation registry entry`,builder:Ke,handler:async l=>s({command:`email-security impersonation-registry edit`,classification:{safeFlags:[`is-email-regex`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security impersonation-registry edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/impersonation_registry/${l[`impersonation-registry-id`]==null?`<impersonation-registry-id>`:encodeURIComponent(String(l[`impersonation-registry-id`]))}`,pathParams:{"impersonation-registry-id":String(l[`impersonation-registry-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.impersonationRegistry.edit({...e,account_id:f,impersonation_registry_id:l[`impersonation-registry-id`]}));i(t,{successLabel:`Updated`});return}let p=u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`)}),m=await o(`Updating`,async()=>s.emailSecurity.impersonationRegistry.edit({...p,account_id:f,impersonation_registry_id:l[`impersonation-registry-id`]}));i(m,{successLabel:`Updated`})})};function Je(e){return e.usage(`$0 email-security impersonation-registry get <impersonation-registry-id>
|
|
86
|
+
Updates an existing impersonation registry entry. Only provided fields will be modified. Directory-synced entries can't be updated.`).positional(`impersonation-registry-id`,{type:`string`,description:`Impersonation registry entry identifier.`,demandOption:!0}).option(`comments`,{type:`string`,description:`Optional note describing the entry.`}).option(`directory-id`,{type:`number`,description:`Identifier of the directory the entry was synced from, when directory-synced.`}).option(`directory-node-id`,{type:`number`,description:`Identifier of the directory node the entry was synced from, when directory-synced.`}).option(`email`,{type:`string`,description:`Email address (or pattern) of the protected identity.`}).option(`external-directory-node-id`,{type:`string`,description:`Deprecated. External identifier of the directory node.`}).option(`is-email-regex`,{type:`boolean`,description:"Whether `email` is a regular expression instead of a literal address."}).option(`name`,{type:`string`,description:`Display name of the protected identity.`}).option(`provenance`,{type:`string`,description:`Source the entry was created from.`,choices:[`A1S_INTERNAL`,`SNOOPY-CASB_OFFICE_365`,`SNOOPY-OFFICE_365`,`SNOOPY-GOOGLE_DIRECTORY`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update an impersonation registry entry.`})}const qe={command:`edit <impersonation-registry-id>`,describe:`Update an impersonation registry entry`,builder:Ke,handler:async l=>s({command:`email-security impersonation-registry edit`,classification:{safeFlags:[`is-email-regex`,`provenance`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security impersonation-registry edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/impersonation_registry/${l[`impersonation-registry-id`]==null?`<impersonation-registry-id>`:encodeURIComponent(String(l[`impersonation-registry-id`]))}`,pathParams:{"impersonation-registry-id":String(l[`impersonation-registry-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`),provenance:d(l.provenance,`provenance`,`text`)}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.emailSecurity.impersonationRegistry.edit({...e,account_id:f,impersonation_registry_id:l[`impersonation-registry-id`]}));i(t,{successLabel:`Updated`});return}let p=u({comments:d(l.comments,`comments`,`text`),directory_id:l[`directory-id`],directory_node_id:l[`directory-node-id`],email:d(l.email,`email`,`text`),external_directory_node_id:d(l[`external-directory-node-id`],`external-directory-node-id`,`text`),is_email_regex:l[`is-email-regex`],name:d(l.name,`name`,`text`),provenance:d(l.provenance,`provenance`,`text`)}),m=await o(`Updating`,async()=>s.emailSecurity.impersonationRegistry.edit({...p,account_id:f,impersonation_registry_id:l[`impersonation-registry-id`]}));i(m,{successLabel:`Updated`})})};function Je(e){return e.usage(`$0 email-security impersonation-registry get <impersonation-registry-id>
|
|
87
87
|
|
|
88
88
|
Retrieves details for a specific impersonation registry entry including the protected identity, email pattern, and synchronization source if directory-synced.`).positional(`impersonation-registry-id`,{type:`string`,description:`Impersonation registry entry identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ye={command:`get <impersonation-registry-id>`,describe:`Get an impersonation registry entry`,builder:Je,handler:async c=>s({command:`email-security impersonation-registry get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf email-security impersonation-registry get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/settings/impersonation_registry/${c[`impersonation-registry-id`]==null?`<impersonation-registry-id>`:encodeURIComponent(String(c[`impersonation-registry-id`]))}`,pathParams:{"impersonation-registry-id":String(c[`impersonation-registry-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.emailSecurity.impersonationRegistry.get({account_id:l,impersonation_registry_id:c[`impersonation-registry-id`]}));i(u,{successLabel:`Loaded`})})};function Xe(e){return e.usage(`$0 email-security impersonation-registry list
|
|
89
89
|
|
|
@@ -98,7 +98,7 @@ regular datastore only.`}).option(`dry-run`,{type:`boolean`,description:`Validat
|
|
|
98
98
|
|
|
99
99
|
Returns information for each email that matches the provided search parameters.`).option(`start`,{type:`string`,description:"The beginning of the search date range. Defaults to `now - 30 days`. Must not be in the future."}).option(`end`,{type:`string`,description:"The end of the search date range. Defaults to `now`."}).option(`query`,{type:`string`,description:`Space-delimited term matched case-insensitively against message metadata — sender, recipient, subject, attachment names and hashes, and message ID.`}).option(`detections-only`,{type:`boolean`,description:`Whether to include only detections in search results.`}).option(`final-disposition`,{type:`string`,description:`Dispositions to filter by.`,choices:[`MALICIOUS`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`NONE`]}).option(`metric`,{type:`string`,description:`Metric to aggregate the results by.`}).option(`message-action`,{type:`string`,description:`Message actions to filter by.`,choices:[`PREVIEW`,`QUARANTINE_RELEASED`,`MOVED`]}).option(`recipient`,{type:`string`,description:`Filter by recipient. Matches an email address or a domain.`}).option(`sender`,{type:`string`,description:`Filter by sender. Matches an email address or a domain.`}).option(`smtp-helo-ip`,{type:`string`,description:`Matches messages whose SMTP HELO server IP address equals this value.`}).option(`alert-id`,{type:`string`,description:`Filter by alert ID.`}).option(`domain`,{type:`string`,description:`Filter by a domain found in the email — sender domain, recipient domain, or a domain in a link.`}).option(`message-id`,{type:`string`,description:`Filter by the RFC 5322 Message-ID header.`}).option(`subject`,{type:`string`,description:`Search for messages containing individual keywords in any order within the subject.`}).option(`delivery-status`,{type:`string`,description:`Delivery status to filter by.`,choices:[`delivered`,`moved`,`quarantined`,`rejected`,`deferred`,`bounced`,`queued`,`move_failed`]}).option(`cursor`,{type:`string`,description:"Pagination cursor from the previous response's `result_info`."}).option(`per-page`,{type:`number`,description:`The number of results per page. Maximum value is 1000.`}).option(`page`,{type:`number`,description:`Deprecated: Use cursor pagination instead. End of life: November 1, 2026.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ct={command:`list`,describe:`Search email messages`,builder:h(st),handler:async c=>s({command:`email-security investigate list`,classification:{safeFlags:[`detections-only`,`final-disposition`,`message-action`,`delivery-status`,`dry-run`]}},c,async()=>{let s={start:c.start,end:c.end,query:c.query,detections_only:c[`detections-only`],final_disposition:c[`final-disposition`],metric:c.metric,message_action:c[`message-action`],recipient:c.recipient,sender:c.sender,smtp_helo_ip:c[`smtp-helo-ip`],alert_id:c[`alert-id`],domain:c.domain,message_id:c[`message-id`],subject:c.subject,delivery_status:c[`delivery-status`],cursor:c.cursor,per_page:c[`per-page`],page:c.page};if(c.dryRun){let e=await n();a({command:`cf email-security investigate list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.emailSecurity.investigate.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function lt(e){return e.usage(`$0 email-security investigate move
|
|
100
100
|
|
|
101
|
-
Moves one or more messages to a specified mailbox folder (Inbox, JunkEmail, DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires active integration. Operates on an explicit list of messages; to move all messages matching a search, create a bulk action job instead.`).option(`destination`,{type:`string`,description:`The mailbox folder to move messages to.`,choices:[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]}).option(`ids`,{type:`string`,array:!0,description:`List of message IDs to move.`}).option(`postfix-ids`,{type:`string`,array:!0,description:"Deprecated, use `ids` instead. End of life: November 1, 2026."}).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 ut={command:`move`,describe:`Move messages`,builder:lt,handler:async l=>s({command:`email-security investigate move`,classification:{safeFlags:[`destination`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security investigate move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/move`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({destination:d(l.destination,`destination`,`text`),ids:l.ids,postfix_ids:l[`postfix-ids`]}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.investigate.move({...e,account_id:f}));i(t,{successLabel:`Created`});return}if(l.destination===void 0&&(l.destination=await p(`destination`,`The mailbox folder to move messages to.`,[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`])),l.ids===void 0)throw Error(`--ids is required (or pass --body with this field set).`);let m=u({destination:d(l.destination,`destination`,`text`),ids:l.ids,postfix_ids:l[`postfix-ids`]}),h=await o(`Creating`,async()=>s.emailSecurity.investigate.move({...m,account_id:f}));i(h,{successLabel:`Created`})})};function dt(e){return e.usage(`$0 email-security investigate preview generate
|
|
101
|
+
Moves one or more messages to a specified mailbox folder (Inbox, JunkEmail, DeletedItems, RecoverableItemsDeletions, or RecoverableItemsPurges). Requires active integration. Operates on an explicit list of messages; to move all messages matching a search, create a bulk action job instead.`).option(`destination`,{type:`string`,description:`The mailbox folder to move messages to.`,choices:[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`]}).option(`expected-disposition`,{type:`string`,description:`Nonfunctional field. End of life: December 1, 2026.`,choices:[`MALICIOUS`,`MALICIOUS-BEC`,`SUSPICIOUS`,`SPOOF`,`SPAM`,`BULK`,`ENCRYPTED`,`EXTERNAL`,`UNKNOWN`,`NONE`]}).option(`ids`,{type:`string`,array:!0,description:`List of message IDs to move.`}).option(`postfix-ids`,{type:`string`,array:!0,description:"Deprecated, use `ids` instead. End of life: November 1, 2026."}).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 ut={command:`move`,describe:`Move messages`,builder:lt,handler:async l=>s({command:`email-security investigate move`,classification:{safeFlags:[`destination`,`expected-disposition`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security investigate move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/move`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({destination:d(l.destination,`destination`,`text`),expected_disposition:d(l[`expected-disposition`],`expected-disposition`,`text`),ids:l.ids,postfix_ids:l[`postfix-ids`]}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.investigate.move({...e,account_id:f}));i(t,{successLabel:`Created`});return}if(l.destination===void 0&&(l.destination=await p(`destination`,`The mailbox folder to move messages to.`,[`Inbox`,`JunkEmail`,`DeletedItems`,`RecoverableItemsDeletions`,`RecoverableItemsPurges`])),l.ids===void 0)throw Error(`--ids is required (or pass --body with this field set).`);let m=u({destination:d(l.destination,`destination`,`text`),expected_disposition:d(l[`expected-disposition`],`expected-disposition`,`text`),ids:l.ids,postfix_ids:l[`postfix-ids`]}),h=await o(`Creating`,async()=>s.emailSecurity.investigate.move({...m,account_id:f}));i(h,{successLabel:`Created`})})};function dt(e){return e.usage(`$0 email-security investigate preview generate
|
|
102
102
|
|
|
103
103
|
Generates a preview image for a message that was not flagged as a detection. The message is rendered from the copy in the recipient's mailbox, so this requires an active integration and only works while the message is still in the recipient's inbox. Returns a base64-encoded PNG screenshot of the email body. For messages with a detection, use the detection preview endpoint instead.`).option(`id`,{type:`string`,description:`Unique identifier for a message retrieved from investigation.`}).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 ft={command:`generate`,describe:`Generate preview for a non-detection message`,builder:dt,handler:async l=>s({command:`email-security investigate preview generate`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf email-security investigate preview generate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email-security/investigate/preview`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({id:d(l.id,`id`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.emailSecurity.investigate.preview.generate({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.id===void 0&&(l.id=await f(`id`,`Unique identifier for a message retrieved from investigation.`));let m=u({id:d(l.id,`id`,`text`)}),h=await o(`Creating`,async()=>s.emailSecurity.investigate.preview.generate({...m,account_id:p}));i(h,{successLabel:`Created`})})};function pt(e){return e.usage(`$0 email-security investigate preview get <investigate-id>
|
|
104
104
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,i as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-RlgRrmbm.mjs";import{t as h}from"./cli-types-9oYmRTHJ.mjs";function ee(e){return e.usage(`$0 email-sending get <message-id>
|
|
3
3
|
|
|
4
4
|
Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <message-id>`,describe:`Fetch an email message`,builder:ee,handler:async r=>c({command:`email-sending get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf email-sending get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/messages/${r[`message-id`]==null?`<message-id>`:encodeURIComponent(String(r[`message-id`]))}`,pathParams:{"message-id":String(r[`message-id`]??``)},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.emailSending.get({account_id:l,message_id:r[`message-id`]}));a(u,{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 email-sending limits get
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./chunk-
|
|
2
|
+
import{t as e}from"./chunk-TAK63GWY-DdMktrgc.mjs";import{n as t}from"./errors-_sob7Ihu.mjs";function n(e){if(typeof e!=`object`||!e)return[];let t=e.errors;return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.code;return typeof t==`number`&&Number.isFinite(t)?[t]:[]}):[]}function r(e){return typeof e==`number`&&Number.isInteger(e)&&e>=100&&e<=599}function i(e){try{return a(e)}catch{return{errorType:`Error`}}}function a(i){if(i instanceof t){let e=n(i.body);return{errorType:`APIError`,...r(i.statusCode)?{httpStatus:i.statusCode}:{},...e.length===0?{}:{errorCodes:e}}}return i instanceof e?{errorType:`APIError`,...r(i.status)?{httpStatus:i.status}:{},...typeof i.code==`number`&&Number.isFinite(i.code)?{errorCodes:[i.code]}:{}}:i instanceof Error?{errorType:`Error`}:{errorType:typeof i}}export{i as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,t as r}from"./context-q7UaYK69.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-BtkTVcHI.mjs";import{t as s}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./prompt-RlgRrmbm.mjs";function f(e){return e.usage(`$0 fieldExtractors delete <extractor>
|
|
3
3
|
|
|
4
4
|
Deletes all custom extraction rules for an extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const p={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:f,handler:async c=>s({command:`fieldExtractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf fieldExtractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/field_extractors/${c.extractor==null?`<extractor>`:encodeURIComponent(String(c.extractor))}`,pathParams:{extractor:String(c.extractor??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await d({force:!!c.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}let u=await o(`Deleting`,async()=>s.fieldExtractors.delete({account_id:l,extractor:c.extractor}));i(u,{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 fieldExtractors get <extractor>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{n as t}from"./auth-CGLsxbc6.mjs";import{a as n,i as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{n as p}from"./prompt-RlgRrmbm.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 firewall access-rules create
|
|
3
3
|
|
|
4
4
|
Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create an IP Access rule`,builder:h,handler:async u=>c({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await n():void 0,t=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;o({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:u.body===void 0?d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}}):l(u.body)});return}let c=await t(u),p=u.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:u.zone},c,{quiet:u.quiet}):u.local?e:await i();if(p===`zones`?u.zoneId=m:u.accountId=m,u.body){let e=l(u.body),t=await s(`Creating`,async()=>c.firewall.accessRules.create({...e,account_or_zone:p,account_or_zone_id:m}));a(t,{successLabel:`Created`});return}let h=d({configuration:{target:f(u[`configuration-target`],`configuration-target`,`text`),value:f(u[`configuration-value`],`configuration-value`,`text`)}}),g=await s(`Creating`,async()=>c.firewall.accessRules.create({...h,account_or_zone:p,account_or_zone_id:m}));a(g,{successLabel:`Created`})})};function _(e){return e.usage(`$0 firewall access-rules delete <rule-id>
|
|
5
5
|
|
|
@@ -10,8 +10,8 @@ Updates an IP Access rule defined. Note: This operation will affect all zones in
|
|
|
10
10
|
|
|
11
11
|
Fetches the details of an IP Access rule defined.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:x,handler:async l=>c({command:`firewall access-rules get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules/${l[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(l[`rule-id`]))}`,pathParams:{"account-or-zone":String(t),"rule-id":String(l[`rule-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.firewall.accessRules.get({account_or_zone:u,account_or_zone_id:d,rule_id:l[`rule-id`]}));a(f,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 firewall access-rules list
|
|
12
12
|
|
|
13
|
-
Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.`).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
|
|
14
|
-
Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`List IP Access rules`,builder:m(C),handler:async l=>c({command:`firewall access-rules list`,classification:{safeFlags:[`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},l,async()=>{let c={"configuration.target":l[`configuration-target`],"configuration.value":l[`configuration-value`],notes:l.notes,match:l.match,page:l.page,per_page:l[`per-page`],order:l.order,direction:l.direction};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.firewall.accessRules.list({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})},T={command:`access-rules`,describe:`IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone`,builder:e=>e.command(g).command(v).command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 firewall lockdowns create
|
|
13
|
+
Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.`).option(`action`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
|
|
14
|
+
Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`List IP Access rules`,builder:m(C),handler:async l=>c({command:`firewall access-rules list`,classification:{safeFlags:[`action`,`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},l,async()=>{let c={mode:l.action,"configuration.target":l[`configuration-target`],"configuration.value":l[`configuration-value`],notes:l.notes,match:l.match,page:l.page,per_page:l[`per-page`],order:l.order,direction:l.direction};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.firewall.accessRules.list({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})},T={command:`access-rules`,describe:`IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone`,builder:e=>e.command(g).command(v).command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 firewall lockdowns create
|
|
15
15
|
|
|
16
16
|
Creates a new Zone Lockdown rule.`).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const D={command:`create`,describe:`Create a Zone Lockdown rule`,builder:E,handler:async e=>c({command:`firewall lockdowns create`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf firewall lockdowns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({configurations:u(e.configurations,`configurations`),description:f(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.firewall.lockdowns.create({...t,zone_id:i}));a(r,{successLabel:`Created`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let c=d({configurations:u(e.configurations,`configurations`),description:f(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}),p=await s(`Creating`,async()=>n.firewall.lockdowns.create({...c,zone_id:i}));a(p,{successLabel:`Created`})})};function O(e){return e.usage(`$0 firewall lockdowns delete <lock-downs-id>
|
|
17
17
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DlT72Xpn.mjs";import{i as t,n}from"./auth-CGLsxbc6.mjs";import{a as r,t as i}from"./context-q7UaYK69.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-BtkTVcHI.mjs";import{t as c}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-RlgRrmbm.mjs";function h(e){return e.usage(`$0 flagship apps create
|
|
3
3
|
|
|
4
4
|
Creates an app. The returned \`id\` is used in all subsequent flag, changelog, and evaluation requests.`).option(`name`,{type:`string`,description:`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create app`,builder:h,handler:async t=>c({command:`flagship apps create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf flagship apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({name:f(t.name,`name`,`text`)}):l(t.body)});return}let c=await n(t),u=t.local?e:await i();if(t.accountId=u,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.flagship.apps.create({...e,account_id:u}));a(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await p(`name`,`Name of the Flagship app (1–64 letters, numbers, hyphens, or underscores).`));let m=d({name:f(t.name,`name`,`text`)}),h=await s(`Creating`,async()=>c.flagship.apps.create({...m,account_id:u}));a(h,{successLabel:`Created`})})};function _(e){return e.usage("$0 flagship apps definitions get <app-id>\n\nReturns an app's evaluation-only flag definitions for SDKs that evaluate locally. Send the returned `ETag` in `If-None-Match` to avoid downloading unchanged definitions.").positional(`app-id`,{type:`string`,description:`Flagship app ID returned when the app was created.`,demandOption:!0}).option(`if-none-match`,{type:`string`,description:"Previously returned ETag, or `*`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <app-id>`,describe:`Get flag definitions`,builder:_,handler:async l=>c({command:`flagship apps definitions get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={};if(l[`if-none-match`]!==void 0&&(c[`If-None-Match`]=String(l[`if-none-match`])),l.dryRun){let e=await r();o({command:`cf flagship apps definitions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/flagship/apps/${l[`app-id`]==null?`<app-id>`:encodeURIComponent(String(l[`app-id`]))}/definitions`,pathParams:{"app-id":String(l[`app-id`]??``)},bodyKind:`none`});return}let u=await n(l),d=l.local?e:await i();l.accountId=d;let f=await s(`Loading`,async()=>t(u,`GET`,`/accounts/${d}/flagship/apps/${encodeURIComponent(String(l[`app-id`]))}/definitions`,{headers:Object.keys(c).length>0?c:void 0}));a(f,{successLabel:`Loaded`})})},y={command:`definitions`,describe:`Operations for apps.definitions`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 flagship apps delete <app-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";function l(e){return e.usage(`$0 fraud get
|
|
3
3
|
|
|
4
4
|
Retrieve Fraud Detection settings for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Get Fraud Detection Settings`,builder:l,handler:async o=>a({command:`fraud get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf fraud get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/fraud_detection/settings`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.fraud.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function d(e){return e.usage("$0 fraud update\n\nUpdate Fraud Detection settings for a zone. Notes on `username_expressions` behavior: - If omitted or set to null, expressions are not modified. - If provided as an empty array `[]`, all expressions will be cleared.").option(`authentication-settings-failure-criteria-kind`,{type:`string`,description:"The type of criterion. Currently only `status_code` is supported.",choices:[`status_code`]}).option(`authentication-settings-failure-criteria-status-codes`,{type:`string`,array:!0,description:`HTTP status codes to match against the origin response.
|
|
5
5
|
- Maximum of 10 codes per criterion.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-CGLsxbc6.mjs";import{i as t}from"./context-q7UaYK69.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-BtkTVcHI.mjs";import{t as a}from"./run-BvHwWWUX.mjs";import"./telemetry-BsYO3nxG.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l}from"./prompt-RlgRrmbm.mjs";function u(e){return e.usage(`$0 google-tag-gateway config get
|
|
3
3
|
|
|
4
4
|
Gets the Google Tag Gateway configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Google Tag Gateway configuration`,builder:u,handler:async o=>a({command:`google-tag-gateway config get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf google-tag-gateway config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/google-tag-gateway/config`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.googleTagGateway.config.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 google-tag-gateway config update
|
|
5
5
|
|