cf 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +6724 -3970
- package/dist/_meta/hand-written-commands.json +150 -32
- package/dist/_meta/schemas.json +2083 -2159
- package/dist/abuse-reports-BAQR1w79.mjs +26 -0
- package/dist/access-C8KMplzp.mjs +27 -0
- package/dist/account-B-KQSR0L.mjs +12 -0
- package/dist/account-tags-EncLJpLc.mjs +15 -0
- package/dist/accounts-BA4Mp3A_.mjs +132 -0
- package/dist/acm-ByxUJcqF.mjs +15 -0
- package/dist/addressing-C-ym0h0G.mjs +93 -0
- package/dist/agent-memory-CkPSiZDI.mjs +34 -0
- package/dist/ai-DkE_Q64s.mjs +31 -0
- package/dist/ai-audit-pPcjYWI5.mjs +6 -0
- package/dist/ai-gateway-DtrwF1lQ.mjs +147 -0
- package/dist/ai-search-DLD_kDS1.mjs +79 -0
- package/dist/ai-security-jyZcBl9g.mjs +10 -0
- package/dist/alerting-DOROjm8E.mjs +56 -0
- package/dist/analytics-rQ-h-plT.mjs +21 -0
- package/dist/analytics_engine-Cg9gCAMt.mjs +4 -0
- package/dist/{lifecycle-XswDq0ZB.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
- package/dist/api-security-B8p8vp8u.mjs +154 -0
- package/dist/argo-g8SjUb_t.mjs +10 -0
- package/dist/artifacts-B1PaeF5h.mjs +43 -0
- package/dist/audit-logs-DmU_PHy_.mjs +4 -0
- package/dist/auth-CZqics6E.mjs +2 -0
- package/dist/auth-Cp7gT-AF.mjs +8 -0
- package/dist/billing-CvTbUg-H.mjs +23 -0
- package/dist/bot-management-z53tbcbH.mjs +9 -0
- package/dist/botnet-feed-CSBbJdr_.mjs +11 -0
- package/dist/brand-protection-DzV211IQ.mjs +27 -0
- package/dist/browser-extension-C0Hi9CHX.mjs +15 -0
- package/dist/browser-run-DYQvMAyo.mjs +46 -0
- package/dist/build-BPIp8J5F.mjs +2 -0
- package/dist/build-OC77a1zq.mjs +2 -0
- package/dist/builds-CwKRqjQ5.mjs +71 -0
- package/dist/cache-CugNPPsJ.mjs +45 -0
- package/dist/certificate-authorities-DaEnJYge.mjs +6 -0
- package/dist/cf-oadujOtC.mjs +18 -0
- package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
- package/dist/chunk-DL5FNmn1.mjs +2 -0
- package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
- package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
- package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
- package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
- package/dist/client-certificates-DZUIqBTB.mjs +13 -0
- package/dist/client-side-security-Dk6F1ENG.mjs +63 -0
- package/dist/cloud-connector-avpf86kG.mjs +6 -0
- package/dist/cloudflared-DhItYrCq.mjs +2 -0
- package/dist/cloudforce-one-DNRhUD8z.mjs +456 -0
- package/dist/command-B2Qe-WUa.mjs +2 -0
- package/dist/command-CF0giIIc.mjs +3 -0
- package/dist/command-D45NW-R3.mjs +2 -0
- package/dist/command-DIvPLK8x.mjs +2 -0
- package/dist/{completions-nPO9PdSu.mjs → completions-xPLd1cvL.mjs} +3 -3
- package/dist/{config-B8lwPpVl.mjs → config-B4vIa0zp.mjs} +1 -1
- package/dist/config.d.mts +1 -1729
- package/dist/config.mjs +1 -1
- package/dist/connector-interrupts-BSztJ-Ko.mjs +6 -0
- package/dist/connector-telemetry-events-_M8CCK6_.mjs +6 -0
- package/dist/connector-telemetry-snapshots-DySvmR9a.mjs +6 -0
- package/dist/connectors-BSmhzNB7.mjs +15 -0
- package/dist/containers-B5vDcFzo.mjs +78 -0
- package/dist/{shared-YJtB5KZB.mjs → containers-CFzvhmyz.mjs} +85 -84
- package/dist/content-scan-CeLZAcbT.mjs +14 -0
- package/dist/cps-BlI_Od72.mjs +6 -0
- package/dist/csamScanner-Cn7d0HWS.mjs +10 -0
- package/dist/ct-alerting-lhgFPu-y.mjs +5 -0
- package/dist/custom-certificates-Ba4Do5qt.mjs +17 -0
- package/dist/custom-csrs-MNUIx8yX.mjs +11 -0
- package/dist/custom-hostnames-Dj1SBd0J.mjs +27 -0
- package/dist/custom-nameservers-C7nzhNzV.mjs +9 -0
- package/dist/custom-pages-BgfhGksj.mjs +21 -0
- package/dist/d1-P2kWbdID.mjs +45 -0
- package/dist/data-security-pBIozmRL.mjs +71 -0
- package/dist/dcv-delegation-Bpy9WnKZ.mjs +4 -0
- package/dist/delegate-GctF_lrq.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-QTGENpOM.mjs → deploy-CVYdt3NK.mjs} +1 -1
- package/dist/{deploy-input-C7W1Bsji.mjs → deploy-input-DpOgndz4.mjs} +1 -1
- package/dist/dev-PPUBjWcm.mjs +4 -0
- package/dist/diagnostics-C62habGQ.mjs +15 -0
- package/dist/dialog-C_ccBiZp.mjs +2 -0
- package/dist/dist-B4pQ4CXK.mjs +48 -0
- package/dist/{dist-DW5BPGFs.mjs → dist-BpadEMNY.mjs} +1 -1
- package/dist/dist-dc4E1u01.mjs +272 -0
- package/dist/dls-CpkcyQ8C.mjs +17 -0
- package/dist/dns-DG1X4Wap.mjs +135 -0
- package/dist/dns-firewall-B1gGHEDo.mjs +71 -0
- package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
- package/dist/dry-run-CLX6Pbtq.mjs +2 -0
- package/dist/durable-objects-D214VhxH.mjs +8 -0
- package/dist/email-auth-Ba4ONan2.mjs +6 -0
- package/dist/email-routing-BlqKnqNM.mjs +45 -0
- package/dist/email-security-Dl1E1Dko.mjs +160 -0
- package/dist/email-sending-DIRSSRIz.mjs +47 -0
- package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
- package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
- package/dist/fieldExtractors-zqYKMCEn.mjs +9 -0
- package/dist/firewall-DdsDh8GD.mjs +56 -0
- package/dist/flagship-CkUIVW7c.mjs +28 -0
- package/dist/fraud-BUpZgvQT.mjs +22 -0
- package/dist/google-tag-gateway-Bi1uLnEU.mjs +6 -0
- package/dist/healthchecks-DjQWb3EM.mjs +22 -0
- package/dist/hostnames-ClBLPbct.mjs +11 -0
- package/dist/hyperdrive-U54xZsWU.mjs +37 -0
- package/dist/iam-T-wWmOep.mjs +52 -0
- package/dist/images-ia5UG1GW.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/intel-BhswZLMI.mjs +76 -0
- package/dist/interactive-B6woOLo-.mjs +32 -0
- package/dist/interactive-DnUvQHjc.mjs +2 -0
- package/dist/ips-Dad_EvhM.mjs +4 -0
- package/dist/keyless-certificates-BhHaxLjM.mjs +13 -0
- package/dist/keys-DjIPvqj4.mjs +4 -0
- package/dist/kv-DzXVnK94.mjs +21 -0
- package/dist/leaked-credential-checks-B9G_ZTNH.mjs +18 -0
- package/dist/lifecycle-Ichnb2x1.mjs +2 -0
- package/dist/load-balancers-3wGHPsYz.mjs +76 -0
- package/dist/local-B6b2OIBW.mjs +2 -0
- package/dist/local-BrfySqnx.mjs +2 -0
- package/dist/{local-runtime-BUGCbx8r.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
- package/dist/login-CEQbOgBM.mjs +5 -0
- package/dist/login-DEWvGuaU.mjs +2 -0
- package/dist/logo-matches-YGRPstPi.mjs +6 -0
- package/dist/logos-BirufUgo.mjs +7 -0
- package/dist/logpush-BlNbUHyV.mjs +46 -0
- package/dist/logs-DmFlVF9q.mjs +48 -0
- package/dist/magic-cloud-networking-B3Wj2dhJ.mjs +71 -0
- package/dist/magic-network-monitoring-ry63w2Rw.mjs +36 -0
- package/dist/magic-transit-CBVOK2aa.mjs +387 -0
- package/dist/managed-defense-BdW6s483.mjs +18 -0
- package/dist/managed-transforms-BIeiofIS.mjs +9 -0
- package/dist/matches-CAnwci0P.mjs +6 -0
- package/dist/mcp-BfhOMGFE.mjs +32 -0
- package/dist/mesh-CxUL2Wf-.mjs +26 -0
- package/dist/mtls-certificates-CzmTw4zs.mjs +13 -0
- package/dist/network-C68psMbz.mjs +50 -0
- package/dist/network-interconnects-CLsMrTuk.mjs +73 -0
- package/dist/oauth-D4bkeMAw.mjs +14 -0
- package/dist/oauth-DouM-qz0.mjs +2 -0
- package/dist/oauth-clients-DbUmVE_5.mjs +16 -0
- package/dist/oauth-scopes-CQ18rwBg.mjs +4 -0
- package/dist/observability-DpYxkFeZ.mjs +80 -0
- package/dist/{open-PBXRGS4R-DARSUDEI.mjs → open-PBXRGS4R-C4CKEADM.mjs} +3 -3
- package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
- package/dist/organization-Dg55Xfz7.mjs +75 -0
- package/dist/organizations-QnyzGjB2.mjs +4 -0
- package/dist/origin-ca-certificates-Co5lqIGL.mjs +11 -0
- package/dist/origin-post-quantum-encryption-Cz8JZamC.mjs +6 -0
- package/dist/origin-tls-client-auth-Dd0T1Kfv.mjs +30 -0
- package/dist/{output-COcSQsfn.mjs → output-Bia1u2k5.mjs} +1 -1
- package/dist/page-rules--D3eXrCf.mjs +39 -0
- package/dist/pages-Ce8DDgNr.mjs +60 -0
- package/dist/pay-per-crawl-CpkEbasz.mjs +65 -0
- package/dist/pay-per-use-fyM1DWgY.mjs +6 -0
- package/dist/pipelines-CAqCgBLh.mjs +44 -0
- package/dist/precursor-DBnn4Q35.mjs +4 -0
- package/dist/previews-y_nSqWK5.mjs +4 -0
- package/dist/progress-Bi02B6v4.mjs +2 -0
- package/dist/project-settings-DSXevRvj.mjs +3 -0
- package/dist/prompt-Bx2PB-tt.mjs +3 -0
- package/dist/queries-dg-CVXjf.mjs +9 -0
- package/dist/queues-C_ilLbRI.mjs +63 -0
- package/dist/r2-data-catalog-DGv6aROr.mjs +44 -0
- package/dist/r2-hZAkra-l.mjs +127 -0
- package/dist/radar-BO9b0aZy.mjs +300 -0
- package/dist/{raw-fetch-BVYQR6C5.mjs → raw-fetch-DNTQkXbg.mjs} +1 -1
- package/dist/realtime-eSavuSeE.mjs +172 -0
- package/dist/registrar-Ct30kOXZ.mjs +43 -0
- package/dist/registrar-sandbox-Dmn9zGUk.mjs +56 -0
- package/dist/{registry-CWUfXloz.mjs → registry-vreNkX6u.mjs} +1 -1
- package/dist/reporting-B-F5aWUJ.mjs +14 -0
- package/dist/request-headers-Dnbzv6RZ.mjs +2 -0
- package/dist/request-tracers-CaubpUFV.mjs +4 -0
- package/dist/resolve-BXemCSyA.mjs +2 -0
- package/dist/resolve-CUDKxUrW.mjs +2 -0
- package/dist/resource-sharing-6Snv-b69.mjs +40 -0
- package/dist/resource-tagging-W_LFiX2J.mjs +4 -0
- package/dist/rules-C26eyeA5.mjs +18 -0
- package/dist/rulesets-BKzIwVtJ.mjs +37 -0
- package/dist/rum-Xdw5hyWY.mjs +30 -0
- package/dist/run-BBBMrSrs.mjs +2 -0
- package/dist/run-BRucX7Rz.mjs +2 -0
- package/dist/{schema-C8hU6G9R.mjs → schema-DqtYndhB.mjs} +1 -1
- package/dist/{schema-flags-DC4c6dka.mjs → schema-flags-CebDI0f1.mjs} +4 -4
- package/dist/scim-odJTXiIe.mjs +18 -0
- package/dist/{sdk-C12y5qCN.mjs → sdk-CvIO3tWS.mjs} +1 -1
- package/dist/secrets-store-RYpWWzaw.mjs +24 -0
- package/dist/security-center-B3D95vCa.mjs +30 -0
- package/dist/security-txt-BSytVv-9.mjs +9 -0
- package/dist/shared-D67owd9x.mjs +2 -0
- package/dist/smart-shield-C83Sfnf4.mjs +24 -0
- package/dist/snippets-B6oE9WIa.mjs +20 -0
- package/dist/source-BR4_k2ad.mjs +6 -0
- package/dist/spawn-CKqJ9J4_.mjs +523 -0
- package/dist/spectrum-CfxY--X_.mjs +83 -0
- package/dist/speed-DzK-kiWt.mjs +24 -0
- package/dist/src-B3h6tKMt.mjs +108 -0
- package/dist/ssl-dnjzPcSB.mjs +45 -0
- package/dist/startup-profile-CYEokTVe.mjs +2 -0
- package/dist/startup-profile-CgWHy4rE.mjs +17 -0
- package/dist/state-BxCejn42.mjs +2 -0
- package/dist/state-DSzkxXML.mjs +2 -0
- package/dist/stream-oFyhS4Wi.mjs +102 -0
- package/dist/submit-4f-ravmC.mjs +4 -0
- package/dist/tags-DrIP6Uiq.mjs +4 -0
- package/dist/{telemetry-DjGNSlkU.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
- package/dist/telemetry-Ds4epd3D.mjs +2 -0
- package/dist/telemetry-mKEb8lYB.mjs +2 -0
- package/dist/tenant-C-gc3NWv.mjs +12 -0
- package/dist/tenant-custom-nameservers-DduTQIwh.mjs +9 -0
- package/dist/{tools-D9RZkZRc.mjs → tools-BMKpYraQ.mjs} +1 -1
- package/dist/tunnels-D0QYsskp.mjs +29 -0
- package/dist/turnstile-C6Q3spRB.mjs +33 -0
- package/dist/ui-DH95w1Qk.mjs +5 -0
- package/dist/undici-DTSBJHNS.mjs +96 -0
- package/dist/update-check-BBS1K1jt.mjs +2 -0
- package/dist/update-check-CTLoakFV.mjs +2 -0
- package/dist/update-check-worker.mjs +2 -0
- package/dist/url-info-Cs0V89qq.mjs +4 -0
- package/dist/url-normalization-DaEQYy5h.mjs +9 -0
- package/dist/url-scanner-C4YVeQ4v.mjs +16 -0
- package/dist/user-BV1VY3Kl.mjs +112 -0
- package/dist/values-qDS63E43.mjs +4 -0
- package/dist/vectorize-NFzD3mP5.mjs +32 -0
- package/dist/version-W6_TN_kN.mjs +2 -0
- package/dist/waiting-rooms-Y9YGj3ih.mjs +53 -0
- package/dist/web-assets-Gd6z8dbt.mjs +64 -0
- package/dist/web3-DCJx4NRp.mjs +28 -0
- package/dist/workers-B-j-1ygi.mjs +36 -0
- package/dist/workers-builds-DPrNKjZW.mjs +14 -0
- package/dist/workers-for-platforms-BjKAhMLA.mjs +25 -0
- package/dist/workers-vpc-C5YoCnQK.mjs +13 -0
- package/dist/workflows-C2KKIJjl.mjs +43 -0
- package/dist/zaraz-CVLCs1IX.mjs +22 -0
- package/dist/zero-trust-BtJi4OXF.mjs +795 -0
- package/dist/zone-hKgt0WzO.mjs +4 -0
- package/dist/zones-CCNyaD3J.mjs +124 -0
- package/package.json +15 -12
- package/dist/_meta/agent-context.json +0 -193
- package/dist/abuse-reports-BbaHw4ST.mjs +0 -8
- package/dist/access-D6Xz892p.mjs +0 -11
- package/dist/account-DvxcqeaK.mjs +0 -2
- package/dist/account-tags-CeqfEWpz.mjs +0 -9
- package/dist/accounts-Bx-8BMH9.mjs +0 -30
- package/dist/acm--0opdSGE.mjs +0 -3
- package/dist/addressing-BS1ynzLA.mjs +0 -13
- package/dist/agent-context-BPhyrSns.mjs +0 -8
- package/dist/agent-memory-DczzpEw5.mjs +0 -6
- package/dist/ai-CDdCTcQl.mjs +0 -5
- package/dist/ai-audit-Bx9KMQYh.mjs +0 -2
- package/dist/ai-gateway-BSXJEaYS.mjs +0 -13
- package/dist/ai-search-DRQj1aMu.mjs +0 -7
- package/dist/ai-security-C_Rb0lGT.mjs +0 -4
- package/dist/alerting-BAR9eFs2.mjs +0 -6
- package/dist/analytics-BaUZwNc5.mjs +0 -4
- package/dist/analytics_engine-DkEzlhfT.mjs +0 -2
- package/dist/api-security-jA0lOk6a.mjs +0 -50
- package/dist/argo-Cz4pDagx.mjs +0 -2
- package/dist/artifacts-BcLTGfAv.mjs +0 -5
- package/dist/audit-logs-DbIv4n6u.mjs +0 -2
- package/dist/auth-rW5d3jtr.mjs +0 -5
- package/dist/auth-tvDdC1J-.mjs +0 -8
- package/dist/billing-Md87QjqW.mjs +0 -3
- package/dist/bot-management-VHMo4hpU.mjs +0 -5
- package/dist/botnet-feed-BHqfo3sa.mjs +0 -3
- package/dist/brand-protection-HUeR6Pof.mjs +0 -3
- package/dist/browser-extension-199oZg3X.mjs +0 -3
- package/dist/browser-run-DDasyux-.mjs +0 -4
- package/dist/build-0QlYUfFS.mjs +0 -2
- package/dist/builds-B-lXn6JR.mjs +0 -9
- package/dist/cache-CevKpiTM.mjs +0 -9
- package/dist/certificate-authorities-DAg-aO1B.mjs +0 -2
- package/dist/cf-C11NGkjx.mjs +0 -18
- package/dist/chunk-LQW53VED-CoECHA3R.mjs +0 -119
- package/dist/chunk-QBZBEHZB-BuiXJn8j.mjs +0 -2
- package/dist/chunk-vbHwaUoU.mjs +0 -2
- package/dist/client-certificates-Bay7oPLE.mjs +0 -3
- package/dist/client-side-security-CbU9xn0k.mjs +0 -37
- package/dist/cloud-connector-AH2ClcSL.mjs +0 -2
- package/dist/cloudforce-one-DwOfS75V.mjs +0 -32
- package/dist/command-CMzMsll4.mjs +0 -2
- package/dist/connector-interrupts-DcLrqM2V.mjs +0 -2
- package/dist/connector-telemetry-events-PrJWgNs9.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CIjJm5yu.mjs +0 -2
- package/dist/connectors-CEAy30E-.mjs +0 -3
- package/dist/containers-BsbDqbSn.mjs +0 -58
- package/dist/content-scan-BdK936iO.mjs +0 -4
- package/dist/cps-oP97-qkm.mjs +0 -2
- package/dist/csamScanner-DUNN4INg.mjs +0 -6
- package/dist/ct-alerting-dV_gsV2w.mjs +0 -3
- package/dist/custom-certificates-DYspvjo4.mjs +0 -5
- package/dist/custom-csrs-DjSWLQRu.mjs +0 -3
- package/dist/custom-hostnames-df1lH6IY.mjs +0 -5
- package/dist/custom-nameservers-CLTbN-9R.mjs +0 -3
- package/dist/custom-pages-DzKnSgL3.mjs +0 -3
- package/dist/d1-JBEqjJoj.mjs +0 -20
- package/dist/data-security-CIktWnXt.mjs +0 -7
- package/dist/dcv-delegation-_r6Vc6VL.mjs +0 -2
- package/dist/dev-CAubuxCc.mjs +0 -4
- package/dist/diagnostics-B0DRh714.mjs +0 -3
- package/dist/dist-12KzRsBM.mjs +0 -387
- package/dist/dist-BCVqQpg2.mjs +0 -2
- package/dist/dist-Cp3uJN1x.mjs +0 -48
- package/dist/dist-S9K_8gq9.mjs +0 -9
- package/dist/dls-CFzTHcZM.mjs +0 -3
- package/dist/dns-Dw6u-NV1.mjs +0 -29
- package/dist/dns-firewall-CIPptslp.mjs +0 -57
- package/dist/dry-run-DiVy1lVo.mjs +0 -2
- package/dist/durable-objects-CCkeqqBq.mjs +0 -2
- package/dist/email-auth-kdxO51Oz.mjs +0 -2
- package/dist/email-routing-BLggZdQq.mjs +0 -6
- package/dist/email-security-DjADlgdM.mjs +0 -18
- package/dist/email-sending-Cz7E7GoP.mjs +0 -7
- package/dist/error-sanitization-DfLijlBJ.mjs +0 -2
- package/dist/fieldExtractors-BWaMi6lD.mjs +0 -3
- package/dist/firewall-5t6OBIOl.mjs +0 -8
- package/dist/flagship-CzG_VoNR.mjs +0 -4
- package/dist/fraud-UOg_69Ob.mjs +0 -20
- package/dist/google-tag-gateway-DirkD-Q2.mjs +0 -2
- package/dist/healthchecks-BkHZGTp1.mjs +0 -4
- package/dist/hostnames-EUYOZm21.mjs +0 -3
- package/dist/hyperdrive-ZoLJlJCL.mjs +0 -21
- package/dist/iam-BQ2xSgYN.mjs +0 -6
- package/dist/images-CkEq6ScP.mjs +0 -8
- package/dist/intel-DDWEdGyl.mjs +0 -8
- package/dist/interactive-B2E03Fs-.mjs +0 -11
- package/dist/interactive-_B-EqD0Y.mjs +0 -23
- package/dist/ips-54Qmy-Uw.mjs +0 -2
- package/dist/keyless-certificates-CXHLc3Qz.mjs +0 -3
- package/dist/keys-rvI4TC3Z.mjs +0 -2
- package/dist/kv-CAeN1zBy.mjs +0 -5
- package/dist/leaked-credential-checks-CbbwtG-p.mjs +0 -4
- package/dist/load-balancers-BFwdwAIU.mjs +0 -6
- package/dist/local-C6XsFD_W.mjs +0 -2
- package/dist/logexplorer-D8rOPB5I.mjs +0 -17
- package/dist/logo-matches-Y3PxVn7t.mjs +0 -2
- package/dist/logos-BN8SvJhS.mjs +0 -3
- package/dist/logpush-BnLA4WVm.mjs +0 -4
- package/dist/logs-CDo7Y5sA.mjs +0 -3
- package/dist/magic-cloud-networking-wPuLwu-F.mjs +0 -5
- package/dist/magic-network-monitoring-BNERUpxS.mjs +0 -4
- package/dist/magic-transit-6tvVOECW.mjs +0 -111
- package/dist/managed-defense-AYwBOYIH.mjs +0 -2
- package/dist/managed-transforms-HZZNrkC7.mjs +0 -3
- package/dist/matches-Dp91L3dL.mjs +0 -2
- package/dist/mcp-P7pcieiT.mjs +0 -4
- package/dist/mesh-DjFrk6PL.mjs +0 -4
- package/dist/mtls-certificates-DZMoef2H.mjs +0 -3
- package/dist/network-7cd1U6-I.mjs +0 -6
- package/dist/network-interconnects-CQ7cPZjK.mjs +0 -41
- package/dist/oauth-DH3kMXSs.mjs +0 -14
- package/dist/oauth-clients-P9t-eMnx.mjs +0 -4
- package/dist/oauth-scopes-C3r9Qh_y.mjs +0 -2
- package/dist/observability-M1DnLhMR.mjs +0 -10
- package/dist/organization-cUE7GDCt.mjs +0 -45
- package/dist/organizations-C-Hcpd0w.mjs +0 -2
- package/dist/origin-ca-certificates-C8cJMyQH.mjs +0 -3
- package/dist/origin-post-quantum-encryption-DjZJCk8M.mjs +0 -2
- package/dist/origin-tls-client-auth-BsjR5EAV.mjs +0 -4
- package/dist/page-rules-B-zq1EUb.mjs +0 -27
- package/dist/pages-B6YpkPos.mjs +0 -14
- package/dist/pay-per-crawl-B4wx0lUb.mjs +0 -4
- package/dist/pipelines-BJc_RylD.mjs +0 -6
- package/dist/precursor-CLQu7suY.mjs +0 -4
- package/dist/progress-V6SZV3Ux.mjs +0 -2
- package/dist/prompt-DjRTpML4.mjs +0 -3
- package/dist/public-BMg6-Hxh-BfUOZTDP.mjs +0 -2
- package/dist/queries-DSrrket-.mjs +0 -3
- package/dist/queues-Tf7kPBpn.mjs +0 -7
- package/dist/r2-DmKNnxtC.mjs +0 -25
- package/dist/r2-data-catalog-DBxoifOq.mjs +0 -16
- package/dist/radar-Csk7Ab-b.mjs +0 -2
- package/dist/realtime-CDehZVhV.mjs +0 -20
- package/dist/registrar-sandbox-BxVdfnam.mjs +0 -56
- package/dist/registrar-vflzeNQ9.mjs +0 -43
- package/dist/reporting-BaPZ1PHN.mjs +0 -2
- package/dist/request-headers-CC4eHmI2.mjs +0 -3
- package/dist/request-tracers-C_UVBexV.mjs +0 -2
- package/dist/resolve-B8CyM1mi.mjs +0 -2
- package/dist/resource-sharing-CoB4S9j1.mjs +0 -6
- package/dist/resource-tagging-CUiUC5g4.mjs +0 -2
- package/dist/rules-4O8076_s.mjs +0 -4
- package/dist/rulesets-C84MxTYo.mjs +0 -5
- package/dist/rum-Bvwkrntx.mjs +0 -4
- package/dist/run-CRfinkSe.mjs +0 -2
- package/dist/schemas-O_ZNaF8R.mjs +0 -65
- package/dist/scim-BvxQmde6.mjs +0 -4
- package/dist/secrets-store-DOKWiC-j.mjs +0 -7
- package/dist/security-center-Bhy_aC-w.mjs +0 -2
- package/dist/security-txt-L7HJ9tq5.mjs +0 -3
- package/dist/smart-shield-COMXuQ1S.mjs +0 -4
- package/dist/snippets-DffQhlKt.mjs +0 -4
- package/dist/spawn-C1AISA2V.mjs +0 -526
- package/dist/spectrum-Cmf7SqQE.mjs +0 -63
- package/dist/speed-m8cdhLFS.mjs +0 -4
- package/dist/src-C8phrg-8.mjs +0 -109
- package/dist/ssl-D4ffsdSw.mjs +0 -15
- package/dist/startup-profile-Dx95Y5cl.mjs +0 -17
- package/dist/state-CHif8Y5I.mjs +0 -2
- package/dist/stream-DPF5fojV.mjs +0 -16
- package/dist/submit-Br8hfP0_.mjs +0 -2
- package/dist/tags-Bnt4JuxQ.mjs +0 -2
- package/dist/telemetry-Ch1vCICm.mjs +0 -2
- package/dist/tenant-D8u0CxoC.mjs +0 -2
- package/dist/tenant-custom-nameservers-BrWMyslZ.mjs +0 -3
- package/dist/tunnels-BkNPpTHa.mjs +0 -5
- package/dist/turnstile-MgwRECJv.mjs +0 -23
- package/dist/ui-DQSZeaG5.mjs +0 -5
- package/dist/url-info-Ddp7MgcI.mjs +0 -2
- package/dist/url-normalization-3ptK9ntV.mjs +0 -3
- package/dist/url-scanner-Psb9ollR.mjs +0 -2
- package/dist/user-DWdshcIu.mjs +0 -12
- package/dist/values-CDKQL1z2.mjs +0 -2
- package/dist/vectorize-CTYYUyQj.mjs +0 -4
- package/dist/waiting-rooms-BUdmwXDY.mjs +0 -11
- package/dist/web-assets-CpDwDEx8.mjs +0 -8
- package/dist/web3-YsjDyAzH.mjs +0 -4
- package/dist/workers-BKKxaZcz.mjs +0 -6
- package/dist/workers-builds-BWo5vUA9.mjs +0 -2
- package/dist/workers-for-platforms-ASJsxYdM.mjs +0 -5
- package/dist/workers-vpc-RkTnRvA2.mjs +0 -3
- package/dist/workflows-KrIFI9ns.mjs +0 -5
- package/dist/zaraz-DglXbVzZ.mjs +0 -2
- package/dist/zero-trust-RilTdSjX.mjs +0 -91
- package/dist/zone-DsBtVkvT.mjs +0 -2
- package/dist/zones-BFxvWFQW.mjs +0 -44
- /package/dist/{alerts-B2SJO4nd.mjs → alerts-CstOk8n0.mjs} +0 -0
- /package/dist/{autorag-iNjZXw1n.mjs → autorag-PRTwXGgn.mjs} +0 -0
- /package/dist/{body-parser-DIlfApuJ.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
- /package/dist/{brands-BrVnNrT3.mjs → brands-BHRXlWDm.mjs} +0 -0
- /package/dist/{clear-an9o3dJ3.mjs → clear-UvKESVx3.mjs} +0 -0
- /package/dist/{cli-types-CrSoSMPF.mjs → cli-types-tt_LZMbn.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-BqWfopFc.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-C1m9U1En.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
- /package/dist/{domain-info-B0Ykqv5l.mjs → domain-info-BqTDXNBo.mjs} +0 -0
- /package/dist/{health-CIUg1C5o.mjs → health-CwPzzrV6.mjs} +0 -0
- /package/dist/{input-validation-BxchZ9jE.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
- /package/dist/{internal-DmpATljO.mjs → internal-WLHfxX64.mjs} +0 -0
- /package/dist/{live-B66u3_0g.mjs → live-D_k7eHdv.mjs} +0 -0
- /package/dist/{metadata-D062SVyy.mjs → metadata-APBiectA.mjs} +0 -0
- /package/dist/{rate-limit-analytics-BknoecoM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
- /package/dist/{rate-limits-cdChIg_S.mjs → rate-limits-C3K9smdl.mjs} +0 -0
- /package/dist/{ready-C-H2cwp_.mjs → ready-CvwvbdTX.mjs} +0 -0
- /package/dist/{recent-submissions-DyuH_n5u.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
- /package/dist/{refute-uSlzkQKq.mjs → refute-CIAFMj00.mjs} +0 -0
- /package/dist/{scan-logo-DMk--WT7.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
- /package/dist/{scan-page-DEHnAOJo.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
- /package/dist/{search-BlKeSfVD.mjs → search-12jA1b4l.mjs} +0 -0
- /package/dist/{signed-url-CiGmGkLQ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
- /package/dist/{submission-info-DHlTHDrs.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
- /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
- /package/dist/{total-queries-D5WvVfYi.mjs → total-queries-CJTc9Pde.mjs} +0 -0
- /package/dist/{tracked-domains-9deBK9bp.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
- /package/dist/{verify-S-TmhUDr.mjs → verify-CZW5Fo1q.mjs} +0 -0
package/dist/dns-Dw6u-NV1.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-C6XsFD_W.mjs";import{f as t,g as n,h as r}from"./oauth-DH3kMXSs.mjs";import{a as i,r as a}from"./auth-tvDdC1J-.mjs";import{t as o}from"./output-COcSQsfn.mjs";import{t as s}from"./dry-run-DiVy1lVo.mjs";import{t as c}from"./progress-V6SZV3Ux.mjs";import{t as l}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as u,r as d,t as f}from"./body-parser-DIlfApuJ.mjs";import{n as p,t as m}from"./input-validation-BxchZ9jE.mjs";import{a as h,n as g}from"./prompt-DjRTpML4.mjs";import{t as _}from"./cli-types-CrSoSMPF.mjs";import{n as ee,t as te}from"./raw-fetch-BVYQR6C5.mjs";function v(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete`,describe:`Delete DNSSEC.`,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 a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
3
|
-
`);return}o(await c(`Deleting`,async()=>t.dns.dnssec.delete({zone_id:n})),{successLabel:`Deleted`})})};function b(e){return e.option(`dnssec-multi-signer`,{type:`boolean`,description:`If true, multi-signer DNSSEC is enabled on the zone, allowing multiple
|
|
4
|
-
providers to serve a DNSSEC-signed zone at the same time.
|
|
5
|
-
This is required for DNSKEY records (except those automatically
|
|
6
|
-
generated by Cloudflare) to be added to the zone.
|
|
7
|
-
|
|
8
|
-
See [Multi-signer DNSSEC](https://developers.cloudflare.com/dns/dnssec/multi-signer-dnssec/) for details.`}).option(`dnssec-presigned`,{type:`boolean`,description:`If true, allows Cloudflare to transfer in a DNSSEC-signed zone
|
|
9
|
-
including signatures from an external provider, without requiring
|
|
10
|
-
Cloudflare to sign any records on the fly.
|
|
11
|
-
|
|
12
|
-
Note that this feature has some limitations.
|
|
13
|
-
See [Cloudflare as Secondary](https://developers.cloudflare.com/dns/zone-setups/zone-transfers/cloudflare-as-secondary/setup/#dnssec) for details.`}).option(`dnssec-use-nsec3`,{type:`boolean`,description:`If true, enables the use of NSEC3 together with DNSSEC on the zone.
|
|
14
|
-
Combined with setting dnssec_presigned to true, this enables the use of
|
|
15
|
-
NSEC3 records when transferring in from an external provider.
|
|
16
|
-
If dnssec_presigned is instead set to false (default), NSEC3 records will be
|
|
17
|
-
generated and signed at request time.
|
|
18
|
-
|
|
19
|
-
See [DNSSEC with NSEC3](https://developers.cloudflare.com/dns/dnssec/enable-nsec3/) for details.`}).option(`status`,{type:`string`,description:`Status of DNSSEC, based on user-desired state and presence of necessary records.`,choices:[`active`,`disabled`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`edit`,describe:`Enable or disable DNSSEC.`,builder:b,handler:async e=>l({command:`dns dnssec edit`,classification:{safeFlags:[`dnssec-multi-signer`,`dnssec-presigned`,`dnssec-use-nsec3`,`status`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns dnssec edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({dnssec_multi_signer:e[`dnssec-multi-signer`],dnssec_presigned:e[`dnssec-presigned`],dnssec_use_nsec3:e[`dnssec-use-nsec3`],status:p(e.status,`status`,`text`)}):u(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=u(e.body);o(await c(`Updating`,async()=>t.dns.dnssec.edit({...r,zone_id:n})),{successLabel:`Updated`});return}let i=f({dnssec_multi_signer:e[`dnssec-multi-signer`],dnssec_presigned:e[`dnssec-presigned`],dnssec_use_nsec3:e[`dnssec-use-nsec3`],status:p(e.status,`status`,`text`)});o(await c(`Updating`,async()=>t.dns.dnssec.edit({...i,zone_id:n})),{successLabel:`Updated`})})};function S(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`Details about DNSSEC status and configuration.`,builder:S,handler:async e=>l({command:`dns dnssec get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns dnssec get`,method:`GET`,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 a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.dnssec.get({zone_id:n})),{successLabel:`Loaded`})})};function w(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`zsks`,describe:`List the Zone Signing Keys (ZSKs) that DNSSEC uses for the zone.`,builder:w,handler:async e=>l({command:`dns dnssec list zsks`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns dnssec list zsks`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec/zsk`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.dnssec.list.zsks({zone_id:n})),{successLabel:`Loaded`})})},E={command:`list`,describe:`Operations for dnssec.list`,builder:e=>e.command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},D={command:`dnssec`,describe:`Operations for dnssec`,builder:e=>e.command(y).command(x).command(C).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.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(`deletes`,{type:`string`,description:`The deletes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`The patches field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`The posts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`The puts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`batch`,describe:`Send a Batch of DNS Record API calls to be executed together. Notes: - Although Cloudflare will execute the batched operations in a single database transaction, Cloudflare's distributed KV store must treat each record change as a single key-value pair. This means that the propagation of changes is not atomic. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/batch-record-changes/ "Batch DNS records") for more information. - The operations you specify within the /batch request body are always executed in the following order: - Deletes - Patches - Puts - Posts`,builder:O,handler:async e=>l({command:`dns records batch`,classification:{safeFlags:[`include-shadow-metadata`,`dry-run`]}},e,async()=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){s({command:`cf dns records batch`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/batch`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?f({deletes:d(e.deletes,`deletes`),patches:d(e.patches,`patches`),posts:d(e.posts,`posts`),puts:d(e.puts,`puts`)}):u(e.body)});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=u(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Creating`,async()=>n.dns.records.batch({...r,zone_id:i,...t})),{successLabel:`Created`});return}let l=f({deletes:d(e.deletes,`deletes`),patches:d(e.patches,`patches`),posts:d(e.posts,`posts`),puts:d(e.puts,`puts`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Creating`,async()=>n.dns.records.batch({...l,zone_id:i,...t})),{successLabel:`Created`})})};function A(e){return e.option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`create`,describe:`Create a new DNS record for a zone. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:A,handler:async e=>l({command:`dns records create`,classification:{safeFlags:[`include-shadow-metadata`,`dry-run`]}},e,async()=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){s({command:`cf dns records create`,method:`POST`,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:`json`,body:e.body===void 0?void 0:u(e.body)});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=u(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Creating`,async()=>n.dns.records.create({body:r,zone_id:i,...t})),{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 M(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const N={command:`delete <dns-record-id>`,describe:`Permanently removes a DNS record from the zone.`,builder:M,handler:async e=>l({command:`dns records delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf dns records delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
20
|
-
`);return}o(await c(`Deleting`,async()=>t.dns.records.delete({zone_id:n,dns_record_id:e[`dns-record-id`]})),{successLabel:`Deleted`})})};function P(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`edit <dns-record-id>`,describe:`Update an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:P,handler:async e=>l({command:`dns records edit`,classification:{safeFlags:[`include-shadow-metadata`,`dry-run`]}},e,async()=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){s({command:`cf dns records edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=u(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Updating`,async()=>n.dns.records.edit({body:r,zone_id:i,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function I(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`export`,describe:`You can export your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.`,builder:I,handler:async e=>l({command:`dns records export`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns records export`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/export`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e);e.zoneId=await r({zone:e.zone},t,{quiet:e.quiet}),ee((await c(`Loading`,async()=>te(`/zones/${e.zoneId}/dns_records/export`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}))).toString(`utf-8`))})};function R(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <dns-record-id>`,describe:`Retrieves details for a specific DNS record in the zone.`,builder:R,handler:async e=>l({command:`dns records get`,classification:{safeFlags:[`include-shadow-metadata`,`dry-run`]}},e,async()=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){s({command:`cf dns records get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>n.dns.records.get({zone_id:i,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Loaded`})})};function B(e){return e.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:`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.`,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 t=await a(e);if(e.zoneId=await r({zone:e.zone},t,{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`)??``)),o(await c(`Creating`,async()=>i(t,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n})),{successLabel:`Created`});return}if(e.body){let n=p(e.body,`body`,`binary`);o(await c(`Creating`,async()=>i(t,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n,headers:{"Content-Type":`multipart/form-data`}})),{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.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 given NS delegation name, excluding the NS records that form the delegation itself. The value must be a subdomain of the zone; the zone apex is not accepted. 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, search, sort, and filter a zones' 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 n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>n.dns.records.list({zone_id:i,...t})),{successLabel:`Loaded`})})};function W(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`scan-list`,describe:"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.",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 a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.records.scanList({zone_id:n})),{successLabel:`Loaded`})})};function K(e){return e.option(`accepts`,{type:`string`,description:`The accepts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rejects`,{type:`string`,description:`The rejects field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const q={command:`scan-review`,describe:`Accept or reject DNS records found by the DNS records scan. Accepted records will be permanently added to the zone, while rejected records will be permanently deleted.`,builder:K,handler:async e=>l({command:`dns records scan-review`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns records scan-review`,method:`POST`,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:`json`,body:e.body===void 0?f({accepts:d(e.accepts,`accepts`),rejects:d(e.rejects,`rejects`)}):u(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=u(e.body);o(await c(`Creating`,async()=>t.dns.records.scanReview({...r,zone_id:n})),{successLabel:`Created`});return}let i=f({accepts:d(e.accepts,`accepts`),rejects:d(e.rejects,`rejects`)});o(await c(`Creating`,async()=>t.dns.records.scanReview({...i,zone_id:n})),{successLabel:`Created`})})};function J(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`scan-trigger`,describe:"Initiates an asynchronous scan for common DNS records on your domain. Note that this **does not** automatically add records to your zone. The scan runs in the background, and results can be reviewed later using the `/scan/review` endpoints. Useful if you haven't updated your nameservers yet.",builder:J,handler:async e=>l({command:`dns records scan-trigger`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns records scan-trigger`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan/trigger`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.records.scanTrigger({zone_id:n})),{successLabel:`Created`})})};function X(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`scan`,describe:`Scan for common DNS records on your domain and automatically add them to your zone. Useful if you haven't updated your nameservers yet.`,builder:X,handler:async e=>l({command:`dns records scan`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns records scan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.records.scan({zone_id:n})),{successLabel:`Created`})})};function Q(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`update <dns-record-id>`,describe:`Overwrite an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:Q,handler:async e=>l({command:`dns records update`,classification:{safeFlags:[`include-shadow-metadata`,`dry-run`]}},e,async()=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){s({command:`cf dns records update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=u(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Updating`,async()=>n.dns.records.update({body:r,zone_id:i,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},re={command:`records`,describe:`Operations for records`,builder:e=>e.command(k).command(j).command(N).command(F).command(L).command(z).command(V).command(U).command(Z).command(G).command(q).command(Y).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ie(e){return e.option(`enforce-dns-only`,{type:`boolean`,description:`When enabled, forces all proxied DNS records in the account to behave as DNS-only at the edge, regardless of each record's individual proxy setting. Note that this account-level override does not modify the records themselves; it only affects how they are served at the edge. See more on [Enforce DNS-only](https://developers.cloudflare.com/dns/proxy-status/enforce-dns-only).`}).option(`zone-defaults-flatten-all-cnames`,{type:`boolean`,description:`Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.`}).option(`zone-defaults-foundation-dns`,{type:`boolean`,description:`Deprecated. Use nameservers.type to configure Advanced Nameservers.`}).option(`zone-defaults-internal-dns-reference-zone-id`,{type:`string`,description:`The ID of the zone to fallback to.`}).option(`zone-defaults-multi-provider`,{type:`boolean`,description:`Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.`}).option(`zone-defaults-ns-ttl`,{type:`number`,description:`The time to live (TTL) of the zone's nameserver (NS) records.`}).option(`zone-defaults-secondary-overrides`,{type:`boolean`,description:`Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.`}).option(`zone-defaults-soa-expire`,{type:`number`,description:`Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.`}).option(`zone-defaults-soa-min-ttl`,{type:`number`,description:`The time to live (TTL) for negative caching of records within the zone.`}).option(`zone-defaults-soa-mname`,{type:`string`,description:`The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.`}).option(`zone-defaults-soa-refresh`,{type:`number`,description:`Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.`}).option(`zone-defaults-soa-retry`,{type:`number`,description:`Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.`}).option(`zone-defaults-soa-rname`,{type:`string`,description:`The email address of the zone administrator, with the first label representing the local part of the email address.`}).option(`zone-defaults-soa-ttl`,{type:`number`,description:`The time to live (TTL) of the SOA record itself.`}).option(`zone-defaults-zone-mode`,{type:`string`,description:`Whether the zone mode is a regular or CDN/DNS only zone.`,choices:[`standard`,`cdn_only`,`dns_only`]}).option(`zone-defaults-nameservers-type`,{type:`string`,description:`Nameserver type`,choices:[`cloudflare.standard`,`cloudflare.advanced`,`cloudflare.standard.random`,`custom.account`,`custom.tenant`]}).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 ae={command:`edit`,describe:`Update DNS settings for an account or zone`,builder:ie,handler:async i=>l({command:`dns settings account edit`,classification:{safeFlags:[`enforce-dns-only`,`zone-defaults-flatten-all-cnames`,`zone-defaults-foundation-dns`,`zone-defaults-multi-provider`,`zone-defaults-secondary-overrides`,`zone-defaults-zone-mode`,`zone-defaults-nameservers-type`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf dns settings account edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/dns_settings`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?f({enforce_dns_only:i[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:i[`zone-defaults-flatten-all-cnames`],foundation_dns:i[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:p(i[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:i[`zone-defaults-multi-provider`],ns_ttl:i[`zone-defaults-ns-ttl`],secondary_overrides:i[`zone-defaults-secondary-overrides`],soa:{expire:i[`zone-defaults-soa-expire`],min_ttl:i[`zone-defaults-soa-min-ttl`],mname:p(i[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:i[`zone-defaults-soa-refresh`],retry:i[`zone-defaults-soa-retry`],rname:p(i[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:i[`zone-defaults-soa-ttl`]},zone_mode:p(i[`zone-defaults-zone-mode`],`zone-defaults-zone-mode`,`text`),nameservers:{type:p(i[`zone-defaults-nameservers-type`],`zone-defaults-nameservers-type`,`text`)}}}):u(i.body)});return}let l=await a(i),d=i.zone===void 0?`accounts`:`zones`,m=d===`zones`?await r({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await t();if(d===`zones`?i.zoneId=m:i.accountId=m,i.body){let e=u(i.body);o(await c(`Updating`,async()=>l.dns.settings.account.edit({...e,account_or_zone:d,account_or_zone_id:m})),{successLabel:`Updated`});return}let h=f({enforce_dns_only:i[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:i[`zone-defaults-flatten-all-cnames`],foundation_dns:i[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:p(i[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:i[`zone-defaults-multi-provider`],ns_ttl:i[`zone-defaults-ns-ttl`],secondary_overrides:i[`zone-defaults-secondary-overrides`],soa:{expire:i[`zone-defaults-soa-expire`],min_ttl:i[`zone-defaults-soa-min-ttl`],mname:p(i[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:i[`zone-defaults-soa-refresh`],retry:i[`zone-defaults-soa-retry`],rname:p(i[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:i[`zone-defaults-soa-ttl`]},zone_mode:p(i[`zone-defaults-zone-mode`],`zone-defaults-zone-mode`,`text`),nameservers:{type:p(i[`zone-defaults-nameservers-type`],`zone-defaults-nameservers-type`,`text`)}}});o(await c(`Updating`,async()=>l.dns.settings.account.edit({...h,account_or_zone:d,account_or_zone_id:m})),{successLabel:`Updated`})})};function oe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get`,describe:`Show DNS settings for an account or zone`,builder:oe,handler:async i=>l({command:`dns settings account get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf dns settings account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/dns_settings`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await t();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.dns.settings.account.get({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})};function ce(e){return e.option(`name`,{type:`string`,description:`The name of the view.`}).option(`zones`,{type:`string`,array:!0,description:`The list of zones linked to this view.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const le={command:`create`,describe:`Create Internal DNS View for an account`,builder:ce,handler:async r=>l({command:`dns settings account views create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns settings account views create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({name:p(r.name,`name`,`text`),zones:r.zones}):u(r.body)});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);o(await c(`Creating`,async()=>i.dns.settings.account.views.create({...e,account_id:l})),{successLabel:`Created`});return}if(r.name===void 0&&(r.name=await h(`name`,`The name of the view.`)),r.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let d=f({name:p(r.name,`name`,`text`),zones:r.zones});o(await c(`Creating`,async()=>i.dns.settings.account.views.create({...d,account_id:l})),{successLabel:`Created`})})};function ue(e){return e.positional(`view-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const de={command:`delete <view-id>`,describe:`Delete an existing Internal DNS View`,builder:ue,handler:async r=>l({command:`dns settings account views delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){s({command:`cf dns settings account views delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views/${r[`view-id`]==null?`<view-id>`:encodeURIComponent(String(r[`view-id`]))}`,pathParams:{"view-id":String(r[`view-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
21
|
-
`);return}o(await c(`Deleting`,async()=>i.dns.settings.account.views.delete({account_id:l,view_id:r[`view-id`]})),{successLabel:`Deleted`})})};function fe(e){return e.positional(`view-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the view.`}).option(`zones`,{type:`string`,array:!0,description:`The list of zones linked to this view.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const pe={command:`edit <view-id>`,describe:`Update an existing Internal DNS View`,builder:fe,handler:async r=>l({command:`dns settings account views edit`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns settings account views edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views/${r[`view-id`]==null?`<view-id>`:encodeURIComponent(String(r[`view-id`]))}`,pathParams:{"view-id":String(r[`view-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({name:p(r.name,`name`,`text`),zones:r.zones}):u(r.body)});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);o(await c(`Updating`,async()=>i.dns.settings.account.views.edit({...e,account_id:l,view_id:r[`view-id`]})),{successLabel:`Updated`});return}let d=f({name:p(r.name,`name`,`text`),zones:r.zones});o(await c(`Updating`,async()=>i.dns.settings.account.views.edit({...d,account_id:l,view_id:r[`view-id`]})),{successLabel:`Updated`})})};function me(e){return e.positional(`view-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`get <view-id>`,describe:`Get DNS Internal View`,builder:me,handler:async r=>l({command:`dns settings account views get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns settings account views get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views/${r[`view-id`]==null?`<view-id>`:encodeURIComponent(String(r[`view-id`]))}`,pathParams:{"view-id":String(r[`view-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.settings.account.views.get({account_id:l,view_id:r[`view-id`]})),{successLabel:`Loaded`})})};function ge(e){return e.option(`name`,{type:`string`,description:"Exact value of the DNS view name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS view name.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS view name.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS view name.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS view name.`}).option(`zone-id`,{type:`string`,description:`A zone ID that exists in the zones list for the view.`}).option(`zone-name`,{type:`string`,description:`A zone name that exists in the zones list for the view.`}).option(`match`,{type:`string`,description:"Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of DNS views per page.`}).option(`order`,{type:`string`,description:`Field to order DNS views by.`,choices:[`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order DNS views in.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`list`,describe:`List DNS Internal Views for an Account`,builder:_(ge),handler:async r=>l({command:`dns settings account views list`,classification:{safeFlags:[`match`,`order`,`direction`,`dry-run`]}},r,async()=>{let i={name:r.name,"name.exact":r[`name-exact`],"name.contains":r[`name-contains`],"name.startswith":r[`name-startswith`],"name.endswith":r[`name-endswith`],zone_id:r[`zone-id`],zone_name:r[`zone-name`],match:r.match,page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){s({command:`cf dns settings account views list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.dns.settings.account.views.list({account_id:u,...i})),{successLabel:`Loaded`})})},ve={command:`views`,describe:`Operations for settings.account.views`,builder:e=>e.command(le).command(de).command(pe).command(he).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`account`,describe:`Operations for settings.account`,builder:e=>e.command(ae).command(se).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},be={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get`,describe:`Get the current DNS record usage and quota for an account or zone. May include internal DNS usage and quota.`,builder:xe,handler:async i=>l({command:`dns usage account get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf dns usage account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/dns_records/usage`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await t();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.dns.usage.account.get({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})},Ce={command:`account`,describe:`Operations for usage.account`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},we={command:`usage`,describe:`Operations for usage`,builder:e=>e.command(Ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Te(e){return e.option(`ip-range`,{type:`string`,description:`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`}).option(`name`,{type:`string`,description:`The name of the acl.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ee={command:`create`,describe:`Create ACL.`,builder:Te,handler:async r=>l({command:`dns zone-transfers acls create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/acls`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({ip_range:p(r[`ip-range`],`ip-range`,`text`),name:p(r.name,`name`,`text`)}):u(r.body)});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);o(await c(`Creating`,async()=>i.dns.zoneTransfers.acls.create({...e,account_id:l})),{successLabel:`Created`});return}r[`ip-range`]===void 0&&(r[`ip-range`]=await h(`ip-range`,`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`)),r.name===void 0&&(r.name=await h(`name`,`The name of the acl.`));let d=f({ip_range:p(r[`ip-range`],`ip-range`,`text`),name:p(r.name,`name`,`text`)});o(await c(`Creating`,async()=>i.dns.zoneTransfers.acls.create({...d,account_id:l})),{successLabel:`Created`})})};function De(e){return e.positional(`acl-id`,{type:`string`,description:`Acl 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 Oe={command:`delete <acl-id>`,describe:`Delete ACL.`,builder:De,handler:async r=>l({command:`dns zone-transfers acls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"acl-id":String(r[`acl-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
22
|
-
`);return}o(await c(`Deleting`,async()=>i.dns.zoneTransfers.acls.delete({account_id:l,acl_id:r[`acl-id`]})),{successLabel:`Deleted`})})};function ke(e){return e.positional(`acl-id`,{type:`string`,description:`Acl ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ae={command:`get <acl-id>`,describe:`Get ACL.`,builder:ke,handler:async r=>l({command:`dns zone-transfers acls get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"acl-id":String(r[`acl-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.acls.get({account_id:l,acl_id:r[`acl-id`]})),{successLabel:`Loaded`})})};function je(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`list`,describe:`List ACLs.`,builder:je,handler:async r=>l({command:`dns zone-transfers acls list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/acls`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.acls.list({account_id:l})),{successLabel:`Loaded`})})};function Ne(e){return e.positional(`acl-id`,{type:`string`,description:`Acl ID`,demandOption:!0}).option(`ip-range`,{type:`string`,description:`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`}).option(`name`,{type:`string`,description:`The name of the acl.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Pe={command:`update <acl-id>`,describe:`Modify ACL.`,builder:Ne,handler:async r=>l({command:`dns zone-transfers acls update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"acl-id":String(r[`acl-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({ip_range:p(r[`ip-range`],`ip-range`,`text`),name:p(r.name,`name`,`text`)}):u(r.body)});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);o(await c(`Updating`,async()=>i.dns.zoneTransfers.acls.update({body:e,account_id:l,acl_id:r[`acl-id`]})),{successLabel:`Updated`});return}r[`ip-range`]===void 0&&(r[`ip-range`]=await h(`ip-range`,`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`)),r.name===void 0&&(r.name=await h(`name`,`The name of the acl.`));let d=f({ip_range:p(r[`ip-range`],`ip-range`,`text`),name:p(r.name,`name`,`text`)});o(await c(`Updating`,async()=>i.dns.zoneTransfers.acls.update({body:d,account_id:l,acl_id:r[`acl-id`]})),{successLabel:`Updated`})})},Fe={command:`acls`,describe:`Operations for zone-transfers.acls`,builder:e=>e.command(Ee).command(Oe).command(Ae).command(Me).command(Pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ie(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`create`,describe:`Sends AXFR zone transfer request to primary nameserver(s).`,builder:Ie,handler:async e=>l({command:`dns zone-transfers force-axfr create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers force-axfr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/force_axfr`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.zoneTransfers.forceAxfr.create({zone_id:n})),{successLabel:`Created`})})},Re={command:`force-axfr`,describe:`Operations for zone-transfers.force-axfr`,builder:e=>e.command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ze(e){return e.option(`auto-refresh-seconds`,{type:`number`,description:`How often should a secondary zone auto refresh regardless of DNS NOTIFY.
|
|
23
|
-
Not applicable for primary zones.`,default:86400}).option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).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 Be={command:`create`,describe:`Create secondary zone configuration for incoming zone transfers.`,builder:ze,handler:async e=>l({command:`dns zone-transfers incoming create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers incoming create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/incoming`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({auto_refresh_seconds:e[`auto-refresh-seconds`],name:p(e.name,`name`,`text`),peers:e.peers}):u(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=u(e.body);o(await c(`Creating`,async()=>t.dns.zoneTransfers.incoming.create({body:r,zone_id:n})),{successLabel:`Created`});return}if(e[`auto-refresh-seconds`]===void 0)throw Error(`--auto-refresh-seconds is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await h(`name`,`Zone name.`)),e.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let i=f({auto_refresh_seconds:e[`auto-refresh-seconds`],name:p(e.name,`name`,`text`),peers:e.peers});o(await c(`Creating`,async()=>t.dns.zoneTransfers.incoming.create({body:i,zone_id:n})),{successLabel:`Created`})})};function Ve(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const He={command:`delete`,describe:`Delete secondary zone configuration for incoming zone transfers.`,builder:Ve,handler:async e=>l({command:`dns zone-transfers incoming delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers incoming delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/incoming`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
24
|
-
`);return}o(await c(`Deleting`,async()=>t.dns.zoneTransfers.incoming.delete({zone_id:n})),{successLabel:`Deleted`})})};function Ue(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const We={command:`get`,describe:`Get secondary zone configuration for incoming zone transfers.`,builder:Ue,handler:async e=>l({command:`dns zone-transfers incoming get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers incoming get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/incoming`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.zoneTransfers.incoming.get({zone_id:n})),{successLabel:`Loaded`})})};function Ge(e){return e.option(`auto-refresh-seconds`,{type:`number`,description:`How often should a secondary zone auto refresh regardless of DNS NOTIFY.
|
|
25
|
-
Not applicable for primary zones.`}).option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).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 Ke={command:`update`,describe:`Update secondary zone configuration for incoming zone transfers.`,builder:Ge,handler:async e=>l({command:`dns zone-transfers incoming update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers incoming update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/incoming`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({auto_refresh_seconds:e[`auto-refresh-seconds`],name:p(e.name,`name`,`text`),peers:e.peers}):u(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=u(e.body);o(await c(`Updating`,async()=>t.dns.zoneTransfers.incoming.update({body:r,zone_id:n})),{successLabel:`Updated`});return}if(e[`auto-refresh-seconds`]===void 0)throw Error(`--auto-refresh-seconds is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await h(`name`,`Zone name.`)),e.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let i=f({auto_refresh_seconds:e[`auto-refresh-seconds`],name:p(e.name,`name`,`text`),peers:e.peers});o(await c(`Updating`,async()=>t.dns.zoneTransfers.incoming.update({body:i,zone_id:n})),{successLabel:`Updated`})})},qe={command:`incoming`,describe:`Operations for zone-transfers.incoming`,builder:e=>e.command(Be).command(He).command(We).command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Je(e){return e.option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).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 Ye={command:`create`,describe:`Create primary zone configuration for outgoing zone transfers.`,builder:Je,handler:async e=>l({command:`dns zone-transfers outgoing create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),peers:e.peers}):u(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=u(e.body);o(await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.create({body:r,zone_id:n})),{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await h(`name`,`Zone name.`)),e.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let i=f({name:p(e.name,`name`,`text`),peers:e.peers});o(await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.create({body:i,zone_id:n})),{successLabel:`Created`})})};function Xe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ze={command:`delete`,describe:`Delete primary zone configuration for outgoing zone transfers.`,builder:Xe,handler:async e=>l({command:`dns zone-transfers outgoing delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
26
|
-
`);return}o(await c(`Deleting`,async()=>t.dns.zoneTransfers.outgoing.delete({zone_id:n})),{successLabel:`Deleted`})})};function Qe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const $e={command:`disable`,describe:`Disable outgoing zone transfers for primary zone and clears IXFR backlog of primary zone.`,builder:Qe,handler:async e=>l({command:`dns zone-transfers outgoing disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/disable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await g({force:!!e.force,message:`This operation turns off outgoing zone transfers for the primary zone, which means secondary zones will stop receiving updates.`})){process.stderr.write(`Aborted.
|
|
27
|
-
`);return}o(await c(`Deleting`,async()=>t.dns.zoneTransfers.outgoing.disable({zone_id:n})),{successLabel:`Deleted`})})};function et(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const tt={command:`enable`,describe:`Enable outgoing zone transfers for primary zone.`,builder:et,handler:async e=>l({command:`dns zone-transfers outgoing enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.enable({zone_id:n})),{successLabel:`Created`})})};function nt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rt={command:`force-notify`,describe:`Notifies the secondary nameserver(s) and clears IXFR backlog of primary zone.`,builder:nt,handler:async e=>l({command:`dns zone-transfers outgoing force-notify`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing force-notify`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/force_notify`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.forceNotify({zone_id:n})),{successLabel:`Created`})})};function it(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const at={command:`get`,describe:`Get primary zone configuration for outgoing zone transfers.`,builder:it,handler:async e=>l({command:`dns zone-transfers outgoing get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.zoneTransfers.outgoing.get({zone_id:n})),{successLabel:`Loaded`})})};function ot(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const st={command:`get`,describe:`Get primary zone transfer status.`,builder:ot,handler:async e=>l({command:`dns zone-transfers outgoing status get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing status get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/status`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.zoneTransfers.outgoing.status.get({zone_id:n})),{successLabel:`Loaded`})})},ct={command:`status`,describe:`Operations for zone-transfers.outgoing.status`,builder:e=>e.command(st).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function lt(e){return e.option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).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:`update`,describe:`Update primary zone configuration for outgoing zone transfers.`,builder:lt,handler:async e=>l({command:`dns zone-transfers outgoing update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),peers:e.peers}):u(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=u(e.body);o(await c(`Updating`,async()=>t.dns.zoneTransfers.outgoing.update({body:r,zone_id:n})),{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await h(`name`,`Zone name.`)),e.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let i=f({name:p(e.name,`name`,`text`),peers:e.peers});o(await c(`Updating`,async()=>t.dns.zoneTransfers.outgoing.update({body:i,zone_id:n})),{successLabel:`Updated`})})},dt={command:`outgoing`,describe:`Operations for zone-transfers.outgoing`,builder:e=>e.command(Ye).command(Ze).command($e).command(tt).command(rt).command(at).command(ut).command(ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ft(e){return e.option(`name`,{type:`string`,description:`The name of the peer.`}).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 pt={command:`create`,describe:`Create Peer.`,builder:ft,handler:async r=>l({command:`dns zone-transfers peers create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers peers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/peers`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({name:p(r.name,`name`,`text`)}):u(r.body)});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);o(await c(`Creating`,async()=>i.dns.zoneTransfers.peers.create({...e,account_id:l})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await h(`name`,`The name of the peer.`));let d=f({name:p(r.name,`name`,`text`)});o(await c(`Creating`,async()=>i.dns.zoneTransfers.peers.create({...d,account_id:l})),{successLabel:`Created`})})};function mt(e){return e.positional(`peer-id`,{type:`string`,description:`Peer 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 ht={command:`delete <peer-id>`,describe:`Delete Peer.`,builder:mt,handler:async r=>l({command:`dns zone-transfers peers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers peers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/peers/${r[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(r[`peer-id`]))}`,pathParams:{"peer-id":String(r[`peer-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
28
|
-
`);return}o(await c(`Deleting`,async()=>i.dns.zoneTransfers.peers.delete({account_id:l,peer_id:r[`peer-id`]})),{successLabel:`Deleted`})})};function gt(e){return e.positional(`peer-id`,{type:`string`,description:`Peer ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _t={command:`get <peer-id>`,describe:`Get Peer.`,builder:gt,handler:async r=>l({command:`dns zone-transfers peers get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers peers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/peers/${r[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(r[`peer-id`]))}`,pathParams:{"peer-id":String(r[`peer-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.peers.get({account_id:l,peer_id:r[`peer-id`]})),{successLabel:`Loaded`})})};function vt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yt={command:`list`,describe:`List Peers.`,builder:vt,handler:async r=>l({command:`dns zone-transfers peers list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers peers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/peers`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.peers.list({account_id:l})),{successLabel:`Loaded`})})};function $(e){return e.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 bt={command:`update <peer-id>`,describe:`Modify Peer.`,builder:$,handler:async r=>l({command:`dns zone-transfers peers update`,classification:{safeFlags:[`ixfr-enable`,`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers peers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/peers/${r[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(r[`peer-id`]))}`,pathParams:{"peer-id":String(r[`peer-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({ip:p(r.ip,`ip`,`text`),ixfr_enable:r[`ixfr-enable`],name:p(r.name,`name`,`text`),port:r.port,tsig_id:p(r[`tsig-id`],`tsig-id`,`text`)}):u(r.body)});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);o(await c(`Updating`,async()=>i.dns.zoneTransfers.peers.update({body:e,account_id:l,peer_id:r[`peer-id`]})),{successLabel:`Updated`});return}r.name===void 0&&(r.name=await h(`name`,`The name of the peer.`));let d=f({ip:p(r.ip,`ip`,`text`),ixfr_enable:r[`ixfr-enable`],name:p(r.name,`name`,`text`),port:r.port,tsig_id:p(r[`tsig-id`],`tsig-id`,`text`)});o(await c(`Updating`,async()=>i.dns.zoneTransfers.peers.update({body:d,account_id:l,peer_id:r[`peer-id`]})),{successLabel:`Updated`})})},xt={command:`peers`,describe:`Operations for zone-transfers.peers`,builder:e=>e.command(pt).command(ht).command(_t).command(yt).command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function St(e){return e.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 Ct={command:`create`,describe:`Create TSIG.`,builder:St,handler:async r=>l({command:`dns zone-transfers tsigs create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers tsigs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({algo:p(r.algo,`algo`,`text`),name:p(r.name,`name`,`text`),secret:p(r.secret,`secret`,`text`)}):u(r.body)});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);o(await c(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:e,account_id:l})),{successLabel:`Created`});return}r.algo===void 0&&(r.algo=await h(`algo`,`TSIG algorithm.`)),r.name===void 0&&(r.name=await h(`name`,`TSIG key name.`)),r.secret===void 0&&(r.secret=await h(`secret`,`TSIG secret.`,{kind:`secret`}));let d=f({algo:p(r.algo,`algo`,`text`),name:p(r.name,`name`,`text`),secret:p(r.secret,`secret`,`text`)});o(await c(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:d,account_id:l})),{successLabel:`Created`})})};function wt(e){return e.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 Tt={command:`delete <tsig-id>`,describe:`Delete TSIG.`,builder:wt,handler:async r=>l({command:`dns zone-transfers tsigs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers tsigs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/tsigs/${r[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(r[`tsig-id`]))}`,pathParams:{"tsig-id":String(r[`tsig-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await g({force:!!r.force})){process.stderr.write(`Aborted.
|
|
29
|
-
`);return}o(await c(`Deleting`,async()=>i.dns.zoneTransfers.tsigs.delete({account_id:l,tsig_id:r[`tsig-id`]})),{successLabel:`Deleted`})})};function Et(e){return e.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})}const Dt={command:`get <tsig-id>`,describe:`Get TSIG.`,builder:Et,handler:async r=>l({command:`dns zone-transfers tsigs get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers tsigs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/tsigs/${r[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(r[`tsig-id`]))}`,pathParams:{"tsig-id":String(r[`tsig-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.tsigs.get({account_id:l,tsig_id:r[`tsig-id`]})),{successLabel:`Loaded`})})};function Ot(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const kt={command:`list`,describe:`List TSIGs.`,builder:Ot,handler:async r=>l({command:`dns zone-transfers tsigs list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers tsigs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.tsigs.list({account_id:l})),{successLabel:`Loaded`})})};function At(e){return e.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 jt={command:`update <tsig-id>`,describe:`Modify TSIG.`,builder:At,handler:async r=>l({command:`dns zone-transfers tsigs update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){s({command:`cf dns zone-transfers tsigs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/tsigs/${r[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(r[`tsig-id`]))}`,pathParams:{"tsig-id":String(r[`tsig-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({algo:p(r.algo,`algo`,`text`),name:p(r.name,`name`,`text`),secret:p(r.secret,`secret`,`text`)}):u(r.body)});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);o(await c(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:e,account_id:l,tsig_id:r[`tsig-id`]})),{successLabel:`Updated`});return}r.algo===void 0&&(r.algo=await h(`algo`,`TSIG algorithm.`)),r.name===void 0&&(r.name=await h(`name`,`TSIG key name.`)),r.secret===void 0&&(r.secret=await h(`secret`,`TSIG secret.`,{kind:`secret`}));let d=f({algo:p(r.algo,`algo`,`text`),name:p(r.name,`name`,`text`),secret:p(r.secret,`secret`,`text`)});o(await c(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:d,account_id:l,tsig_id:r[`tsig-id`]})),{successLabel:`Updated`})})},Mt={command:`tsigs`,describe:`Operations for zone-transfers.tsigs`,builder:e=>e.command(Ct).command(Tt).command(Dt).command(kt).command(jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Nt={command:`zone-transfers`,describe:`Operations for zone-transfers`,builder:e=>e.command(Fe).command(Re).command(qe).command(dt).command(xt).command(Mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pt={command:`dns`,describe:`dns`,builder:e=>e.command(D).command(re).command(be).command(we).command(Nt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pt as default};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-C6XsFD_W.mjs";import{f as t,g as n}from"./oauth-DH3kMXSs.mjs";import{r}from"./auth-tvDdC1J-.mjs";import{t as i}from"./output-COcSQsfn.mjs";import{t as a}from"./dry-run-DiVy1lVo.mjs";import{t as o}from"./progress-V6SZV3Ux.mjs";import{t as s}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as c,t as l}from"./body-parser-DIlfApuJ.mjs";import{n as u}from"./input-validation-BxchZ9jE.mjs";import{a as d,n as f}from"./prompt-DjRTpML4.mjs";function p(e){return e.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
|
|
3
|
-
indicated by the TTL received from upstream nameservers. This setting
|
|
4
|
-
sets an upper bound on this duration. For caching purposes, higher TTLs
|
|
5
|
-
will be decreased to the maximum value defined by this setting.
|
|
6
|
-
|
|
7
|
-
This setting does not affect the TTL value in the DNS response
|
|
8
|
-
Cloudflare returns to clients. Cloudflare will always forward the TTL
|
|
9
|
-
value received from upstream nameservers.
|
|
10
|
-
`,default:900}).option(`minimum-cache-ttl`,{type:`number`,description:`By default, Cloudflare attempts to cache responses for as long as
|
|
11
|
-
indicated by the TTL received from upstream nameservers. This setting
|
|
12
|
-
sets a lower bound on this duration. For caching purposes, lower TTLs
|
|
13
|
-
will be increased to the minimum value defined by this setting.
|
|
14
|
-
|
|
15
|
-
This setting does not affect the TTL value in the DNS response
|
|
16
|
-
Cloudflare returns to clients. Cloudflare will always forward the TTL
|
|
17
|
-
value received from upstream nameservers.
|
|
18
|
-
|
|
19
|
-
Note that, even with this setting, there is no guarantee that a
|
|
20
|
-
response will be cached for at least the specified duration. Cached
|
|
21
|
-
responses may be removed earlier for capacity or other operational
|
|
22
|
-
reasons.
|
|
23
|
-
`,default:60}).option(`name`,{type:`string`,description:`DNS Firewall cluster name`}).option(`negative-cache-ttl`,{type:`number`,description:`This setting controls how long DNS Firewall should cache negative
|
|
24
|
-
responses (e.g., NXDOMAIN) from the upstream servers.
|
|
25
|
-
|
|
26
|
-
This setting does not affect the TTL value in the DNS response
|
|
27
|
-
Cloudflare returns to clients. Cloudflare will always forward the TTL
|
|
28
|
-
value received from upstream nameservers.
|
|
29
|
-
`}).option(`ratelimit`,{type:`number`,description:`Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.`}).option(`retries`,{type:`number`,description:`Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)`,default:2}).option(`upstream-ips`,{type:`string`,array:!0,description:`The upstream_ips field`}).option(`dns-firewall-ip-count`,{type:`number`,description:`Number of IPv4 addresses to assign to the DNS Firewall cluster. Only used during cluster creation and cannot be changed later.`,default:2}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create a DNS Firewall cluster`,builder:p,handler:async f=>s({command:`dns-firewall create`,classification:{safeFlags:[`attack-mitigation-enabled`,`attack-mitigation-only-when-upstream-unhealthy`,`deprecate-any-requests`,`ecs-fallback`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf dns-firewall create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_firewall`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({attack_mitigation:{enabled:f[`attack-mitigation-enabled`],only_when_upstream_unhealthy:f[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:f[`deprecate-any-requests`],ecs_fallback:f[`ecs-fallback`],maximum_cache_ttl:f[`maximum-cache-ttl`],minimum_cache_ttl:f[`minimum-cache-ttl`],name:u(f.name,`name`,`text`),negative_cache_ttl:f[`negative-cache-ttl`],ratelimit:f.ratelimit,retries:f.retries,upstream_ips:f[`upstream-ips`],dns_firewall_ip_count:f[`dns-firewall-ip-count`]}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.dnsFirewall.create({...e,account_id:p})),{successLabel:`Created`});return}if(f.name===void 0&&(f.name=await d(`name`,`DNS Firewall cluster name`)),f[`upstream-ips`]===void 0)throw Error(`--upstream-ips is required (or pass --body with this field set).`);let m=l({attack_mitigation:{enabled:f[`attack-mitigation-enabled`],only_when_upstream_unhealthy:f[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:f[`deprecate-any-requests`],ecs_fallback:f[`ecs-fallback`],maximum_cache_ttl:f[`maximum-cache-ttl`],minimum_cache_ttl:f[`minimum-cache-ttl`],name:u(f.name,`name`,`text`),negative_cache_ttl:f[`negative-cache-ttl`],ratelimit:f.ratelimit,retries:f.retries,upstream_ips:f[`upstream-ips`],dns_firewall_ip_count:f[`dns-firewall-ip-count`]});i(await o(`Creating`,async()=>s.dnsFirewall.create({...m,account_id:p})),{successLabel:`Created`})})};function h(e){return e.positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <dns-firewall-id>`,describe:`Delete a DNS Firewall cluster`,builder:h,handler:async c=>s({command:`dns-firewall delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf dns-firewall delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_firewall/${c[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(c[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(c[`dns-firewall-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
30
|
-
`);return}i(await o(`Deleting`,async()=>s.dnsFirewall.delete({account_id:l,dns_firewall_id:c[`dns-firewall-id`]})),{successLabel:`Deleted`})})};function _(e){return e.positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`attack-mitigation-enabled`,{type:`boolean`,description:`When enabled, automatically mitigate random-prefix attacks to protect upstream DNS servers`}).option(`attack-mitigation-only-when-upstream-unhealthy`,{type:`boolean`,description:`Only mitigate attacks when upstream servers seem unhealthy`}).option(`deprecate-any-requests`,{type:`boolean`,description:`Whether to refuse to answer queries for the ANY type`}).option(`ecs-fallback`,{type:`boolean`,description:`Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent`}).option(`maximum-cache-ttl`,{type:`number`,description:`By default, Cloudflare attempts to cache responses for as long as
|
|
31
|
-
indicated by the TTL received from upstream nameservers. This setting
|
|
32
|
-
sets an upper bound on this duration. For caching purposes, higher TTLs
|
|
33
|
-
will be decreased to the maximum value defined by this setting.
|
|
34
|
-
|
|
35
|
-
This setting does not affect the TTL value in the DNS response
|
|
36
|
-
Cloudflare returns to clients. Cloudflare will always forward the TTL
|
|
37
|
-
value received from upstream nameservers.
|
|
38
|
-
`}).option(`minimum-cache-ttl`,{type:`number`,description:`By default, Cloudflare attempts to cache responses for as long as
|
|
39
|
-
indicated by the TTL received from upstream nameservers. This setting
|
|
40
|
-
sets a lower bound on this duration. For caching purposes, lower TTLs
|
|
41
|
-
will be increased to the minimum value defined by this setting.
|
|
42
|
-
|
|
43
|
-
This setting does not affect the TTL value in the DNS response
|
|
44
|
-
Cloudflare returns to clients. Cloudflare will always forward the TTL
|
|
45
|
-
value received from upstream nameservers.
|
|
46
|
-
|
|
47
|
-
Note that, even with this setting, there is no guarantee that a
|
|
48
|
-
response will be cached for at least the specified duration. Cached
|
|
49
|
-
responses may be removed earlier for capacity or other operational
|
|
50
|
-
reasons.
|
|
51
|
-
`}).option(`name`,{type:`string`,description:`DNS Firewall cluster name`}).option(`negative-cache-ttl`,{type:`number`,description:`This setting controls how long DNS Firewall should cache negative
|
|
52
|
-
responses (e.g., NXDOMAIN) from the upstream servers.
|
|
53
|
-
|
|
54
|
-
This setting does not affect the TTL value in the DNS response
|
|
55
|
-
Cloudflare returns to clients. Cloudflare will always forward the TTL
|
|
56
|
-
value received from upstream nameservers.
|
|
57
|
-
`}).option(`ratelimit`,{type:`number`,description:`Maximum number of DNS queries per second that will be forwarded to your upstream nameservers. The limit is enforced per server, where each server receives a fraction of the configured value. The actual aggregate rate for a data center may vary depending on how many servers are present. Responses served from cache do not count toward this limit. Set to null to disable rate limiting.`}).option(`retries`,{type:`number`,description:`Number of retries for fetching DNS responses from upstream nameservers (not counting the initial attempt)`}).option(`upstream-ips`,{type:`string`,array:!0,description:`The upstream_ips field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`edit <dns-firewall-id>`,describe:`Modify the configuration of a DNS Firewall cluster`,builder:_,handler:async d=>s({command:`dns-firewall edit`,classification:{safeFlags:[`attack-mitigation-enabled`,`attack-mitigation-only-when-upstream-unhealthy`,`deprecate-any-requests`,`ecs-fallback`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf dns-firewall edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_firewall/${d[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(d[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(d[`dns-firewall-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({attack_mitigation:{enabled:d[`attack-mitigation-enabled`],only_when_upstream_unhealthy:d[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:d[`deprecate-any-requests`],ecs_fallback:d[`ecs-fallback`],maximum_cache_ttl:d[`maximum-cache-ttl`],minimum_cache_ttl:d[`minimum-cache-ttl`],name:u(d.name,`name`,`text`),negative_cache_ttl:d[`negative-cache-ttl`],ratelimit:d.ratelimit,retries:d.retries,upstream_ips:d[`upstream-ips`]}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.dnsFirewall.edit({...e,account_id:f,dns_firewall_id:d[`dns-firewall-id`]})),{successLabel:`Updated`});return}let p=l({attack_mitigation:{enabled:d[`attack-mitigation-enabled`],only_when_upstream_unhealthy:d[`attack-mitigation-only-when-upstream-unhealthy`]},deprecate_any_requests:d[`deprecate-any-requests`],ecs_fallback:d[`ecs-fallback`],maximum_cache_ttl:d[`maximum-cache-ttl`],minimum_cache_ttl:d[`minimum-cache-ttl`],name:u(d.name,`name`,`text`),negative_cache_ttl:d[`negative-cache-ttl`],ratelimit:d.ratelimit,retries:d.retries,upstream_ips:d[`upstream-ips`]});i(await o(`Updating`,async()=>s.dnsFirewall.edit({...p,account_id:f,dns_firewall_id:d[`dns-firewall-id`]})),{successLabel:`Updated`})})};function y(e){return e.positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <dns-firewall-id>`,describe:`Show a single DNS Firewall cluster for an account`,builder:y,handler:async c=>s({command:`dns-firewall get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf dns-firewall get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_firewall/${c[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(c[`dns-firewall-id`]))}`,pathParams:{"dns-firewall-id":String(c[`dns-firewall-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.dnsFirewall.get({account_id:l,dns_firewall_id:c[`dns-firewall-id`]})),{successLabel:`Loaded`})})};function x(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results`}).option(`per-page`,{type:`number`,description:`Number of clusters per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List DNS Firewall clusters for an account`,builder:x,handler:async c=>s({command:`dns-firewall list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf dns-firewall list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_firewall`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.dnsFirewall.list({account_id:u,...s})),{successLabel:`Loaded`})})};function C(e){return e.positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`edit <dns-firewall-id>`,describe:`Update reverse DNS configuration (PTR records) for a DNS Firewall cluster`,builder:C,handler:async l=>s({command:`dns-firewall reverse-dns edit`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf dns-firewall reverse-dns edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_firewall/${l[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(l[`dns-firewall-id`]))}/reverse_dns`,pathParams:{"dns-firewall-id":String(l[`dns-firewall-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.dnsFirewall.reverseDns.edit({...e,account_id:u,dns_firewall_id:l[`dns-firewall-id`]})),{successLabel:`Updated`});return}i(await o(`Updating`,async()=>s.dnsFirewall.reverseDns.edit({account_id:u,dns_firewall_id:l[`dns-firewall-id`]})),{successLabel:`Updated`})})};function T(e){return e.positional(`dns-firewall-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <dns-firewall-id>`,describe:`Show reverse DNS configuration (PTR records) for a DNS Firewall cluster`,builder:T,handler:async c=>s({command:`dns-firewall reverse-dns get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf dns-firewall reverse-dns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_firewall/${c[`dns-firewall-id`]==null?`<dns-firewall-id>`:encodeURIComponent(String(c[`dns-firewall-id`]))}/reverse_dns`,pathParams:{"dns-firewall-id":String(c[`dns-firewall-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.dnsFirewall.reverseDns.get({account_id:l,dns_firewall_id:c[`dns-firewall-id`]})),{successLabel:`Loaded`})})},D={command:`reverse-dns`,describe:`Operations for reverse-dns`,builder:e=>e.command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},O={command:`dns-firewall`,describe:`dns-firewall`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{O as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-C6XsFD_W.mjs";import{f as t,g as n}from"./oauth-DH3kMXSs.mjs";import{r}from"./auth-tvDdC1J-.mjs";import{t as i}from"./output-COcSQsfn.mjs";import{t as a}from"./dry-run-DiVy1lVo.mjs";import{t as o}from"./progress-V6SZV3Ux.mjs";import{t as s}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as c,r as l,t as u}from"./body-parser-DIlfApuJ.mjs";import{n as d}from"./input-validation-BxchZ9jE.mjs";function f(e){return e.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 p={command:`list`,describe:`Returns the Durable Object namespaces owned by an account.`,builder:f,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){a({command:`cf durable-objects namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/durable_objects/namespaces`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.durableObjects.namespaces.list({account_id:u,...s})),{successLabel:`Loaded`})})};function m(e){return e.option(`id`,{type:`string`,description:`ID of the namespace.`,demandOption:!0}).option(`limit`,{type:`number`,description:`The number of objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`Opaque token indicating the position from which to continue when requesting the next set of records. A valid value for the cursor can be obtained from the cursors object in the result_info structure.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`list`,describe:`Returns the Durable Objects in a given Durable Object namespace.`,builder:m,handler:async c=>s({command:`durable-objects namespaces objects list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={limit:c.limit,cursor:c.cursor};if(c.dryRun){a({command:`cf durable-objects namespaces objects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/durable_objects/namespaces/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}/objects`,pathParams:{id:String(c.id??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.durableObjects.namespaces.objects.list({account_id:u,id:c.id,...s})),{successLabel:`Loaded`})})},g={command:`objects`,describe:`Operations for namespaces.objects`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.positional(`id`,{type:`string`,description:`ID of the namespace.`,demandOption:!0}).option(`durable-object-id`,{type:`string`,description:`The durable_object_id field`}).option(`queries`,{type:`string`,description:`The queries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`durable-object-name`,{type:`string`,description:`The durable_object_name field`}).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`fedramp`,`eu`,`none`]}).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)`}).conflicts(`durable-object-id`,[`durable-object-name`,`jurisdiction`]).conflicts(`durable-object-name`,[`durable-object-id`]).implies(`durable-object-name`,[`jurisdiction`]).conflicts(`jurisdiction`,[`durable-object-id`]).implies(`jurisdiction`,[`durable-object-name`])}const v={command:`query <id>`,describe:`Executes one or more SQL queries against a Durable Object.`,builder:_,handler:async f=>s({command:`durable-objects namespaces query`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf durable-objects namespaces query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/durable_objects/namespaces/${f.id==null?`<id>`:encodeURIComponent(String(f.id))}/query/v2`,pathParams:{id:String(f.id??``)},bodyKind:`json`,body:f.body===void 0?u({durable_object_id:d(f[`durable-object-id`],`durable-object-id`,`text`),queries:l(f.queries,`queries`),durable_object_name:d(f[`durable-object-name`],`durable-object-name`,`text`),jurisdiction:d(f.jurisdiction,`jurisdiction`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Loading`,async()=>s.durableObjects.namespaces.query({body:e,account_id:p,id:f.id})),{successLabel:`Loaded`});return}if(f.queries===void 0)throw Error(`--queries is required (or pass --body with this field set).`);let m=u({durable_object_id:d(f[`durable-object-id`],`durable-object-id`,`text`),queries:l(f.queries,`queries`),durable_object_name:d(f[`durable-object-name`],`durable-object-name`,`text`),jurisdiction:d(f.jurisdiction,`jurisdiction`,`text`)});i(await o(`Loading`,async()=>s.durableObjects.namespaces.query({body:m,account_id:p,id:f.id})),{successLabel:`Loaded`})})},y={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(p).command(v).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},b={command:`durable-objects`,describe:`durable-objects`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{h as e}from"./oauth-DH3kMXSs.mjs";import{r as t}from"./auth-tvDdC1J-.mjs";import{t as n}from"./output-COcSQsfn.mjs";import{t as r}from"./dry-run-DiVy1lVo.mjs";import{t as i}from"./progress-V6SZV3Ux.mjs";import{t as a}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as o,t as s}from"./body-parser-DIlfApuJ.mjs";function c(e){return e.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:"Updates 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.",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 t(c),l=await e({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body);n(await i(`Updating`,async()=>a.emailAuth.dmarcReports.edit({...e,zone_id:l})),{successLabel:`Updated`});return}let u=s({enabled:c.enabled,skip_wizard:c[`skip-wizard`]});n(await i(`Updating`,async()=>a.emailAuth.dmarcReports.edit({...u,zone_id:l})),{successLabel:`Updated`})})};function u(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Retrieves the current DMARC report configuration and status for a zone. Returns the RUA prefix, enabled status, approved sources, and DNS records.`,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 t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.emailAuth.dmarcReports.get({zone_id:s})),{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.option(`id`,{type:`string`,description:`DNS record ID (rec_tag) to inspect`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`inspect`,describe:"Inspects a specific SPF TXT record and returns a parsed tree structure in the spflimit-worker format. The record ID must be provided via the `id` query parameter. Returns a recursive tree showing: - Parsed components with their qualifiers and types - Nested includes recursively resolved within components - Per-component and total lookup counts - Detailed error information with context",builder:p,handler:async o=>a({command:`email-auth spf inspect`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={id:o.id};if(o.dryRun){r({command:`cf email-auth spf inspect`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/email/auth/spf/inspect`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.emailAuth.spf.inspect({zone_id:c,...a})),{successLabel:`Loaded`})})},h={command:`spf`,describe:`Operations for spf`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`email-auth`,describe:`email-auth`,builder:e=>e.command(f).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-C6XsFD_W.mjs";import{f as t,g as n,h as r}from"./oauth-DH3kMXSs.mjs";import{r as i}from"./auth-tvDdC1J-.mjs";import{t as a}from"./output-COcSQsfn.mjs";import{t as o}from"./dry-run-DiVy1lVo.mjs";import{t as s}from"./progress-V6SZV3Ux.mjs";import{t as c}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as l,r as u,t as d}from"./body-parser-DIlfApuJ.mjs";import{n as f}from"./input-validation-BxchZ9jE.mjs";import{a as p,i as m,n as h}from"./prompt-DjRTpML4.mjs";import{t as g}from"./cli-types-CrSoSMPF.mjs";function ee(e){return e.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 _={command:`create`,describe:`Create a destination address to forward your emails to. Destination addresses need to be verified before they can be used.`,builder:ee,handler:async r=>c({command:`email-routing addresses create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf email-routing addresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.emailRouting.addresses.create({...e,account_id:u})),{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`)});a(await s(`Creating`,async()=>c.emailRouting.addresses.create({...m,account_id:u})),{successLabel:`Created`})})};function v(e){return e.positional(`destination-address-identifier`,{type:`string`,description:`Destination address identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <destination-address-identifier>`,describe:`Deletes a specific destination address.`,builder:v,handler:async r=>c({command:`email-routing addresses delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf email-routing addresses delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/addresses/${r[`destination-address-identifier`]==null?`<destination-address-identifier>`:encodeURIComponent(String(r[`destination-address-identifier`]))}`,pathParams:{"destination-address-identifier":String(r[`destination-address-identifier`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
|
|
3
|
-
`);return}a(await s(`Deleting`,async()=>c.emailRouting.addresses.delete({account_id:l,destination_address_identifier:r[`destination-address-identifier`]})),{successLabel:`Deleted`})})};function b(e){return e.positional(`destination-address-identifier`,{type:`string`,description:`Destination address identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <destination-address-identifier>`,describe:`Gets information for a specific destination email already created.`,builder:b,handler:async r=>c({command:`email-routing addresses get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf email-routing addresses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/addresses/${r[`destination-address-identifier`]==null?`<destination-address-identifier>`:encodeURIComponent(String(r[`destination-address-identifier`]))}`,pathParams:{"destination-address-identifier":String(r[`destination-address-identifier`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.emailRouting.addresses.get({account_id:l,destination_address_identifier:r[`destination-address-identifier`]})),{successLabel:`Loaded`})})};function S(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Sorts results in an ascending or descending order.`,choices:[`asc`,`desc`]}).option(`verified`,{type:`string`,description:`Filter by verified destination addresses.`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`Lists existing destination addresses.`,builder:g(S),handler:async r=>c({command:`email-routing addresses list`,classification:{safeFlags:[`direction`,`verified`,`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],direction:r.direction,verified:r.verified};if(r.dryRun){o({command:`cf email-routing addresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/addresses`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.emailRouting.addresses.list({account_id:u,...c})),{successLabel:`Loaded`})})};function w(e){return e.positional(`destination-address-identifier`,{type:`string`,description:`Destination address identifier.`,demandOption:!0}).option(`status`,{type:`string`,description:`Destination address status. Non-admin callers may only set verified addresses back to unverified; setting to verified requires admin privileges.`,choices:[`unverified`,`verified`]}).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 T={command:`update <destination-address-identifier>`,describe:`Updates the status of a specific destination address.`,builder:w,handler:async r=>c({command:`email-routing addresses update`,classification:{safeFlags:[`status`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf email-routing addresses update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/addresses/${r[`destination-address-identifier`]==null?`<destination-address-identifier>`:encodeURIComponent(String(r[`destination-address-identifier`]))}`,pathParams:{"destination-address-identifier":String(r[`destination-address-identifier`]??``)},bodyKind:`json`,body:r.body===void 0?d({status:f(r.status,`status`,`text`)}):l(r.body)});return}let c=await i(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.emailRouting.addresses.update({...e,account_id:u,destination_address_identifier:r[`destination-address-identifier`]})),{successLabel:`Updated`});return}r.status===void 0&&(r.status=await m(`status`,`Destination address status. Non-admin callers may only set verified addresses back to unverified; setting to verified requires admin privileges.`,[`unverified`,`verified`]));let p=d({status:f(r.status,`status`,`text`)});a(await s(`Updating`,async()=>c.emailRouting.addresses.update({...p,account_id:u,destination_address_identifier:r[`destination-address-identifier`]})),{successLabel:`Updated`})})},E={command:`addresses`,describe:`Verified destination email addresses that can receive forwarded mail`,builder:e=>e.command(_).command(y).command(x).command(C).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function D(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const O={command:`disable`,describe:`Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work.`,builder:D,handler:async e=>c({command:`email-routing disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf email-routing disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/disable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force,message:`This operation turns off email routing for a zone.`})){process.stderr.write(`Aborted.
|
|
4
|
-
`);return}a(await s(`Deleting`,async()=>t.emailRouting.disable({zone_id:n})),{successLabel:`Deleted`})})};function k(e){return e.option(`name`,{type:`string`,description:`Domain of your zone.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`create`,describe:`Enable you Email Routing zone. Add and lock the necessary MX and SPF records.`,builder:k,handler:async e=>c({command:`email-routing dns create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing dns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/dns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Creating`,async()=>t.emailRouting.dns.create({body:r,zone_id:n})),{successLabel:`Created`});return}let c=d({name:f(e.name,`name`,`text`)});a(await s(`Creating`,async()=>t.emailRouting.dns.create({body:c,zone_id:n})),{successLabel:`Created`})})};function j(e){return e.option(`name`,{type:`string`,description:`Domain of your zone.`}).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 M={command:`delete`,describe:`Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work.`,builder:j,handler:async e=>c({command:`email-routing dns delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf email-routing dns delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/dns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
5
|
-
`);return}if(e.body){let r=l(e.body);a(await s(`Deleting`,async()=>t.emailRouting.dns.delete({body:r,zone_id:n})),{successLabel:`Deleted`});return}let c=d({name:f(e.name,`name`,`text`)});a(await s(`Deleting`,async()=>t.emailRouting.dns.delete({body:c,zone_id:n})),{successLabel:`Deleted`})})};function N(e){return e.option(`name`,{type:`string`,description:`Domain of your zone.`}).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 P={command:`edit`,describe:`Unlock MX Records previously locked by Email Routing.`,builder:N,handler:async e=>c({command:`email-routing dns edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing dns edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/dns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.emailRouting.dns.edit({body:r,zone_id:n})),{successLabel:`Updated`});return}let c=d({name:f(e.name,`name`,`text`)});a(await s(`Updating`,async()=>t.emailRouting.dns.edit({body:c,zone_id:n})),{successLabel:`Updated`})})};function F(e){return e.option(`subdomain`,{type:`string`,description:`Deprecated. When supplied, the response shape differs from the documented default and is not modeled in generated SDKs. Do not rely on this parameter.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Show the DNS records needed to configure your Email Routing zone.`,builder:F,handler:async e=>c({command:`email-routing dns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={subdomain:e.subdomain};if(e.dryRun){o({command:`cf email-routing dns get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/dns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),c=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=c,a(await s(`Loading`,async()=>n.emailRouting.dns.get({zone_id:c,...t})),{successLabel:`Loaded`})})},L={command:`dns`,describe:`DNS records required for email routing (MX, SPF, DKIM) — enable, lock, or disable`,builder:e=>e.command(A).command(M).command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.option(`enabled`,{type:`boolean`,description:"State of your zone Email Routing settings. No-op on this endpoint - use `POST`/`DELETE /zones/{zone_id}/email/routing/dns`."}).option(`skip-wizard`,{type:`boolean`,description:`Flag to check if the user skipped the configuration wizard.`}).option(`support-subaddress`,{type:`boolean`,description:`Whether subaddressing (plus-addressing) is honored when matching incoming mail against routing rules.`}).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:`edit`,describe:`Update the settings for your Email Routing zone.`,builder:R,handler:async e=>c({command:`email-routing edit`,classification:{safeFlags:[`enabled`,`skip-wizard`,`support-subaddress`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,skip_wizard:e[`skip-wizard`],support_subaddress:e[`support-subaddress`]}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.emailRouting.edit({...r,zone_id:n})),{successLabel:`Updated`});return}let c=d({enabled:e.enabled,skip_wizard:e[`skip-wizard`],support_subaddress:e[`support-subaddress`]});a(await s(`Updating`,async()=>t.emailRouting.edit({...c,zone_id:n})),{successLabel:`Updated`})})};function B(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`enable`,describe:`Enable you Email Routing zone. Add and lock the necessary MX and SPF records.`,builder:B,handler:async e=>c({command:`email-routing enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Creating`,async()=>t.emailRouting.enable({zone_id:n})),{successLabel:`Created`})})};function V(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get`,describe:`Get information about the settings for your Email Routing zone.`,builder:V,handler:async e=>c({command:`email-routing get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.emailRouting.get({zone_id:n})),{successLabel:`Loaded`})})};function U(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get`,describe:`Get information on the default catch-all routing rule.`,builder:U,handler:async e=>c({command:`email-routing rules catch-alls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing rules catch-alls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/catch_all`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.emailRouting.rules.catchAlls.get({zone_id:n})),{successLabel:`Loaded`})})};function G(e){return e.option(`actions`,{type:`string`,description:`List actions for the catch-all routing rule. Provide as a JSON array of objects or @path/to/file.json.`}).option(`enabled`,{type:`boolean`,description:`Routing rule status.`}).option(`matchers`,{type:`string`,description:`List of matchers for the catch-all routing rule. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Routing rule name.`}).option(`owner-worker-tag`,{type:`string`,description:"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n"}).option(`source`,{type:`string`,description:"Who manages the rule. `api` covers dashboard, generic API, and Terraform;\n`wrangler` means the rule is managed by a Worker's wrangler.jsonc. Defaults\nto `api` when omitted on write.\n",choices:[`api`,`wrangler`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`update`,describe:`Enable or disable catch-all routing rule, or change action to forward to a specific destination address. Forward actions require exactly one verified destination address.`,builder:G,handler:async e=>c({command:`email-routing rules catch-alls update`,classification:{safeFlags:[`enabled`,`source`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing rules catch-alls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/catch_all`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({actions:u(e.actions,`actions`),enabled:e.enabled,matchers:u(e.matchers,`matchers`),name:f(e.name,`name`,`text`),owner_worker_tag:f(e[`owner-worker-tag`],`owner-worker-tag`,`text`),source:f(e.source,`source`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.emailRouting.rules.catchAlls.update({...r,zone_id:n})),{successLabel:`Updated`});return}if(e.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(e.matchers===void 0)throw Error(`--matchers is required (or pass --body with this field set).`);let c=d({actions:u(e.actions,`actions`),enabled:e.enabled,matchers:u(e.matchers,`matchers`),name:f(e.name,`name`,`text`),owner_worker_tag:f(e[`owner-worker-tag`],`owner-worker-tag`,`text`),source:f(e.source,`source`,`text`)});a(await s(`Updating`,async()=>t.emailRouting.rules.catchAlls.update({...c,zone_id:n})),{successLabel:`Updated`})})},q={command:`catch-alls`,describe:`Operations for rules.catch-alls`,builder:e=>e.command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function J(e){return e.option(`actions`,{type:`string`,description:`List actions patterns. Provide as a JSON array of objects or @path/to/file.json.`}).option(`enabled`,{type:`boolean`,description:`Routing rule status.`,default:!0}).option(`matchers`,{type:`string`,description:`Matching patterns to forward to your actions. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Routing rule name.`}).option(`owner-worker-tag`,{type:`string`,description:"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n"}).option(`priority`,{type:`number`,description:`Priority of the routing rule.`,default:0}).option(`source`,{type:`string`,description:"Who manages the rule. `api` covers dashboard, generic API, and Terraform;\n`wrangler` means the rule is managed by a Worker's wrangler.jsonc. Defaults\nto `api` when omitted on write.\n",choices:[`api`,`wrangler`],default:`api`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Y={command:`create`,describe:`Rules consist of a set of criteria for matching emails (such as an email being sent to a specific custom email address) plus a set of actions to take on the email (like forwarding it to a specific destination address). Forward actions require exactly one verified destination address.`,builder:J,handler:async e=>c({command:`email-routing rules create`,classification:{safeFlags:[`enabled`,`source`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({actions:u(e.actions,`actions`),enabled:e.enabled,matchers:u(e.matchers,`matchers`),name:f(e.name,`name`,`text`),owner_worker_tag:f(e[`owner-worker-tag`],`owner-worker-tag`,`text`),priority:e.priority,source:f(e.source,`source`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Creating`,async()=>t.emailRouting.rules.create({...r,zone_id:n})),{successLabel:`Created`});return}if(e.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(e.matchers===void 0)throw Error(`--matchers is required (or pass --body with this field set).`);let c=d({actions:u(e.actions,`actions`),enabled:e.enabled,matchers:u(e.matchers,`matchers`),name:f(e.name,`name`,`text`),owner_worker_tag:f(e[`owner-worker-tag`],`owner-worker-tag`,`text`),priority:e.priority,source:f(e.source,`source`,`text`)});a(await s(`Creating`,async()=>t.emailRouting.rules.create({...c,zone_id:n})),{successLabel:`Created`})})};function X(e){return e.positional(`rule-identifier`,{type:`string`,description:`Routing rule identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Z={command:`delete <rule-identifier>`,describe:`Delete a specific routing rule.`,builder:X,handler:async e=>c({command:`email-routing rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf email-routing rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/${e[`rule-identifier`]==null?`<rule-identifier>`:encodeURIComponent(String(e[`rule-identifier`]))}`,pathParams:{"rule-identifier":String(e[`rule-identifier`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
6
|
-
`);return}a(await s(`Deleting`,async()=>t.emailRouting.rules.delete({zone_id:n,rule_identifier:e[`rule-identifier`]})),{successLabel:`Deleted`})})};function Q(e){return e.positional(`rule-identifier`,{type:`string`,description:`Routing rule identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <rule-identifier>`,describe:`Get information for a specific routing rule already created.`,builder:Q,handler:async e=>c({command:`email-routing rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/${e[`rule-identifier`]==null?`<rule-identifier>`:encodeURIComponent(String(e[`rule-identifier`]))}`,pathParams:{"rule-identifier":String(e[`rule-identifier`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.emailRouting.rules.get({zone_id:n,rule_identifier:e[`rule-identifier`]})),{successLabel:`Loaded`})})};function re(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`enabled`,{type:`string`,description:`Filter by enabled routing rules.`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`list-account`,describe:`Lists existing routing rules across all zones in the account or zone.`,builder:g(re),handler:async l=>c({command:`email-routing rules list-account`,classification:{safeFlags:[`enabled`,`dry-run`]}},l,async()=>{let c={page:l.page,per_page:l[`per-page`],enabled:l.enabled};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 email-routing rules list-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/email/routing/rules`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await i(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await t();d===`zones`?l.zoneId=f:l.accountId=f,a(await s(`Loading`,async()=>u.emailRouting.rules.listAccount({account_or_zone:d,account_or_zone_id:f,...c})),{successLabel:`Loaded`})})};function ae(e){return e.option(`catch-all-rules`,{type:`string`,description:`Desired catch-all Email Routing rules managed by the deploying Worker. Provide as a JSON array of objects or @path/to/file.json.`}).option(`owner-worker-tag`,{type:`string`,description:"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n"}).option(`rules`,{type:`string`,description:`Desired normal Email Routing rules managed by the deploying Worker. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const oe={command:`plan`,describe:`Computes the Email Routing rule changes that would be needed to reconcile a Wrangler-managed desired ruleset. This endpoint is read-only and does not create, update, or delete rules.`,builder:ae,handler:async r=>c({command:`email-routing rules plan`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf email-routing rules plan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/email/routing/rules/plan`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({catch_all_rules:u(r[`catch-all-rules`],`catch-all-rules`),owner_worker_tag:f(r[`owner-worker-tag`],`owner-worker-tag`,`text`),rules:u(r.rules,`rules`)}):l(r.body)});return}let c=await i(r),m=r.local?e:await t();if(r.accountId=m,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.emailRouting.rules.plan({...e,account_id:m})),{successLabel:`Created`});return}r[`owner-worker-tag`]===void 0&&(r[`owner-worker-tag`]=await p(`owner-worker-tag`,"Public tag (script_tag) of the Worker that owns this rule. Required when `source` is `wrangler`. "));let h=d({catch_all_rules:u(r[`catch-all-rules`],`catch-all-rules`),owner_worker_tag:f(r[`owner-worker-tag`],`owner-worker-tag`,`text`),rules:u(r.rules,`rules`)});a(await s(`Creating`,async()=>c.emailRouting.rules.plan({...h,account_id:m})),{successLabel:`Created`})})};function $(e){return e.positional(`rule-identifier`,{type:`string`,description:`Routing rule identifier.`,demandOption:!0}).option(`actions`,{type:`string`,description:`List actions patterns. Provide as a JSON array of objects or @path/to/file.json.`}).option(`enabled`,{type:`boolean`,description:`Routing rule status.`}).option(`matchers`,{type:`string`,description:`Matching patterns to forward to your actions. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`Routing rule name.`}).option(`owner-worker-tag`,{type:`string`,description:"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n"}).option(`priority`,{type:`number`,description:`Priority of the routing rule.`}).option(`source`,{type:`string`,description:"Who manages the rule. `api` covers dashboard, generic API, and Terraform;\n`wrangler` means the rule is managed by a Worker's wrangler.jsonc. Defaults\nto `api` when omitted on write.\n",choices:[`api`,`wrangler`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const se={command:`update <rule-identifier>`,describe:`Update actions and matches, or enable/disable specific routing rules. Forward actions require exactly one verified destination address.`,builder:$,handler:async e=>c({command:`email-routing rules update`,classification:{safeFlags:[`enabled`,`source`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/rules/${e[`rule-identifier`]==null?`<rule-identifier>`:encodeURIComponent(String(e[`rule-identifier`]))}`,pathParams:{"rule-identifier":String(e[`rule-identifier`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({actions:u(e.actions,`actions`),enabled:e.enabled,matchers:u(e.matchers,`matchers`),name:f(e.name,`name`,`text`),owner_worker_tag:f(e[`owner-worker-tag`],`owner-worker-tag`,`text`),priority:e.priority,source:f(e.source,`source`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.emailRouting.rules.update({...r,zone_id:n,rule_identifier:e[`rule-identifier`]})),{successLabel:`Updated`});return}if(e.actions===void 0)throw Error(`--actions is required (or pass --body with this field set).`);if(e.matchers===void 0)throw Error(`--matchers is required (or pass --body with this field set).`);let c=d({actions:u(e.actions,`actions`),enabled:e.enabled,matchers:u(e.matchers,`matchers`),name:f(e.name,`name`,`text`),owner_worker_tag:f(e[`owner-worker-tag`],`owner-worker-tag`,`text`),priority:e.priority,source:f(e.source,`source`,`text`)});a(await s(`Updating`,async()=>t.emailRouting.rules.update({...c,zone_id:n,rule_identifier:e[`rule-identifier`]})),{successLabel:`Updated`})})},ce={command:`rules`,describe:`Routing rules that match incoming email addresses and forward to destination mailboxes`,builder:e=>e.command(Y).command(Z).command(ne).command(ie).command(oe).command(se).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function le(e){return e.option(`name`,{type:`string`,description:`Domain of your zone.`}).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 ue={command:`unlock`,describe:`Unlock MX records previously locked by Email Routing. Deprecated - use PATCH /zones/{zone_id}/email/routing/dns instead.`,builder:le,handler:async e=>c({command:`email-routing unlock`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing unlock`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing/unlock`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({name:f(e.name,`name`,`text`)}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Creating`,async()=>t.emailRouting.unlock({body:r,zone_id:n})),{successLabel:`Created`});return}let c=d({name:f(e.name,`name`,`text`)});a(await s(`Creating`,async()=>t.emailRouting.unlock({body:c,zone_id:n})),{successLabel:`Created`})})};function de(e){return e.option(`enabled`,{type:`boolean`,description:"State of your zone Email Routing settings. No-op on this endpoint - use `POST`/`DELETE /zones/{zone_id}/email/routing/dns`."}).option(`skip-wizard`,{type:`boolean`,description:`Flag to check if the user skipped the configuration wizard.`}).option(`support-subaddress`,{type:`boolean`,description:`Whether subaddressing (plus-addressing) is honored when matching incoming mail against routing rules.`}).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 fe={command:`update`,describe:`Update the settings for your Email Routing zone.`,builder:de,handler:async e=>c({command:`email-routing update`,classification:{safeFlags:[`enabled`,`skip-wizard`,`support-subaddress`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/routing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,skip_wizard:e[`skip-wizard`],support_subaddress:e[`support-subaddress`]}):l(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);a(await s(`Updating`,async()=>t.emailRouting.update({...r,zone_id:n})),{successLabel:`Updated`});return}let c=d({enabled:e.enabled,skip_wizard:e[`skip-wizard`],support_subaddress:e[`support-subaddress`]});a(await s(`Updating`,async()=>t.emailRouting.update({...c,zone_id:n})),{successLabel:`Updated`})})},pe={command:`email-routing`,describe:`Route incoming emails to destination addresses using custom rules, catch-all handlers, and DNS configuration`,builder:e=>e.command(O).command(z).command(te).command(H).command(ue).command(fe).command(E).command(L).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{pe as default};
|