cf 1.0.0-beta.14 → 1.0.0-beta.15
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/README.md +10 -0
- package/dist/_meta/commands.json +3409 -621
- package/dist/_meta/hand-written-commands.json +33 -0
- package/dist/_meta/schemas.json +2160 -246
- package/dist/abuse-reports-CnQBtN1G.mjs +24 -0
- package/dist/{access-k1QjF5rE.mjs → access-BzmXSwzj.mjs} +1 -1
- package/dist/account-tags-2qPWbW17.mjs +15 -0
- package/dist/accounts-B0Byg-AV.mjs +132 -0
- package/dist/acm-DgAu0cnk.mjs +15 -0
- package/dist/addressing-J1oa0ML2.mjs +105 -0
- package/dist/agent-memory-4KGou-tm.mjs +34 -0
- package/dist/ai-WY7wVQfA.mjs +31 -0
- package/dist/ai-audit-D38HaEoZ.mjs +6 -0
- package/dist/ai-gateway-C0gIipT8.mjs +80 -0
- package/dist/ai-search-ClwnPU-9.mjs +79 -0
- package/dist/ai-security-BIsvFPYV.mjs +10 -0
- package/dist/alerting-MHhv28oO.mjs +56 -0
- package/dist/analytics-BfBz7bqB.mjs +17 -0
- package/dist/analytics_engine-CXVdBF1n.mjs +4 -0
- package/dist/api-eMuS5GI1.mjs +3 -0
- package/dist/api-security-DUCfcdC1.mjs +154 -0
- package/dist/argo-CUlzI4v3.mjs +14 -0
- package/dist/artifacts-BLfWGzBg.mjs +43 -0
- package/dist/audit-logs-CsfIm2QS.mjs +4 -0
- package/dist/auth-8Sm4uLGM.mjs +2 -0
- package/dist/auth-C6u9qIGO.mjs +2 -0
- package/dist/auth-CGRemu5W.mjs +2 -0
- package/dist/{auth-token-Dop0wLCw.mjs → auth-token-DkkYg4DP.mjs} +1 -1
- package/dist/{autoconfig-RQ3HS4m1.mjs → autoconfig-B0ESZ8DJ.mjs} +2 -2
- package/dist/basin-catalog-CrKRYJ0b.mjs +46 -0
- package/dist/billing-NxehgXrR.mjs +23 -0
- package/dist/blocks-Bat9A8V_.mjs +5 -0
- package/dist/bot-management-C993iQKL.mjs +9 -0
- package/dist/botnet-feed-CZ4vYk5y.mjs +11 -0
- package/dist/brand-protection-ADVgIi0l.mjs +27 -0
- package/dist/browser-run-CEptKZYl.mjs +42 -0
- package/dist/build-Bm6kGyzo.mjs +2 -0
- package/dist/{build-CCe7IrWT.mjs → build-sBpqm9ga.mjs} +1 -1
- package/dist/builds-DqtiTH7p.mjs +71 -0
- package/dist/cache-hX5QxmI0.mjs +45 -0
- package/dist/certificate-authorities-BOcybjc1.mjs +6 -0
- package/dist/cf-Bq4pA4n6.mjs +18 -0
- package/dist/{chunk-TAK63GWY-DdMktrgc.mjs → chunk-2HLTAS5V-D7COzUOd.mjs} +2 -2
- package/dist/chunk-2K52M2W5-CYxfQXUq.mjs +363 -0
- package/dist/{chunk-DSGVRFIS-CPI5cYtB.mjs → chunk-DSGVRFIS-C5SqiTOz.mjs} +1 -1
- package/dist/{cli-ht4q6i2y.mjs → cli-R8h3OKZI.mjs} +1 -1
- package/dist/client-certificates-Bez_ArKE.mjs +13 -0
- package/dist/client-side-security-CSmA50Bv.mjs +63 -0
- package/dist/cloud-connector-0Wivqi7S.mjs +6 -0
- package/dist/{cloudflared-D83U8Yn3.mjs → cloudflared-By8BzYXc.mjs} +1 -1
- package/dist/cloudforce-one-J-rU6k1U.mjs +405 -0
- package/dist/{command-9VAc7b30.mjs → command-0BOb1pgV.mjs} +1 -1
- package/dist/{command-CyJQ40fc.mjs → command-BCJN-ZM2.mjs} +1 -1
- package/dist/{command-OHov3PEc.mjs → command-BG-kLOnS.mjs} +1 -1
- package/dist/{command-B_Ixlz8Q.mjs → command-BIsI-mMX.mjs} +1 -1
- package/dist/{command-SmWD-MeI.mjs → command-BKDbbA-L.mjs} +1 -1
- package/dist/command-BWQIKu6I.mjs +2 -0
- package/dist/{command-Ckb9FufU.mjs → command-Bdy69UFU.mjs} +1 -1
- package/dist/{command-CtVUNm__.mjs → command-Bgb-3yPg.mjs} +1 -1
- package/dist/{command-DtgJilOK.mjs → command-C6w1OdoC.mjs} +1 -1
- package/dist/{command-BtDY_MKv.mjs → command-CKW6UhTh.mjs} +1 -1
- package/dist/{command-Bpzp8Mz2.mjs → command-DCQgsd2U.mjs} +1 -1
- package/dist/{command-DjEJaOwV.mjs → command-DIs-Nqtl.mjs} +1 -1
- package/dist/command-DPn5ANHs.mjs +2 -0
- package/dist/{command-CUNMrMou.mjs → command-DZfKHiru.mjs} +1 -1
- package/dist/{command-DXaRn1ls.mjs → command-DppVezAB.mjs} +1 -1
- package/dist/{completions-CuqAO3N_.mjs → completions-CpNGTlUX.mjs} +1 -1
- package/dist/config.mjs +0 -0
- package/dist/connector-interrupts-CH-DaLuo.mjs +6 -0
- package/dist/connector-telemetry-events-X3Fod9nl.mjs +6 -0
- package/dist/connector-telemetry-snapshots-D-WR4npQ.mjs +6 -0
- package/dist/connectors-CORKD31m.mjs +15 -0
- package/dist/containers-BboUbx3k.mjs +78 -0
- package/dist/containers-Di3_Vopq.mjs +376 -0
- package/dist/content-scan-DXGREAXa.mjs +14 -0
- package/dist/{context-BBLtgdR1.mjs → context-A6T-NKPI.mjs} +2 -2
- package/dist/{cps-C5phNoVU.mjs → cps-1BoOLtTq.mjs} +3 -3
- package/dist/create-OXylMu6m.mjs +2 -0
- package/dist/csamScanner-CHfbfeup.mjs +10 -0
- package/dist/ct-alerting-DlH4ILQo.mjs +5 -0
- package/dist/custom-certificates-zJqJZ2Th.mjs +17 -0
- package/dist/custom-csrs-DoLIGqYL.mjs +11 -0
- package/dist/custom-hostnames-YfV-aoAK.mjs +27 -0
- package/dist/custom-nameservers-BV43gmgt.mjs +9 -0
- package/dist/custom-pages-CoOU1Cdx.mjs +21 -0
- package/dist/{d1-EQMUlHTJ.mjs → d1-DujBmzLa.mjs} +31 -31
- package/dist/dcv-delegation-CPLsVYOl.mjs +4 -0
- package/dist/delegate.mjs +0 -0
- package/dist/deploy-context-tEhwEXnA.mjs +56 -0
- package/dist/{deploy-input-BCjcuP6u.mjs → deploy-input-BqJ7GVZ-.mjs} +1 -1
- package/dist/{deploy-B22sEVHd.mjs → deploy-wNujfGUJ.mjs} +1 -1
- package/dist/{dev-ClhhXuNU.mjs → dev-EtnMYA7K.mjs} +1 -1
- package/dist/diagnostics-B3TYPVRi.mjs +15 -0
- package/dist/{dist-DmRM6WSZ.mjs → dist-DZRTPMMA.mjs} +4 -4
- package/dist/dls-CWm1HRF0.mjs +17 -0
- package/dist/dns-CjAFU7Z9.mjs +144 -0
- package/dist/dns-firewall-BooBP9ap.mjs +71 -0
- package/dist/docs-C5XB7HdG.mjs +3 -0
- package/dist/{dotenv-DpXaxfho.mjs → dotenv-usOKkeW7.mjs} +3 -3
- package/dist/{dry-run-DRj2_uV3.mjs → dry-run-C2KjGX10.mjs} +1 -1
- package/dist/durable-objects-CSrMQDCE.mjs +6 -0
- package/dist/email-auth-Bp1Mui-n.mjs +6 -0
- package/dist/email-routing-CVF6SwQt.mjs +45 -0
- package/dist/email-security-mYZtazae.mjs +158 -0
- package/dist/email-sending-BqaKU_Xu.mjs +47 -0
- package/dist/error-sanitization-CIQOep3I.mjs +2 -0
- package/dist/error-sanitization-pOyzm2F1.mjs +2 -0
- package/dist/fieldExtractors-CAGZVmYg.mjs +9 -0
- package/dist/firewall-DgTDsYOt.mjs +36 -0
- package/dist/flagship-Db3PxxyZ.mjs +28 -0
- package/dist/fraud-BEOQczy8.mjs +22 -0
- package/dist/get-By1q8YlI.mjs +2 -0
- package/dist/get-CRKvqCu6.mjs +2 -0
- package/dist/get-iPUHxD1r.mjs +2 -0
- package/dist/google-tag-gateway-DjLQ9wo0.mjs +6 -0
- package/dist/healthchecks-C3ScnKss.mjs +22 -0
- package/dist/{hostnames-DvaUSzsj.mjs → hostnames-DU0k-xO9.mjs} +6 -6
- package/dist/hyperdrive-IpCCLCRd.mjs +37 -0
- package/dist/iam-96CYM8Vw.mjs +52 -0
- package/dist/images-AB9EgZgT.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-Da8pe296.mjs → init-D2nPoW4f.mjs} +2 -2
- package/dist/intel-BKb4RLvS.mjs +76 -0
- package/dist/ips-z9APCV_b.mjs +4 -0
- package/dist/k2-Bv-HiJ29.mjs +11 -0
- package/dist/keyless-certificates-ChgSGHq4.mjs +13 -0
- package/dist/keys-BhngDsDa.mjs +4 -0
- package/dist/kv-CB5MQVGP.mjs +15 -0
- package/dist/{lazy-command-CDWwCsD2.mjs → lazy-command-CaZ1kdlW.mjs} +1 -1
- package/dist/leaked-credential-checks-Bsi2WpSU.mjs +18 -0
- package/dist/{load-balancers-Bu9pd2SV.mjs → load-balancers-0gXZNCeI.mjs} +40 -40
- package/dist/{local-BcPM4I0s.mjs → local-Dil4fTWX.mjs} +1 -1
- package/dist/local-DxWDQDnG.mjs +2 -0
- package/dist/{local-runtime-BHKyRlCP.mjs → local-runtime-B7TKFu6E.mjs} +1 -1
- package/dist/login-CiQGR8ha.mjs +5 -0
- package/dist/login-Ik98G4K6.mjs +2 -0
- package/dist/logo-matches-DmoF5Otu.mjs +6 -0
- package/dist/logos-BL6ohIMH.mjs +7 -0
- package/dist/logpush-UVopW68t.mjs +46 -0
- package/dist/logs-BVfxiEiM.mjs +36 -0
- package/dist/magic-cloud-networking-B5S3aM6f.mjs +71 -0
- package/dist/magic-network-monitoring-CDSJPP47.mjs +36 -0
- package/dist/magic-transit-TcDTKM43.mjs +386 -0
- package/dist/managed-defense-C88HL0pg.mjs +18 -0
- package/dist/managed-transforms-Ja41Tahl.mjs +9 -0
- package/dist/matches-BL_Y-9Yq.mjs +6 -0
- package/dist/mcp-BWp5Q09R.mjs +32 -0
- package/dist/mesh-lFPLRWhV.mjs +26 -0
- package/dist/{migrate-CZNq63Uj.mjs → migrate-6e5mJ79R.mjs} +1 -1
- package/dist/monetization-BIc4Bwo2.mjs +20 -0
- package/dist/mtls-certificates-CVBw-Jli.mjs +13 -0
- package/dist/network-Wig0qbaC.mjs +50 -0
- package/dist/network-interconnects-C16z1HuQ.mjs +72 -0
- package/dist/o11y-Bhy4qDRm.mjs +93 -0
- package/dist/oauth-CfEedDZi.mjs +4 -0
- package/dist/oauth-clients-eXjmK5yf.mjs +16 -0
- package/dist/{oauth-n8um6MFk.mjs → oauth-oWaW7ICv.mjs} +1 -1
- package/dist/oauth-scopes-DZWn50EA.mjs +4 -0
- package/dist/organization-QdAQTrKa.mjs +71 -0
- package/dist/organizations-CgAQYdK5.mjs +4 -0
- package/dist/origin-ca-certificates-BklXqp8X.mjs +11 -0
- package/dist/origin-post-quantum-encryption-Dg16ueT4.mjs +6 -0
- package/dist/origin-tls-client-auth-d8bDU5zU.mjs +30 -0
- package/dist/output-Co4xdFf6.mjs +2 -0
- package/dist/page-rules-CgMkC6YR.mjs +39 -0
- package/dist/{pages-Bn0Sg1ay.mjs → pages-CkBtOOf8.mjs} +29 -29
- package/dist/path-DRw6Y-nd.mjs +2 -0
- package/dist/pay-per-crawl-CnGXOWyz.mjs +38 -0
- package/dist/pay-per-use-HbfxpATr.mjs +33 -0
- package/dist/pipelines-CnO9CCs0.mjs +44 -0
- package/dist/precursor-Bc55XJdQ.mjs +4 -0
- package/dist/previews-C7vZrajd.mjs +7 -0
- package/dist/progress-D5po7ScB.mjs +2 -0
- package/dist/prompt-BAJpE3jV.mjs +4 -0
- package/dist/queries-BJAH4B74.mjs +9 -0
- package/dist/queues-D4G8vvwi.mjs +57 -0
- package/dist/r2-CJ8rD6Jb.mjs +128 -0
- package/dist/{radar-CdvQL4xm.mjs → radar-DgaxOdcd.mjs} +150 -150
- package/dist/raw-fetch-yY-wX5Xx.mjs +2 -0
- package/dist/realtime-DU09m7L7.mjs +172 -0
- package/dist/registrar-Cj7OfvGs.mjs +43 -0
- package/dist/registrar-sandbox-CA0Mua-j.mjs +56 -0
- package/dist/{registry-PI6sO95I.mjs → registry-CRnk93ur.mjs} +1 -1
- package/dist/reporting-3kDVF5c8.mjs +14 -0
- package/dist/{request-headers-D8L95bEQ.mjs → request-headers-D_eQn93b.mjs} +1 -1
- package/dist/request-tracers-VBD4R3s3.mjs +4 -0
- package/dist/resolve-BpgXeklt.mjs +2 -0
- package/dist/resolve-C3FmNlSO.mjs +2 -0
- package/dist/resource-sharing-BtUF3psS.mjs +40 -0
- package/dist/resource-tagging--90INP8_.mjs +4 -0
- package/dist/rules-CcwPngVo.mjs +18 -0
- package/dist/rulesets-CfdruY82.mjs +37 -0
- package/dist/rum-RLkdfSL7.mjs +30 -0
- package/dist/run-CUNhH5CQ.mjs +2 -0
- package/dist/{run-CW2Cgi0S.mjs → run-DASYqJsY.mjs} +1 -1
- package/dist/{schema-elj12WOx.mjs → schema-S3pUZwpI.mjs} +1 -1
- package/dist/{schema-flags-BTItUu1K.mjs → schema-flags-CShtn7ya.mjs} +1 -1
- package/dist/scim-BZYsTPIL.mjs +18 -0
- package/dist/secrets-store-C_-FkSH_.mjs +24 -0
- package/dist/security-insights-BVBEaZmD.mjs +40 -0
- package/dist/security-txt--IoHrHee.mjs +9 -0
- package/dist/session-Cq3YNLoI.mjs +2 -0
- package/dist/shared-zNQNv1im.mjs +2 -0
- package/dist/smart-shield-CByC4_60.mjs +24 -0
- package/dist/snippets-DB-jiZAV.mjs +20 -0
- package/dist/{spawn-D07wH-MH.mjs → spawn-DQttFH05.mjs} +1 -1
- package/dist/{spectrum-B6qkjR_Z.mjs → spectrum-Bs2g1BmK.mjs} +14 -14
- package/dist/speed-Bq4evEnJ.mjs +24 -0
- package/dist/sql-XGci7hZC.mjs +4 -0
- package/dist/src-GiuwAT55.mjs +125 -0
- package/dist/ssl-KJTLW1NR.mjs +45 -0
- package/dist/{startup-profile-CrtCP-6-.mjs → startup-profile-BOaseXnO.mjs} +1 -1
- package/dist/startup-profile-BwEZFVGS.mjs +2 -0
- package/dist/{state-DIiIGEtR.mjs → state-Boubf1X6.mjs} +1 -1
- package/dist/state-CODDG9Nx.mjs +2 -0
- package/dist/stream-BotgYspF.mjs +102 -0
- package/dist/submit-C5VytaHP.mjs +4 -0
- package/dist/{tags-CX23P4jg.mjs → tags-3Hq-B9qp.mjs} +2 -2
- package/dist/{telemetry-ZlCi5Xhc.mjs → telemetry-3FJOXl_C.mjs} +1 -1
- package/dist/telemetry-BhKfwxyh.mjs +2 -0
- package/dist/tenant-BgX5onPc.mjs +10 -0
- package/dist/tenant-custom-nameservers-BVG8v1Xo.mjs +9 -0
- package/dist/theme-BGHWSKCw.mjs +6 -0
- package/dist/{tools-CSc5DmFi.mjs → tools-BCCRUENY.mjs} +1 -1
- package/dist/{tunnels-NzYpsfi_.mjs → tunnels-CThOI3qH.mjs} +15 -15
- package/dist/turnstile-BgZaUx-g.mjs +33 -0
- package/dist/ui-BtIBQeaG.mjs +2 -0
- package/dist/update-check-Yy7Ivq2V.mjs +2 -0
- package/dist/{update-check-HFkPml6x.mjs → update-check-jb89ih_g.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-DQERN0Xq.mjs +4 -0
- package/dist/url-normalization-Cb1hofqv.mjs +9 -0
- package/dist/url-scanner-gHgx1bW7.mjs +16 -0
- package/dist/{user-rXca0J9M.mjs → user-CdKzIuSi.mjs} +58 -58
- package/dist/values-EwA8Sx0w.mjs +4 -0
- package/dist/vectorize-DejgIJIv.mjs +32 -0
- package/dist/version-B6MnUIqV.mjs +2 -0
- package/dist/{waiting-rooms-DrA3-0bw.mjs → waiting-rooms-BNR1HvAP.mjs} +25 -25
- package/dist/web-assets-iglnzkTV.mjs +64 -0
- package/dist/web3-JBUU6IVt.mjs +28 -0
- package/dist/workers-CDp4kLTJ.mjs +40 -0
- package/dist/workers-builds-CSb9Dglt.mjs +14 -0
- package/dist/workers-for-platforms-D4srNZvt.mjs +40 -0
- package/dist/workers-vpc-LPC8TadH.mjs +13 -0
- package/dist/workflows-DN_VqWJC.mjs +52 -0
- package/dist/{wrangler-migration-C6FKHER1.mjs → wrangler-migration-DxTB5yPT.mjs} +1 -1
- package/dist/zaraz-DDErl5yc.mjs +22 -0
- package/dist/zero-trust-M88XX3uD.mjs +957 -0
- package/dist/zone-BsGvedmN.mjs +4 -0
- package/dist/zones-l_sRKrVl.mjs +124 -0
- package/package.json +15 -18
- package/dist/Page-BShsqCXr.mjs +0 -2
- package/dist/abuse-reports-CVv52Q2w.mjs +0 -24
- package/dist/account-tags-RhvWOkOf.mjs +0 -15
- package/dist/accounts--3lrEkmu.mjs +0 -125
- package/dist/acm-BJxINEcu.mjs +0 -15
- package/dist/addressing-BqByG9JW.mjs +0 -105
- package/dist/agent-memory-D4dQMGbh.mjs +0 -34
- package/dist/ai-CRkQ4pjC.mjs +0 -31
- package/dist/ai-audit-fMSn4c5L.mjs +0 -6
- package/dist/ai-gateway-CbhvQK4L.mjs +0 -80
- package/dist/ai-search-CvVSnOA0.mjs +0 -79
- package/dist/ai-security-Z_qpI92I.mjs +0 -10
- package/dist/alerting-CpbCB8br.mjs +0 -56
- package/dist/analytics-DkY9dOP1.mjs +0 -17
- package/dist/analytics_engine-DE_jvlx_.mjs +0 -4
- package/dist/api-security-BHnOU5MM.mjs +0 -154
- package/dist/argo-DhC5L_aN.mjs +0 -14
- package/dist/args-CfbYkeXd.mjs +0 -2
- package/dist/artifacts-CrIupY7P.mjs +0 -43
- package/dist/audit-logs-BjeBxTox.mjs +0 -4
- package/dist/auth-BNYfOMl0.mjs +0 -2
- package/dist/auth-CAWalgW0.mjs +0 -2
- package/dist/auth-DOwC01PW.mjs +0 -2
- package/dist/banner-D03JEqRs.mjs +0 -2
- package/dist/basin-catalog-DZ7QV-_N.mjs +0 -46
- package/dist/billing-BFyte9fL.mjs +0 -23
- package/dist/bot-management-DXcbV3am.mjs +0 -9
- package/dist/botnet-feed-bGGp_cwX.mjs +0 -11
- package/dist/brand-protection-DN36XkxH.mjs +0 -27
- package/dist/browser-run-hHD1RT43.mjs +0 -42
- package/dist/build-BhpWYgNm.mjs +0 -2
- package/dist/builds-6aO61R9R.mjs +0 -71
- package/dist/cache-C5YJpMqi.mjs +0 -45
- package/dist/certificate-authorities-CbqDAktQ.mjs +0 -6
- package/dist/cf-oRSQKirD.mjs +0 -18
- package/dist/chunk-NDZDTP46-Civns3WA.mjs +0 -361
- package/dist/cli-types-9oYmRTHJ.mjs +0 -2
- package/dist/client-certificates-balaN_my.mjs +0 -13
- package/dist/client-side-security-3_4Ermmg.mjs +0 -63
- package/dist/cloud-connector-avx27sLw.mjs +0 -6
- package/dist/cloudforce-one-CXdeqJ9l.mjs +0 -405
- package/dist/command-DPX9sJVi.mjs +0 -2
- package/dist/command-OWe3v69l.mjs +0 -2
- package/dist/connector-interrupts-ftd10Du-.mjs +0 -6
- package/dist/connector-telemetry-events-TwDZYdEM.mjs +0 -6
- package/dist/connector-telemetry-snapshots-CZxkOuC3.mjs +0 -6
- package/dist/connectors-6lVSr-fd.mjs +0 -15
- package/dist/containers-Dqs_ZnO2.mjs +0 -78
- package/dist/containers-ncw3bd3a.mjs +0 -376
- package/dist/content-scan-BWFbqfQ0.mjs +0 -14
- package/dist/csamScanner-BwZNZu0A.mjs +0 -10
- package/dist/ct-alerting-DPp3qLqO.mjs +0 -5
- package/dist/custom-certificates-pfpZcr06.mjs +0 -17
- package/dist/custom-csrs-DrvGRAkl.mjs +0 -11
- package/dist/custom-hostnames-wGtmFbz1.mjs +0 -27
- package/dist/custom-nameservers-HTG6MPKv.mjs +0 -9
- package/dist/custom-pages-DqEHBSVt.mjs +0 -21
- package/dist/dcv-delegation-D6nj0Z5N.mjs +0 -4
- package/dist/deploy-context-DmG9rgPO.mjs +0 -56
- package/dist/diagnostics-tqHjq-Pl.mjs +0 -15
- package/dist/dls-BEHj4X9T.mjs +0 -17
- package/dist/dns-firewall-zwbkutyf.mjs +0 -71
- package/dist/dns-n4mfYBZg.mjs +0 -144
- package/dist/durable-objects-CQ2dHhho.mjs +0 -6
- package/dist/email-auth-DOi6yOt3.mjs +0 -6
- package/dist/email-routing-WcSPt22u.mjs +0 -45
- package/dist/email-security-BXu3OGay.mjs +0 -158
- package/dist/email-sending-B9zTlIjt.mjs +0 -47
- package/dist/error-sanitization-DE_zSrXw.mjs +0 -2
- package/dist/error-sanitization-DOCQ9Ykh.mjs +0 -2
- package/dist/errors-_sob7Ihu.mjs +0 -3
- package/dist/fieldExtractors-B37m2lKW.mjs +0 -9
- package/dist/firewall-CRtYO0Ha.mjs +0 -36
- package/dist/flagship-DvTFZSay.mjs +0 -28
- package/dist/fraud-uSyibsit.mjs +0 -22
- package/dist/google-tag-gateway-BFXiiokq.mjs +0 -6
- package/dist/healthchecks-27u7b7Jb.mjs +0 -22
- package/dist/hyperdrive-BzJvPdu6.mjs +0 -37
- package/dist/iam-Dl3cU9GI.mjs +0 -52
- package/dist/images-C2OkI1j7.mjs +0 -71
- package/dist/intel-DoB1g_K7.mjs +0 -76
- package/dist/ips-BRt68epr.mjs +0 -4
- package/dist/k2-_eq5ZY2t.mjs +0 -11
- package/dist/keyless-certificates-DaO2yqYu.mjs +0 -13
- package/dist/keys-7BQ3Zq6Y.mjs +0 -4
- package/dist/kv-BTYCXKML.mjs +0 -15
- package/dist/leaked-credential-checks-CPHOK_dE.mjs +0 -18
- package/dist/local-BundUuDT.mjs +0 -2
- package/dist/login-BBYC_BtH.mjs +0 -2
- package/dist/login-D2uoWhWh.mjs +0 -5
- package/dist/logo-matches-Bc1DQ4-g.mjs +0 -6
- package/dist/logos-X5B8z7Iv.mjs +0 -7
- package/dist/logpush-C2ENi1et.mjs +0 -46
- package/dist/logs-BKDz7kBW.mjs +0 -36
- package/dist/magic-cloud-networking-B60Gld8A.mjs +0 -71
- package/dist/magic-network-monitoring-CxXI3Y-H.mjs +0 -36
- package/dist/magic-transit-ZCSaCbl8.mjs +0 -386
- package/dist/managed-defense-DrxMb7xi.mjs +0 -18
- package/dist/managed-transforms-AI7KrRU1.mjs +0 -9
- package/dist/matches-rPMLS3Ip.mjs +0 -6
- package/dist/mcp-DXUMvEWt.mjs +0 -32
- package/dist/mesh-MmBCQ37q.mjs +0 -26
- package/dist/monetization-DQE5VtUO.mjs +0 -20
- package/dist/mtls-certificates-DwkEb-Hy.mjs +0 -13
- package/dist/network-BcfobxQY.mjs +0 -50
- package/dist/network-interconnects-BU3tN_Ab.mjs +0 -72
- package/dist/o11y-BBv7nedp.mjs +0 -93
- package/dist/oauth-BUr8bPwo.mjs +0 -9
- package/dist/oauth-clients-qWVImhHE.mjs +0 -16
- package/dist/oauth-scopes-CdeIgJIx.mjs +0 -4
- package/dist/organization-CJeOVWH7.mjs +0 -71
- package/dist/organizations-BpfoqZcG.mjs +0 -4
- package/dist/origin-ca-certificates-Bimf07RF.mjs +0 -11
- package/dist/origin-post-quantum-encryption-CM-If38w.mjs +0 -6
- package/dist/origin-tls-client-auth-BPwYPhc9.mjs +0 -30
- package/dist/output-BOe-3AQG.mjs +0 -2
- package/dist/page-rules-DOeekMrj.mjs +0 -39
- package/dist/pay-per-crawl-qJpseNNx.mjs +0 -38
- package/dist/pay-per-use-C1MWKJ4O.mjs +0 -33
- package/dist/pipelines-rCwXQw6S.mjs +0 -44
- package/dist/precursor-Bk8Pp6jT.mjs +0 -4
- package/dist/previews-BEheHO3T.mjs +0 -4
- package/dist/progress-CQqDtgmF.mjs +0 -2
- package/dist/prompt-C8FyienX.mjs +0 -3
- package/dist/queries-DJ8looyq.mjs +0 -9
- package/dist/queues-BBH9Q-Tt.mjs +0 -57
- package/dist/r2-CdJKpP2w.mjs +0 -128
- package/dist/raw-fetch-DbXN3SlE.mjs +0 -2
- package/dist/realtime-onrXppzh.mjs +0 -172
- package/dist/registrar-CbEBc5IE.mjs +0 -43
- package/dist/registrar-sandbox-BJhn1HFT.mjs +0 -56
- package/dist/reporting-bXZY6obP.mjs +0 -14
- package/dist/request-tracers-CihskC2A.mjs +0 -4
- package/dist/resolve-CaTBV-c6.mjs +0 -2
- package/dist/resolve-DCGSzUDQ.mjs +0 -2
- package/dist/resource-sharing-DDqcCHVs.mjs +0 -40
- package/dist/resource-tagging-D63RpBce.mjs +0 -4
- package/dist/rules-CAW0-Wde.mjs +0 -18
- package/dist/rulesets-CPir63Qc.mjs +0 -37
- package/dist/rum-BfwTcuup.mjs +0 -30
- package/dist/run-DEynXvCc.mjs +0 -2
- package/dist/scim-CtZ1FeQE.mjs +0 -18
- package/dist/secrets-store-BIuBYUJT.mjs +0 -24
- package/dist/security-insights-DfUus0bs.mjs +0 -40
- package/dist/security-txt-CgZOsAIZ.mjs +0 -9
- package/dist/session-BcM8Vyyx.mjs +0 -2
- package/dist/shared-CpS23WwR.mjs +0 -2
- package/dist/smart-shield-ClgB7r-9.mjs +0 -24
- package/dist/snippets-DLO3iFAg.mjs +0 -20
- package/dist/speed-DX5X2EIR.mjs +0 -24
- package/dist/sql-CF044HDW.mjs +0 -4
- package/dist/src-BMATTZU_.mjs +0 -125
- package/dist/ssl-CM-rChEC.mjs +0 -45
- package/dist/startup-profile-D662WI9s.mjs +0 -2
- package/dist/state-D7uNYnoi.mjs +0 -2
- package/dist/stream-5EmUOQvy.mjs +0 -102
- package/dist/submit-lEAaRSMR.mjs +0 -4
- package/dist/telemetry-0Y5hAtCX.mjs +0 -2
- package/dist/tenant-DnI7QziH.mjs +0 -10
- package/dist/tenant-custom-nameservers-MR0dlcGm.mjs +0 -9
- package/dist/theme-CQ_TYifs.mjs +0 -6
- package/dist/turnstile-M7sKCEz3.mjs +0 -33
- package/dist/ui-YmjF66Ct.mjs +0 -5
- package/dist/update-check-aTutXNRd.mjs +0 -2
- package/dist/url-info-Dos9VOXV.mjs +0 -4
- package/dist/url-normalization-CZbFOq_v.mjs +0 -9
- package/dist/url-scanner-B7quLPGW.mjs +0 -16
- package/dist/values-D-rrZrDa.mjs +0 -4
- package/dist/vectorize-D2tf_oA8.mjs +0 -32
- package/dist/version-BGnqDvNR.mjs +0 -2
- package/dist/web-assets-DQAfvPT9.mjs +0 -64
- package/dist/web3-MI0GQDnu.mjs +0 -28
- package/dist/workers-By6Pf8fv.mjs +0 -40
- package/dist/workers-builds-6YsWsCmC.mjs +0 -14
- package/dist/workers-for-platforms-DL8fC1qR.mjs +0 -40
- package/dist/workers-vpc-BYx6sbgd.mjs +0 -13
- package/dist/workflows-ByQLnV0E.mjs +0 -52
- package/dist/zaraz-CgbpmA85.mjs +0 -22
- package/dist/zero-trust-CpjTkkWt.mjs +0 -837
- package/dist/zone-DnKIe6po.mjs +0 -4
- package/dist/zones--5ZzsDmQ.mjs +0 -124
package/dist/dns-n4mfYBZg.mjs
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,i,t as a}from"./context-BBLtgdR1.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-CQqDtgmF.mjs";import{t as l}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-C8FyienX.mjs";import{t as _}from"./cli-types-9oYmRTHJ.mjs";import{n as ee,t as te}from"./raw-fetch-DbXN3SlE.mjs";function v(e){return e.usage(`$0 dns dnssec delete
|
|
3
|
-
|
|
4
|
-
Delete DNSSEC.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete`,describe:`Delete DNSSEC records`,builder:v,handler:async e=>l({command:`dns dnssec delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf dns dnssec delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
5
|
-
`);return}let a=await c(`Deleting`,async()=>t.dns.dnssec.delete({zone_id:r}));o(a,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 dns dnssec edit
|
|
6
|
-
|
|
7
|
-
Enable or disable DNSSEC.`).option(`dnssec-multi-signer`,{type:`boolean`,description:`If true, multi-signer DNSSEC is enabled on the zone, allowing multiple
|
|
8
|
-
providers to serve a DNSSEC-signed zone at the same time.
|
|
9
|
-
This is required for DNSKEY records (except those automatically
|
|
10
|
-
generated by Cloudflare) to be added to the zone.
|
|
11
|
-
|
|
12
|
-
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
|
|
13
|
-
including signatures from an external provider, without requiring
|
|
14
|
-
Cloudflare to sign any records on the fly.
|
|
15
|
-
|
|
16
|
-
Note that this feature has some limitations.
|
|
17
|
-
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.
|
|
18
|
-
Combined with setting dnssec_presigned to true, this enables the use of
|
|
19
|
-
NSEC3 records when transferring in from an external provider.
|
|
20
|
-
If dnssec_presigned is instead set to false (default), NSEC3 records will be
|
|
21
|
-
generated and signed at request time.
|
|
22
|
-
|
|
23
|
-
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`]}).coerce(`status`,e=>p(e,`status`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`edit`,describe:`Edit DNSSEC Status`,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:e.status}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.dns.dnssec.edit({...n,zone_id:r}));o(i,{successLabel:`Updated`});return}let a=f({dnssec_multi_signer:e[`dnssec-multi-signer`],dnssec_presigned:e[`dnssec-presigned`],dnssec_use_nsec3:e[`dnssec-use-nsec3`],status:e.status}),l=await c(`Updating`,async()=>t.dns.dnssec.edit({...a,zone_id:r}));o(l,{successLabel:`Updated`})})};function S(e){return e.usage(`$0 dns dnssec get
|
|
24
|
-
|
|
25
|
-
Details about DNSSEC status and configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`DNSSEC Details`,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.dns.dnssec.get({zone_id:r}));o(a,{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 dns dnssec list zsks
|
|
26
|
-
|
|
27
|
-
List the Zone Signing Keys (ZSKs) that DNSSEC uses for the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`zsks`,describe:`List DNSSEC ZSKs`,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.dns.dnssec.list.zsks({zone_id:r}));o(a,{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.usage(`$0 dns records batch
|
|
28
|
-
|
|
29
|
-
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`).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:`Batch DNS Records`,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 r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body){let n=u(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let i=await c(`Creating`,async()=>r.dns.records.batch({...n,zone_id:a,...t}));o(i,{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();let p=await c(`Creating`,async()=>r.dns.records.batch({...l,zone_id:a,...t}));o(p,{successLabel:`Created`})})};function A(e){return e.usage(`$0 dns records create
|
|
30
|
-
|
|
31
|
-
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.`).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 DNS 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 r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body){let n=u(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let i=await c(`Creating`,async()=>r.dns.records.create({body:n,zone_id:a,...t}));o(i,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function M(e){return e.usage(`$0 dns records delete <dns-record-id>
|
|
32
|
-
|
|
33
|
-
Permanently removes a DNS record from the zone.`).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:`Delete DNS Record`,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
34
|
-
`);return}let a=await c(`Deleting`,async()=>t.dns.records.delete({zone_id:r,dns_record_id:e[`dns-record-id`]}));o(a,{successLabel:`Deleted`})})};function P(e){return e.usage(`$0 dns records edit <dns-record-id>
|
|
35
|
-
|
|
36
|
-
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.`).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 DNS 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 r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body){let n=u(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let i=await c(`Updating`,async()=>r.dns.records.edit({body:n,zone_id:a,dns_record_id:e[`dns-record-id`],...t}));o(i,{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.usage(`$0 dns records export
|
|
37
|
-
|
|
38
|
-
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.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`export`,describe:`Export DNS Records`,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 n(e);e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet});let r=await c(`Loading`,async()=>te(`/zones/${e.zoneId}/dns_records/export`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));ee(r.toString(`utf-8`))})};function R(e){return e.usage(`$0 dns records get <dns-record-id>
|
|
39
|
-
|
|
40
|
-
Retrieves details for a specific DNS record in the zone.`).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:`DNS Record Details`,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 r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.dns.records.get({zone_id:a,dns_record_id:e[`dns-record-id`],...t}));o(l,{successLabel:`Loaded`})})};function B(e){return e.usage(`$0 dns records import
|
|
41
|
-
|
|
42
|
-
You can upload your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. It assumes that cURL is called from a location with bind_config.txt (valid BIND config) present. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`proxied`,{type:`string`,description:"Whether or not proxiable records should receive the performance and security benefits of Cloudflare. The value should be either `true` or `false`."})}const V={command:`import`,describe:`Import DNS Records`,builder:B,handler:async e=>l({command:`dns records import`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns records import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/import`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,proxied:e.proxied}});return}let r=await n(e);if(e.zoneId=await i({zone:e.zone},r,{quiet:e.quiet}),e.file!==void 0||e.body!==void 0||e.proxied!==void 0){let n=new FormData;if(e.file){let t=m(e.file);n.append(`file`,new Blob([t]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&n.append(`file`,e.body);e.proxied!==void 0&&n.append(`proxied`,String(p(e.proxied,`proxied`,`text`)??``));let i=await c(`Creating`,async()=>t(r,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n}));o(i,{successLabel:`Created`});return}if(e.body){let n=p(e.body,`body`,`binary`),i=await c(`Creating`,async()=>t(r,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n,headers:{"Content-Type":`multipart/form-data`}}));o(i,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function H(e){return e.usage(`$0 dns records list
|
|
43
|
-
|
|
44
|
-
List, search, sort, and filter a zones' DNS records.`).option(`name`,{type:`string`,description:"Exact value of the DNS record name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS record name. Name filters are case-insensitive.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS record name. Name filters are case-insensitive.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS record name. Name filters are case-insensitive.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS record name. Name filters are case-insensitive.`}).option(`type`,{type:`string`,description:`Record type.`,choices:[`A`,`AAAA`,`CAA`,`CERT`,`CNAME`,`DNSKEY`,`DS`,`HTTPS`,`LOC`,`MX`,`NAPTR`,`NS`,`OPENPGPKEY`,`PTR`,`SMIMEA`,`SRV`,`SSHFP`,`SVCB`,`TLSA`,`TXT`,`URI`]}).option(`content`,{type:`string`,description:"Exact value of the DNS record content. This is a convenience alias for `content.exact`."}).option(`content-exact`,{type:`string`,description:`Exact value of the DNS record content. Content filters are case-insensitive.`}).option(`content-contains`,{type:`string`,description:`Substring of the DNS record content. Content filters are case-insensitive.`}).option(`content-startswith`,{type:`string`,description:`Prefix of the DNS record content. Content filters are case-insensitive.`}).option(`content-endswith`,{type:`string`,description:`Suffix of the DNS record content. Content filters are case-insensitive.`}).option(`proxied`,{type:`boolean`,description:`Whether the record is receiving the performance and security benefits of Cloudflare.`}).option(`match`,{type:`string`,description:"Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead. Note that the interaction between tag filters is controlled by the `tag-match` parameter instead.",choices:[`any`,`all`]}).option(`comment`,{type:`string`,description:"Exact value of the DNS record comment. This is a convenience alias for `comment.exact`."}).option(`comment-present`,{type:`string`,description:`If this parameter is present, only records *with* a comment are returned.`}).option(`comment-absent`,{type:`string`,description:`If this parameter is present, only records *without* a comment are returned.`}).option(`comment-exact`,{type:`string`,description:`Exact value of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-contains`,{type:`string`,description:`Substring of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-startswith`,{type:`string`,description:`Prefix of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-endswith`,{type:`string`,description:`Suffix of the DNS record comment. Comment filters are case-insensitive.`}).option(`tag`,{type:`string`,description:"Condition on the DNS record tag.\n\nParameter values can be of the form `<tag-name>:<tag-value>` to search for an exact `name:value` pair, or just `<tag-name>` to search for records with a specific tag name regardless of its value.\n\nThis is a convenience shorthand for the more powerful `tag.<predicate>` parameters.\nExamples:\n- `tag=important` is equivalent to `tag.present=important`\n- `tag=team:DNS` is equivalent to `tag.exact=team:DNS`"}).option(`tag-present`,{type:`string`,description:`Name of a tag which must be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-absent`,{type:`string`,description:`Name of a tag which must *not* be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-exact`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value is `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-contains`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value contains `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-startswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value starts with `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-endswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value ends with `<tag-value>`. Tag filters are case-insensitive."}).option(`search`,{type:`string`,description:"Allows searching in multiple properties of a DNS record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is subject to change in the future. This parameter works independently of the `match` setting. For automated searches, please use the other available parameters."}).option(`tag-match`,{type:`string`,description:"Whether to match all tag search requirements or at least one (any). If set to `all`, acts like a logical AND between tag filters. If set to `any`, acts like a logical OR instead. Note that the regular `match` parameter is still used to combine the resulting condition with other filters that aren't related to tags.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of DNS records per page.`}).option(`order`,{type:`string`,description:`Field to order DNS records by.`,choices:[`type`,`name`,`content`,`ttl`,`proxied`]}).option(`direction`,{type:`string`,description:`Direction to order DNS records in.`,choices:[`asc`,`desc`]}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`shadowed-by-name`,{type:`string`,description:"Filters the response to records at or below the specified NS delegation name. NS, DS, and NSEC records at the delegation name are excluded because they are not shadowed by that delegation. Those record types are included only when they exist below the delegation. The value must be a non-apex subdomain of the zone. Requires `include_shadow_metadata=true`. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`shadowing-name`,{type:`string`,description:`Returns NS records that shadow the given name, searching at the name itself and each of its ancestor names within the zone, excluding the zone apex. The value must be a subdomain of the zone; the zone apex is not accepted. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`list`,describe:`List DNS Records`,builder:_(H),handler:async e=>l({command:`dns records list`,classification:{safeFlags:[`type`,`proxied`,`match`,`tag-match`,`order`,`direction`,`include-shadow-metadata`,`dry-run`]}},e,async()=>{let t={name:e.name,"name.exact":e[`name-exact`],"name.contains":e[`name-contains`],"name.startswith":e[`name-startswith`],"name.endswith":e[`name-endswith`],type:e.type,content:e.content,"content.exact":e[`content-exact`],"content.contains":e[`content-contains`],"content.startswith":e[`content-startswith`],"content.endswith":e[`content-endswith`],proxied:e.proxied,match:e.match,comment:e.comment,"comment.present":e[`comment-present`],"comment.absent":e[`comment-absent`],"comment.exact":e[`comment-exact`],"comment.contains":e[`comment-contains`],"comment.startswith":e[`comment-startswith`],"comment.endswith":e[`comment-endswith`],tag:e.tag,"tag.present":e[`tag-present`],"tag.absent":e[`tag-absent`],"tag.exact":e[`tag-exact`],"tag.contains":e[`tag-contains`],"tag.startswith":e[`tag-startswith`],"tag.endswith":e[`tag-endswith`],search:e.search,tag_match:e[`tag-match`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,include_shadow_metadata:e[`include-shadow-metadata`],shadowed_by_name:e[`shadowed-by-name`],shadowing_name:e[`shadowing-name`]};if(e.dryRun){s({command:`cf dns records list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.dns.records.list({zone_id:a,...t}));o(l,{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 dns records scan-list
|
|
45
|
-
|
|
46
|
-
Retrieves the list of DNS records discovered up to this point by the asynchronous scan. These records are temporary until explicitly accepted or rejected via \`POST /scan/review\`. Additional records may be discovered by the scan later.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`scan-list`,describe:`List Scanned DNS Records`,builder:W,handler:async e=>l({command:`dns records scan-list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf dns records scan-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan/review`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.dns.records.scanList({zone_id:r}));o(a,{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 dns records scan-review
|
|
47
|
-
|
|
48
|
-
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.`).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:`Review Scanned DNS Records`,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Creating`,async()=>t.dns.records.scanReview({...n,zone_id:r}));o(i,{successLabel:`Created`});return}let a=f({accepts:d(e.accepts,`accepts`),rejects:d(e.rejects,`rejects`)}),l=await c(`Creating`,async()=>t.dns.records.scanReview({...a,zone_id:r}));o(l,{successLabel:`Created`})})};function J(e){return e.usage(`$0 dns records scan-trigger
|
|
49
|
-
|
|
50
|
-
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.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`scan-trigger`,describe:`Trigger DNS Record Scan`,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Creating`,async()=>t.dns.records.scanTrigger({zone_id:r}));o(a,{successLabel:`Created`})})};function X(e){return e.usage(`$0 dns records scan
|
|
51
|
-
|
|
52
|
-
Scan for common DNS records on your domain and automatically add them to your zone. Useful if you haven't updated your nameservers yet.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`scan`,describe:`Scan DNS Records`,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Creating`,async()=>t.dns.records.scan({zone_id:r}));o(a,{successLabel:`Created`})})};function Q(e){return e.usage(`$0 dns records update <dns-record-id>
|
|
53
|
-
|
|
54
|
-
Overwrite an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`).positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`update <dns-record-id>`,describe:`Overwrite DNS 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 r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body){let n=u(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let i=await c(`Updating`,async()=>r.dns.records.update({body:n,zone_id:a,dns_record_id:e[`dns-record-id`],...t}));o(i,{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.usage(`$0 dns settings account edit
|
|
55
|
-
|
|
56
|
-
Update DNS settings for an account or zone`).option(`enforce-dns-only`,{type:`boolean`,description:`When enabled, forces all proxied DNS records in the account to behave as DNS-only at the edge, regardless of each record's individual proxy setting. Note that this account-level override does not modify the records themselves; it only affects how they are served at the edge. See more on [Enforce DNS-only](https://developers.cloudflare.com/dns/proxy-status/enforce-dns-only).`}).option(`zone-defaults-flatten-all-cnames`,{type:`boolean`,description:`Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.`}).option(`zone-defaults-foundation-dns`,{type:`boolean`,description:`Deprecated. Use nameservers.type to configure Advanced Nameservers.`}).option(`zone-defaults-internal-dns-reference-zone-id`,{type:`string`,description:`The ID of the zone to fallback to.`}).option(`zone-defaults-multi-provider`,{type:`boolean`,description:`Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.`}).option(`zone-defaults-ns-ttl`,{type:`number`,description:`The time to live (TTL) of the zone's nameserver (NS) records.`}).option(`zone-defaults-secondary-overrides`,{type:`boolean`,description:`Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.`}).option(`zone-defaults-soa-expire`,{type:`number`,description:`Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.`}).option(`zone-defaults-soa-min-ttl`,{type:`number`,description:`The time to live (TTL) for negative caching of records within the zone.`}).option(`zone-defaults-soa-mname`,{type:`string`,description:`The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.`}).option(`zone-defaults-soa-refresh`,{type:`number`,description:`Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.`}).option(`zone-defaults-soa-retry`,{type:`number`,description:`Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.`}).option(`zone-defaults-soa-rname`,{type:`string`,description:`The email address of the zone administrator, with the first label representing the local part of the email address.`}).option(`zone-defaults-soa-ttl`,{type:`number`,description:`The time to live (TTL) of the SOA record itself.`}).option(`zone-defaults-zone-mode`,{type:`string`,description:`Whether the zone mode is a regular or CDN/DNS only zone.`,choices:[`standard`,`cdn_only`,`dns_only`]}).coerce(`zone-defaults-zone-mode`,e=>p(e,`zone-defaults-zone-mode`,`text`)).option(`zone-defaults-nameservers-type`,{type:`string`,description:`Nameserver type`,choices:[`cloudflare.standard`,`cloudflare.advanced`,`cloudflare.standard.random`,`custom.account`,`custom.tenant`]}).coerce(`zone-defaults-nameservers-type`,e=>p(e,`zone-defaults-nameservers-type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ae={command:`edit`,describe:`Update DNS Settings`,builder:ie,handler:async t=>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`]}},t,async()=>{if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf dns settings account edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/dns_settings`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:t.body===void 0?f({enforce_dns_only:t[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:t[`zone-defaults-flatten-all-cnames`],foundation_dns:t[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:p(t[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:t[`zone-defaults-multi-provider`],ns_ttl:t[`zone-defaults-ns-ttl`],secondary_overrides:t[`zone-defaults-secondary-overrides`],soa:{expire:t[`zone-defaults-soa-expire`],min_ttl:t[`zone-defaults-soa-min-ttl`],mname:p(t[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:t[`zone-defaults-soa-refresh`],retry:t[`zone-defaults-soa-retry`],rname:p(t[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:t[`zone-defaults-soa-ttl`]},zone_mode:t[`zone-defaults-zone-mode`],nameservers:{type:t[`zone-defaults-nameservers-type`]}}}):u(t.body)});return}let l=await n(t),d=t.zone===void 0?`accounts`:`zones`,m=d===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();if(d===`zones`?t.zoneId=m:t.accountId=m,t.body){let e=u(t.body),n=await c(`Updating`,async()=>l.dns.settings.account.edit({...e,account_or_zone:d,account_or_zone_id:m}));o(n,{successLabel:`Updated`});return}let h=f({enforce_dns_only:t[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:t[`zone-defaults-flatten-all-cnames`],foundation_dns:t[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:p(t[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:t[`zone-defaults-multi-provider`],ns_ttl:t[`zone-defaults-ns-ttl`],secondary_overrides:t[`zone-defaults-secondary-overrides`],soa:{expire:t[`zone-defaults-soa-expire`],min_ttl:t[`zone-defaults-soa-min-ttl`],mname:p(t[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:t[`zone-defaults-soa-refresh`],retry:t[`zone-defaults-soa-retry`],rname:p(t[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:t[`zone-defaults-soa-ttl`]},zone_mode:t[`zone-defaults-zone-mode`],nameservers:{type:t[`zone-defaults-nameservers-type`]}}}),g=await c(`Updating`,async()=>l.dns.settings.account.edit({...h,account_or_zone:d,account_or_zone_id:m}));o(g,{successLabel:`Updated`})})};function oe(e){return e.usage(`$0 dns settings account get
|
|
57
|
-
|
|
58
|
-
Show DNS settings for an account or zone`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get`,describe:`Show DNS Settings`,builder:oe,handler:async t=>l({command:`dns settings account get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf dns settings account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/dns_settings`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(t),u=t.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();u===`zones`?t.zoneId=d:t.accountId=d;let f=await c(`Loading`,async()=>l.dns.settings.account.get({account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 dns settings account nameserver-sets create
|
|
59
|
-
|
|
60
|
-
Creates an immutable Custom Nameserver Set. To change a set, create a new one, move any zone assignments, and delete the old set.`).option(`advanced`,{type:`boolean`,description:`Whether to allocate the nameservers from distinct Advanced anycast groups.`,default:!1}).option(`ip-set`,{type:`number`,description:"Selects the account-specific IP set that supplies the nameserver addresses. Nameserver sets with the same `ip_set` and `advanced` value may reuse addresses; otherwise, they use disjoint address groups.",default:1}).option(`nameservers`,{type:`string`,description:`Lists each nameserver and the number of addresses to allocate to it. Requires a unique name for each entry in the set. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const le={command:`create`,describe:`Create Custom Nameserver Set`,builder:ce,handler:async t=>l({command:`dns settings account nameserver-sets create`,classification:{safeFlags:[`advanced`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns settings account nameserver-sets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/nameserver_sets`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({advanced:t.advanced,ip_set:t[`ip-set`],nameservers:d(t.nameservers,`nameservers`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.dns.settings.account.nameserverSets.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}if(t.nameservers===void 0)throw Error(`--nameservers is required (or pass --body with this field set).`);let p=f({advanced:t.advanced,ip_set:t[`ip-set`],nameservers:d(t.nameservers,`nameservers`)}),m=await c(`Creating`,async()=>i.dns.settings.account.nameserverSets.create({...p,account_id:l}));o(m,{successLabel:`Created`})})};function ue(e){return e.usage(`$0 dns settings account nameserver-sets delete <nameserver-set-id>
|
|
61
|
-
|
|
62
|
-
Deletes an unassigned Custom Nameserver Set.`).positional(`nameserver-set-id`,{type:`string`,description:`Identifier for a nameserver set.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const de={command:`delete <nameserver-set-id>`,describe:`Delete Custom Nameserver Set`,builder:ue,handler:async t=>l({command:`dns settings account nameserver-sets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns settings account nameserver-sets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/nameserver_sets/${t[`nameserver-set-id`]==null?`<nameserver-set-id>`:encodeURIComponent(String(t[`nameserver-set-id`]))}`,pathParams:{"nameserver-set-id":String(t[`nameserver-set-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
|
|
63
|
-
`);return}let u=await c(`Deleting`,async()=>i.dns.settings.account.nameserverSets.delete({account_id:l,nameserver_set_id:t[`nameserver-set-id`]}));o(u,{successLabel:`Deleted`})})};function fe(e){return e.usage(`$0 dns settings account nameserver-sets get <nameserver-set-id>
|
|
64
|
-
|
|
65
|
-
Gets a Custom Nameserver Set owned by an account.`).positional(`nameserver-set-id`,{type:`string`,description:`Identifier for a nameserver set.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get <nameserver-set-id>`,describe:`Get Custom Nameserver Set`,builder:fe,handler:async t=>l({command:`dns settings account nameserver-sets get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns settings account nameserver-sets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/nameserver_sets/${t[`nameserver-set-id`]==null?`<nameserver-set-id>`:encodeURIComponent(String(t[`nameserver-set-id`]))}`,pathParams:{"nameserver-set-id":String(t[`nameserver-set-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.dns.settings.account.nameserverSets.get({account_id:l,nameserver_set_id:t[`nameserver-set-id`]}));o(u,{successLabel:`Loaded`})})};function me(e){return e.usage(`$0 dns settings account nameserver-sets list
|
|
66
|
-
|
|
67
|
-
Lists an account's Custom Nameserver Sets.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`list`,describe:`List Custom Nameserver Sets`,builder:me,handler:async t=>l({command:`dns settings account nameserver-sets list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({command:`cf dns settings account nameserver-sets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/nameserver_sets`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.dns.settings.account.nameserverSets.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},ge={command:`nameserver-sets`,describe:`Operations for settings.account.nameserver-sets`,builder:e=>e.command(le).command(de).command(pe).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(e){return e.usage(`$0 dns settings account views create
|
|
68
|
-
|
|
69
|
-
Create Internal DNS View for an account`).option(`name`,{type:`string`,description:`The name of the view.`}).option(`zones`,{type:`string`,array:!0,description:`The list of zones linked to this view.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ve={command:`create`,describe:`Create Internal DNS View`,builder:_e,handler:async t=>l({command:`dns settings account views create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns settings account views create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/views`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({name:p(t.name,`name`,`text`),zones:t.zones}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.dns.settings.account.views.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}if(t.name===void 0&&(t.name=await h(`name`,`The name of the view.`)),t.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let d=f({name:p(t.name,`name`,`text`),zones:t.zones}),m=await c(`Creating`,async()=>i.dns.settings.account.views.create({...d,account_id:l}));o(m,{successLabel:`Created`})})};function ye(e){return e.usage(`$0 dns settings account views delete <view-id>
|
|
70
|
-
|
|
71
|
-
Delete an existing Internal DNS View`).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 be={command:`delete <view-id>`,describe:`Delete Internal DNS View`,builder:ye,handler:async t=>l({command:`dns settings account views delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns settings account views delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/views/${t[`view-id`]==null?`<view-id>`:encodeURIComponent(String(t[`view-id`]))}`,pathParams:{"view-id":String(t[`view-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
|
|
72
|
-
`);return}let u=await c(`Deleting`,async()=>i.dns.settings.account.views.delete({account_id:l,view_id:t[`view-id`]}));o(u,{successLabel:`Deleted`})})};function xe(e){return e.usage(`$0 dns settings account views edit <view-id>
|
|
73
|
-
|
|
74
|
-
Update an existing Internal DNS View`).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 Se={command:`edit <view-id>`,describe:`Update Internal DNS View`,builder:xe,handler:async t=>l({command:`dns settings account views edit`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns settings account views edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/views/${t[`view-id`]==null?`<view-id>`:encodeURIComponent(String(t[`view-id`]))}`,pathParams:{"view-id":String(t[`view-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({name:p(t.name,`name`,`text`),zones:t.zones}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.dns.settings.account.views.edit({...e,account_id:l,view_id:t[`view-id`]}));o(n,{successLabel:`Updated`});return}let d=f({name:p(t.name,`name`,`text`),zones:t.zones}),m=await c(`Updating`,async()=>i.dns.settings.account.views.edit({...d,account_id:l,view_id:t[`view-id`]}));o(m,{successLabel:`Updated`})})};function Ce(e){return e.usage(`$0 dns settings account views get <view-id>
|
|
75
|
-
|
|
76
|
-
Get DNS Internal View`).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 we={command:`get <view-id>`,describe:`DNS Internal View Details`,builder:Ce,handler:async t=>l({command:`dns settings account views get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns settings account views get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/views/${t[`view-id`]==null?`<view-id>`:encodeURIComponent(String(t[`view-id`]))}`,pathParams:{"view-id":String(t[`view-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.dns.settings.account.views.get({account_id:l,view_id:t[`view-id`]}));o(u,{successLabel:`Loaded`})})};function Te(e){return e.usage(`$0 dns settings account views list
|
|
77
|
-
|
|
78
|
-
List DNS Internal Views for an Account`).option(`name`,{type:`string`,description:"Exact value of the DNS view name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS view name.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS view name.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS view name.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS view name.`}).option(`zone-id`,{type:`string`,description:`A zone ID that exists in the zones list for the view.`}).option(`zone-name`,{type:`string`,description:`A zone name that exists in the zones list for the view.`}).option(`match`,{type:`string`,description:"Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of results per page.`}).option(`order`,{type:`string`,description:`Field to order DNS views by.`,choices:[`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order DNS views in.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ee={command:`list`,describe:`List Internal DNS Views`,builder:_(Te),handler:async t=>l({command:`dns settings account views list`,classification:{safeFlags:[`match`,`order`,`direction`,`dry-run`]}},t,async()=>{let i={name:t.name,"name.exact":t[`name-exact`],"name.contains":t[`name-contains`],"name.startswith":t[`name-startswith`],"name.endswith":t[`name-endswith`],zone_id:t[`zone-id`],zone_name:t[`zone-name`],match:t.match,page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();s({command:`cf dns settings account views list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/dns_settings/views`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.dns.settings.account.views.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},De={command:`views`,describe:`Operations for settings.account.views`,builder:e=>e.command(ve).command(be).command(Se).command(we).command(Ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Oe={command:`account`,describe:`Operations for settings.account`,builder:e=>e.command(ae).command(se).command(ge).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ke={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ae(e){return e.usage(`$0 dns usage account get
|
|
79
|
-
|
|
80
|
-
Get the current DNS record usage and quota for an account or zone. May include internal DNS usage and quota.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`get`,describe:`Get DNS Record Usage for account or zone`,builder:Ae,handler:async t=>l({command:`dns usage account get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf dns usage account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/dns_records/usage`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(t),u=t.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();u===`zones`?t.zoneId=d:t.accountId=d;let f=await c(`Loading`,async()=>l.dns.usage.account.get({account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})},Me={command:`account`,describe:`Operations for usage.account`,builder:e=>e.command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ne={command:`usage`,describe:`Operations for usage`,builder:e=>e.command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pe(e){return e.usage(`$0 dns zone-transfers acls create
|
|
81
|
-
|
|
82
|
-
Create ACL.`).option(`ip-range`,{type:`string`,description:`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`}).option(`name`,{type:`string`,description:`The name of the acl.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Fe={command:`create`,describe:`Create ACL`,builder:Pe,handler:async t=>l({command:`dns zone-transfers acls create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/acls`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({ip_range:p(t[`ip-range`],`ip-range`,`text`),name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.dns.zoneTransfers.acls.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}t[`ip-range`]===void 0&&(t[`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.`)),t.name===void 0&&(t.name=await h(`name`,`The name of the acl.`));let d=f({ip_range:p(t[`ip-range`],`ip-range`,`text`),name:p(t.name,`name`,`text`)}),m=await c(`Creating`,async()=>i.dns.zoneTransfers.acls.create({...d,account_id:l}));o(m,{successLabel:`Created`})})};function Ie(e){return e.usage(`$0 dns zone-transfers acls delete <acl-id>
|
|
83
|
-
|
|
84
|
-
Delete ACL.`).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 Le={command:`delete <acl-id>`,describe:`Delete ACL`,builder:Ie,handler:async t=>l({command:`dns zone-transfers acls delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"acl-id":String(t[`acl-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
|
|
85
|
-
`);return}let u=await c(`Deleting`,async()=>i.dns.zoneTransfers.acls.delete({account_id:l,acl_id:t[`acl-id`]}));o(u,{successLabel:`Deleted`})})};function Re(e){return e.usage(`$0 dns zone-transfers acls get <acl-id>
|
|
86
|
-
|
|
87
|
-
Get ACL.`).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 ze={command:`get <acl-id>`,describe:`ACL Details`,builder:Re,handler:async t=>l({command:`dns zone-transfers acls get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"acl-id":String(t[`acl-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.dns.zoneTransfers.acls.get({account_id:l,acl_id:t[`acl-id`]}));o(u,{successLabel:`Loaded`})})};function Be(e){return e.usage(`$0 dns zone-transfers acls list
|
|
88
|
-
|
|
89
|
-
List ACLs.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ve={command:`list`,describe:`List ACLs`,builder:Be,handler:async t=>l({command:`dns zone-transfers acls list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/acls`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.dns.zoneTransfers.acls.list({account_id:l}));o(u,{successLabel:`Loaded`})})};function He(e){return e.usage(`$0 dns zone-transfers acls update <acl-id>
|
|
90
|
-
|
|
91
|
-
Modify ACL.`).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 Ue={command:`update <acl-id>`,describe:`Update ACL`,builder:He,handler:async t=>l({command:`dns zone-transfers acls update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/acls/${t[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(t[`acl-id`]))}`,pathParams:{"acl-id":String(t[`acl-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({ip_range:p(t[`ip-range`],`ip-range`,`text`),name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.dns.zoneTransfers.acls.update({body:e,account_id:l,acl_id:t[`acl-id`]}));o(n,{successLabel:`Updated`});return}t[`ip-range`]===void 0&&(t[`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.`)),t.name===void 0&&(t.name=await h(`name`,`The name of the acl.`));let d=f({ip_range:p(t[`ip-range`],`ip-range`,`text`),name:p(t.name,`name`,`text`)}),m=await c(`Updating`,async()=>i.dns.zoneTransfers.acls.update({body:d,account_id:l,acl_id:t[`acl-id`]}));o(m,{successLabel:`Updated`})})},We={command:`acls`,describe:`Operations for zone-transfers.acls`,builder:e=>e.command(Fe).command(Le).command(ze).command(Ve).command(Ue).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ge(e){return e.usage(`$0 dns zone-transfers force-axfr create
|
|
92
|
-
|
|
93
|
-
Sends AXFR zone transfer request to primary nameserver(s).`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ke={command:`create`,describe:`Force AXFR`,builder:Ge,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Creating`,async()=>t.dns.zoneTransfers.forceAxfr.create({zone_id:r}));o(a,{successLabel:`Created`})})},qe={command:`force-axfr`,describe:`Operations for zone-transfers.force-axfr`,builder:e=>e.command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Je(e){return e.usage(`$0 dns zone-transfers incoming create
|
|
94
|
-
|
|
95
|
-
Create secondary zone configuration for incoming zone transfers.`).option(`auto-refresh-seconds`,{type:`number`,description:`How often should a secondary zone auto refresh regardless of DNS NOTIFY.
|
|
96
|
-
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 Ye={command:`create`,describe:`Create Secondary Zone Configuration`,builder:Je,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Creating`,async()=>t.dns.zoneTransfers.incoming.create({body:n,zone_id:r}));o(i,{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 a=f({auto_refresh_seconds:e[`auto-refresh-seconds`],name:p(e.name,`name`,`text`),peers:e.peers}),l=await c(`Creating`,async()=>t.dns.zoneTransfers.incoming.create({body:a,zone_id:r}));o(l,{successLabel:`Created`})})};function Xe(e){return e.usage(`$0 dns zone-transfers incoming delete
|
|
97
|
-
|
|
98
|
-
Delete secondary zone configuration for incoming zone transfers.`).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 Secondary Zone Configuration`,builder:Xe,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
99
|
-
`);return}let a=await c(`Deleting`,async()=>t.dns.zoneTransfers.incoming.delete({zone_id:r}));o(a,{successLabel:`Deleted`})})};function Qe(e){return e.usage(`$0 dns zone-transfers incoming get
|
|
100
|
-
|
|
101
|
-
Get secondary zone configuration for incoming zone transfers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $e={command:`get`,describe:`Secondary Zone Configuration Details`,builder:Qe,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.dns.zoneTransfers.incoming.get({zone_id:r}));o(a,{successLabel:`Loaded`})})};function et(e){return e.usage(`$0 dns zone-transfers incoming update
|
|
102
|
-
|
|
103
|
-
Update secondary zone configuration for incoming zone transfers.`).option(`auto-refresh-seconds`,{type:`number`,description:`How often should a secondary zone auto refresh regardless of DNS NOTIFY.
|
|
104
|
-
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 tt={command:`update`,describe:`Update Secondary Zone Configuration`,builder:et,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.dns.zoneTransfers.incoming.update({body:n,zone_id:r}));o(i,{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 a=f({auto_refresh_seconds:e[`auto-refresh-seconds`],name:p(e.name,`name`,`text`),peers:e.peers}),l=await c(`Updating`,async()=>t.dns.zoneTransfers.incoming.update({body:a,zone_id:r}));o(l,{successLabel:`Updated`})})},nt={command:`incoming`,describe:`Operations for zone-transfers.incoming`,builder:e=>e.command(Ye).command(Ze).command($e).command(tt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function rt(e){return e.usage(`$0 dns zone-transfers outgoing create
|
|
105
|
-
|
|
106
|
-
Create primary zone configuration for outgoing zone transfers.`).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 it={command:`create`,describe:`Create Primary Zone Configuration`,builder:rt,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.create({body:n,zone_id:r}));o(i,{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 a=f({name:p(e.name,`name`,`text`),peers:e.peers}),l=await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.create({body:a,zone_id:r}));o(l,{successLabel:`Created`})})};function at(e){return e.usage(`$0 dns zone-transfers outgoing delete
|
|
107
|
-
|
|
108
|
-
Delete primary zone configuration for outgoing zone transfers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ot={command:`delete`,describe:`Delete Primary Zone Configuration`,builder:at,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
109
|
-
`);return}let a=await c(`Deleting`,async()=>t.dns.zoneTransfers.outgoing.delete({zone_id:r}));o(a,{successLabel:`Deleted`})})};function st(e){return e.usage(`$0 dns zone-transfers outgoing disable
|
|
110
|
-
|
|
111
|
-
Disable outgoing zone transfers for primary zone and clears IXFR backlog of primary 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})}const ct={command:`disable`,describe:`Disable Outgoing Zone Transfers`,builder:st,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!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.
|
|
112
|
-
`);return}let a=await c(`Deleting`,async()=>t.dns.zoneTransfers.outgoing.disable({zone_id:r}));o(a,{successLabel:`Deleted`})})};function lt(e){return e.usage(`$0 dns zone-transfers outgoing enable
|
|
113
|
-
|
|
114
|
-
Enable outgoing zone transfers for primary zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ut={command:`enable`,describe:`Enable Outgoing Zone Transfers`,builder:lt,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.enable({zone_id:r}));o(a,{successLabel:`Created`})})};function dt(e){return e.usage(`$0 dns zone-transfers outgoing force-notify
|
|
115
|
-
|
|
116
|
-
Notifies the secondary nameserver(s) and clears IXFR backlog of primary zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ft={command:`force-notify`,describe:`Force DNS NOTIFY`,builder:dt,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.forceNotify({zone_id:r}));o(a,{successLabel:`Created`})})};function pt(e){return e.usage(`$0 dns zone-transfers outgoing get
|
|
117
|
-
|
|
118
|
-
Get primary zone configuration for outgoing zone transfers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`get`,describe:`Primary Zone Configuration Details`,builder:pt,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.dns.zoneTransfers.outgoing.get({zone_id:r}));o(a,{successLabel:`Loaded`})})};function ht(e){return e.usage(`$0 dns zone-transfers outgoing status get
|
|
119
|
-
|
|
120
|
-
Get primary zone transfer status.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gt={command:`get`,describe:`Get Outgoing Zone Transfer Status`,builder:ht,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.dns.zoneTransfers.outgoing.status.get({zone_id:r}));o(a,{successLabel:`Loaded`})})},_t={command:`status`,describe:`Operations for zone-transfers.outgoing.status`,builder:e=>e.command(gt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function vt(e){return e.usage(`$0 dns zone-transfers outgoing update
|
|
121
|
-
|
|
122
|
-
Update primary zone configuration for outgoing zone transfers.`).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 yt={command:`update`,describe:`Update Primary Zone Configuration`,builder:vt,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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.dns.zoneTransfers.outgoing.update({body:n,zone_id:r}));o(i,{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 a=f({name:p(e.name,`name`,`text`),peers:e.peers}),l=await c(`Updating`,async()=>t.dns.zoneTransfers.outgoing.update({body:a,zone_id:r}));o(l,{successLabel:`Updated`})})},bt={command:`outgoing`,describe:`Operations for zone-transfers.outgoing`,builder:e=>e.command(it).command(ot).command(ct).command(ut).command(ft).command(mt).command(yt).command(_t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xt(e){return e.usage(`$0 dns zone-transfers peers create
|
|
123
|
-
|
|
124
|
-
Create Peer.`).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 St={command:`create`,describe:`Create Peer`,builder:xt,handler:async t=>l({command:`dns zone-transfers peers create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers peers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/peers`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.dns.zoneTransfers.peers.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await h(`name`,`The name of the peer.`));let d=f({name:p(t.name,`name`,`text`)}),m=await c(`Creating`,async()=>i.dns.zoneTransfers.peers.create({...d,account_id:l}));o(m,{successLabel:`Created`})})};function Ct(e){return e.usage(`$0 dns zone-transfers peers delete <peer-id>
|
|
125
|
-
|
|
126
|
-
Delete Peer.`).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 wt={command:`delete <peer-id>`,describe:`Delete Peer`,builder:Ct,handler:async t=>l({command:`dns zone-transfers peers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers peers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/peers/${t[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(t[`peer-id`]))}`,pathParams:{"peer-id":String(t[`peer-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
|
|
127
|
-
`);return}let u=await c(`Deleting`,async()=>i.dns.zoneTransfers.peers.delete({account_id:l,peer_id:t[`peer-id`]}));o(u,{successLabel:`Deleted`})})};function Tt(e){return e.usage(`$0 dns zone-transfers peers get <peer-id>
|
|
128
|
-
|
|
129
|
-
Get Peer.`).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 Et={command:`get <peer-id>`,describe:`Peer Details`,builder:Tt,handler:async t=>l({command:`dns zone-transfers peers get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers peers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/peers/${t[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(t[`peer-id`]))}`,pathParams:{"peer-id":String(t[`peer-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.dns.zoneTransfers.peers.get({account_id:l,peer_id:t[`peer-id`]}));o(u,{successLabel:`Loaded`})})};function Dt(e){return e.usage(`$0 dns zone-transfers peers list
|
|
130
|
-
|
|
131
|
-
List Peers.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ot={command:`list`,describe:`List Peers`,builder:Dt,handler:async t=>l({command:`dns zone-transfers peers list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers peers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/peers`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.dns.zoneTransfers.peers.list({account_id:l}));o(u,{successLabel:`Loaded`})})};function kt(e){return e.usage(`$0 dns zone-transfers peers update <peer-id>
|
|
132
|
-
|
|
133
|
-
Modify Peer.`).positional(`peer-id`,{type:`string`,description:`Peer ID`,demandOption:!0}).option(`ip`,{type:`string`,description:`IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to.`}).option(`ixfr-enable`,{type:`boolean`,description:`Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones.`}).option(`name`,{type:`string`,description:`The name of the peer.`}).option(`port`,{type:`number`,description:`DNS port of primary or secondary nameserver, depending on what zone this peer is linked to.`}).option(`tsig-id`,{type:`string`,description:`TSIG authentication will be used for zone transfer if configured.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const At={command:`update <peer-id>`,describe:`Update Peer`,builder:kt,handler:async t=>l({command:`dns zone-transfers peers update`,classification:{safeFlags:[`ixfr-enable`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers peers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/peers/${t[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(t[`peer-id`]))}`,pathParams:{"peer-id":String(t[`peer-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({ip:p(t.ip,`ip`,`text`),ixfr_enable:t[`ixfr-enable`],name:p(t.name,`name`,`text`),port:t.port,tsig_id:p(t[`tsig-id`],`tsig-id`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.dns.zoneTransfers.peers.update({body:e,account_id:l,peer_id:t[`peer-id`]}));o(n,{successLabel:`Updated`});return}t.name===void 0&&(t.name=await h(`name`,`The name of the peer.`));let d=f({ip:p(t.ip,`ip`,`text`),ixfr_enable:t[`ixfr-enable`],name:p(t.name,`name`,`text`),port:t.port,tsig_id:p(t[`tsig-id`],`tsig-id`,`text`)}),m=await c(`Updating`,async()=>i.dns.zoneTransfers.peers.update({body:d,account_id:l,peer_id:t[`peer-id`]}));o(m,{successLabel:`Updated`})})},jt={command:`peers`,describe:`Operations for zone-transfers.peers`,builder:e=>e.command(St).command(wt).command(Et).command(Ot).command(At).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Mt(e){return e.usage(`$0 dns zone-transfers tsigs create
|
|
134
|
-
|
|
135
|
-
Create TSIG.`).option(`algo`,{type:`string`,description:`TSIG algorithm.`}).option(`name`,{type:`string`,description:`TSIG key name.`}).option(`secret`,{type:`string`,description:`TSIG secret.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Nt={command:`create`,describe:`Create TSIG`,builder:Mt,handler:async t=>l({command:`dns zone-transfers tsigs create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}):u(t.body),sensitiveBodyPaths:[[`secret`]]});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:e,account_id:l}));o(n,{successLabel:`Created`});return}t.algo===void 0&&(t.algo=await h(`algo`,`TSIG algorithm.`)),t.name===void 0&&(t.name=await h(`name`,`TSIG key name.`)),t.secret===void 0&&(t.secret=await h(`secret`,`TSIG secret.`,{kind:`secret`}));let d=f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}),m=await c(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:d,account_id:l}));o(m,{successLabel:`Created`})})};function $(e){return e.usage(`$0 dns zone-transfers tsigs delete <tsig-id>
|
|
136
|
-
|
|
137
|
-
Delete TSIG.`).positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Pt={command:`delete <tsig-id>`,describe:`Delete TSIG`,builder:$,handler:async t=>l({command:`dns zone-transfers tsigs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs/${t[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(t[`tsig-id`]))}`,pathParams:{"tsig-id":String(t[`tsig-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await g({force:!!t.force})){process.stderr.write(`Aborted.
|
|
138
|
-
`);return}let u=await c(`Deleting`,async()=>i.dns.zoneTransfers.tsigs.delete({account_id:l,tsig_id:t[`tsig-id`]}));o(u,{successLabel:`Deleted`})})};function Ft(e){return e.usage(`$0 dns zone-transfers tsigs get <tsig-id>
|
|
139
|
-
|
|
140
|
-
Get TSIG.`).positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const It={command:`get <tsig-id>`,describe:`TSIG Details`,builder:Ft,handler:async t=>l({command:`dns zone-transfers tsigs get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs/${t[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(t[`tsig-id`]))}`,pathParams:{"tsig-id":String(t[`tsig-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.dns.zoneTransfers.tsigs.get({account_id:l,tsig_id:t[`tsig-id`]}));o(u,{successLabel:`Loaded`})})};function Lt(e){return e.usage(`$0 dns zone-transfers tsigs list
|
|
141
|
-
|
|
142
|
-
List TSIGs.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Rt={command:`list`,describe:`List TSIGs`,builder:Lt,handler:async t=>l({command:`dns zone-transfers tsigs list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.dns.zoneTransfers.tsigs.list({account_id:l}));o(u,{successLabel:`Loaded`})})};function zt(e){return e.usage(`$0 dns zone-transfers tsigs update <tsig-id>
|
|
143
|
-
|
|
144
|
-
Modify TSIG.`).positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`algo`,{type:`string`,description:`TSIG algorithm.`}).option(`name`,{type:`string`,description:`TSIG key name.`}).option(`secret`,{type:`string`,description:`TSIG secret.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Bt={command:`update <tsig-id>`,describe:`Update TSIG`,builder:zt,handler:async t=>l({command:`dns zone-transfers tsigs update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf dns zone-transfers tsigs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/secondary_dns/tsigs/${t[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(t[`tsig-id`]))}`,pathParams:{"tsig-id":String(t[`tsig-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}):u(t.body),sensitiveBodyPaths:[[`secret`]]});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:e,account_id:l,tsig_id:t[`tsig-id`]}));o(n,{successLabel:`Updated`});return}t.algo===void 0&&(t.algo=await h(`algo`,`TSIG algorithm.`)),t.name===void 0&&(t.name=await h(`name`,`TSIG key name.`)),t.secret===void 0&&(t.secret=await h(`secret`,`TSIG secret.`,{kind:`secret`}));let d=f({algo:p(t.algo,`algo`,`text`),name:p(t.name,`name`,`text`),secret:p(t.secret,`secret`,`text`)}),m=await c(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:d,account_id:l,tsig_id:t[`tsig-id`]}));o(m,{successLabel:`Updated`})})},Vt={command:`tsigs`,describe:`Operations for zone-transfers.tsigs`,builder:e=>e.command(Nt).command(Pt).command(It).command(Rt).command(Bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ht={command:`zone-transfers`,describe:`Operations for zone-transfers`,builder:e=>e.command(We).command(qe).command(nt).command(bt).command(jt).command(Vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ut={command:`dns`,describe:`dns`,builder:e=>e.command(D).command(re).command(ke).command(Ne).command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ut as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";function c(e){return e.usage(`$0 durable-objects namespaces list
|
|
3
|
-
|
|
4
|
-
Returns the Durable Object namespaces owned by an account.`).option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`List Durable Object Namespaces`,builder:c,handler:async c=>s({command:`durable-objects namespaces list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf durable-objects namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/durable_objects/namespaces`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.durableObjects.namespaces.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function u(e){return e.usage(`$0 durable-objects namespaces objects list
|
|
5
|
-
|
|
6
|
-
Returns the Durable Objects in a given Durable Object namespace.`).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 d={command:`list`,describe:`List Objects in a Durable Object namespace`,builder:u,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){let e=await n();a({command:`cf durable-objects namespaces objects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.durableObjects.namespaces.objects.list({account_id:u,id:c.id,...s}));i(d,{successLabel:`Loaded`})})},f={command:`objects`,describe:`Operations for namespaces.objects`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},p={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(l).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`durable-objects`,describe:`durable-objects`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";function c(e){return e.usage("$0 email-auth dmarc-reports edit\n\nUpdates the DMARC report configuration for a zone. At least one of `enabled` or `skip_wizard` must be provided. When enabling, the handler will ensure the DMARC RUA record exists in DNS.").option(`enabled`,{type:`boolean`,description:`Enable or disable DMARC reports for this zone`}).option(`skip-wizard`,{type:`boolean`,description:`Skip the DMARC setup wizard`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for PATCH /dmarc-reports`})}const l={command:`edit`,describe:`Configure DMARC Reports`,builder:c,handler:async c=>a({command:`email-auth dmarc-reports edit`,classification:{safeFlags:[`enabled`,`skip-wizard`,`dry-run`]}},c,async()=>{if(c.dryRun){r({command:`cf email-auth dmarc-reports edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({enabled:c.enabled,skip_wizard:c[`skip-wizard`]}):o(c.body)});return}let a=await e(c),l=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=l,c.body){let e=o(c.body),t=await i(`Updating`,async()=>a.emailAuth.dmarcReports.edit({...e,zone_id:l}));n(t,{successLabel:`Updated`});return}let u=s({enabled:c.enabled,skip_wizard:c[`skip-wizard`]}),d=await i(`Updating`,async()=>a.emailAuth.dmarcReports.edit({...u,zone_id:l}));n(d,{successLabel:`Updated`})})};function u(e){return e.usage(`$0 email-auth dmarc-reports get
|
|
3
|
-
|
|
4
|
-
Retrieves the current DMARC report configuration and status for a zone. Returns the RUA prefix, enabled status, approved sources, and DNS records.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get DMARC Report Status`,builder:u,handler:async o=>a({command:`email-auth dmarc-reports get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf email-auth dmarc-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.emailAuth.dmarcReports.get({zone_id:s}));n(c,{successLabel:`Loaded`})})},f={command:`dmarc-reports`,describe:`Operations for dmarc-reports`,builder:e=>e.command(l).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function p(e){return e.usage(`$0 email-auth spf inspect
|
|
5
|
-
|
|
6
|
-
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`).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:`Inspect SPF Record`,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 e(o),c=await t({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c;let l=await i(`Loading`,async()=>s.emailAuth.spf.inspect({zone_id:c,...a}));n(l,{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,45 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,i as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-C8FyienX.mjs";import{t as g}from"./cli-types-9oYmRTHJ.mjs";function _(e){return e.usage(`$0 email-routing addresses create
|
|
3
|
-
|
|
4
|
-
Create a destination address to forward your emails to. Destination addresses need to be verified before they can be used.`).option(`email`,{type:`string`,description:`The contact email address of the user.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`create`,describe:`Create a destination address`,builder:_,handler:async r=>c({command:`email-routing addresses create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf email-routing addresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/routing/addresses`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({email:f(r.email,`email`,`text`)}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.emailRouting.addresses.create({...e,account_id:u}));a(t,{successLabel:`Created`});return}r.email===void 0&&(r.email=await p(`email`,`The contact email address of the user.`));let m=d({email:f(r.email,`email`,`text`)}),h=await s(`Creating`,async()=>c.emailRouting.addresses.create({...m,account_id:u}));a(h,{successLabel:`Created`})})};function y(e){return e.usage(`$0 email-routing addresses delete <destination-address-identifier>
|
|
5
|
-
|
|
6
|
-
Deletes a specific destination address.`).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 b={command:`delete <destination-address-identifier>`,describe:`Delete destination address`,builder:y,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){let e=await n();o({command:`cf email-routing addresses delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(r),l=r.local?e:await i();if(r.accountId=l,!await h({force:!!r.force,message:`This operation permanently deletes a destination address.`})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}let u=await s(`Deleting`,async()=>c.emailRouting.addresses.delete({account_id:l,destination_address_identifier:r[`destination-address-identifier`]}));a(u,{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 email-routing addresses get <destination-address-identifier>
|
|
8
|
-
|
|
9
|
-
Gets information for a specific destination email already created.`).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 S={command:`get <destination-address-identifier>`,describe:`Get a destination address`,builder:x,handler:async r=>c({command:`email-routing addresses get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf email-routing addresses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.emailRouting.addresses.get({account_id:l,destination_address_identifier:r[`destination-address-identifier`]}));a(u,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 email-routing addresses list
|
|
10
|
-
|
|
11
|
-
Lists destination addresses configured for Email Routing in an account.`).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 w={command:`list`,describe:`List destination addresses`,builder:g(C),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){let e=await n();o({command:`cf email-routing addresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/routing/addresses`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Loading`,async()=>l.emailRouting.addresses.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 email-routing addresses update <destination-address-identifier>
|
|
12
|
-
|
|
13
|
-
Updates the status of a specific destination address.`).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`]}).coerce(`status`,e=>f(e,`status`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`update <destination-address-identifier>`,describe:`Update destination address`,builder:T,handler:async r=>c({command:`email-routing addresses update`,classification:{safeFlags:[`status`,`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf email-routing addresses update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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:r.status}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Updating`,async()=>c.emailRouting.addresses.update({...e,account_id:u,destination_address_identifier:r[`destination-address-identifier`]}));a(t,{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 f=d({status:r.status}),p=await s(`Updating`,async()=>c.emailRouting.addresses.update({...f,account_id:u,destination_address_identifier:r[`destination-address-identifier`]}));a(p,{successLabel:`Updated`})})},D={command:`addresses`,describe:`Verified destination email addresses that can receive forwarded mail`,builder:e=>e.command(v).command(b).command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 email-routing disable
|
|
14
|
-
|
|
15
|
-
Disable your Email Routing zone. Also removes additional MX records previously required for Email Routing to work.`).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 k={command:`disable`,describe:`Disable Email Routing`,builder:O,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:`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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,!await h({force:!!e.force,message:`This operation disables Email Routing and removes its DNS records.`})){process.stderr.write(`Aborted.
|
|
16
|
-
`);return}if(e.body){let t=l(e.body),r=await s(`Deleting`,async()=>n.emailRouting.disable({body:t,zone_id:i}));a(r,{successLabel:`Deleted`});return}let c=d({name:f(e.name,`name`,`text`)}),u=await s(`Deleting`,async()=>n.emailRouting.disable({body:c,zone_id:i}));a(u,{successLabel:`Deleted`})})};function A(e){return e.usage(`$0 email-routing dns get
|
|
17
|
-
|
|
18
|
-
Show the DNS records needed to configure your Email Routing zone.`).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 j={command:`get`,describe:`Email Routing - DNS settings`,builder:A,handler:async e=>c({command:`email-routing dns get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={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:n,bodyKind:`none`});return}let i=await t(e),c=await r({zone:e.zone},i,{quiet:e.quiet});e.zoneId=c;let l=await s(`Loading`,async()=>i.emailRouting.dns.get({zone_id:c,...n}));a(l,{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 email-routing dns unlock
|
|
19
|
-
|
|
20
|
-
Unlock MX Records previously locked by Email Routing.`).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 N={command:`unlock`,describe:`Unlock Email Routing DNS records`,builder:M,handler:async e=>c({command:`email-routing dns unlock`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing dns unlock`,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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.emailRouting.dns.unlock({body:t,zone_id:i}));a(r,{successLabel:`Updated`});return}let c=d({name:f(e.name,`name`,`text`)}),u=await s(`Updating`,async()=>n.emailRouting.dns.unlock({body:c,zone_id:i}));a(u,{successLabel:`Updated`})})},P={command:`dns`,describe:`Inspect or unlock the DNS records required by Email Routing`,builder:e=>e.command(j).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 email-routing enable
|
|
21
|
-
|
|
22
|
-
Enable your Email Routing zone. Add and lock the necessary MX and SPF records.`).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 I={command:`enable`,describe:`Enable Email Routing`,builder:F,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/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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.emailRouting.enable({body:t,zone_id:i}));a(r,{successLabel:`Created`});return}let c=d({name:f(e.name,`name`,`text`)}),u=await s(`Creating`,async()=>n.emailRouting.enable({body:c,zone_id:i}));a(u,{successLabel:`Created`})})};function L(e){return e.usage(`$0 email-routing rules catch-all get
|
|
23
|
-
|
|
24
|
-
Get information on the default catch-all routing rule.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get`,describe:`Get catch-all rule`,builder:L,handler:async e=>c({command:`email-routing rules catch-all get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing rules catch-all 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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.emailRouting.rules.catchAll.get({zone_id:i}));a(c,{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 email-routing rules catch-all update
|
|
25
|
-
|
|
26
|
-
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.`).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`]}).coerce(`source`,e=>f(e,`source`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`update`,describe:`Update catch-all rule`,builder:R,handler:async e=>c({command:`email-routing rules catch-all update`,classification:{safeFlags:[`enabled`,`source`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing rules catch-all 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:e.source}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.emailRouting.rules.catchAll.update({...t,zone_id:i}));a(r,{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:e.source}),p=await s(`Updating`,async()=>n.emailRouting.rules.catchAll.update({...c,zone_id:i}));a(p,{successLabel:`Updated`})})},B={command:`catch-all`,describe:`Operations for rules.catch-all`,builder:e=>e.command(ee).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 email-routing rules create
|
|
27
|
-
|
|
28
|
-
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.`).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`}).coerce(`source`,e=>f(e,`source`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`create`,describe:`Create routing rule`,builder:V,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:e.source}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.emailRouting.rules.create({...t,zone_id:i}));a(r,{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:e.source}),p=await s(`Creating`,async()=>n.emailRouting.rules.create({...c,zone_id:i}));a(p,{successLabel:`Created`})})};function U(e){return e.usage(`$0 email-routing rules delete <rule-identifier>
|
|
29
|
-
|
|
30
|
-
Deletes a routing rule so matching incoming messages are no longer forwarded by it.`).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 W={command:`delete <rule-identifier>`,describe:`Delete routing rule`,builder:U,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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,!await h({force:!!e.force,message:`This operation permanently deletes an Email Routing rule.`})){process.stderr.write(`Aborted.
|
|
31
|
-
`);return}let c=await s(`Deleting`,async()=>n.emailRouting.rules.delete({zone_id:i,rule_identifier:e[`rule-identifier`]}));a(c,{successLabel:`Deleted`})})};function G(e){return e.usage(`$0 email-routing rules get <rule-identifier>
|
|
32
|
-
|
|
33
|
-
Get information for a specific routing rule already created.`).positional(`rule-identifier`,{type:`string`,description:`Routing rule identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <rule-identifier>`,describe:`Get routing rule`,builder:G,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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.emailRouting.rules.get({zone_id:i,rule_identifier:e[`rule-identifier`]}));a(c,{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 email-routing rules list-account
|
|
34
|
-
|
|
35
|
-
Lists existing routing rules across all zones in the account or zone.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`enabled`,{type:`string`,description:`Filter by enabled routing rules.`,choices:[`true`,`false`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list-account`,describe:`List account or zone routing rules`,builder:g(q),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 t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.emailRouting.rules.listAccount({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 email-routing rules plan
|
|
36
|
-
|
|
37
|
-
Computes the Email Routing rule changes that would be needed to reconcile a Wrangler-managed desired ruleset. This endpoint is read-only and does not create, update, or delete rules.`).option(`catch-all-rules`,{type:`string`,description:`Desired catch-all Email Routing rules managed by the deploying Worker. Provide as a JSON array of objects or @path/to/file.json.`}).option(`owner-worker-tag`,{type:`string`,description:"Public tag (script_tag) of the Worker that owns this rule. Required when\n`source` is `wrangler`.\n"}).option(`rules`,{type:`string`,description:`Desired normal Email Routing rules managed by the deploying Worker. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const X={command:`plan`,describe:`Plan account routing rule changes`,builder:Y,handler:async r=>c({command:`email-routing rules plan`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf email-routing rules plan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(r),m=r.local?e:await i();if(r.accountId=m,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.emailRouting.rules.plan({...e,account_id:m}));a(t,{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`)}),g=await s(`Creating`,async()=>c.emailRouting.rules.plan({...h,account_id:m}));a(g,{successLabel:`Created`})})};function Z(e){return e.usage(`$0 email-routing rules update <rule-identifier>
|
|
38
|
-
|
|
39
|
-
Update actions and matches, or enable/disable specific routing rules. Forward actions require exactly one verified destination address.`).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`]}).coerce(`source`,e=>f(e,`source`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Q={command:`update <rule-identifier>`,describe:`Update routing rule`,builder:Z,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:e.source}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.emailRouting.rules.update({...t,zone_id:i,rule_identifier:e[`rule-identifier`]}));a(r,{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:e.source}),p=await s(`Updating`,async()=>n.emailRouting.rules.update({...c,zone_id:i,rule_identifier:e[`rule-identifier`]}));a(p,{successLabel:`Updated`})})},$={command:`rules`,describe:`Match incoming email addresses and forward messages to destination mailboxes or Workers`,builder:e=>e.command(H).command(W).command(K).command(J).command(X).command(Q).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.usage(`$0 email-routing settings apply
|
|
40
|
-
|
|
41
|
-
Apply the provided settings to your Email Routing zone. Omitted settings retain their current values, as with PATCH.`).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 ne={command:`apply`,describe:`Apply Email Routing settings`,builder:te,handler:async e=>c({command:`email-routing settings apply`,classification:{safeFlags:[`enabled`,`skip-wizard`,`support-subaddress`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing settings apply`,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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.emailRouting.settings.apply({...t,zone_id:i}));a(r,{successLabel:`Updated`});return}let c=d({enabled:e.enabled,skip_wizard:e[`skip-wizard`],support_subaddress:e[`support-subaddress`]}),u=await s(`Updating`,async()=>n.emailRouting.settings.apply({...c,zone_id:i}));a(u,{successLabel:`Updated`})})};function re(e){return e.usage(`$0 email-routing settings get
|
|
42
|
-
|
|
43
|
-
Get information about the settings for your Email Routing zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get`,describe:`Get Email Routing settings`,builder:re,handler:async e=>c({command:`email-routing settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing settings 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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.emailRouting.settings.get({zone_id:i}));a(c,{successLabel:`Loaded`})})};function ae(e){return e.usage(`$0 email-routing settings update
|
|
44
|
-
|
|
45
|
-
Update the settings for your Email Routing zone.`).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 oe={command:`update`,describe:`Update Email Routing settings`,builder:ae,handler:async e=>c({command:`email-routing settings update`,classification:{safeFlags:[`enabled`,`skip-wizard`,`support-subaddress`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf email-routing settings update`,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 n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.emailRouting.settings.update({...t,zone_id:i}));a(r,{successLabel:`Updated`});return}let c=d({enabled:e.enabled,skip_wizard:e[`skip-wizard`],support_subaddress:e[`support-subaddress`]}),u=await s(`Updating`,async()=>n.emailRouting.settings.update({...c,zone_id:i}));a(u,{successLabel:`Updated`})})},se={command:`settings`,describe:`Inspect and update Email Routing settings`,builder:e=>e.command(ne).command(ie).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ce={command:`email-routing`,describe:`Route incoming email to verified destination addresses or Workers with routing rules, catch-all behavior, and managed DNS records`,builder:e=>e.command(k).command(I).command(D).command(P).command($).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ce as default};
|