cf 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -5
- package/dist/_meta/agent-context.json +12 -4
- package/dist/_meta/commands.json +2249 -262
- package/dist/_meta/hand-written-commands.json +784 -0
- package/dist/_meta/schemas.json +1882 -155
- package/dist/{abuse-reports-CGF4zcKf.mjs → abuse-reports-sDBTV0qZ.mjs} +2 -2
- package/dist/{access-lhLJo1v2.mjs → access-DcNzuCue.mjs} +1 -1
- package/dist/account-BX90zXn5.mjs +2 -0
- package/dist/{account-tags-B88TotoH.mjs → account-tags-Bz3JG5hI.mjs} +4 -4
- package/dist/{accounts-BSIAT_iP.mjs → accounts-DCuW3xyZ.mjs} +12 -12
- package/dist/{acm-VULm1djv.mjs → acm-zjfShZLS.mjs} +1 -1
- package/dist/{addressing-BHPBIkRY.mjs → addressing-DORQ64Ux.mjs} +11 -11
- package/dist/{agent-context-KBy48G1b.mjs → agent-context-BgPR_aQr.mjs} +1 -1
- package/dist/agent-memory-C0hAUMeC.mjs +6 -0
- package/dist/ai-BpEBGMT2.mjs +5 -0
- package/dist/ai-audit-DnU3vn3E.mjs +2 -0
- package/dist/ai-gateway-COOrr_Yw.mjs +13 -0
- package/dist/ai-search-DKbN9Tyd.mjs +7 -0
- package/dist/ai-security-C_I5lo58.mjs +4 -0
- package/dist/{alerting-Bl8OqViR.mjs → alerting-4T8gmZs-.mjs} +1 -1
- package/dist/analytics-Bxh4TCP7.mjs +3 -0
- package/dist/analytics_engine-fV56bjVN.mjs +2 -0
- package/dist/{api-security-4FVrD4n8.mjs → api-security-COk_i184.mjs} +20 -20
- package/dist/argo-DIRfvxvv.mjs +2 -0
- package/dist/{artifacts-CVDGnr2V.mjs → artifacts-BBfXNfUg.mjs} +1 -1
- package/dist/audit-logs-BlOrlAWe.mjs +2 -0
- package/dist/{auth-MQEamPN9.mjs → auth-D3X9HYhD.mjs} +3 -3
- package/dist/auth-DPhNN3Ly.mjs +5 -0
- package/dist/billing-B9e4PnvN.mjs +3 -0
- package/dist/body-parser-BshbixEq.mjs +2 -0
- package/dist/bot-management-D2JVeS-V.mjs +5 -0
- package/dist/botnet-feed-BTzTYs5d.mjs +3 -0
- package/dist/brand-protection-C5Q6Gpw9.mjs +3 -0
- package/dist/{browser-extension-BtpCbh-2.mjs → browser-extension-u5uA0Lwk.mjs} +1 -1
- package/dist/browser-run-CHGOCTdG.mjs +4 -0
- package/dist/build-D0FhOj40.mjs +8 -0
- package/dist/{cache-VyWK1SjY.mjs → cache-C6V7PbQM.mjs} +1 -1
- package/dist/{calls-BxoRYxs4.mjs → calls-Bye8Tyy-.mjs} +1 -1
- package/dist/certificate-authorities-B-U_e6JJ.mjs +2 -0
- package/dist/cf-Ds4JFovl.mjs +18 -0
- package/dist/chunk-LQW53VED-22IYZovK.mjs +119 -0
- package/dist/chunk-QBZBEHZB-CKzQKcIp.mjs +2 -0
- package/dist/{client-certificates-DDUv8K0a.mjs → client-certificates-3RrC-6LG.mjs} +1 -1
- package/dist/{client-side-security-D4ysjwWT.mjs → client-side-security-DIdKvRMT.mjs} +1 -1
- package/dist/cloud-connector-CL1jPQud.mjs +2 -0
- package/dist/cloudforce-one-DULeqLkR.mjs +36 -0
- package/dist/command-C9VP3xaA.mjs +2 -0
- package/dist/{completions-BHE4pRjB.mjs → completions-CqgGKRAC.mjs} +3 -3
- package/dist/config.d.mts +1460 -1348
- package/dist/config.mjs +1 -1
- package/dist/connector-interrupts-CXlLObDv.mjs +2 -0
- package/dist/connector-telemetry-events-BrYX4ig4.mjs +2 -0
- package/dist/connector-telemetry-snapshots-BdeBQYcM.mjs +2 -0
- package/dist/{connectors-BqxYMMtQ.mjs → connectors-BQwyBJ4_.mjs} +1 -1
- package/dist/{containers-CKW081JA.mjs → containers-BrQtGiNp.mjs} +12 -8
- package/dist/{content-scan-Dgd7A8KF.mjs → content-scan-DNzhXYkY.mjs} +1 -1
- package/dist/{csamScanner-DYL37wLc.mjs → csamScanner-CFq5s1Q3.mjs} +1 -1
- package/dist/{ct-alerting-CkhSbfAs.mjs → ct-alerting-CH6UmsGQ.mjs} +1 -1
- package/dist/custom-certificates-DnG73Wg2.mjs +5 -0
- package/dist/custom-csrs-bhClr2SU.mjs +3 -0
- package/dist/{custom-hostnames-q_nsnlye.mjs → custom-hostnames-C0eiGvG9.mjs} +1 -1
- package/dist/custom-nameservers-CVMhhLm6.mjs +3 -0
- package/dist/custom-pages-DTINMR30.mjs +3 -0
- package/dist/d1-sKdExJYF.mjs +20 -0
- package/dist/data-security-mV3a6UfW.mjs +7 -0
- package/dist/dcv-delegation-dBu3jdRw.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-CZ7bgNDu.mjs → deploy-BL59O1O1.mjs} +1 -1
- package/dist/deploy-input-Dz6q-__n.mjs +2 -0
- package/dist/{dev-V10MG-Bg.mjs → dev-BDaavgH1.mjs} +2 -2
- package/dist/{diagnostics-BTH-8nJH.mjs → diagnostics-CJV6qWUA.mjs} +1 -1
- package/dist/{directory-BlH6N6Qy.mjs → directory-B5zCMusW.mjs} +1 -1
- package/dist/{dispatch-namespaces-BCjH1JzB.mjs → dispatch-namespaces-Dg5lu5xX.mjs} +1 -1
- package/dist/dist-BHi7UhXO.mjs +72 -0
- package/dist/dist-BWpErtDM.mjs +384 -0
- package/dist/{dls-BF5iN78p.mjs → dls-t0hnIe_P.mjs} +1 -1
- package/dist/{dns-CeCTNqRk.mjs → dns-C8FC2hbh.mjs} +13 -13
- package/dist/{dns-firewall-B54MaLGm.mjs → dns-firewall-CuhhUm55.mjs} +1 -1
- package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-wwGHcwAa.mjs} +1 -1
- package/dist/dry-run-DL2V6yFm.mjs +2 -0
- package/dist/durable-objects-BLrgM3Cw.mjs +2 -0
- package/dist/email-auth-BmYrl0pO.mjs +2 -0
- package/dist/email-routing-CF3_Z957.mjs +6 -0
- package/dist/email-security-F7OYcMkZ.mjs +18 -0
- package/dist/email-sending-EyU3WvGQ.mjs +7 -0
- package/dist/fieldExtractors-Cno37T2m.mjs +3 -0
- package/dist/{firewall-CBPGJ43p.mjs → firewall-8YWWy4iB.mjs} +9 -9
- package/dist/flagship-C4x0l-8J.mjs +4 -0
- package/dist/{fraud-BIhS8pLf.mjs → fraud-HR_SdUx3.mjs} +1 -1
- package/dist/google-tag-gateway-BdcS0WnX.mjs +2 -0
- package/dist/{healthchecks-FiXIk-KP.mjs → healthchecks-4qOvjrTN.mjs} +1 -1
- package/dist/{hostnames-Bx0mykMR.mjs → hostnames-DehdYOMz.mjs} +1 -1
- package/dist/{hyperdrive-C8qCabBF.mjs → hyperdrive-3gD3hn70.mjs} +1 -1
- package/dist/iam-DR72hmii.mjs +6 -0
- package/dist/images-CeKc5JPh.mjs +8 -0
- package/dist/index.mjs +1 -1
- package/dist/{intel-B-9Z_sJs.mjs → intel-DtFix9WL.mjs} +1 -1
- package/dist/{interactive-DtsCYfrK.mjs → interactive-C7M55Wxx.mjs} +1 -1
- package/dist/ips-CtWCjXAN.mjs +2 -0
- package/dist/{keyless-certificates-THHvoXX3.mjs → keyless-certificates-Dk24yQFz.mjs} +1 -1
- package/dist/keys-BmhG6Kn1.mjs +2 -0
- package/dist/{kv-BFDUCnft.mjs → kv-BuVPAuZP.mjs} +1 -1
- package/dist/{leaked-credential-checks-DUlUCOoJ.mjs → leaked-credential-checks-XcZmt1I-.mjs} +1 -1
- package/dist/load-balancers-CylN-l7n.mjs +6 -0
- package/dist/{local-D-aVNu6A.mjs → local-Be3lg_9E.mjs} +1 -1
- package/dist/{local-runtime-Dh3keC5v.mjs → local-runtime-Ce7k598H.mjs} +1 -1
- package/dist/logexplorer-CvRPoKbj.mjs +17 -0
- package/dist/logo-matches-Heuft3yF.mjs +2 -0
- package/dist/logos-DRYjGBDq.mjs +3 -0
- package/dist/{logpush-BK34mMQs.mjs → logpush-Dve9jOMp.mjs} +1 -1
- package/dist/{logs-CLAqX9h2.mjs → logs-SC86FE89.mjs} +1 -1
- package/dist/{magic-cloud-networking-h_ozrC5S.mjs → magic-cloud-networking-DXzeqwX-.mjs} +4 -4
- package/dist/magic-network-monitoring-DW0Jl74i.mjs +4 -0
- package/dist/magic-transit-BK_3asH2.mjs +111 -0
- package/dist/managed-transforms-B6TV4qoE.mjs +3 -0
- package/dist/matches-Iss9Fo4R.mjs +2 -0
- package/dist/mcp-8wxXT6JU.mjs +4 -0
- package/dist/mesh-Bf9UAS4J.mjs +4 -0
- package/dist/{moq-qmuVPAO0.mjs → moq-ZKMFOeVz.mjs} +1 -1
- package/dist/mtls-certificates-DoWm6GiE.mjs +3 -0
- package/dist/{network-D74cSy3t.mjs → network-B1lBARU9.mjs} +1 -1
- package/dist/{network-interconnects-BJ0Nc48J.mjs → network-interconnects-CLYIFHfU.mjs} +1 -1
- package/dist/oauth-DuEONNgC.mjs +14 -0
- package/dist/{oauth-clients-Br-smLxQ.mjs → oauth-clients-DgiTzLzu.mjs} +1 -1
- package/dist/oauth-scopes-BOBRMxjm.mjs +2 -0
- package/dist/observability-Jya7-zkl.mjs +4 -0
- package/dist/{open-PBXRGS4R-R-qesf18.mjs → open-PBXRGS4R-CX8K4WYl.mjs} +3 -3
- package/dist/{organization-NX7yCZrq.mjs → organization-CYxYV4e0.mjs} +6 -6
- package/dist/organizations-SacGUW44.mjs +2 -0
- package/dist/origin-ca-certificates-Ph1bJGQ1.mjs +3 -0
- package/dist/origin-post-quantum-encryption-BBLiGAGB.mjs +2 -0
- package/dist/origin-tls-client-auth-DSDgTN2X.mjs +4 -0
- package/dist/{output-DrpYYfnB.mjs → output-Ccqw2WOb.mjs} +1 -1
- package/dist/page-rules-BqEyFR2c.mjs +27 -0
- package/dist/pages-CQ7ZVWk1.mjs +14 -0
- package/dist/pay-per-crawl-BMe_3_Qj.mjs +4 -0
- package/dist/pipelines-6De2Pe2C.mjs +6 -0
- package/dist/precursor-iwK-1P_d.mjs +4 -0
- package/dist/progress-BqQcF5QH.mjs +2 -0
- package/dist/project-settings-C_1-JI6Y.mjs +3 -0
- package/dist/prompt-B0sWIs9c.mjs +3 -0
- package/dist/{public-BwQqexwo-CNW_dPly.mjs → public-BYCVISMH-DnMJ5Jct.mjs} +1 -1
- package/dist/queries-c7zvnfEQ.mjs +3 -0
- package/dist/queues-BU6y16qS.mjs +6 -0
- package/dist/r2-Jo3QMahK.mjs +24 -0
- package/dist/{r2-data-catalog-Du7hN9jA.mjs → r2-data-catalog-B-tw-JdG.mjs} +1 -1
- package/dist/radar-DIYAMEof.mjs +2 -0
- package/dist/{rate-limits-yBF3qoYD.mjs → rate-limits-DewOcznT.mjs} +1 -1
- package/dist/raw-fetch-Cc-MjHeL.mjs +2 -0
- package/dist/{realtimekit-CIP7lP-a.mjs → realtimekit-cnZEVNDn.mjs} +1 -1
- package/dist/registrar-BsWr_aPM.mjs +23 -0
- package/dist/{registrar-sandbox-DiXg8p_1.mjs → registrar-sandbox-BlcpUyIH.mjs} +4 -4
- package/dist/{registry-Bck_zFkz.mjs → registry-jifR3_Y6.mjs} +1 -1
- package/dist/reporting--1AyTV7k.mjs +2 -0
- package/dist/request-tracers-C_VX7X6-.mjs +2 -0
- package/dist/{resource-sharing-D1pSDvtf.mjs → resource-sharing-Br5dqr3o.mjs} +1 -1
- package/dist/resource-tagging-C33U6T74.mjs +2 -0
- package/dist/rules-BfjzALMi.mjs +4 -0
- package/dist/rulesets-3i_1Vwt-.mjs +5 -0
- package/dist/rum-CjmIckiR.mjs +4 -0
- package/dist/{schema-B34Q9tLF.mjs → schema-1mwmslUV.mjs} +1 -1
- package/dist/schema-flags-llLJuFFw.mjs +5 -0
- package/dist/{scim-CcSyfKCH.mjs → scim-pApmzA5B.mjs} +1 -1
- package/dist/{secrets-store-DFmvtphu.mjs → secrets-store-DBC9WJau.mjs} +1 -1
- package/dist/security-center-Djm06dq-.mjs +2 -0
- package/dist/{security-txt-DqnFpjMI.mjs → security-txt-Ci7bP4zH.mjs} +1 -1
- package/dist/{share-BuwYUzOL.mjs → share-Dj-MNXrw.mjs} +4 -4
- package/dist/shared-BJvq4DkR.mjs +290 -0
- package/dist/smart-shield--8EpJjrF.mjs +4 -0
- package/dist/snippets-Dyz0PH60.mjs +4 -0
- package/dist/{spawn-O1RS01vr.mjs → spawn-C5Z7oWdp.mjs} +108 -112
- package/dist/{spectrum-b7N1ZRAm.mjs → spectrum-rAHWz8rH.mjs} +1 -1
- package/dist/{speed-cw31yFva.mjs → speed-BKepWBXj.mjs} +1 -1
- package/dist/src-gJma71Ec.mjs +108 -0
- package/dist/{ssl-CsEhRVTO.mjs → ssl-KdFiY3ev.mjs} +1 -1
- package/dist/startup-profile-GLNPHQ9U.mjs +17 -0
- package/dist/{state-Bb5Cbc_L.mjs → state-Cu3cItUg.mjs} +1 -1
- package/dist/{stream-DFOao6Gu.mjs → stream-CKJ6Tb0M.mjs} +13 -13
- package/dist/submit-BxbKKhBn.mjs +2 -0
- package/dist/tags-DA8dq9fx.mjs +2 -0
- package/dist/tenant-DLXw48hS.mjs +2 -0
- package/dist/tenant-custom-nameservers-9G93XuvU.mjs +3 -0
- package/dist/{tools-BHfBOZOU.mjs → tools-x8bj9E6b.mjs} +1 -1
- package/dist/{tunnel-DkMiNtVY.mjs → tunnel-CNQA5Flp.mjs} +1 -1
- package/dist/tunnels-CC10EOsU.mjs +2 -0
- package/dist/turnstile-CH58hnf4.mjs +23 -0
- package/dist/{ui-DE8CNn6c.mjs → ui-CmnnBm_O.mjs} +1 -1
- package/dist/url-info-BpCgdUtL.mjs +2 -0
- package/dist/{url-normalization-ClfFiruK.mjs → url-normalization-BzuynEy1.mjs} +1 -1
- package/dist/url-scanner-APIZbhB7.mjs +2 -0
- package/dist/user-2-NGebfI.mjs +12 -0
- package/dist/values-S_bNv819.mjs +2 -0
- package/dist/{vectorize-CVKu7lEt.mjs → vectorize-Bv7feLBC.mjs} +1 -1
- package/dist/waiting-rooms-Dk4LIpvm.mjs +11 -0
- package/dist/{web-assets-C2s9kzWf.mjs → web-assets-C1UmOyzD.mjs} +1 -1
- package/dist/web3-GnUocVYH.mjs +4 -0
- package/dist/workers-J1-PLwdl.mjs +28 -0
- package/dist/{workers-builds-B55-oXOa.mjs → workers-builds-DCHmWOMS.mjs} +1 -1
- package/dist/{workflows-B-kGHxFu.mjs → workflows-CArfEI2c.mjs} +1 -1
- package/dist/zaraz-mg2YlR3_.mjs +2 -0
- package/dist/{zero-trust-DV3sIOvu.mjs → zero-trust-DVdUPtj1.mjs} +67 -66
- package/dist/zone-DMAfrDJX.mjs +2 -0
- package/dist/zones-CNwxUi7I.mjs +21 -0
- package/package.json +10 -7
- package/dist/account-CYRm3yoN.mjs +0 -2
- package/dist/agent-memory-DDv_Gxr7.mjs +0 -6
- package/dist/ai-audit-BWZGvbca.mjs +0 -2
- package/dist/ai-gateway-jeB-sAgP.mjs +0 -13
- package/dist/ai-search-BmdskMjR.mjs +0 -7
- package/dist/ai-security-CsmfcaUx.mjs +0 -4
- package/dist/ai-viHB1tgI.mjs +0 -5
- package/dist/analytics-vOxw8Hy0.mjs +0 -3
- package/dist/analytics_engine-DO4-C0wD.mjs +0 -2
- package/dist/argo-CQfCgazW.mjs +0 -2
- package/dist/audit-logs-CzpwvQ6A.mjs +0 -2
- package/dist/auth-D0xZxAEa.mjs +0 -5
- package/dist/billing-aJgapeRm.mjs +0 -3
- package/dist/body-parser-C-c9gfH1.mjs +0 -2
- package/dist/bot-management-Y2q5d-pi.mjs +0 -5
- package/dist/botnet-feed-DANJqfmE.mjs +0 -3
- package/dist/brand-protection-CjpZWBjp.mjs +0 -3
- package/dist/browser-run-BFn9h2Tz.mjs +0 -4
- package/dist/build-DcflwvqN.mjs +0 -2
- package/dist/certificate-authorities-D7OAFxF_.mjs +0 -2
- package/dist/cf-C7DU4819.mjs +0 -18
- package/dist/chunk-LQW53VED-DLrXV-hE.mjs +0 -499
- package/dist/cloud-connector-Bhec6z2P.mjs +0 -2
- package/dist/cloudforce-one-J_hn9ss9.mjs +0 -36
- package/dist/connector-interrupts-Dycx8zFx.mjs +0 -2
- package/dist/connector-telemetry-events-BmxOSNtN.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CdcqfKnH.mjs +0 -2
- package/dist/custom-certificates-BzAOnEoT.mjs +0 -5
- package/dist/custom-csrs-CgzG3pd3.mjs +0 -3
- package/dist/custom-nameservers-BUBmfhUe.mjs +0 -3
- package/dist/custom-pages-M7jA2Hit.mjs +0 -3
- package/dist/d1-BFvMd6-S.mjs +0 -20
- package/dist/data-security-Bji4Or_j.mjs +0 -7
- package/dist/dcv-delegation-BuoRQ1Yh.mjs +0 -2
- package/dist/deploy-input-CrvuoDGJ.mjs +0 -242
- package/dist/dist-CgrMkXFx.mjs +0 -72
- package/dist/durable-objects-D8FQORrL.mjs +0 -2
- package/dist/email-auth-DJK0Eb30.mjs +0 -2
- package/dist/email-routing-NpmiKIrl.mjs +0 -6
- package/dist/email-security-BLZ7WZ9Z.mjs +0 -18
- package/dist/email-sending-dn-353Nx.mjs +0 -7
- package/dist/fieldExtractors-ahysj57J.mjs +0 -3
- package/dist/flagship-BusjRNIb.mjs +0 -4
- package/dist/google-tag-gateway-TZZ3F1tV.mjs +0 -2
- package/dist/iam-Cj63Kjc6.mjs +0 -6
- package/dist/images-CBWXCDhy.mjs +0 -8
- package/dist/ips-qs9eGJnI.mjs +0 -2
- package/dist/keys-D7N0j4-x.mjs +0 -2
- package/dist/load-balancers-D2zbQ8fT.mjs +0 -6
- package/dist/logexplorer-CUsfZ_bS.mjs +0 -13
- package/dist/logo-matches-CJcthPHf.mjs +0 -2
- package/dist/logos-BS65zN8q.mjs +0 -3
- package/dist/magic-network-monitoring-C7tAPNKP.mjs +0 -4
- package/dist/magic-transit-BtsFePMx.mjs +0 -111
- package/dist/managed-transforms-Cm_KVCMB.mjs +0 -3
- package/dist/matches-InA1hwII.mjs +0 -2
- package/dist/mcp-mJ7bekNJ.mjs +0 -4
- package/dist/mesh-BK4S1Ezy.mjs +0 -4
- package/dist/mtls-certificates-CU4OAAXY.mjs +0 -3
- package/dist/oauth-B0ETkNcX.mjs +0 -15
- package/dist/oauth-scopes-D5bF11ju.mjs +0 -2
- package/dist/observability-BWE0Gg3V.mjs +0 -4
- package/dist/organizations-DLhiRt8g.mjs +0 -2
- package/dist/origin-ca-certificates-Ff4McZRQ.mjs +0 -3
- package/dist/origin-post-quantum-encryption-UuTr4_SW.mjs +0 -2
- package/dist/origin-tls-client-auth-DOJ1zlH3.mjs +0 -4
- package/dist/page-rules-BSz1gO-_.mjs +0 -18
- package/dist/pages-DVDogxPs.mjs +0 -14
- package/dist/pay-per-crawl-BrLXK7gT.mjs +0 -4
- package/dist/pipelines-BszRk4sM.mjs +0 -6
- package/dist/precursor-BPNjQr76.mjs +0 -4
- package/dist/progress-CsHIt3Tp.mjs +0 -2
- package/dist/prompt-DdegNPpg.mjs +0 -3
- package/dist/queries-JL1H1Biz.mjs +0 -3
- package/dist/queues-DpkYdRUE.mjs +0 -6
- package/dist/r2-CKozthw_.mjs +0 -24
- package/dist/radar-C-92vggG.mjs +0 -2
- package/dist/raw-fetch-CteyTOM2.mjs +0 -2
- package/dist/registrar-DKKN0M29.mjs +0 -21
- package/dist/reporting-fg_GKXe1.mjs +0 -2
- package/dist/request-tracers-CkMya96z.mjs +0 -2
- package/dist/resource-tagging-z48JGHCq.mjs +0 -2
- package/dist/rules-BTmNjDN-.mjs +0 -4
- package/dist/rulesets-CsoSM-17.mjs +0 -5
- package/dist/rum-DB4iO2q5.mjs +0 -4
- package/dist/schema-flags-iGoOriJt.mjs +0 -5
- package/dist/security-center-DFKeHq5c.mjs +0 -2
- package/dist/session-D6KHthHf.mjs +0 -2
- package/dist/shared-VppSAQf4.mjs +0 -2
- package/dist/smart-shield-D6X8L7p8.mjs +0 -4
- package/dist/snippets-DIpc9pb_.mjs +0 -4
- package/dist/src-D_HETJNy.mjs +0 -108
- package/dist/submit--xTzyNPy.mjs +0 -2
- package/dist/tags-efICDkah.mjs +0 -2
- package/dist/tenant-CerHuToJ.mjs +0 -2
- package/dist/tenant-custom-nameservers-C4otMBm2.mjs +0 -3
- package/dist/triggers-BEsiiKAf.mjs +0 -2
- package/dist/tunnels-D0J8lJoI.mjs +0 -2
- package/dist/turnstile-CFmtY5bn.mjs +0 -23
- package/dist/url-info-DBCeRWwb.mjs +0 -2
- package/dist/url-scanner-CNyvg65L.mjs +0 -2
- package/dist/user-bifVEQq5.mjs +0 -12
- package/dist/values-OxkdP1tV.mjs +0 -2
- package/dist/versions-BVL-Ludh.mjs +0 -2
- package/dist/waiting-rooms-CmRAl51T.mjs +0 -11
- package/dist/web3-y_cY91V_.mjs +0 -4
- package/dist/workers-jDcq14GH.mjs +0 -24
- package/dist/zaraz-27zwjLvv.mjs +0 -2
- package/dist/zone-BJix2KQ9.mjs +0 -2
- package/dist/zones-Bkj5i92c.mjs +0 -21
- /package/dist/{alerts-CRmjqOZi.mjs → alerts-15-IW4jE.mjs} +0 -0
- /package/dist/{autorag-BD7cu5NU.mjs → autorag-CFwRkEKw.mjs} +0 -0
- /package/dist/{brands-BhALBkX2.mjs → brands-BgT1vu9B.mjs} +0 -0
- /package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-C3w62dek.mjs} +0 -0
- /package/dist/{clear-BgF8No7D.mjs → clear-BlCK85Me.mjs} +0 -0
- /package/dist/{cli-types-BsTty22w.mjs → cli-types-DAYeL_Mj.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-BY2556uL.mjs → connector-telemetry-events-latest-BbpcII3_.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-BHYdxUEF.mjs → connector-telemetry-snapshots-latest-DuCiimXl.mjs} +0 -0
- /package/dist/{domain-info-C50W5GhA.mjs → domain-info-C7LBxPBt.mjs} +0 -0
- /package/dist/{health-BFNZqiAm.mjs → health-DZFfafkX.mjs} +0 -0
- /package/dist/{input-validation-Bav2M9F-.mjs → input-validation-QDIYu7Vb.mjs} +0 -0
- /package/dist/{internal-BTeSewwB.mjs → internal-BKHC2D1Y.mjs} +0 -0
- /package/dist/{live-Dkiyu30_.mjs → live-DwCvDmaH.mjs} +0 -0
- /package/dist/{metadata-8AkOftcB.mjs → metadata-B5yfL0ln.mjs} +0 -0
- /package/dist/{rate-limit-analytics-Dz-Wv1T0.mjs → rate-limit-analytics-B8Vuu1sU.mjs} +0 -0
- /package/dist/{ready-TKOkKeRg.mjs → ready-D9H2zHHI.mjs} +0 -0
- /package/dist/{recent-submissions-3Asm6eIi.mjs → recent-submissions-BPo0J80d.mjs} +0 -0
- /package/dist/{refute-BVz9nMyd.mjs → refute-2W8NLCN4.mjs} +0 -0
- /package/dist/{resolve-CeBbH6Pq.mjs → resolve-B8CyM1mi.mjs} +0 -0
- /package/dist/{scan-logo-ZteA-PUV.mjs → scan-logo-D5x6F1Y0.mjs} +0 -0
- /package/dist/{scan-page-DWDSyzQ7.mjs → scan-page-CWhta3x7.mjs} +0 -0
- /package/dist/{search-DGNc37HK.mjs → search-DZmBQJL9.mjs} +0 -0
- /package/dist/{signed-url-B5Qpn2mn.mjs → signed-url-CQrmWgz5.mjs} +0 -0
- /package/dist/{submission-info-FjUolE6A.mjs → submission-info-C98A0bqq.mjs} +0 -0
- /package/dist/{theme-CeVf-5qG.mjs → theme-CrIBazAF.mjs} +0 -0
- /package/dist/{total-queries-NHJj1HGq.mjs → total-queries-BZoaFoDE.mjs} +0 -0
- /package/dist/{tracked-domains-CniKVHIp.mjs → tracked-domains-CNHogPHx.mjs} +0 -0
- /package/dist/{verify-DS1PWAJe.mjs → verify-4e4L9IRk.mjs} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n}from"./oauth-DuEONNgC.mjs";import{r}from"./auth-D3X9HYhD.mjs";import{t as i}from"./output-Ccqw2WOb.mjs";import{t as a}from"./dry-run-DL2V6yFm.mjs";import{t as o}from"./progress-BqQcF5QH.mjs";import{n as s,t as c}from"./body-parser-BshbixEq.mjs";import{n as l}from"./input-validation-QDIYu7Vb.mjs";import{a as u,n as d}from"./prompt-B0sWIs9c.mjs";import{t as f}from"./cli-types-DAYeL_Mj.mjs";function p(e){return e.option(`cidr`,{type:`string`,description:`IP prefix in CIDR notation to bind.`}).option(`prefix-id`,{type:`string`,description:`The ID of the parent IP prefix that contains the CIDR.`}).option(`region-key`,{type:`string`,description:`Region key from managed regions (e.g., "us", "eu").`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create a DLS prefix binding`,builder:p,handler:async d=>{if(d.dryRun){a({command:`cf dls regional_services prefix_bindings create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regional_services/prefix_bindings`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({cidr:l(d.cidr,`cidr`,`text`),prefix_id:l(d[`prefix-id`],`prefix-id`,`text`),region_key:l(d[`region-key`],`region-key`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.dls.regionalServices.prefixBindings.create({...e,account_id:p})),{successLabel:`Created`});return}d.cidr===void 0&&(d.cidr=await u(`cidr`,`IP prefix in CIDR notation to bind.`)),d[`prefix-id`]===void 0&&(d[`prefix-id`]=await u(`prefix-id`,`The ID of the parent IP prefix that contains the CIDR.`)),d[`region-key`]===void 0&&(d[`region-key`]=await u(`region-key`,`Region key from managed regions (e.g., "us", "eu").`));let m=c({cidr:l(d.cidr,`cidr`,`text`),prefix_id:l(d[`prefix-id`],`prefix-id`,`text`),region_key:l(d[`region-key`],`region-key`,`text`)});i(await o(`Creating`,async()=>f.dls.regionalServices.prefixBindings.create({...m,account_id:p})),{successLabel:`Created`})}};function h(e){return e.positional(`binding-id`,{type:`string`,description:`Unique identifier for the prefix binding.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <binding-id>`,describe:`Delete a DLS prefix binding`,builder:h,handler:async s=>{if(s.dryRun){a({command:`cf dls regional_services prefix_bindings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regional_services/prefix_bindings/${s[`binding-id`]==null?`<binding-id>`:encodeURIComponent(String(s[`binding-id`]))}`,pathParams:{"binding-id":String(s[`binding-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await d({force:!!s.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}i(await o(`Deleting`,async()=>c.dls.regionalServices.prefixBindings.delete({account_id:l,binding_id:s[`binding-id`]})),{successLabel:`Deleted`})}};function _(e){return e.positional(`binding-id`,{type:`string`,description:`Unique identifier for the prefix binding.`,demandOption:!0}).option(`region-key`,{type:`string`,description:`New region key to assign (e.g., "us", "eu", "cfcanary").`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const v={command:`edit <binding-id>`,describe:`Update a DLS prefix binding`,builder:_,handler:async d=>{if(d.dryRun){a({command:`cf dls regional_services prefix_bindings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regional_services/prefix_bindings/${d[`binding-id`]==null?`<binding-id>`:encodeURIComponent(String(d[`binding-id`]))}`,pathParams:{"binding-id":String(d[`binding-id`]??``)},bodyKind:`json`,body:d.body===void 0?c({region_key:l(d[`region-key`],`region-key`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Updating`,async()=>f.dls.regionalServices.prefixBindings.edit({...e,account_id:p,binding_id:d[`binding-id`]})),{successLabel:`Updated`});return}d[`region-key`]===void 0&&(d[`region-key`]=await u(`region-key`,`New region key to assign (e.g., "us", "eu", "cfcanary").`));let m=c({region_key:l(d[`region-key`],`region-key`,`text`)});i(await o(`Updating`,async()=>f.dls.regionalServices.prefixBindings.edit({...m,account_id:p,binding_id:d[`binding-id`]})),{successLabel:`Updated`})}};function y(e){return e.positional(`binding-id`,{type:`string`,description:`Unique identifier for the prefix binding.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <binding-id>`,describe:`Get a DLS prefix binding`,builder:y,handler:async s=>{if(s.dryRun){a({command:`cf dls regional_services prefix_bindings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regional_services/prefix_bindings/${s[`binding-id`]==null?`<binding-id>`:encodeURIComponent(String(s[`binding-id`]))}`,pathParams:{"binding-id":String(s[`binding-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.dls.regionalServices.prefixBindings.get({account_id:l,binding_id:s[`binding-id`]})),{successLabel:`Loaded`})}};function x(e){return e.option(`cursor`,{type:`string`,description:`Opaque token for cursor-based pagination. Omit for the first page. Pass the value from a previous response to fetch the next page.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List DLS prefix bindings for an account`,builder:x,handler:async s=>{let c={cursor:s.cursor,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf dls regional_services prefix_bindings list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regional_services/prefix_bindings`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.dls.regionalServices.prefixBindings.list({account_id:u,...c})),{successLabel:`Loaded`})}},C={command:`prefix_bindings`,describe:`Operations for regional_services.prefix_bindings`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`regional_services`,describe:`Operations for regional_services`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.positional(`region-id`,{type:`string`,description:`UUID of the region (custom or managed) or region_key of a managed region.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <region-id>`,describe:`Get a DLS region`,builder:T,handler:async s=>{if(s.dryRun){a({command:`cf dls regions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regions/${s[`region-id`]==null?`<region-id>`:encodeURIComponent(String(s[`region-id`]))}`,pathParams:{"region-id":String(s[`region-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.dls.regions.get({account_id:l,region_id:s[`region-id`]})),{successLabel:`Loaded`})}};function D(e){return e.option(`cursor`,{type:`string`,description:`Opaque token for cursor-based pagination. Omit for the first page. Pass the value from a previous response to fetch the next page.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`type`,{type:`string`,description:`Filter regions by type. Omit to return all regions.`,choices:[`managed`,`custom`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List DLS regions for an account`,builder:f(D),handler:async s=>{let c={cursor:s.cursor,per_page:s[`per-page`],type:s.type};if(s.dryRun){a({command:`cf dls regions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dls/regions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.dls.regions.list({account_id:u,...c})),{successLabel:`Loaded`})}},k={command:`regions`,describe:`Operations for regions`,builder:e=>e.command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},A={command:`dls`,describe:`dls`,builder:e=>e.command(w).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{A as default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
3
|
-
`);return}o(await c(`Deleting`,async()=>t.dns.dnssec.delete({zone_id:n})),{successLabel:`Deleted`})}};function
|
|
2
|
+
import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n,h as r}from"./oauth-DuEONNgC.mjs";import{a as i,r as a}from"./auth-D3X9HYhD.mjs";import{t as o}from"./output-Ccqw2WOb.mjs";import{t as s}from"./dry-run-DL2V6yFm.mjs";import{t as c}from"./progress-BqQcF5QH.mjs";import{n as l,r as u,t as d}from"./body-parser-BshbixEq.mjs";import{n as f,t as p}from"./input-validation-QDIYu7Vb.mjs";import{a as m,n as h}from"./prompt-B0sWIs9c.mjs";import{t as g}from"./cli-types-DAYeL_Mj.mjs";import{n as ee,t as te}from"./raw-fetch-Cc-MjHeL.mjs";function _(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const v={command:`delete`,describe:`Delete DNSSEC.`,builder:_,handler:async e=>{if(e.dryRun){s({command:`cf dns dnssec delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
3
|
+
`);return}o(await c(`Deleting`,async()=>t.dns.dnssec.delete({zone_id:n})),{successLabel:`Deleted`})}};function y(e){return e.option(`dnssec-multi-signer`,{type:`boolean`,description:`If true, multi-signer DNSSEC is enabled on the zone, allowing multiple
|
|
4
4
|
providers to serve a DNSSEC-signed zone at the same time.
|
|
5
5
|
This is required for DNSKEY records (except those automatically
|
|
6
6
|
generated by Cloudflare) to be added to the zone.
|
|
@@ -16,14 +16,14 @@ NSEC3 records when transferring in from an external provider.
|
|
|
16
16
|
If dnssec_presigned is instead set to false (default), NSEC3 records will be
|
|
17
17
|
generated and signed at request time.
|
|
18
18
|
|
|
19
|
-
See [DNSSEC with NSEC3](https://developers.cloudflare.com/dns/dnssec/enable-nsec3/) for details.`}).option(`status`,{type:`string`,description:`Status of DNSSEC, based on user-desired state and presence of necessary records.`,choices:[`active`,`disabled`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
20
|
-
`);return}o(await c(`Deleting`,async()=>t.dns.records.delete({zone_id:n,dns_record_id:e[`dns-record-id`]})),{successLabel:`Deleted`})}};function M(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`edit <dns-record-id>`,describe:`Update an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:M,handler:async e=>{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:l(e.body)});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=l(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Updating`,async()=>n.dns.records.edit({body:r,zone_id:i,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function P(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`export`,describe:`You can export your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.`,builder:P,handler:async e=>{if(e.dryRun){s({command:`cf dns records export`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/export`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e);e.zoneId=await r({zone:e.zone},t,{quiet:e.quiet}),ee((await c(`Loading`,async()=>te(`/zones/${e.zoneId}/dns_records/export`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}))).toString(`utf-8`))}};function I(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <dns-record-id>`,describe:`Retrieves details for a specific DNS record in the zone.`,builder:I,handler:async e=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){s({command:`cf dns records get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>n.dns.records.get({zone_id:i,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Loaded`})}};function R(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`proxied`,{type:`string`,description:"Whether or not proxiable records should receive the performance and security benefits of Cloudflare. The value should be either `true` or `false`."})}const z={command:`import`,describe:`You can upload your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. It assumes that cURL is called from a location with bind_config.txt (valid BIND config) present. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.`,builder:R,handler:async e=>{if(e.dryRun){s({command:`cf dns records import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/import`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,proxied:e.proxied}});return}let t=await a(e);if(e.zoneId=await r({zone:e.zone},t,{quiet:e.quiet}),e.file!==void 0||e.body!==void 0||e.proxied!==void 0){let n=new FormData;if(e.file){let t=f(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(d(e.proxied,`proxied`,`text`)??``)),o(await c(`Creating`,async()=>i(t,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n})),{successLabel:`Created`});return}if(e.body){let n=d(e.body,`body`,`binary`);o(await c(`Creating`,async()=>i(t,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function B(e){return e.option(`name`,{type:`string`,description:"Exact value of the DNS record name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS record name. Name filters are case-insensitive.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS record name. Name filters are case-insensitive.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS record name. Name filters are case-insensitive.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS record name. Name filters are case-insensitive.`}).option(`type`,{type:`string`,description:`Record type.`,choices:[`A`,`AAAA`,`CAA`,`CERT`,`CNAME`,`DNSKEY`,`DS`,`HTTPS`,`LOC`,`MX`,`NAPTR`,`NS`,`OPENPGPKEY`,`PTR`,`SMIMEA`,`SRV`,`SSHFP`,`SVCB`,`TLSA`,`TXT`,`URI`]}).option(`content`,{type:`string`,description:"Exact value of the DNS record content. This is a convenience alias for `content.exact`."}).option(`content-exact`,{type:`string`,description:`Exact value of the DNS record content. Content filters are case-insensitive.`}).option(`content-contains`,{type:`string`,description:`Substring of the DNS record content. Content filters are case-insensitive.`}).option(`content-startswith`,{type:`string`,description:`Prefix of the DNS record content. Content filters are case-insensitive.`}).option(`content-endswith`,{type:`string`,description:`Suffix of the DNS record content. Content filters are case-insensitive.`}).option(`proxied`,{type:`boolean`,description:`Whether the record is receiving the performance and security benefits of Cloudflare.`}).option(`match`,{type:`string`,description:"Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead. Note that the interaction between tag filters is controlled by the `tag-match` parameter instead.",choices:[`any`,`all`]}).option(`comment`,{type:`string`,description:"Exact value of the DNS record comment. This is a convenience alias for `comment.exact`."}).option(`comment-present`,{type:`string`,description:`If this parameter is present, only records *with* a comment are returned.`}).option(`comment-absent`,{type:`string`,description:`If this parameter is present, only records *without* a comment are returned.`}).option(`comment-exact`,{type:`string`,description:`Exact value of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-contains`,{type:`string`,description:`Substring of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-startswith`,{type:`string`,description:`Prefix of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-endswith`,{type:`string`,description:`Suffix of the DNS record comment. Comment filters are case-insensitive.`}).option(`tag`,{type:`string`,description:"Condition on the DNS record tag.\n\nParameter values can be of the form `<tag-name>:<tag-value>` to search for an exact `name:value` pair, or just `<tag-name>` to search for records with a specific tag name regardless of its value.\n\nThis is a convenience shorthand for the more powerful `tag.<predicate>` parameters.\nExamples:\n- `tag=important` is equivalent to `tag.present=important`\n- `tag=team:DNS` is equivalent to `tag.exact=team:DNS`"}).option(`tag-present`,{type:`string`,description:`Name of a tag which must be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-absent`,{type:`string`,description:`Name of a tag which must *not* be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-exact`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value is `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-contains`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value contains `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-startswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value starts with `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-endswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value ends with `<tag-value>`. Tag filters are case-insensitive."}).option(`search`,{type:`string`,description:"Allows searching in multiple properties of a DNS record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is subject to change in the future. This parameter works independently of the `match` setting. For automated searches, please use the other available parameters."}).option(`tag-match`,{type:`string`,description:"Whether to match all tag search requirements or at least one (any). If set to `all`, acts like a logical AND between tag filters. If set to `any`, acts like a logical OR instead. Note that the regular `match` parameter is still used to combine the resulting condition with other filters that aren't related to tags.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of DNS records per page.`}).option(`order`,{type:`string`,description:`Field to order DNS records by.`,choices:[`type`,`name`,`content`,`ttl`,`proxied`]}).option(`direction`,{type:`string`,description:`Direction to order DNS records in.`,choices:[`asc`,`desc`]}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`shadowed-by-name`,{type:`string`,description:"Filters to records at or below the given NS delegation name, excluding the NS records that form the delegation itself. The value must be a subdomain of the zone; the zone apex is not accepted. Requires `include_shadow_metadata=true`. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`shadowing-name`,{type:`string`,description:`Returns NS records that shadow the given name, searching at the name itself and each of its ancestor names within the zone, excluding the zone apex. The value must be a subdomain of the zone; the zone apex is not accepted. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list`,describe:`List, search, sort, and filter a zones' DNS records.`,builder:h(B),handler:async e=>{let t={name:e.name,"name.exact":e[`name-exact`],"name.contains":e[`name-contains`],"name.startswith":e[`name-startswith`],"name.endswith":e[`name-endswith`],type:e.type,content:e.content,"content.exact":e[`content-exact`],"content.contains":e[`content-contains`],"content.startswith":e[`content-startswith`],"content.endswith":e[`content-endswith`],proxied:e.proxied,match:e.match,comment:e.comment,"comment.present":e[`comment-present`],"comment.absent":e[`comment-absent`],"comment.exact":e[`comment-exact`],"comment.contains":e[`comment-contains`],"comment.startswith":e[`comment-startswith`],"comment.endswith":e[`comment-endswith`],tag:e.tag,"tag.present":e[`tag-present`],"tag.absent":e[`tag-absent`],"tag.exact":e[`tag-exact`],"tag.contains":e[`tag-contains`],"tag.startswith":e[`tag-startswith`],"tag.endswith":e[`tag-endswith`],search:e.search,tag_match:e[`tag-match`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,include_shadow_metadata:e[`include-shadow-metadata`],shadowed_by_name:e[`shadowed-by-name`],shadowing_name:e[`shadowing-name`]};if(e.dryRun){s({command:`cf dns records list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>n.dns.records.list({zone_id:i,...t})),{successLabel:`Loaded`})}};function H(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`scan-list`,describe:"Retrieves the list of DNS records discovered up to this point by the asynchronous scan. These records are temporary until explicitly accepted or rejected via `POST /scan/review`. Additional records may be discovered by the scan later.",builder:H,handler:async e=>{if(e.dryRun){s({command:`cf dns records scan-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan/review`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.records.scanList({zone_id:n})),{successLabel:`Loaded`})}};function W(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const G={command:`scan-review`,describe:`Accept or reject DNS records found by the DNS records scan. Accepted records will be permanently added to the zone, while rejected records will be permanently deleted.`,builder:W,handler:async e=>{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?void 0:l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Creating`,async()=>t.dns.records.scanReview({...r,zone_id:n})),{successLabel:`Created`});return}o(await c(`Creating`,async()=>t.dns.records.scanReview({zone_id:n})),{successLabel:`Created`})}};function K(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`scan-trigger`,describe:"Initiates an asynchronous scan for common DNS records on your domain. Note that this **does not** automatically add records to your zone. The scan runs in the background, and results can be reviewed later using the `/scan/review` endpoints. Useful if you haven't updated your nameservers yet.",builder:K,handler:async e=>{if(e.dryRun){s({command:`cf dns records scan-trigger`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan/trigger`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.records.scanTrigger({zone_id:n})),{successLabel:`Created`})}};function J(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`scan`,describe:`Scan for common DNS records on your domain and automatically add them to your zone. Useful if you haven't updated your nameservers yet.`,builder:J,handler:async e=>{if(e.dryRun){s({command:`cf dns records scan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.records.scan({zone_id:n})),{successLabel:`Created`})}};function X(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Z={command:`update <dns-record-id>`,describe:`Overwrite an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:X,handler:async e=>{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:l(e.body)});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=l(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Updating`,async()=>n.dns.records.update({body:r,zone_id:i,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},Q={command:`records`,describe:`Operations for records`,builder:e=>e.command(D).command(k).command(j).command(N).command(F).command(L).command(z).command(V).command(Y).command(U).command(G).command(q).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.option(`enforce-dns-only`,{type:`boolean`,description:`When enabled, forces all proxied DNS records in the account to behave as DNS-only at the edge, regardless of each record's individual proxy setting. Note that this account-level override does not modify the records themselves; it only affects how they are served at the edge. See more on [Enforce DNS-only](https://developers.cloudflare.com/dns/proxy-status/enforce-dns-only).`}).option(`zone-defaults-flatten-all-cnames`,{type:`boolean`,description:`Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.`}).option(`zone-defaults-foundation-dns`,{type:`boolean`,description:`Deprecated. Use nameservers.type to configure Advanced Nameservers.`}).option(`zone-defaults-internal-dns-reference-zone-id`,{type:`string`,description:`The ID of the zone to fallback to.`}).option(`zone-defaults-multi-provider`,{type:`boolean`,description:`Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.`}).option(`zone-defaults-ns-ttl`,{type:`number`,description:`The time to live (TTL) of the zone's nameserver (NS) records.`}).option(`zone-defaults-secondary-overrides`,{type:`boolean`,description:`Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.`}).option(`zone-defaults-soa-expire`,{type:`number`,description:`Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.`}).option(`zone-defaults-soa-min-ttl`,{type:`number`,description:`The time to live (TTL) for negative caching of records within the zone.`}).option(`zone-defaults-soa-mname`,{type:`string`,description:`The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.`}).option(`zone-defaults-soa-refresh`,{type:`number`,description:`Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.`}).option(`zone-defaults-soa-retry`,{type:`number`,description:`Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.`}).option(`zone-defaults-soa-rname`,{type:`string`,description:`The email address of the zone administrator, with the first label representing the local part of the email address.`}).option(`zone-defaults-soa-ttl`,{type:`number`,description:`The time to live (TTL) of the SOA record itself.`}).option(`zone-defaults-zone-mode`,{type:`string`,description:`Whether the zone mode is a regular or CDN/DNS only zone.`,choices:[`standard`,`cdn_only`,`dns_only`]}).option(`zone-defaults-nameservers-type`,{type:`string`,description:`Nameserver type`,choices:[`cloudflare.standard`,`cloudflare.advanced`,`cloudflare.standard.random`,`custom.account`,`custom.tenant`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`edit`,describe:`Update DNS settings for an account or zone`,builder:ne,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf dns settings account edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/dns_settings`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?u({enforce_dns_only:i[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:i[`zone-defaults-flatten-all-cnames`],foundation_dns:i[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:d(i[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:i[`zone-defaults-multi-provider`],ns_ttl:i[`zone-defaults-ns-ttl`],secondary_overrides:i[`zone-defaults-secondary-overrides`],soa:{expire:i[`zone-defaults-soa-expire`],min_ttl:i[`zone-defaults-soa-min-ttl`],mname:d(i[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:i[`zone-defaults-soa-refresh`],retry:i[`zone-defaults-soa-retry`],rname:d(i[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:i[`zone-defaults-soa-ttl`]},zone_mode:d(i[`zone-defaults-zone-mode`],`zone-defaults-zone-mode`,`text`),nameservers:{type:d(i[`zone-defaults-nameservers-type`],`zone-defaults-nameservers-type`,`text`)}}}):l(i.body)});return}let f=await a(i),p=i.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:i.zone},f,{quiet:i.quiet}):i.local?e:await t();if(p===`zones`?i.zoneId=m:i.accountId=m,i.body){let e=l(i.body);o(await c(`Updating`,async()=>f.dns.settings.account.edit({...e,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Updated`});return}let h=u({enforce_dns_only:i[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:i[`zone-defaults-flatten-all-cnames`],foundation_dns:i[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:d(i[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:i[`zone-defaults-multi-provider`],ns_ttl:i[`zone-defaults-ns-ttl`],secondary_overrides:i[`zone-defaults-secondary-overrides`],soa:{expire:i[`zone-defaults-soa-expire`],min_ttl:i[`zone-defaults-soa-min-ttl`],mname:d(i[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:i[`zone-defaults-soa-refresh`],retry:i[`zone-defaults-soa-retry`],rname:d(i[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:i[`zone-defaults-soa-ttl`]},zone_mode:d(i[`zone-defaults-zone-mode`],`zone-defaults-zone-mode`,`text`),nameservers:{type:d(i[`zone-defaults-nameservers-type`],`zone-defaults-nameservers-type`,`text`)}}});o(await c(`Updating`,async()=>f.dns.settings.account.edit({...h,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Updated`})}};function ie(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`get`,describe:`Show DNS settings for an account or zone`,builder:ie,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf dns settings account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/dns_settings`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await t();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.dns.settings.account.get({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})}};function oe(e){return e.option(`name`,{type:`string`,description:`The name of the view.`}).option(`zones`,{type:`string`,array:!0,description:`The list of zones linked to this view.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const se={command:`create`,describe:`Create Internal DNS View for an account`,builder:oe,handler:async r=>{if(r.dryRun){s({command:`cf dns settings account views create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({name:d(r.name,`name`,`text`),zones:r.zones}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.dns.settings.account.views.create({...e,account_id:f})),{successLabel:`Created`});return}if(r.name===void 0&&(r.name=await p(`name`,`The name of the view.`)),r.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let m=u({name:d(r.name,`name`,`text`),zones:r.zones});o(await c(`Creating`,async()=>i.dns.settings.account.views.create({...m,account_id:f})),{successLabel:`Created`})}};function ce(e){return e.positional(`view-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const le={command:`delete <view-id>`,describe:`Delete an existing Internal DNS View`,builder:ce,handler:async r=>{if(r.dryRun){s({command:`cf dns settings account views delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views/${r[`view-id`]==null?`<view-id>`:encodeURIComponent(String(r[`view-id`]))}`,pathParams:{"view-id":String(r[`view-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
21
|
-
`);return}o(await c(`Deleting`,async()=>i.dns.settings.account.views.delete({account_id:l,view_id:r[`view-id`]})),{successLabel:`Deleted`})}};function
|
|
22
|
-
`);return}o(await c(`Deleting`,async()=>i.dns.zoneTransfers.acls.delete({account_id:l,acl_id:r[`acl-id`]})),{successLabel:`Deleted`})}};function
|
|
23
|
-
Not applicable for primary zones.`,default:86400}).option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
24
|
-
`);return}o(await c(`Deleting`,async()=>t.dns.zoneTransfers.incoming.delete({zone_id:n})),{successLabel:`Deleted`})}};function
|
|
25
|
-
Not applicable for primary zones.`}).option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
26
|
-
`);return}o(await c(`Deleting`,async()=>t.dns.zoneTransfers.outgoing.delete({zone_id:n})),{successLabel:`Deleted`})}};function
|
|
27
|
-
`);return}o(await c(`Deleting`,async()=>t.dns.zoneTransfers.outgoing.disable({zone_id:n})),{successLabel:`Deleted`})}};function
|
|
28
|
-
`);return}o(await c(`Deleting`,async()=>i.dns.zoneTransfers.peers.delete({account_id:l,peer_id:r[`peer-id`]})),{successLabel:`Deleted`})}};function
|
|
29
|
-
`);return}o(await c(`Deleting`,async()=>i.dns.zoneTransfers.tsigs.delete({account_id:l,tsig_id:r[`tsig-id`]})),{successLabel:`Deleted`})}};function
|
|
19
|
+
See [DNSSEC with NSEC3](https://developers.cloudflare.com/dns/dnssec/enable-nsec3/) for details.`}).option(`status`,{type:`string`,description:`Status of DNSSEC, based on user-desired state and presence of necessary records.`,choices:[`active`,`disabled`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`edit`,describe:`Enable or disable DNSSEC.`,builder:y,handler:async e=>{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?d({dnssec_multi_signer:e[`dnssec-multi-signer`],dnssec_presigned:e[`dnssec-presigned`],dnssec_use_nsec3:e[`dnssec-use-nsec3`],status:f(e.status,`status`,`text`)}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Updating`,async()=>t.dns.dnssec.edit({...r,zone_id:n})),{successLabel:`Updated`});return}let i=d({dnssec_multi_signer:e[`dnssec-multi-signer`],dnssec_presigned:e[`dnssec-presigned`],dnssec_use_nsec3:e[`dnssec-use-nsec3`],status:f(e.status,`status`,`text`)});o(await c(`Updating`,async()=>t.dns.dnssec.edit({...i,zone_id:n})),{successLabel:`Updated`})}};function x(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Details about DNSSEC status and configuration.`,builder:x,handler:async e=>{if(e.dryRun){s({command:`cf dns dnssec get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.dnssec.get({zone_id:n})),{successLabel:`Loaded`})}};function C(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`zsks`,describe:`List the Zone Signing Keys (ZSKs) that DNSSEC uses for the zone.`,builder:C,handler:async e=>{if(e.dryRun){s({command:`cf dns dnssec list zsks`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dnssec/zsk`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.dnssec.list.zsks({zone_id:n})),{successLabel:`Loaded`})}},T={command:`list`,describe:`Operations for dnssec.list`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},E={command:`dnssec`,describe:`Operations for dnssec`,builder:e=>e.command(v).command(b).command(S).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function D(e){return e.option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`deletes`,{type:`string`,description:`The deletes field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`patches`,{type:`string`,description:`The patches field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`posts`,{type:`string`,description:`The posts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`puts`,{type:`string`,description:`The puts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`batch`,describe:`Send a Batch of DNS Record API calls to be executed together. Notes: - Although Cloudflare will execute the batched operations in a single database transaction, Cloudflare's distributed KV store must treat each record change as a single key-value pair. This means that the propagation of changes is not atomic. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/batch-record-changes/ "Batch DNS records") for more information. - The operations you specify within the /batch request body are always executed in the following order: - Deletes - Patches - Puts - Posts`,builder:D,handler:async e=>{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?d({deletes:u(e.deletes,`deletes`),patches:u(e.patches,`patches`),posts:u(e.posts,`posts`),puts:u(e.puts,`puts`)}):l(e.body)});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=l(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Creating`,async()=>n.dns.records.batch({...r,zone_id:i,...t})),{successLabel:`Created`});return}let f=d({deletes:u(e.deletes,`deletes`),patches:u(e.patches,`patches`),posts:u(e.posts,`posts`),puts:u(e.puts,`puts`)});new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Creating`,async()=>n.dns.records.batch({...f,zone_id:i,...t})),{successLabel:`Created`})}};function k(e){return e.option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`create`,describe:`Create a new DNS record for a zone. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:k,handler:async e=>{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:l(e.body)});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=l(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Creating`,async()=>n.dns.records.create({body:r,zone_id:i,...t})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function j(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const M={command:`delete <dns-record-id>`,describe:`Permanently removes a DNS record from the zone.`,builder:j,handler:async e=>{if(e.dryRun){s({command:`cf dns records delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
20
|
+
`);return}o(await c(`Deleting`,async()=>t.dns.records.delete({zone_id:n,dns_record_id:e[`dns-record-id`]})),{successLabel:`Deleted`})}};function N(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`edit <dns-record-id>`,describe:`Update an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:N,handler:async e=>{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:l(e.body)});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=l(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Updating`,async()=>n.dns.records.edit({body:r,zone_id:i,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function F(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`export`,describe:`You can export your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.`,builder:F,handler:async e=>{if(e.dryRun){s({command:`cf dns records export`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/export`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e);e.zoneId=await r({zone:e.zone},t,{quiet:e.quiet}),ee((await c(`Loading`,async()=>te(`/zones/${e.zoneId}/dns_records/export`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}))).toString(`utf-8`))}};function L(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get <dns-record-id>`,describe:`Retrieves details for a specific DNS record in the zone.`,builder:L,handler:async e=>{let t={include_shadow_metadata:e[`include-shadow-metadata`]};if(e.dryRun){s({command:`cf dns records get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/${e[`dns-record-id`]==null?`<dns-record-id>`:encodeURIComponent(String(e[`dns-record-id`]))}`,pathParams:{"dns-record-id":String(e[`dns-record-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>n.dns.records.get({zone_id:i,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Loaded`})}};function z(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`proxied`,{type:`string`,description:"Whether or not proxiable records should receive the performance and security benefits of Cloudflare. The value should be either `true` or `false`."})}const B={command:`import`,describe:`You can upload your [BIND config](https://en.wikipedia.org/wiki/Zone_file "Zone file") through this endpoint. It assumes that cURL is called from a location with bind_config.txt (valid BIND config) present. See [the documentation](https://developers.cloudflare.com/dns/manage-dns-records/how-to/import-and-export/ "Import and export records") for more information.`,builder:z,handler:async e=>{if(e.dryRun){s({command:`cf dns records import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/import`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,proxied:e.proxied}});return}let t=await a(e);if(e.zoneId=await r({zone:e.zone},t,{quiet:e.quiet}),e.file!==void 0||e.body!==void 0||e.proxied!==void 0){let n=new FormData;if(e.file){let t=p(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(f(e.proxied,`proxied`,`text`)??``)),o(await c(`Creating`,async()=>i(t,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n})),{successLabel:`Created`});return}if(e.body){let n=f(e.body,`body`,`binary`);o(await c(`Creating`,async()=>i(t,`POST`,`/zones/${e.zoneId}/dns_records/import`,{body:n,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function V(e){return e.option(`name`,{type:`string`,description:"Exact value of the DNS record name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS record name. Name filters are case-insensitive.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS record name. Name filters are case-insensitive.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS record name. Name filters are case-insensitive.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS record name. Name filters are case-insensitive.`}).option(`type`,{type:`string`,description:`Record type.`,choices:[`A`,`AAAA`,`CAA`,`CERT`,`CNAME`,`DNSKEY`,`DS`,`HTTPS`,`LOC`,`MX`,`NAPTR`,`NS`,`OPENPGPKEY`,`PTR`,`SMIMEA`,`SRV`,`SSHFP`,`SVCB`,`TLSA`,`TXT`,`URI`]}).option(`content`,{type:`string`,description:"Exact value of the DNS record content. This is a convenience alias for `content.exact`."}).option(`content-exact`,{type:`string`,description:`Exact value of the DNS record content. Content filters are case-insensitive.`}).option(`content-contains`,{type:`string`,description:`Substring of the DNS record content. Content filters are case-insensitive.`}).option(`content-startswith`,{type:`string`,description:`Prefix of the DNS record content. Content filters are case-insensitive.`}).option(`content-endswith`,{type:`string`,description:`Suffix of the DNS record content. Content filters are case-insensitive.`}).option(`proxied`,{type:`boolean`,description:`Whether the record is receiving the performance and security benefits of Cloudflare.`}).option(`match`,{type:`string`,description:"Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead. Note that the interaction between tag filters is controlled by the `tag-match` parameter instead.",choices:[`any`,`all`]}).option(`comment`,{type:`string`,description:"Exact value of the DNS record comment. This is a convenience alias for `comment.exact`."}).option(`comment-present`,{type:`string`,description:`If this parameter is present, only records *with* a comment are returned.`}).option(`comment-absent`,{type:`string`,description:`If this parameter is present, only records *without* a comment are returned.`}).option(`comment-exact`,{type:`string`,description:`Exact value of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-contains`,{type:`string`,description:`Substring of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-startswith`,{type:`string`,description:`Prefix of the DNS record comment. Comment filters are case-insensitive.`}).option(`comment-endswith`,{type:`string`,description:`Suffix of the DNS record comment. Comment filters are case-insensitive.`}).option(`tag`,{type:`string`,description:"Condition on the DNS record tag.\n\nParameter values can be of the form `<tag-name>:<tag-value>` to search for an exact `name:value` pair, or just `<tag-name>` to search for records with a specific tag name regardless of its value.\n\nThis is a convenience shorthand for the more powerful `tag.<predicate>` parameters.\nExamples:\n- `tag=important` is equivalent to `tag.present=important`\n- `tag=team:DNS` is equivalent to `tag.exact=team:DNS`"}).option(`tag-present`,{type:`string`,description:`Name of a tag which must be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-absent`,{type:`string`,description:`Name of a tag which must *not* be present on the DNS record. Tag filters are case-insensitive.`}).option(`tag-exact`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value is `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-contains`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value contains `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-startswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value starts with `<tag-value>`. Tag filters are case-insensitive."}).option(`tag-endswith`,{type:`string`,description:"A tag and value, of the form `<tag-name>:<tag-value>`. The API will only return DNS records that have a tag named `<tag-name>` whose value ends with `<tag-value>`. Tag filters are case-insensitive."}).option(`search`,{type:`string`,description:"Allows searching in multiple properties of a DNS record simultaneously. This parameter is intended for human users, not automation. Its exact behavior is intentionally left unspecified and is subject to change in the future. This parameter works independently of the `match` setting. For automated searches, please use the other available parameters."}).option(`tag-match`,{type:`string`,description:"Whether to match all tag search requirements or at least one (any). If set to `all`, acts like a logical AND between tag filters. If set to `any`, acts like a logical OR instead. Note that the regular `match` parameter is still used to combine the resulting condition with other filters that aren't related to tags.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of DNS records per page.`}).option(`order`,{type:`string`,description:`Field to order DNS records by.`,choices:[`type`,`name`,`content`,`ttl`,`proxied`]}).option(`direction`,{type:`string`,description:`Direction to order DNS records in.`,choices:[`asc`,`desc`]}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`shadowed-by-name`,{type:`string`,description:"Filters to records at or below the given NS delegation name, excluding the NS records that form the delegation itself. The value must be a subdomain of the zone; the zone apex is not accepted. Requires `include_shadow_metadata=true`. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`shadowing-name`,{type:`string`,description:`Returns NS records that shadow the given name, searching at the name itself and each of its ancestor names within the zone, excluding the zone apex. The value must be a subdomain of the zone; the zone apex is not accepted. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List, search, sort, and filter a zones' DNS records.`,builder:g(V),handler:async e=>{let t={name:e.name,"name.exact":e[`name-exact`],"name.contains":e[`name-contains`],"name.startswith":e[`name-startswith`],"name.endswith":e[`name-endswith`],type:e.type,content:e.content,"content.exact":e[`content-exact`],"content.contains":e[`content-contains`],"content.startswith":e[`content-startswith`],"content.endswith":e[`content-endswith`],proxied:e.proxied,match:e.match,comment:e.comment,"comment.present":e[`comment-present`],"comment.absent":e[`comment-absent`],"comment.exact":e[`comment-exact`],"comment.contains":e[`comment-contains`],"comment.startswith":e[`comment-startswith`],"comment.endswith":e[`comment-endswith`],tag:e.tag,"tag.present":e[`tag-present`],"tag.absent":e[`tag-absent`],"tag.exact":e[`tag-exact`],"tag.contains":e[`tag-contains`],"tag.startswith":e[`tag-startswith`],"tag.endswith":e[`tag-endswith`],search:e.search,tag_match:e[`tag-match`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,include_shadow_metadata:e[`include-shadow-metadata`],shadowed_by_name:e[`shadowed-by-name`],shadowing_name:e[`shadowing-name`]};if(e.dryRun){s({command:`cf dns records list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>n.dns.records.list({zone_id:i,...t})),{successLabel:`Loaded`})}};function U(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`scan-list`,describe:"Retrieves the list of DNS records discovered up to this point by the asynchronous scan. These records are temporary until explicitly accepted or rejected via `POST /scan/review`. Additional records may be discovered by the scan later.",builder:U,handler:async e=>{if(e.dryRun){s({command:`cf dns records scan-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan/review`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.records.scanList({zone_id:n})),{successLabel:`Loaded`})}};function G(e){return e.option(`accepts`,{type:`string`,description:`The accepts field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rejects`,{type:`string`,description:`The rejects field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`scan-review`,describe:`Accept or reject DNS records found by the DNS records scan. Accepted records will be permanently added to the zone, while rejected records will be permanently deleted.`,builder:G,handler:async e=>{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?d({accepts:u(e.accepts,`accepts`),rejects:u(e.rejects,`rejects`)}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Creating`,async()=>t.dns.records.scanReview({...r,zone_id:n})),{successLabel:`Created`});return}let i=d({accepts:u(e.accepts,`accepts`),rejects:u(e.rejects,`rejects`)});o(await c(`Creating`,async()=>t.dns.records.scanReview({...i,zone_id:n})),{successLabel:`Created`})}};function q(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`scan-trigger`,describe:"Initiates an asynchronous scan for common DNS records on your domain. Note that this **does not** automatically add records to your zone. The scan runs in the background, and results can be reviewed later using the `/scan/review` endpoints. Useful if you haven't updated your nameservers yet.",builder:q,handler:async e=>{if(e.dryRun){s({command:`cf dns records scan-trigger`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan/trigger`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.records.scanTrigger({zone_id:n})),{successLabel:`Created`})}};function Y(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`scan`,describe:`Scan for common DNS records on your domain and automatically add them to your zone. Useful if you haven't updated your nameservers yet.`,builder:Y,handler:async e=>{if(e.dryRun){s({command:`cf dns records scan`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/dns_records/scan`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.records.scan({zone_id:n})),{successLabel:`Created`})}};function Z(e){return e.positional(`dns-record-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`include-shadow-metadata`,{type:`boolean`,description:"Whether to include shadow metadata in the `meta` field of each record in the response. See [Shadowed records](https://developers.cloudflare.com/dns/manage-dns-records/reference/shadowed-records)."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Q={command:`update <dns-record-id>`,describe:`Overwrite an existing DNS record. Notes: - A/AAAA records cannot exist on the same name as CNAME records. - NS records cannot exist on the same name as any other record type. - Domain names are always represented in Punycode, even if Unicode characters were used when creating the record.`,builder:Z,handler:async e=>{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:l(e.body)});return}let n=await a(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let r=l(e.body);new URLSearchParams(Object.entries(t).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),o(await c(`Updating`,async()=>n.dns.records.update({body:r,zone_id:i,dns_record_id:e[`dns-record-id`],...t})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},ne={command:`records`,describe:`Operations for records`,builder:e=>e.command(O).command(A).command(M).command(P).command(I).command(R).command(B).command(H).command(X).command(W).command(K).command(J).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.option(`enforce-dns-only`,{type:`boolean`,description:`When enabled, forces all proxied DNS records in the account to behave as DNS-only at the edge, regardless of each record's individual proxy setting. Note that this account-level override does not modify the records themselves; it only affects how they are served at the edge. See more on [Enforce DNS-only](https://developers.cloudflare.com/dns/proxy-status/enforce-dns-only).`}).option(`zone-defaults-flatten-all-cnames`,{type:`boolean`,description:`Whether to flatten all CNAME records in the zone. Note that, due to DNS limitations, a CNAME record at the zone apex will always be flattened.`}).option(`zone-defaults-foundation-dns`,{type:`boolean`,description:`Deprecated. Use nameservers.type to configure Advanced Nameservers.`}).option(`zone-defaults-internal-dns-reference-zone-id`,{type:`string`,description:`The ID of the zone to fallback to.`}).option(`zone-defaults-multi-provider`,{type:`boolean`,description:`Whether to enable multi-provider DNS, which causes Cloudflare to activate the zone even when non-Cloudflare NS records exist, and to respect NS records at the zone apex during outbound zone transfers.`}).option(`zone-defaults-ns-ttl`,{type:`number`,description:`The time to live (TTL) of the zone's nameserver (NS) records.`}).option(`zone-defaults-secondary-overrides`,{type:`boolean`,description:`Allows a Secondary DNS zone to use (proxied) override records and CNAME flattening at the zone apex.`}).option(`zone-defaults-soa-expire`,{type:`number`,description:`Time in seconds of being unable to query the primary server after which secondary servers should stop serving the zone.`}).option(`zone-defaults-soa-min-ttl`,{type:`number`,description:`The time to live (TTL) for negative caching of records within the zone.`}).option(`zone-defaults-soa-mname`,{type:`string`,description:`The primary nameserver, which may be used for outbound zone transfers. If null, a Cloudflare-assigned value will be used.`}).option(`zone-defaults-soa-refresh`,{type:`number`,description:`Time in seconds after which secondary servers should re-check the SOA record to see if the zone has been updated.`}).option(`zone-defaults-soa-retry`,{type:`number`,description:`Time in seconds after which secondary servers should retry queries after the primary server was unresponsive.`}).option(`zone-defaults-soa-rname`,{type:`string`,description:`The email address of the zone administrator, with the first label representing the local part of the email address.`}).option(`zone-defaults-soa-ttl`,{type:`number`,description:`The time to live (TTL) of the SOA record itself.`}).option(`zone-defaults-zone-mode`,{type:`string`,description:`Whether the zone mode is a regular or CDN/DNS only zone.`,choices:[`standard`,`cdn_only`,`dns_only`]}).option(`zone-defaults-nameservers-type`,{type:`string`,description:`Nameserver type`,choices:[`cloudflare.standard`,`cloudflare.advanced`,`cloudflare.standard.random`,`custom.account`,`custom.tenant`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`edit`,describe:`Update DNS settings for an account or zone`,builder:re,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf dns settings account edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/dns_settings`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?d({enforce_dns_only:i[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:i[`zone-defaults-flatten-all-cnames`],foundation_dns:i[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:f(i[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:i[`zone-defaults-multi-provider`],ns_ttl:i[`zone-defaults-ns-ttl`],secondary_overrides:i[`zone-defaults-secondary-overrides`],soa:{expire:i[`zone-defaults-soa-expire`],min_ttl:i[`zone-defaults-soa-min-ttl`],mname:f(i[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:i[`zone-defaults-soa-refresh`],retry:i[`zone-defaults-soa-retry`],rname:f(i[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:i[`zone-defaults-soa-ttl`]},zone_mode:f(i[`zone-defaults-zone-mode`],`zone-defaults-zone-mode`,`text`),nameservers:{type:f(i[`zone-defaults-nameservers-type`],`zone-defaults-nameservers-type`,`text`)}}}):l(i.body)});return}let u=await a(i),p=i.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:i.zone},u,{quiet:i.quiet}):i.local?e:await t();if(p===`zones`?i.zoneId=m:i.accountId=m,i.body){let e=l(i.body);o(await c(`Updating`,async()=>u.dns.settings.account.edit({...e,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Updated`});return}let h=d({enforce_dns_only:i[`enforce-dns-only`],zone_defaults:{flatten_all_cnames:i[`zone-defaults-flatten-all-cnames`],foundation_dns:i[`zone-defaults-foundation-dns`],internal_dns:{reference_zone_id:f(i[`zone-defaults-internal-dns-reference-zone-id`],`zone-defaults-internal-dns-reference-zone-id`,`text`)},multi_provider:i[`zone-defaults-multi-provider`],ns_ttl:i[`zone-defaults-ns-ttl`],secondary_overrides:i[`zone-defaults-secondary-overrides`],soa:{expire:i[`zone-defaults-soa-expire`],min_ttl:i[`zone-defaults-soa-min-ttl`],mname:f(i[`zone-defaults-soa-mname`],`zone-defaults-soa-mname`,`text`),refresh:i[`zone-defaults-soa-refresh`],retry:i[`zone-defaults-soa-retry`],rname:f(i[`zone-defaults-soa-rname`],`zone-defaults-soa-rname`,`text`),ttl:i[`zone-defaults-soa-ttl`]},zone_mode:f(i[`zone-defaults-zone-mode`],`zone-defaults-zone-mode`,`text`),nameservers:{type:f(i[`zone-defaults-nameservers-type`],`zone-defaults-nameservers-type`,`text`)}}});o(await c(`Updating`,async()=>u.dns.settings.account.edit({...h,account_or_zone:p,account_or_zone_id:m})),{successLabel:`Updated`})}};function ae(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get`,describe:`Show DNS settings for an account or zone`,builder:ae,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf dns settings account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/dns_settings`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await t();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.dns.settings.account.get({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})}};function se(e){return e.option(`name`,{type:`string`,description:`The name of the view.`}).option(`zones`,{type:`string`,array:!0,description:`The list of zones linked to this view.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ce={command:`create`,describe:`Create Internal DNS View for an account`,builder:se,handler:async r=>{if(r.dryRun){s({command:`cf dns settings account views create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({name:f(r.name,`name`,`text`),zones:r.zones}):l(r.body)});return}let i=await a(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.dns.settings.account.views.create({...e,account_id:u})),{successLabel:`Created`});return}if(r.name===void 0&&(r.name=await m(`name`,`The name of the view.`)),r.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=d({name:f(r.name,`name`,`text`),zones:r.zones});o(await c(`Creating`,async()=>i.dns.settings.account.views.create({...p,account_id:u})),{successLabel:`Created`})}};function le(e){return e.positional(`view-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ue={command:`delete <view-id>`,describe:`Delete an existing Internal DNS View`,builder:le,handler:async r=>{if(r.dryRun){s({command:`cf dns settings account views delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views/${r[`view-id`]==null?`<view-id>`:encodeURIComponent(String(r[`view-id`]))}`,pathParams:{"view-id":String(r[`view-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
|
|
21
|
+
`);return}o(await c(`Deleting`,async()=>i.dns.settings.account.views.delete({account_id:l,view_id:r[`view-id`]})),{successLabel:`Deleted`})}};function de(e){return e.positional(`view-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the view.`}).option(`zones`,{type:`string`,array:!0,description:`The list of zones linked to this view.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fe={command:`edit <view-id>`,describe:`Update an existing Internal DNS View`,builder:de,handler:async r=>{if(r.dryRun){s({command:`cf dns settings account views edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views/${r[`view-id`]==null?`<view-id>`:encodeURIComponent(String(r[`view-id`]))}`,pathParams:{"view-id":String(r[`view-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({name:f(r.name,`name`,`text`),zones:r.zones}):l(r.body)});return}let i=await a(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.dns.settings.account.views.edit({...e,account_id:u,view_id:r[`view-id`]})),{successLabel:`Updated`});return}let p=d({name:f(r.name,`name`,`text`),zones:r.zones});o(await c(`Updating`,async()=>i.dns.settings.account.views.edit({...p,account_id:u,view_id:r[`view-id`]})),{successLabel:`Updated`})}};function pe(e){return e.positional(`view-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`get <view-id>`,describe:`Get DNS Internal View`,builder:pe,handler:async r=>{if(r.dryRun){s({command:`cf dns settings account views get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views/${r[`view-id`]==null?`<view-id>`:encodeURIComponent(String(r[`view-id`]))}`,pathParams:{"view-id":String(r[`view-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.settings.account.views.get({account_id:l,view_id:r[`view-id`]})),{successLabel:`Loaded`})}};function he(e){return e.option(`name`,{type:`string`,description:"Exact value of the DNS view name. This is a convenience alias for `name.exact`."}).option(`name-exact`,{type:`string`,description:`Exact value of the DNS view name.`}).option(`name-contains`,{type:`string`,description:`Substring of the DNS view name.`}).option(`name-startswith`,{type:`string`,description:`Prefix of the DNS view name.`}).option(`name-endswith`,{type:`string`,description:`Suffix of the DNS view name.`}).option(`zone-id`,{type:`string`,description:`A zone ID that exists in the zones list for the view.`}).option(`zone-name`,{type:`string`,description:`A zone name that exists in the zones list for the view.`}).option(`match`,{type:`string`,description:"Whether to match all search requirements or at least one (any). If set to `all`, acts like a logical AND between filters. If set to `any`, acts like a logical OR instead.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of DNS views per page.`}).option(`order`,{type:`string`,description:`Field to order DNS views by.`,choices:[`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order DNS views in.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`list`,describe:`List DNS Internal Views for an Account`,builder:g(he),handler:async r=>{let i={name:r.name,"name.exact":r[`name-exact`],"name.contains":r[`name-contains`],"name.startswith":r[`name-startswith`],"name.endswith":r[`name-endswith`],zone_id:r[`zone-id`],zone_name:r[`zone-name`],match:r.match,page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){s({command:`cf dns settings account views list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/dns_settings/views`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.dns.settings.account.views.list({account_id:u,...i})),{successLabel:`Loaded`})}},_e={command:`views`,describe:`Operations for settings.account.views`,builder:e=>e.command(ce).command(ue).command(fe).command(me).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ve={command:`account`,describe:`Operations for settings.account`,builder:e=>e.command(ie).command(oe).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ye={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function be(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const xe={command:`get`,describe:`Get the current DNS record usage and quota for an account or zone. May include internal DNS usage and quota.`,builder:be,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf dns usage account get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/dns_records/usage`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await t();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.dns.usage.account.get({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})}},Se={command:`account`,describe:`Operations for usage.account`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ce={command:`usage`,describe:`Operations for usage`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function we(e){return e.option(`ip-range`,{type:`string`,description:`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`}).option(`name`,{type:`string`,description:`The name of the acl.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`create`,describe:`Create ACL.`,builder:we,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers acls create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/acls`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({ip_range:f(r[`ip-range`],`ip-range`,`text`),name:f(r.name,`name`,`text`)}):l(r.body)});return}let i=await a(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.dns.zoneTransfers.acls.create({...e,account_id:u})),{successLabel:`Created`});return}r[`ip-range`]===void 0&&(r[`ip-range`]=await m(`ip-range`,`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`)),r.name===void 0&&(r.name=await m(`name`,`The name of the acl.`));let p=d({ip_range:f(r[`ip-range`],`ip-range`,`text`),name:f(r.name,`name`,`text`)});o(await c(`Creating`,async()=>i.dns.zoneTransfers.acls.create({...p,account_id:u})),{successLabel:`Created`})}};function Ee(e){return e.positional(`acl-id`,{type:`string`,description:`Acl ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const De={command:`delete <acl-id>`,describe:`Delete ACL.`,builder:Ee,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers acls delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"acl-id":String(r[`acl-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
|
|
22
|
+
`);return}o(await c(`Deleting`,async()=>i.dns.zoneTransfers.acls.delete({account_id:l,acl_id:r[`acl-id`]})),{successLabel:`Deleted`})}};function Oe(e){return e.positional(`acl-id`,{type:`string`,description:`Acl ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`get <acl-id>`,describe:`Get ACL.`,builder:Oe,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers acls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"acl-id":String(r[`acl-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.acls.get({account_id:l,acl_id:r[`acl-id`]})),{successLabel:`Loaded`})}};function Ae(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`list`,describe:`List ACLs.`,builder:Ae,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers acls list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/acls`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.acls.list({account_id:l})),{successLabel:`Loaded`})}};function Me(e){return e.positional(`acl-id`,{type:`string`,description:`Acl ID`,demandOption:!0}).option(`ip-range`,{type:`string`,description:`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`}).option(`name`,{type:`string`,description:`The name of the acl.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ne={command:`update <acl-id>`,describe:`Modify ACL.`,builder:Me,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers acls update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/acls/${r[`acl-id`]==null?`<acl-id>`:encodeURIComponent(String(r[`acl-id`]))}`,pathParams:{"acl-id":String(r[`acl-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({ip_range:f(r[`ip-range`],`ip-range`,`text`),name:f(r.name,`name`,`text`)}):l(r.body)});return}let i=await a(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.dns.zoneTransfers.acls.update({body:e,account_id:u,acl_id:r[`acl-id`]})),{successLabel:`Updated`});return}r[`ip-range`]===void 0&&(r[`ip-range`]=await m(`ip-range`,`Allowed IPv4/IPv6 address range of primary or secondary nameservers. This will be applied for the entire account. The IP range is used to allow additional NOTIFY IPs for secondary zones and IPs Cloudflare allows AXFR/IXFR requests from for primary zones. CIDRs are limited to a maximum of /24 for IPv4 and /64 for IPv6 respectively.`)),r.name===void 0&&(r.name=await m(`name`,`The name of the acl.`));let p=d({ip_range:f(r[`ip-range`],`ip-range`,`text`),name:f(r.name,`name`,`text`)});o(await c(`Updating`,async()=>i.dns.zoneTransfers.acls.update({body:p,account_id:u,acl_id:r[`acl-id`]})),{successLabel:`Updated`})}},Pe={command:`acls`,describe:`Operations for zone-transfers.acls`,builder:e=>e.command(Te).command(De).command(ke).command(je).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`create`,describe:`Sends AXFR zone transfer request to primary nameserver(s).`,builder:Fe,handler:async e=>{if(e.dryRun){s({command:`cf dns zone-transfers force-axfr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/force_axfr`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.zoneTransfers.forceAxfr.create({zone_id:n})),{successLabel:`Created`})}},Le={command:`force-axfr`,describe:`Operations for zone-transfers.force-axfr`,builder:e=>e.command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Re(e){return e.option(`auto-refresh-seconds`,{type:`number`,description:`How often should a secondary zone auto refresh regardless of DNS NOTIFY.
|
|
23
|
+
Not applicable for primary zones.`,default:86400}).option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ze={command:`create`,describe:`Create secondary zone configuration for incoming zone transfers.`,builder:Re,handler:async e=>{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?d({auto_refresh_seconds:e[`auto-refresh-seconds`],name:f(e.name,`name`,`text`),peers:e.peers}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Creating`,async()=>t.dns.zoneTransfers.incoming.create({body:r,zone_id:n})),{successLabel:`Created`});return}if(e[`auto-refresh-seconds`]===void 0)throw Error(`--auto-refresh-seconds is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await m(`name`,`Zone name.`)),e.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let i=d({auto_refresh_seconds:e[`auto-refresh-seconds`],name:f(e.name,`name`,`text`),peers:e.peers});o(await c(`Creating`,async()=>t.dns.zoneTransfers.incoming.create({body:i,zone_id:n})),{successLabel:`Created`})}};function Be(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ve={command:`delete`,describe:`Delete secondary zone configuration for incoming zone transfers.`,builder:Be,handler:async e=>{if(e.dryRun){s({command:`cf dns zone-transfers incoming delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/incoming`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
24
|
+
`);return}o(await c(`Deleting`,async()=>t.dns.zoneTransfers.incoming.delete({zone_id:n})),{successLabel:`Deleted`})}};function He(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ue={command:`get`,describe:`Get secondary zone configuration for incoming zone transfers.`,builder:He,handler:async e=>{if(e.dryRun){s({command:`cf dns zone-transfers incoming get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/incoming`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.zoneTransfers.incoming.get({zone_id:n})),{successLabel:`Loaded`})}};function We(e){return e.option(`auto-refresh-seconds`,{type:`number`,description:`How often should a secondary zone auto refresh regardless of DNS NOTIFY.
|
|
25
|
+
Not applicable for primary zones.`}).option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ge={command:`update`,describe:`Update secondary zone configuration for incoming zone transfers.`,builder:We,handler:async e=>{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?d({auto_refresh_seconds:e[`auto-refresh-seconds`],name:f(e.name,`name`,`text`),peers:e.peers}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Updating`,async()=>t.dns.zoneTransfers.incoming.update({body:r,zone_id:n})),{successLabel:`Updated`});return}if(e[`auto-refresh-seconds`]===void 0)throw Error(`--auto-refresh-seconds is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await m(`name`,`Zone name.`)),e.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let i=d({auto_refresh_seconds:e[`auto-refresh-seconds`],name:f(e.name,`name`,`text`),peers:e.peers});o(await c(`Updating`,async()=>t.dns.zoneTransfers.incoming.update({body:i,zone_id:n})),{successLabel:`Updated`})}},Ke={command:`incoming`,describe:`Operations for zone-transfers.incoming`,builder:e=>e.command(ze).command(Ve).command(Ue).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qe(e){return e.option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Je={command:`create`,describe:`Create primary zone configuration for outgoing zone transfers.`,builder:qe,handler:async e=>{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?d({name:f(e.name,`name`,`text`),peers:e.peers}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.create({body:r,zone_id:n})),{successLabel:`Created`});return}if(e.name===void 0&&(e.name=await m(`name`,`Zone name.`)),e.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let i=d({name:f(e.name,`name`,`text`),peers:e.peers});o(await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.create({body:i,zone_id:n})),{successLabel:`Created`})}};function Ye(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Xe={command:`delete`,describe:`Delete primary zone configuration for outgoing zone transfers.`,builder:Ye,handler:async e=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
26
|
+
`);return}o(await c(`Deleting`,async()=>t.dns.zoneTransfers.outgoing.delete({zone_id:n})),{successLabel:`Deleted`})}};function Ze(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Qe={command:`disable`,describe:`Disable outgoing zone transfers for primary zone and clears IXFR backlog of primary zone.`,builder:Ze,handler:async e=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/disable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await h({force:!!e.force,message:`This operation turns off outgoing zone transfers for the primary zone, which means secondary zones will stop receiving updates.`})){process.stderr.write(`Aborted.
|
|
27
|
+
`);return}o(await c(`Deleting`,async()=>t.dns.zoneTransfers.outgoing.disable({zone_id:n})),{successLabel:`Deleted`})}};function $e(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const et={command:`enable`,describe:`Enable outgoing zone transfers for primary zone.`,builder:$e,handler:async e=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/enable`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.enable({zone_id:n})),{successLabel:`Created`})}};function tt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const nt={command:`force-notify`,describe:`Notifies the secondary nameserver(s) and clears IXFR backlog of primary zone.`,builder:tt,handler:async e=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing force-notify`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/force_notify`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Creating`,async()=>t.dns.zoneTransfers.outgoing.forceNotify({zone_id:n})),{successLabel:`Created`})}};function rt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get`,describe:`Get primary zone configuration for outgoing zone transfers.`,builder:rt,handler:async e=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.zoneTransfers.outgoing.get({zone_id:n})),{successLabel:`Loaded`})}};function at(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ot={command:`get`,describe:`Get primary zone transfer status.`,builder:at,handler:async e=>{if(e.dryRun){s({command:`cf dns zone-transfers outgoing status get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/secondary_dns/outgoing/status`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.dns.zoneTransfers.outgoing.status.get({zone_id:n})),{successLabel:`Loaded`})}},st={command:`status`,describe:`Operations for zone-transfers.outgoing.status`,builder:e=>e.command(ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ct(e){return e.option(`name`,{type:`string`,description:`Zone name.`}).option(`peers`,{type:`string`,array:!0,description:`A list of peer tags.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const lt={command:`update`,describe:`Update primary zone configuration for outgoing zone transfers.`,builder:ct,handler:async e=>{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?d({name:f(e.name,`name`,`text`),peers:e.peers}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Updating`,async()=>t.dns.zoneTransfers.outgoing.update({body:r,zone_id:n})),{successLabel:`Updated`});return}if(e.name===void 0&&(e.name=await m(`name`,`Zone name.`)),e.peers===void 0)throw Error(`--peers is required (or pass --body with this field set).`);let i=d({name:f(e.name,`name`,`text`),peers:e.peers});o(await c(`Updating`,async()=>t.dns.zoneTransfers.outgoing.update({body:i,zone_id:n})),{successLabel:`Updated`})}},ut={command:`outgoing`,describe:`Operations for zone-transfers.outgoing`,builder:e=>e.command(Je).command(Xe).command(Qe).command(et).command(nt).command(it).command(lt).command(st).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function dt(e){return e.option(`name`,{type:`string`,description:`The name of the peer.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ft={command:`create`,describe:`Create Peer.`,builder:dt,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers peers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/peers`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({name:f(r.name,`name`,`text`)}):l(r.body)});return}let i=await a(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.dns.zoneTransfers.peers.create({...e,account_id:u})),{successLabel:`Created`});return}r.name===void 0&&(r.name=await m(`name`,`The name of the peer.`));let p=d({name:f(r.name,`name`,`text`)});o(await c(`Creating`,async()=>i.dns.zoneTransfers.peers.create({...p,account_id:u})),{successLabel:`Created`})}};function pt(e){return e.positional(`peer-id`,{type:`string`,description:`Peer ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const mt={command:`delete <peer-id>`,describe:`Delete Peer.`,builder:pt,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers peers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/peers/${r[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(r[`peer-id`]))}`,pathParams:{"peer-id":String(r[`peer-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
|
|
28
|
+
`);return}o(await c(`Deleting`,async()=>i.dns.zoneTransfers.peers.delete({account_id:l,peer_id:r[`peer-id`]})),{successLabel:`Deleted`})}};function ht(e){return e.positional(`peer-id`,{type:`string`,description:`Peer ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gt={command:`get <peer-id>`,describe:`Get Peer.`,builder:ht,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers peers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/peers/${r[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(r[`peer-id`]))}`,pathParams:{"peer-id":String(r[`peer-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.peers.get({account_id:l,peer_id:r[`peer-id`]})),{successLabel:`Loaded`})}};function _t(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const vt={command:`list`,describe:`List Peers.`,builder:_t,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers peers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/peers`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.peers.list({account_id:l})),{successLabel:`Loaded`})}};function yt(e){return e.positional(`peer-id`,{type:`string`,description:`Peer ID`,demandOption:!0}).option(`ip`,{type:`string`,description:`IPv4/IPv6 address of primary or secondary nameserver, depending on what zone this peer is linked to. For primary zones this IP defines the IP of the secondary nameserver Cloudflare will NOTIFY upon zone changes. For secondary zones this IP defines the IP of the primary nameserver Cloudflare will send AXFR/IXFR requests to.`}).option(`ixfr-enable`,{type:`boolean`,description:`Enable IXFR transfer protocol, default is AXFR. Only applicable to secondary zones.`}).option(`name`,{type:`string`,description:`The name of the peer.`}).option(`port`,{type:`number`,description:`DNS port of primary or secondary nameserver, depending on what zone this peer is linked to.`}).option(`tsig-id`,{type:`string`,description:`TSIG authentication will be used for zone transfer if configured.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $={command:`update <peer-id>`,describe:`Modify Peer.`,builder:yt,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers peers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/peers/${r[`peer-id`]==null?`<peer-id>`:encodeURIComponent(String(r[`peer-id`]))}`,pathParams:{"peer-id":String(r[`peer-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({ip:f(r.ip,`ip`,`text`),ixfr_enable:r[`ixfr-enable`],name:f(r.name,`name`,`text`),port:r.port,tsig_id:f(r[`tsig-id`],`tsig-id`,`text`)}):l(r.body)});return}let i=await a(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.dns.zoneTransfers.peers.update({body:e,account_id:u,peer_id:r[`peer-id`]})),{successLabel:`Updated`});return}r.name===void 0&&(r.name=await m(`name`,`The name of the peer.`));let p=d({ip:f(r.ip,`ip`,`text`),ixfr_enable:r[`ixfr-enable`],name:f(r.name,`name`,`text`),port:r.port,tsig_id:f(r[`tsig-id`],`tsig-id`,`text`)});o(await c(`Updating`,async()=>i.dns.zoneTransfers.peers.update({body:p,account_id:u,peer_id:r[`peer-id`]})),{successLabel:`Updated`})}},bt={command:`peers`,describe:`Operations for zone-transfers.peers`,builder:e=>e.command(ft).command(mt).command(gt).command(vt).command($).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xt(e){return e.option(`algo`,{type:`string`,description:`TSIG algorithm.`}).option(`name`,{type:`string`,description:`TSIG key name.`}).option(`secret`,{type:`string`,description:`TSIG secret.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const St={command:`create`,describe:`Create TSIG.`,builder:xt,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers tsigs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({algo:f(r.algo,`algo`,`text`),name:f(r.name,`name`,`text`),secret:f(r.secret,`secret`,`text`)}):l(r.body)});return}let i=await a(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:e,account_id:u})),{successLabel:`Created`});return}r.algo===void 0&&(r.algo=await m(`algo`,`TSIG algorithm.`)),r.name===void 0&&(r.name=await m(`name`,`TSIG key name.`)),r.secret===void 0&&(r.secret=await m(`secret`,`TSIG secret.`,{kind:`secret`}));let p=d({algo:f(r.algo,`algo`,`text`),name:f(r.name,`name`,`text`),secret:f(r.secret,`secret`,`text`)});o(await c(`Creating`,async()=>i.dns.zoneTransfers.tsigs.create({body:p,account_id:u})),{successLabel:`Created`})}};function Ct(e){return e.positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const wt={command:`delete <tsig-id>`,describe:`Delete TSIG.`,builder:Ct,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers tsigs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/tsigs/${r[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(r[`tsig-id`]))}`,pathParams:{"tsig-id":String(r[`tsig-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
|
|
29
|
+
`);return}o(await c(`Deleting`,async()=>i.dns.zoneTransfers.tsigs.delete({account_id:l,tsig_id:r[`tsig-id`]})),{successLabel:`Deleted`})}};function Tt(e){return e.positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Et={command:`get <tsig-id>`,describe:`Get TSIG.`,builder:Tt,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers tsigs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/tsigs/${r[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(r[`tsig-id`]))}`,pathParams:{"tsig-id":String(r[`tsig-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.tsigs.get({account_id:l,tsig_id:r[`tsig-id`]})),{successLabel:`Loaded`})}};function Dt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ot={command:`list`,describe:`List TSIGs.`,builder:Dt,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers tsigs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/tsigs`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.dns.zoneTransfers.tsigs.list({account_id:l})),{successLabel:`Loaded`})}};function kt(e){return e.positional(`tsig-id`,{type:`string`,description:`Tsig ID`,demandOption:!0}).option(`algo`,{type:`string`,description:`TSIG algorithm.`}).option(`name`,{type:`string`,description:`TSIG key name.`}).option(`secret`,{type:`string`,description:`TSIG secret.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const At={command:`update <tsig-id>`,describe:`Modify TSIG.`,builder:kt,handler:async r=>{if(r.dryRun){s({command:`cf dns zone-transfers tsigs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/secondary_dns/tsigs/${r[`tsig-id`]==null?`<tsig-id>`:encodeURIComponent(String(r[`tsig-id`]))}`,pathParams:{"tsig-id":String(r[`tsig-id`]??``)},bodyKind:`json`,body:r.body===void 0?d({algo:f(r.algo,`algo`,`text`),name:f(r.name,`name`,`text`),secret:f(r.secret,`secret`,`text`)}):l(r.body)});return}let i=await a(r),u=r.local?e:await t();if(r.accountId=u,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:e,account_id:u,tsig_id:r[`tsig-id`]})),{successLabel:`Updated`});return}r.algo===void 0&&(r.algo=await m(`algo`,`TSIG algorithm.`)),r.name===void 0&&(r.name=await m(`name`,`TSIG key name.`)),r.secret===void 0&&(r.secret=await m(`secret`,`TSIG secret.`,{kind:`secret`}));let p=d({algo:f(r.algo,`algo`,`text`),name:f(r.name,`name`,`text`),secret:f(r.secret,`secret`,`text`)});o(await c(`Updating`,async()=>i.dns.zoneTransfers.tsigs.update({body:p,account_id:u,tsig_id:r[`tsig-id`]})),{successLabel:`Updated`})}},jt={command:`tsigs`,describe:`Operations for zone-transfers.tsigs`,builder:e=>e.command(St).command(wt).command(Et).command(Ot).command(At).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Mt={command:`zone-transfers`,describe:`Operations for zone-transfers`,builder:e=>e.command(Pe).command(Le).command(Ke).command(ut).command(bt).command(jt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Nt={command:`dns`,describe:`dns`,builder:e=>e.command(E).command(ne).command(ye).command(Ce).command(Mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Nt as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n}from"./oauth-DuEONNgC.mjs";import{r}from"./auth-D3X9HYhD.mjs";import{t as i}from"./output-Ccqw2WOb.mjs";import{t as a}from"./dry-run-DL2V6yFm.mjs";import{t as o}from"./progress-BqQcF5QH.mjs";import{n as s,t as c}from"./body-parser-BshbixEq.mjs";import{n as l}from"./input-validation-QDIYu7Vb.mjs";import{a as u,n as d}from"./prompt-B0sWIs9c.mjs";function f(e){return e.option(`attack-mitigation-enabled`,{type:`boolean`,description:`When enabled, automatically mitigate random-prefix attacks to protect upstream DNS servers`}).option(`attack-mitigation-only-when-upstream-unhealthy`,{type:`boolean`,description:`Only mitigate attacks when upstream servers seem unhealthy`}).option(`deprecate-any-requests`,{type:`boolean`,description:`Whether to refuse to answer queries for the ANY type`}).option(`ecs-fallback`,{type:`boolean`,description:`Whether to forward client IP (resolver) subnet if no EDNS Client Subnet is sent`}).option(`maximum-cache-ttl`,{type:`number`,description:`By default, Cloudflare attempts to cache responses for as long as
|
|
3
3
|
indicated by the TTL received from upstream nameservers. This setting
|
|
4
4
|
sets an upper bound on this duration. For caching purposes, higher TTLs
|
|
5
5
|
will be decreased to the maximum value defined by this setting.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./chunk-6EUZQHAF-
|
|
2
|
+
import{i as e}from"./chunk-6EUZQHAF-C3w62dek.mjs";var t=e(e=>{let t=typeof e;return e!==null&&(t===`object`||t===`function`)},`isObject`),n=e(e=>t(e)&&Object.keys(e).length===0,`isEmptyObject`),r=new Set([`__proto__`,`prototype`,`constructor`]),i=new Set(`0123456789`);function a(e){let t=[],n=``,a=`start`,o=!1;for(let s of e)switch(s){case`\\`:if(a===`index`)throw Error(`Invalid character in an index`);if(a===`indexEnd`)throw Error(`Invalid character after an index`);o&&(n+=s),a=`property`,o=!o;break;case`.`:if(a===`index`)throw Error(`Invalid character in an index`);if(a===`indexEnd`){a=`property`;break}if(o){o=!1,n+=s;break}if(r.has(n))return[];t.push(n),n=``,a=`property`;break;case`[`:if(a===`index`)throw Error(`Invalid character in an index`);if(a===`indexEnd`){a=`index`;break}if(o){o=!1,n+=s;break}if(a===`property`){if(r.has(n))return[];t.push(n),n=``}a=`index`;break;case`]`:if(a===`index`){t.push(Number.parseInt(n,10)),n=``,a=`indexEnd`;break}if(a===`indexEnd`)throw Error(`Invalid character after an index`);default:if(a===`index`&&!i.has(s))throw Error(`Invalid character in an index`);if(a===`indexEnd`)throw Error(`Invalid character after an index`);a===`start`&&(a=`property`),o&&(o=!1,n+=`\\`),n+=s}switch(o&&(n+=`\\`),a){case`property`:if(r.has(n))return[];t.push(n);break;case`index`:throw Error(`Index was not closed`);case`start`:t.push(``);break}return t}e(a,`getPathSegments`);function o(e,t){if(typeof t!=`number`&&Array.isArray(e)){let n=Number.parseInt(t,10);return Number.isInteger(n)&&e[n]===e[t]}return!1}e(o,`isStringIndex`);function s(e,t){if(o(e,t))throw Error(`Cannot use string index`)}e(s,`assertNotStringIndex`);function c(e,n,r){if(!t(e)||typeof n!=`string`)return r===void 0?e:r;let i=a(n);if(i.length===0)return r;for(let t=0;t<i.length;t++){let n=i[t];if(e=o(e,n)?t===i.length-1?void 0:null:e[n],e==null){if(t!==i.length-1)return r;break}}return e===void 0?r:e}e(c,`getProperty`);function l(e,n,r){if(!t(e)||typeof n!=`string`)return e;let i=e,o=a(n);for(let n=0;n<o.length;n++){let i=o[n];s(e,i),n===o.length-1?e[i]=r:t(e[i])||(e[i]=typeof o[n+1]==`number`?[]:{}),e=e[i]}return i}e(l,`setProperty`);function u(e,n){if(!t(e)||typeof n!=`string`)return!1;let r=a(n);for(let n=0;n<r.length;n++){let i=r[n];if(s(e,i),n===r.length-1)return delete e[i],!0;if(e=e[i],!t(e))return!1}}e(u,`deleteProperty`);function d(e,n){if(!t(e)||typeof n!=`string`)return!1;let r=a(n);if(r.length===0)return!1;for(let n of r){if(!t(e)||!(n in e)||o(e,n))return!1;e=e[n]}return!0}e(d,`hasProperty`);function f(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replaceAll(/[\\.[]/g,`\\$&`)}e(f,`escapePath`);function p(e){let t=Object.entries(e);return Array.isArray(e)?t.map(([e,t])=>[Number(e),t]):t}e(p,`entries`);function m(e){let t=``;for(let[n,r]of p(e))typeof r==`number`?t+=`[${r}]`:(r=f(r),t+=n===0?r:`.${r}`);return t}e(m,`stringifyPath`);function*h(e,r=[]){if(!t(e)||n(e)){r.length>0&&(yield m(r));return}for(let[t,n]of p(e))yield*h(n,[...r,t])}e(h,`deepKeysIterator`);function g(e){return[...h(e)]}e(g,`deepKeys`);export{c as getProperty};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-Be3lg_9E.mjs";import{f as t,g as n}from"./oauth-DuEONNgC.mjs";import{r}from"./auth-D3X9HYhD.mjs";import{t as i}from"./output-Ccqw2WOb.mjs";import{t as a}from"./dry-run-DL2V6yFm.mjs";import{t as o}from"./progress-BqQcF5QH.mjs";function s(e){return e.option(`page`,{type:`number`,description:`Current page.`}).option(`per-page`,{type:`number`,description:`Items per-page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`Returns the Durable Object namespaces owned by an account.`,builder:s,handler:async s=>{let c={page:s.page,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf durable-objects namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/durable_objects/namespaces`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.durableObjects.namespaces.list({account_id:u,...c})),{successLabel:`Loaded`})}};function l(e){return e.option(`id`,{type:`string`,description:`ID of the namespace.`,demandOption:!0}).option(`limit`,{type:`number`,description:`The number of objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`Opaque token indicating the position from which to continue when requesting the next set of records. A valid value for the cursor can be obtained from the cursors object in the result_info structure.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`Returns the Durable Objects in a given namespace.`,builder:l,handler:async s=>{let c={limit:s.limit,cursor:s.cursor};if(s.dryRun){a({command:`cf durable-objects namespaces objects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/workers/durable_objects/namespaces/${s.id==null?`<id>`:encodeURIComponent(String(s.id))}/objects`,pathParams:{id:String(s.id??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.durableObjects.namespaces.objects.list({account_id:u,id:s.id,...c})),{successLabel:`Loaded`})}},d={command:`objects`,describe:`Operations for namespaces.objects`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},f={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(c).command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},p={command:`durable-objects`,describe:`durable-objects`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{h as e}from"./oauth-DuEONNgC.mjs";import{r as t}from"./auth-D3X9HYhD.mjs";import{t as n}from"./output-Ccqw2WOb.mjs";import{t as r}from"./dry-run-DL2V6yFm.mjs";import{t as i}from"./progress-BqQcF5QH.mjs";import{n as a,t as o}from"./body-parser-BshbixEq.mjs";function s(e){return e.option(`enabled`,{type:`boolean`,description:`Enable or disable DMARC reports for this zone`}).option(`skip-wizard`,{type:`boolean`,description:`Skip the DMARC setup wizard`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for PATCH /dmarc-reports`})}const c={command:`edit`,describe:"Updates the DMARC report configuration for a zone. At least one of `enabled` or `skip_wizard` must be provided. When enabling, the handler will ensure the DMARC RUA record exists in DNS.",builder:s,handler:async s=>{if(s.dryRun){r({command:`cf email-auth dmarc-reports edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?o({enabled:s.enabled,skip_wizard:s[`skip-wizard`]}):a(s.body)});return}let c=await t(s),l=await e({zone:s.zone},c,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=a(s.body);n(await i(`Updating`,async()=>c.emailAuth.dmarcReports.edit({...e,zone_id:l})),{successLabel:`Updated`});return}let u=o({enabled:s.enabled,skip_wizard:s[`skip-wizard`]});n(await i(`Updating`,async()=>c.emailAuth.dmarcReports.edit({...u,zone_id:l})),{successLabel:`Updated`})}};function l(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`Retrieves the current DMARC report configuration and status for a zone. Returns the RUA prefix, enabled status, approved sources, and DNS records.`,builder:l,handler:async a=>{if(a.dryRun){r({command:`cf email-auth dmarc-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/email/auth/dmarc-reports`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.emailAuth.dmarcReports.get({zone_id:s})),{successLabel:`Loaded`})}},d={command:`dmarc-reports`,describe:`Operations for dmarc-reports`,builder:e=>e.command(c).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function f(e){return e.option(`id`,{type:`string`,description:`DNS record ID (rec_tag) to inspect`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`inspect`,describe:"Inspects a specific SPF TXT record and returns a parsed tree structure in the spflimit-worker format. The record ID must be provided via the `id` query parameter. Returns a recursive tree showing: - Parsed components with their qualifiers and types - Nested includes recursively resolved within components - Per-component and total lookup counts - Detailed error information with context",builder:f,handler:async a=>{let o={id:a.id};if(a.dryRun){r({command:`cf email-auth spf inspect`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/email/auth/spf/inspect`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.emailAuth.spf.inspect({zone_id:c,...o})),{successLabel:`Loaded`})}},m={command:`spf`,describe:`Operations for spf`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`email-auth`,describe:`email-auth`,builder:e=>e.command(d).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
|