cf 1.0.0-beta.14 → 1.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/_meta/commands.json +3409 -621
- package/dist/_meta/hand-written-commands.json +33 -0
- package/dist/_meta/schemas.json +2160 -246
- package/dist/abuse-reports-CnQBtN1G.mjs +24 -0
- package/dist/{access-k1QjF5rE.mjs → access-BzmXSwzj.mjs} +1 -1
- package/dist/account-tags-2qPWbW17.mjs +15 -0
- package/dist/accounts-B0Byg-AV.mjs +132 -0
- package/dist/acm-DgAu0cnk.mjs +15 -0
- package/dist/addressing-J1oa0ML2.mjs +105 -0
- package/dist/agent-memory-4KGou-tm.mjs +34 -0
- package/dist/ai-WY7wVQfA.mjs +31 -0
- package/dist/ai-audit-D38HaEoZ.mjs +6 -0
- package/dist/ai-gateway-C0gIipT8.mjs +80 -0
- package/dist/ai-search-ClwnPU-9.mjs +79 -0
- package/dist/ai-security-BIsvFPYV.mjs +10 -0
- package/dist/alerting-MHhv28oO.mjs +56 -0
- package/dist/analytics-BfBz7bqB.mjs +17 -0
- package/dist/analytics_engine-CXVdBF1n.mjs +4 -0
- package/dist/api-eMuS5GI1.mjs +3 -0
- package/dist/api-security-DUCfcdC1.mjs +154 -0
- package/dist/argo-CUlzI4v3.mjs +14 -0
- package/dist/artifacts-BLfWGzBg.mjs +43 -0
- package/dist/audit-logs-CsfIm2QS.mjs +4 -0
- package/dist/auth-8Sm4uLGM.mjs +2 -0
- package/dist/auth-C6u9qIGO.mjs +2 -0
- package/dist/auth-CGRemu5W.mjs +2 -0
- package/dist/{auth-token-Dop0wLCw.mjs → auth-token-DkkYg4DP.mjs} +1 -1
- package/dist/{autoconfig-RQ3HS4m1.mjs → autoconfig-B0ESZ8DJ.mjs} +2 -2
- package/dist/basin-catalog-CrKRYJ0b.mjs +46 -0
- package/dist/billing-NxehgXrR.mjs +23 -0
- package/dist/blocks-Bat9A8V_.mjs +5 -0
- package/dist/bot-management-C993iQKL.mjs +9 -0
- package/dist/botnet-feed-CZ4vYk5y.mjs +11 -0
- package/dist/brand-protection-ADVgIi0l.mjs +27 -0
- package/dist/browser-run-CEptKZYl.mjs +42 -0
- package/dist/build-Bm6kGyzo.mjs +2 -0
- package/dist/{build-CCe7IrWT.mjs → build-sBpqm9ga.mjs} +1 -1
- package/dist/builds-DqtiTH7p.mjs +71 -0
- package/dist/cache-hX5QxmI0.mjs +45 -0
- package/dist/certificate-authorities-BOcybjc1.mjs +6 -0
- package/dist/cf-Bq4pA4n6.mjs +18 -0
- package/dist/{chunk-TAK63GWY-DdMktrgc.mjs → chunk-2HLTAS5V-D7COzUOd.mjs} +2 -2
- package/dist/chunk-2K52M2W5-CYxfQXUq.mjs +363 -0
- package/dist/{chunk-DSGVRFIS-CPI5cYtB.mjs → chunk-DSGVRFIS-C5SqiTOz.mjs} +1 -1
- package/dist/{cli-ht4q6i2y.mjs → cli-R8h3OKZI.mjs} +1 -1
- package/dist/client-certificates-Bez_ArKE.mjs +13 -0
- package/dist/client-side-security-CSmA50Bv.mjs +63 -0
- package/dist/cloud-connector-0Wivqi7S.mjs +6 -0
- package/dist/{cloudflared-D83U8Yn3.mjs → cloudflared-By8BzYXc.mjs} +1 -1
- package/dist/cloudforce-one-J-rU6k1U.mjs +405 -0
- package/dist/{command-9VAc7b30.mjs → command-0BOb1pgV.mjs} +1 -1
- package/dist/{command-CyJQ40fc.mjs → command-BCJN-ZM2.mjs} +1 -1
- package/dist/{command-OHov3PEc.mjs → command-BG-kLOnS.mjs} +1 -1
- package/dist/{command-B_Ixlz8Q.mjs → command-BIsI-mMX.mjs} +1 -1
- package/dist/{command-SmWD-MeI.mjs → command-BKDbbA-L.mjs} +1 -1
- package/dist/command-BWQIKu6I.mjs +2 -0
- package/dist/{command-Ckb9FufU.mjs → command-Bdy69UFU.mjs} +1 -1
- package/dist/{command-CtVUNm__.mjs → command-Bgb-3yPg.mjs} +1 -1
- package/dist/{command-DtgJilOK.mjs → command-C6w1OdoC.mjs} +1 -1
- package/dist/{command-BtDY_MKv.mjs → command-CKW6UhTh.mjs} +1 -1
- package/dist/{command-Bpzp8Mz2.mjs → command-DCQgsd2U.mjs} +1 -1
- package/dist/{command-DjEJaOwV.mjs → command-DIs-Nqtl.mjs} +1 -1
- package/dist/command-DPn5ANHs.mjs +2 -0
- package/dist/{command-CUNMrMou.mjs → command-DZfKHiru.mjs} +1 -1
- package/dist/{command-DXaRn1ls.mjs → command-DppVezAB.mjs} +1 -1
- package/dist/{completions-CuqAO3N_.mjs → completions-CpNGTlUX.mjs} +1 -1
- package/dist/config.mjs +0 -0
- package/dist/connector-interrupts-CH-DaLuo.mjs +6 -0
- package/dist/connector-telemetry-events-X3Fod9nl.mjs +6 -0
- package/dist/connector-telemetry-snapshots-D-WR4npQ.mjs +6 -0
- package/dist/connectors-CORKD31m.mjs +15 -0
- package/dist/containers-BboUbx3k.mjs +78 -0
- package/dist/containers-Di3_Vopq.mjs +376 -0
- package/dist/content-scan-DXGREAXa.mjs +14 -0
- package/dist/{context-BBLtgdR1.mjs → context-A6T-NKPI.mjs} +2 -2
- package/dist/{cps-C5phNoVU.mjs → cps-1BoOLtTq.mjs} +3 -3
- package/dist/create-OXylMu6m.mjs +2 -0
- package/dist/csamScanner-CHfbfeup.mjs +10 -0
- package/dist/ct-alerting-DlH4ILQo.mjs +5 -0
- package/dist/custom-certificates-zJqJZ2Th.mjs +17 -0
- package/dist/custom-csrs-DoLIGqYL.mjs +11 -0
- package/dist/custom-hostnames-YfV-aoAK.mjs +27 -0
- package/dist/custom-nameservers-BV43gmgt.mjs +9 -0
- package/dist/custom-pages-CoOU1Cdx.mjs +21 -0
- package/dist/{d1-EQMUlHTJ.mjs → d1-DujBmzLa.mjs} +31 -31
- package/dist/dcv-delegation-CPLsVYOl.mjs +4 -0
- package/dist/delegate.mjs +0 -0
- package/dist/deploy-context-tEhwEXnA.mjs +56 -0
- package/dist/{deploy-input-BCjcuP6u.mjs → deploy-input-BqJ7GVZ-.mjs} +1 -1
- package/dist/{deploy-B22sEVHd.mjs → deploy-wNujfGUJ.mjs} +1 -1
- package/dist/{dev-ClhhXuNU.mjs → dev-EtnMYA7K.mjs} +1 -1
- package/dist/diagnostics-B3TYPVRi.mjs +15 -0
- package/dist/{dist-DmRM6WSZ.mjs → dist-DZRTPMMA.mjs} +4 -4
- package/dist/dls-CWm1HRF0.mjs +17 -0
- package/dist/dns-CjAFU7Z9.mjs +144 -0
- package/dist/dns-firewall-BooBP9ap.mjs +71 -0
- package/dist/docs-C5XB7HdG.mjs +3 -0
- package/dist/{dotenv-DpXaxfho.mjs → dotenv-usOKkeW7.mjs} +3 -3
- package/dist/{dry-run-DRj2_uV3.mjs → dry-run-C2KjGX10.mjs} +1 -1
- package/dist/durable-objects-CSrMQDCE.mjs +6 -0
- package/dist/email-auth-Bp1Mui-n.mjs +6 -0
- package/dist/email-routing-CVF6SwQt.mjs +45 -0
- package/dist/email-security-mYZtazae.mjs +158 -0
- package/dist/email-sending-BqaKU_Xu.mjs +47 -0
- package/dist/error-sanitization-CIQOep3I.mjs +2 -0
- package/dist/error-sanitization-pOyzm2F1.mjs +2 -0
- package/dist/fieldExtractors-CAGZVmYg.mjs +9 -0
- package/dist/firewall-DgTDsYOt.mjs +36 -0
- package/dist/flagship-Db3PxxyZ.mjs +28 -0
- package/dist/fraud-BEOQczy8.mjs +22 -0
- package/dist/get-By1q8YlI.mjs +2 -0
- package/dist/get-CRKvqCu6.mjs +2 -0
- package/dist/get-iPUHxD1r.mjs +2 -0
- package/dist/google-tag-gateway-DjLQ9wo0.mjs +6 -0
- package/dist/healthchecks-C3ScnKss.mjs +22 -0
- package/dist/{hostnames-DvaUSzsj.mjs → hostnames-DU0k-xO9.mjs} +6 -6
- package/dist/hyperdrive-IpCCLCRd.mjs +37 -0
- package/dist/iam-96CYM8Vw.mjs +52 -0
- package/dist/images-AB9EgZgT.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-Da8pe296.mjs → init-D2nPoW4f.mjs} +2 -2
- package/dist/intel-BKb4RLvS.mjs +76 -0
- package/dist/ips-z9APCV_b.mjs +4 -0
- package/dist/k2-Bv-HiJ29.mjs +11 -0
- package/dist/keyless-certificates-ChgSGHq4.mjs +13 -0
- package/dist/keys-BhngDsDa.mjs +4 -0
- package/dist/kv-CB5MQVGP.mjs +15 -0
- package/dist/{lazy-command-CDWwCsD2.mjs → lazy-command-CaZ1kdlW.mjs} +1 -1
- package/dist/leaked-credential-checks-Bsi2WpSU.mjs +18 -0
- package/dist/{load-balancers-Bu9pd2SV.mjs → load-balancers-0gXZNCeI.mjs} +40 -40
- package/dist/{local-BcPM4I0s.mjs → local-Dil4fTWX.mjs} +1 -1
- package/dist/local-DxWDQDnG.mjs +2 -0
- package/dist/{local-runtime-BHKyRlCP.mjs → local-runtime-B7TKFu6E.mjs} +1 -1
- package/dist/login-CiQGR8ha.mjs +5 -0
- package/dist/login-Ik98G4K6.mjs +2 -0
- package/dist/logo-matches-DmoF5Otu.mjs +6 -0
- package/dist/logos-BL6ohIMH.mjs +7 -0
- package/dist/logpush-UVopW68t.mjs +46 -0
- package/dist/logs-BVfxiEiM.mjs +36 -0
- package/dist/magic-cloud-networking-B5S3aM6f.mjs +71 -0
- package/dist/magic-network-monitoring-CDSJPP47.mjs +36 -0
- package/dist/magic-transit-TcDTKM43.mjs +386 -0
- package/dist/managed-defense-C88HL0pg.mjs +18 -0
- package/dist/managed-transforms-Ja41Tahl.mjs +9 -0
- package/dist/matches-BL_Y-9Yq.mjs +6 -0
- package/dist/mcp-BWp5Q09R.mjs +32 -0
- package/dist/mesh-lFPLRWhV.mjs +26 -0
- package/dist/{migrate-CZNq63Uj.mjs → migrate-6e5mJ79R.mjs} +1 -1
- package/dist/monetization-BIc4Bwo2.mjs +20 -0
- package/dist/mtls-certificates-CVBw-Jli.mjs +13 -0
- package/dist/network-Wig0qbaC.mjs +50 -0
- package/dist/network-interconnects-C16z1HuQ.mjs +72 -0
- package/dist/o11y-Bhy4qDRm.mjs +93 -0
- package/dist/oauth-CfEedDZi.mjs +4 -0
- package/dist/oauth-clients-eXjmK5yf.mjs +16 -0
- package/dist/{oauth-n8um6MFk.mjs → oauth-oWaW7ICv.mjs} +1 -1
- package/dist/oauth-scopes-DZWn50EA.mjs +4 -0
- package/dist/organization-QdAQTrKa.mjs +71 -0
- package/dist/organizations-CgAQYdK5.mjs +4 -0
- package/dist/origin-ca-certificates-BklXqp8X.mjs +11 -0
- package/dist/origin-post-quantum-encryption-Dg16ueT4.mjs +6 -0
- package/dist/origin-tls-client-auth-d8bDU5zU.mjs +30 -0
- package/dist/output-Co4xdFf6.mjs +2 -0
- package/dist/page-rules-CgMkC6YR.mjs +39 -0
- package/dist/{pages-Bn0Sg1ay.mjs → pages-CkBtOOf8.mjs} +29 -29
- package/dist/path-DRw6Y-nd.mjs +2 -0
- package/dist/pay-per-crawl-CnGXOWyz.mjs +38 -0
- package/dist/pay-per-use-HbfxpATr.mjs +33 -0
- package/dist/pipelines-CnO9CCs0.mjs +44 -0
- package/dist/precursor-Bc55XJdQ.mjs +4 -0
- package/dist/previews-C7vZrajd.mjs +7 -0
- package/dist/progress-D5po7ScB.mjs +2 -0
- package/dist/prompt-BAJpE3jV.mjs +4 -0
- package/dist/queries-BJAH4B74.mjs +9 -0
- package/dist/queues-D4G8vvwi.mjs +57 -0
- package/dist/r2-CJ8rD6Jb.mjs +128 -0
- package/dist/{radar-CdvQL4xm.mjs → radar-DgaxOdcd.mjs} +150 -150
- package/dist/raw-fetch-yY-wX5Xx.mjs +2 -0
- package/dist/realtime-DU09m7L7.mjs +172 -0
- package/dist/registrar-Cj7OfvGs.mjs +43 -0
- package/dist/registrar-sandbox-CA0Mua-j.mjs +56 -0
- package/dist/{registry-PI6sO95I.mjs → registry-CRnk93ur.mjs} +1 -1
- package/dist/reporting-3kDVF5c8.mjs +14 -0
- package/dist/{request-headers-D8L95bEQ.mjs → request-headers-D_eQn93b.mjs} +1 -1
- package/dist/request-tracers-VBD4R3s3.mjs +4 -0
- package/dist/resolve-BpgXeklt.mjs +2 -0
- package/dist/resolve-C3FmNlSO.mjs +2 -0
- package/dist/resource-sharing-BtUF3psS.mjs +40 -0
- package/dist/resource-tagging--90INP8_.mjs +4 -0
- package/dist/rules-CcwPngVo.mjs +18 -0
- package/dist/rulesets-CfdruY82.mjs +37 -0
- package/dist/rum-RLkdfSL7.mjs +30 -0
- package/dist/run-CUNhH5CQ.mjs +2 -0
- package/dist/{run-CW2Cgi0S.mjs → run-DASYqJsY.mjs} +1 -1
- package/dist/{schema-elj12WOx.mjs → schema-S3pUZwpI.mjs} +1 -1
- package/dist/{schema-flags-BTItUu1K.mjs → schema-flags-CShtn7ya.mjs} +1 -1
- package/dist/scim-BZYsTPIL.mjs +18 -0
- package/dist/secrets-store-C_-FkSH_.mjs +24 -0
- package/dist/security-insights-BVBEaZmD.mjs +40 -0
- package/dist/security-txt--IoHrHee.mjs +9 -0
- package/dist/session-Cq3YNLoI.mjs +2 -0
- package/dist/shared-zNQNv1im.mjs +2 -0
- package/dist/smart-shield-CByC4_60.mjs +24 -0
- package/dist/snippets-DB-jiZAV.mjs +20 -0
- package/dist/{spawn-D07wH-MH.mjs → spawn-DQttFH05.mjs} +1 -1
- package/dist/{spectrum-B6qkjR_Z.mjs → spectrum-Bs2g1BmK.mjs} +14 -14
- package/dist/speed-Bq4evEnJ.mjs +24 -0
- package/dist/sql-XGci7hZC.mjs +4 -0
- package/dist/src-GiuwAT55.mjs +125 -0
- package/dist/ssl-KJTLW1NR.mjs +45 -0
- package/dist/{startup-profile-CrtCP-6-.mjs → startup-profile-BOaseXnO.mjs} +1 -1
- package/dist/startup-profile-BwEZFVGS.mjs +2 -0
- package/dist/{state-DIiIGEtR.mjs → state-Boubf1X6.mjs} +1 -1
- package/dist/state-CODDG9Nx.mjs +2 -0
- package/dist/stream-BotgYspF.mjs +102 -0
- package/dist/submit-C5VytaHP.mjs +4 -0
- package/dist/{tags-CX23P4jg.mjs → tags-3Hq-B9qp.mjs} +2 -2
- package/dist/{telemetry-ZlCi5Xhc.mjs → telemetry-3FJOXl_C.mjs} +1 -1
- package/dist/telemetry-BhKfwxyh.mjs +2 -0
- package/dist/tenant-BgX5onPc.mjs +10 -0
- package/dist/tenant-custom-nameservers-BVG8v1Xo.mjs +9 -0
- package/dist/theme-BGHWSKCw.mjs +6 -0
- package/dist/{tools-CSc5DmFi.mjs → tools-BCCRUENY.mjs} +1 -1
- package/dist/{tunnels-NzYpsfi_.mjs → tunnels-CThOI3qH.mjs} +15 -15
- package/dist/turnstile-BgZaUx-g.mjs +33 -0
- package/dist/ui-BtIBQeaG.mjs +2 -0
- package/dist/update-check-Yy7Ivq2V.mjs +2 -0
- package/dist/{update-check-HFkPml6x.mjs → update-check-jb89ih_g.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-DQERN0Xq.mjs +4 -0
- package/dist/url-normalization-Cb1hofqv.mjs +9 -0
- package/dist/url-scanner-gHgx1bW7.mjs +16 -0
- package/dist/{user-rXca0J9M.mjs → user-CdKzIuSi.mjs} +58 -58
- package/dist/values-EwA8Sx0w.mjs +4 -0
- package/dist/vectorize-DejgIJIv.mjs +32 -0
- package/dist/version-B6MnUIqV.mjs +2 -0
- package/dist/{waiting-rooms-DrA3-0bw.mjs → waiting-rooms-BNR1HvAP.mjs} +25 -25
- package/dist/web-assets-iglnzkTV.mjs +64 -0
- package/dist/web3-JBUU6IVt.mjs +28 -0
- package/dist/workers-CDp4kLTJ.mjs +40 -0
- package/dist/workers-builds-CSb9Dglt.mjs +14 -0
- package/dist/workers-for-platforms-D4srNZvt.mjs +40 -0
- package/dist/workers-vpc-LPC8TadH.mjs +13 -0
- package/dist/workflows-DN_VqWJC.mjs +52 -0
- package/dist/{wrangler-migration-C6FKHER1.mjs → wrangler-migration-DxTB5yPT.mjs} +1 -1
- package/dist/zaraz-DDErl5yc.mjs +22 -0
- package/dist/zero-trust-M88XX3uD.mjs +957 -0
- package/dist/zone-BsGvedmN.mjs +4 -0
- package/dist/zones-l_sRKrVl.mjs +124 -0
- package/package.json +15 -18
- package/dist/Page-BShsqCXr.mjs +0 -2
- package/dist/abuse-reports-CVv52Q2w.mjs +0 -24
- package/dist/account-tags-RhvWOkOf.mjs +0 -15
- package/dist/accounts--3lrEkmu.mjs +0 -125
- package/dist/acm-BJxINEcu.mjs +0 -15
- package/dist/addressing-BqByG9JW.mjs +0 -105
- package/dist/agent-memory-D4dQMGbh.mjs +0 -34
- package/dist/ai-CRkQ4pjC.mjs +0 -31
- package/dist/ai-audit-fMSn4c5L.mjs +0 -6
- package/dist/ai-gateway-CbhvQK4L.mjs +0 -80
- package/dist/ai-search-CvVSnOA0.mjs +0 -79
- package/dist/ai-security-Z_qpI92I.mjs +0 -10
- package/dist/alerting-CpbCB8br.mjs +0 -56
- package/dist/analytics-DkY9dOP1.mjs +0 -17
- package/dist/analytics_engine-DE_jvlx_.mjs +0 -4
- package/dist/api-security-BHnOU5MM.mjs +0 -154
- package/dist/argo-DhC5L_aN.mjs +0 -14
- package/dist/args-CfbYkeXd.mjs +0 -2
- package/dist/artifacts-CrIupY7P.mjs +0 -43
- package/dist/audit-logs-BjeBxTox.mjs +0 -4
- package/dist/auth-BNYfOMl0.mjs +0 -2
- package/dist/auth-CAWalgW0.mjs +0 -2
- package/dist/auth-DOwC01PW.mjs +0 -2
- package/dist/banner-D03JEqRs.mjs +0 -2
- package/dist/basin-catalog-DZ7QV-_N.mjs +0 -46
- package/dist/billing-BFyte9fL.mjs +0 -23
- package/dist/bot-management-DXcbV3am.mjs +0 -9
- package/dist/botnet-feed-bGGp_cwX.mjs +0 -11
- package/dist/brand-protection-DN36XkxH.mjs +0 -27
- package/dist/browser-run-hHD1RT43.mjs +0 -42
- package/dist/build-BhpWYgNm.mjs +0 -2
- package/dist/builds-6aO61R9R.mjs +0 -71
- package/dist/cache-C5YJpMqi.mjs +0 -45
- package/dist/certificate-authorities-CbqDAktQ.mjs +0 -6
- package/dist/cf-oRSQKirD.mjs +0 -18
- package/dist/chunk-NDZDTP46-Civns3WA.mjs +0 -361
- package/dist/cli-types-9oYmRTHJ.mjs +0 -2
- package/dist/client-certificates-balaN_my.mjs +0 -13
- package/dist/client-side-security-3_4Ermmg.mjs +0 -63
- package/dist/cloud-connector-avx27sLw.mjs +0 -6
- package/dist/cloudforce-one-CXdeqJ9l.mjs +0 -405
- package/dist/command-DPX9sJVi.mjs +0 -2
- package/dist/command-OWe3v69l.mjs +0 -2
- package/dist/connector-interrupts-ftd10Du-.mjs +0 -6
- package/dist/connector-telemetry-events-TwDZYdEM.mjs +0 -6
- package/dist/connector-telemetry-snapshots-CZxkOuC3.mjs +0 -6
- package/dist/connectors-6lVSr-fd.mjs +0 -15
- package/dist/containers-Dqs_ZnO2.mjs +0 -78
- package/dist/containers-ncw3bd3a.mjs +0 -376
- package/dist/content-scan-BWFbqfQ0.mjs +0 -14
- package/dist/csamScanner-BwZNZu0A.mjs +0 -10
- package/dist/ct-alerting-DPp3qLqO.mjs +0 -5
- package/dist/custom-certificates-pfpZcr06.mjs +0 -17
- package/dist/custom-csrs-DrvGRAkl.mjs +0 -11
- package/dist/custom-hostnames-wGtmFbz1.mjs +0 -27
- package/dist/custom-nameservers-HTG6MPKv.mjs +0 -9
- package/dist/custom-pages-DqEHBSVt.mjs +0 -21
- package/dist/dcv-delegation-D6nj0Z5N.mjs +0 -4
- package/dist/deploy-context-DmG9rgPO.mjs +0 -56
- package/dist/diagnostics-tqHjq-Pl.mjs +0 -15
- package/dist/dls-BEHj4X9T.mjs +0 -17
- package/dist/dns-firewall-zwbkutyf.mjs +0 -71
- package/dist/dns-n4mfYBZg.mjs +0 -144
- package/dist/durable-objects-CQ2dHhho.mjs +0 -6
- package/dist/email-auth-DOi6yOt3.mjs +0 -6
- package/dist/email-routing-WcSPt22u.mjs +0 -45
- package/dist/email-security-BXu3OGay.mjs +0 -158
- package/dist/email-sending-B9zTlIjt.mjs +0 -47
- package/dist/error-sanitization-DE_zSrXw.mjs +0 -2
- package/dist/error-sanitization-DOCQ9Ykh.mjs +0 -2
- package/dist/errors-_sob7Ihu.mjs +0 -3
- package/dist/fieldExtractors-B37m2lKW.mjs +0 -9
- package/dist/firewall-CRtYO0Ha.mjs +0 -36
- package/dist/flagship-DvTFZSay.mjs +0 -28
- package/dist/fraud-uSyibsit.mjs +0 -22
- package/dist/google-tag-gateway-BFXiiokq.mjs +0 -6
- package/dist/healthchecks-27u7b7Jb.mjs +0 -22
- package/dist/hyperdrive-BzJvPdu6.mjs +0 -37
- package/dist/iam-Dl3cU9GI.mjs +0 -52
- package/dist/images-C2OkI1j7.mjs +0 -71
- package/dist/intel-DoB1g_K7.mjs +0 -76
- package/dist/ips-BRt68epr.mjs +0 -4
- package/dist/k2-_eq5ZY2t.mjs +0 -11
- package/dist/keyless-certificates-DaO2yqYu.mjs +0 -13
- package/dist/keys-7BQ3Zq6Y.mjs +0 -4
- package/dist/kv-BTYCXKML.mjs +0 -15
- package/dist/leaked-credential-checks-CPHOK_dE.mjs +0 -18
- package/dist/local-BundUuDT.mjs +0 -2
- package/dist/login-BBYC_BtH.mjs +0 -2
- package/dist/login-D2uoWhWh.mjs +0 -5
- package/dist/logo-matches-Bc1DQ4-g.mjs +0 -6
- package/dist/logos-X5B8z7Iv.mjs +0 -7
- package/dist/logpush-C2ENi1et.mjs +0 -46
- package/dist/logs-BKDz7kBW.mjs +0 -36
- package/dist/magic-cloud-networking-B60Gld8A.mjs +0 -71
- package/dist/magic-network-monitoring-CxXI3Y-H.mjs +0 -36
- package/dist/magic-transit-ZCSaCbl8.mjs +0 -386
- package/dist/managed-defense-DrxMb7xi.mjs +0 -18
- package/dist/managed-transforms-AI7KrRU1.mjs +0 -9
- package/dist/matches-rPMLS3Ip.mjs +0 -6
- package/dist/mcp-DXUMvEWt.mjs +0 -32
- package/dist/mesh-MmBCQ37q.mjs +0 -26
- package/dist/monetization-DQE5VtUO.mjs +0 -20
- package/dist/mtls-certificates-DwkEb-Hy.mjs +0 -13
- package/dist/network-BcfobxQY.mjs +0 -50
- package/dist/network-interconnects-BU3tN_Ab.mjs +0 -72
- package/dist/o11y-BBv7nedp.mjs +0 -93
- package/dist/oauth-BUr8bPwo.mjs +0 -9
- package/dist/oauth-clients-qWVImhHE.mjs +0 -16
- package/dist/oauth-scopes-CdeIgJIx.mjs +0 -4
- package/dist/organization-CJeOVWH7.mjs +0 -71
- package/dist/organizations-BpfoqZcG.mjs +0 -4
- package/dist/origin-ca-certificates-Bimf07RF.mjs +0 -11
- package/dist/origin-post-quantum-encryption-CM-If38w.mjs +0 -6
- package/dist/origin-tls-client-auth-BPwYPhc9.mjs +0 -30
- package/dist/output-BOe-3AQG.mjs +0 -2
- package/dist/page-rules-DOeekMrj.mjs +0 -39
- package/dist/pay-per-crawl-qJpseNNx.mjs +0 -38
- package/dist/pay-per-use-C1MWKJ4O.mjs +0 -33
- package/dist/pipelines-rCwXQw6S.mjs +0 -44
- package/dist/precursor-Bk8Pp6jT.mjs +0 -4
- package/dist/previews-BEheHO3T.mjs +0 -4
- package/dist/progress-CQqDtgmF.mjs +0 -2
- package/dist/prompt-C8FyienX.mjs +0 -3
- package/dist/queries-DJ8looyq.mjs +0 -9
- package/dist/queues-BBH9Q-Tt.mjs +0 -57
- package/dist/r2-CdJKpP2w.mjs +0 -128
- package/dist/raw-fetch-DbXN3SlE.mjs +0 -2
- package/dist/realtime-onrXppzh.mjs +0 -172
- package/dist/registrar-CbEBc5IE.mjs +0 -43
- package/dist/registrar-sandbox-BJhn1HFT.mjs +0 -56
- package/dist/reporting-bXZY6obP.mjs +0 -14
- package/dist/request-tracers-CihskC2A.mjs +0 -4
- package/dist/resolve-CaTBV-c6.mjs +0 -2
- package/dist/resolve-DCGSzUDQ.mjs +0 -2
- package/dist/resource-sharing-DDqcCHVs.mjs +0 -40
- package/dist/resource-tagging-D63RpBce.mjs +0 -4
- package/dist/rules-CAW0-Wde.mjs +0 -18
- package/dist/rulesets-CPir63Qc.mjs +0 -37
- package/dist/rum-BfwTcuup.mjs +0 -30
- package/dist/run-DEynXvCc.mjs +0 -2
- package/dist/scim-CtZ1FeQE.mjs +0 -18
- package/dist/secrets-store-BIuBYUJT.mjs +0 -24
- package/dist/security-insights-DfUus0bs.mjs +0 -40
- package/dist/security-txt-CgZOsAIZ.mjs +0 -9
- package/dist/session-BcM8Vyyx.mjs +0 -2
- package/dist/shared-CpS23WwR.mjs +0 -2
- package/dist/smart-shield-ClgB7r-9.mjs +0 -24
- package/dist/snippets-DLO3iFAg.mjs +0 -20
- package/dist/speed-DX5X2EIR.mjs +0 -24
- package/dist/sql-CF044HDW.mjs +0 -4
- package/dist/src-BMATTZU_.mjs +0 -125
- package/dist/ssl-CM-rChEC.mjs +0 -45
- package/dist/startup-profile-D662WI9s.mjs +0 -2
- package/dist/state-D7uNYnoi.mjs +0 -2
- package/dist/stream-5EmUOQvy.mjs +0 -102
- package/dist/submit-lEAaRSMR.mjs +0 -4
- package/dist/telemetry-0Y5hAtCX.mjs +0 -2
- package/dist/tenant-DnI7QziH.mjs +0 -10
- package/dist/tenant-custom-nameservers-MR0dlcGm.mjs +0 -9
- package/dist/theme-CQ_TYifs.mjs +0 -6
- package/dist/turnstile-M7sKCEz3.mjs +0 -33
- package/dist/ui-YmjF66Ct.mjs +0 -5
- package/dist/update-check-aTutXNRd.mjs +0 -2
- package/dist/url-info-Dos9VOXV.mjs +0 -4
- package/dist/url-normalization-CZbFOq_v.mjs +0 -9
- package/dist/url-scanner-B7quLPGW.mjs +0 -16
- package/dist/values-D-rrZrDa.mjs +0 -4
- package/dist/vectorize-D2tf_oA8.mjs +0 -32
- package/dist/version-BGnqDvNR.mjs +0 -2
- package/dist/web-assets-DQAfvPT9.mjs +0 -64
- package/dist/web3-MI0GQDnu.mjs +0 -28
- package/dist/workers-By6Pf8fv.mjs +0 -40
- package/dist/workers-builds-6YsWsCmC.mjs +0 -14
- package/dist/workers-for-platforms-DL8fC1qR.mjs +0 -40
- package/dist/workers-vpc-BYx6sbgd.mjs +0 -13
- package/dist/workflows-ByQLnV0E.mjs +0 -52
- package/dist/zaraz-CgbpmA85.mjs +0 -22
- package/dist/zero-trust-CpjTkkWt.mjs +0 -837
- package/dist/zone-DnKIe6po.mjs +0 -4
- package/dist/zones--5ZzsDmQ.mjs +0 -124
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-C6u9qIGO.mjs";import{a as i,i as a,t as o}from"./context-A6T-NKPI.mjs";import{t as s}from"./output-Co4xdFf6.mjs";import{t as c}from"./dry-run-C2KjGX10.mjs";import{t as l}from"./progress-D5po7ScB.mjs";import{t as u}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-BAJpE3jV.mjs";import{n as _,t as ee}from"./raw-fetch-yY-wX5Xx.mjs";var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}`};function ne(e){return e.usage(`$0 intel asn get <asn>
|
|
3
|
+
|
|
4
|
+
Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <asn>`,describe:`Get ASN Overview.`,builder:ne,handler:async e=>u({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/asn/${e.asn==null?`<asn>`:encodeURIComponent(String(e.asn))}`,pathParams:{asn:String(e.asn??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(te,{account_id:a,asn:e.asn}));s(u,{successLabel:`Loaded`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}/subnets`};function ae(e){return e.usage(`$0 intel asn subnets get <asn>
|
|
5
|
+
|
|
6
|
+
Get ASN Subnets.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <asn>`,describe:`Get ASN Subnets`,builder:ae,handler:async e=>u({command:`intel asn subnets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel asn subnets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/asn/${e.asn==null?`<asn>`:encodeURIComponent(String(e.asn))}/subnets`,pathParams:{asn:String(e.asn??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ie,{account_id:a,asn:e.asn}));s(u,{successLabel:`Loaded`})})},se={command:`subnets`,describe:`Operations for asn.subnets`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ce={command:`asn`,describe:`ASN intelligence — ownership, geolocation, and subnet details for autonomous systems`,builder:e=>e.command(re).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/attack-surface-report/issue-types`};function ue(e){return e.usage(`$0 intel attack-surface-report issue-types get
|
|
7
|
+
|
|
8
|
+
Lists all available issue types in Security Center, describing categories of security issues.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`get`,describe:`Retrieves Security Center Issues Types`,builder:ue,handler:async e=>u({command:`intel attack-surface-report issue-types get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel attack-surface-report issue-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/attack-surface-report/issue-types`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(le,{account_id:a}));s(u,{successLabel:`Loaded`})})},v={command:`issue-types`,describe:`Operations for attack-surface-report.issue-types`,builder:e=>e.command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/attack-surface-report/issues/class`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`]};function b(e){return e.usage(`$0 intel attack-surface-report issues class
|
|
9
|
+
|
|
10
|
+
Retrieves Security Center issue counts aggregated by classification class.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`class`,describe:`Retrieves Security Center Issue Counts by Class`,builder:b,handler:async e=>u({command:`intel attack-surface-report issues class`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let n={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};if(e.dryRun){let e=await i();c({command:`cf intel attack-surface-report issues class`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/attack-surface-report/issues/class`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(y,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var S={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/attack-surface-report/issues/${t.issue_id}/dismiss`,body:`json`};function C(e){return e.usage(`$0 intel attack-surface-report issues dismiss <issue-id>
|
|
11
|
+
|
|
12
|
+
Deprecated endpoint for archiving Security Center insights. Use the newer archive-security-center-insight endpoint instead.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dismiss`,{type:`boolean`,description:`The dismiss field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`dismiss <issue-id>`,describe:`Archives Security Center Insight`,builder:C,handler:async e=>u({command:`intel attack-surface-report issues dismiss`,classification:{safeFlags:[`dismiss`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel attack-surface-report issues dismiss`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/attack-surface-report/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/dismiss`,pathParams:{"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({dismiss:e.dismiss}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(S,{body:t,account_id:a,issue_id:e[`issue-id`]}));s(r,{successLabel:`Updated`});return}let u=f({dismiss:e.dismiss}),p=await l(`Updating`,async()=>n.send(S,{body:u,account_id:a,issue_id:e[`issue-id`]}));s(p,{successLabel:`Updated`})})};var T={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/attack-surface-report/issues`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`,`page`,`per_page`]};function E(e){return e.usage(`$0 intel attack-surface-report issues list
|
|
13
|
+
|
|
14
|
+
Lists all Security Center issues for the account, showing active security problems requiring attention.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`Retrieves Security Center Issues`,builder:E,handler:async e=>u({command:`intel attack-surface-report issues list`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let n={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf intel attack-surface-report issues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/attack-surface-report/issues`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(T,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/attack-surface-report/issues/severity`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`]};function k(e){return e.usage(`$0 intel attack-surface-report issues severity
|
|
15
|
+
|
|
16
|
+
Retrieves Security Center issue counts aggregated by severity level.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`severity`,describe:`Retrieves Security Center Issue Counts by Severity`,builder:k,handler:async e=>u({command:`intel attack-surface-report issues severity`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let n={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};if(e.dryRun){let e=await i();c({command:`cf intel attack-surface-report issues severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/attack-surface-report/issues/severity`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(O,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})};var j={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/attack-surface-report/issues/type`,query:[`dismissed`,`issue_class`,`issue_type`,`product`,`source`,`severity`,`subject`,`issue_class~neq`,`issue_type~neq`,`product~neq`,`severity~neq`,`subject~neq`]};function M(e){return e.usage(`$0 intel attack-surface-report issues type
|
|
17
|
+
|
|
18
|
+
Retrieves Security Center issue counts aggregated by issue type.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`type`,describe:`Retrieves Security Center Issue Counts by Type`,builder:M,handler:async e=>u({command:`intel attack-surface-report issues type`,classification:{safeFlags:[`dismissed`,`dry-run`]}},e,async()=>{let n={dismissed:e.dismissed,issue_class:e[`issue-class`],issue_type:e[`issue-type`],product:e.product,source:e.source,severity:e.severity,subject:e.subject};if(e.dryRun){let e=await i();c({command:`cf intel attack-surface-report issues type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/attack-surface-report/issues/type`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(j,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},P={command:`issues`,describe:`Operations for attack-surface-report.issues`,builder:e=>e.command(x).command(w).command(D).command(A).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},F={command:`attack-surface-report`,describe:`Attack surface intelligence — exposed assets, vulnerabilities, and infrastructure mapping`,builder:e=>e.command(v).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/dns`,query:[`start_end_params`,`ipv4`,`page`,`per_page`]};function L(e){return e.usage(`$0 intel dns list
|
|
19
|
+
|
|
20
|
+
Gets a list of all the domains that have resolved to a specific IP address.`).option(`start-end-params`,{type:`string`,description:`Start end params`}).option(`ipv4`,{type:`string`,description:`Ipv4`}).option(`page`,{type:`number`,description:`Requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results requested.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`Get Passive DNS by IP`,builder:L,handler:async e=>u({command:`intel dns list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={start_end_params:e[`start-end-params`],ipv4:e.ipv4,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf intel dns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/dns`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(I,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},z={command:`dns`,describe:`Passive DNS data showing historical DNS resolution records for domains`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/domain-history`,query:[`domain`]};function V(e){return e.usage(`$0 intel domain-history get
|
|
21
|
+
|
|
22
|
+
Gets historical security threat and content categories currently and previously assigned to a domain.`).option(`domain`,{type:`string`,description:`Domain`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get`,describe:`Get Domain History`,builder:V,handler:async e=>u({command:`intel domain-history get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={domain:e.domain};if(e.dryRun){let e=await i();c({command:`cf intel domain-history get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain-history`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(B,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},fe={command:`domain-history`,describe:`Historical domain registration and categorization changes over time`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/domain/bulk`,query:[`domain`,`include_ranking`,`skip_ranking`]};function me(e){return e.usage("$0 intel domains bulks get\n\nReturns security details and statistics about multiple domains in a single request. **Behavior change — domain ranking is becoming opt-in.** This endpoint previously included domain ranking data in every response and accepted a `skip_ranking=true` query parameter to opt out. That parameter is being deprecated and ranking will no longer be returned by default. Callers that want ranking data must pass `include_ranking=true`. The `skip_ranking` parameter will be silently ignored once the change ships.").option(`domain`,{type:`string`,description:"Accepts multiple values like `?domain=cloudflare.com&domain=example.com`."}).option(`include-ranking`,{type:`boolean`,description:"Whether to include domain ranking data in the response. Defaults to\n`false` — ranking lookups are expensive at bulk scale and most\ncallers do not need them. Set to `true` to opt in. This parameter\nreplaces the deprecated `skip_ranking` (see below)."}).option(`skip-ranking`,{type:`boolean`,description:"**Deprecated.** Previously controlled whether the ranking lookup\nwas skipped (defaulted to `false`, meaning ranking ran). The\nendpoint's default behavior is being flipped — ranking is now\nopt-in via `include_ranking=true` — and this parameter will be\nsilently ignored. Remove it from your callers and use\n`include_ranking` instead."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`get`,describe:`Get Multiple Domain Details`,builder:me,handler:async e=>u({command:`intel domains bulks get`,classification:{safeFlags:[`include-ranking`,`skip-ranking`,`dry-run`]}},e,async()=>{let n={domain:e.domain,include_ranking:e[`include-ranking`],skip_ranking:e[`skip-ranking`]};if(e.dryRun){let e=await i();c({command:`cf intel domains bulks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain/bulk`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(pe,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},ge={command:`bulks`,describe:`Operations for domains.bulks`,builder:e=>e.command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var _e={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/domain`,query:[`domain`,`skip_dns`,`skip_ranking`]};function ve(e){return e.usage(`$0 intel domains get
|
|
23
|
+
|
|
24
|
+
Gets security details and statistics about a domain.`).option(`domain`,{type:`string`,description:`Domain`}).option(`skip-dns`,{type:`boolean`,description:`Skip DNS resolution lookups for faster response.`}).option(`skip-ranking`,{type:`boolean`,description:"Skip the domain ranking lookup for faster responses. Defaults to\n`false` (ranking is included). Set to `true` to opt out — primarily\nused by callers like Cloudflare Radar that need to avoid a\ncircular dependency when building the domain details page.\nNote: the bulk endpoint (`/intel/domain/bulk`) uses opposite\ndefaults — see `include_ranking` there."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`get`,describe:`Get Domain Details`,builder:ve,handler:async e=>u({command:`intel domains get`,classification:{safeFlags:[`skip-dns`,`skip-ranking`,`dry-run`]}},e,async()=>{let n={domain:e.domain,skip_dns:e[`skip-dns`],skip_ranking:e[`skip-ranking`]};if(e.dryRun){let e=await i();c({command:`cf intel domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(_e,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},be={command:`domains`,describe:`Domain intelligence — risk scores, categories, and associated infrastructure`,builder:e=>e.command(ye).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds`,body:`json`};function xe(e){return e.usage(`$0 intel indicator-feeds create
|
|
25
|
+
|
|
26
|
+
Creates a new custom threat indicator feed for sharing threat intelligence data.`).option(`description`,{type:`string`,description:`The description of the example test`}).option(`name`,{type:`string`,description:`The name of the indicator feed`}).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 new indicator feed`,builder:xe,handler:async e=>u({command:`intel indicator-feeds create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(U,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}let u=f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}),m=await l(`Creating`,async()=>n.send(U,{body:u,account_id:a}));s(m,{successLabel:`Created`})})};function Ce(e){return e.usage(`$0 intel indicator-feeds data <feed-id>
|
|
27
|
+
|
|
28
|
+
Retrieves the raw data entries in a custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`data <feed-id>`,describe:`Get indicator feed data`,builder:Ce,handler:async e=>u({command:`intel indicator-feeds data`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds data`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/data`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await o();e.accountId=n;let a=await l(`Loading`,async()=>ee(`/accounts/${n}/intel/indicator-feeds/${encodeURIComponent(String(e[`feed-id`]))}/data`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));_(a.toString(`utf-8`))})};var Te={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/${t.feed_id}/download`};function Ee(e){return e.usage(`$0 intel indicator-feeds downloads get <feed-id>
|
|
29
|
+
|
|
30
|
+
Downloads the content of a custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`get <feed-id>`,describe:`Download indicator feed data`,builder:Ee,handler:async e=>u({command:`intel indicator-feeds downloads get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds downloads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/download`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Te,{account_id:a,feed_id:e[`feed-id`]}));s(u,{successLabel:`Loaded`})})},Oe={command:`downloads`,describe:`Operations for indicator-feeds.downloads`,builder:e=>e.command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ke={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/${t.feed_id}`};function Ae(e){return e.usage(`$0 intel indicator-feeds get <feed-id>
|
|
31
|
+
|
|
32
|
+
Retrieves details for a specific custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`get <feed-id>`,describe:`Get indicator feed metadata`,builder:Ae,handler:async e=>u({command:`intel indicator-feeds get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ke,{account_id:a,feed_id:e[`feed-id`]}));s(u,{successLabel:`Loaded`})})};var Me={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds`};function Ne(e){return e.usage(`$0 intel indicator-feeds list
|
|
33
|
+
|
|
34
|
+
Retrieves details for all accessible custom threat indicator feeds.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`list`,describe:`Get indicator feeds owned by this account`,builder:Ne,handler:async e=>u({command:`intel indicator-feeds list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel indicator-feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Me,{account_id:a}));s(u,{successLabel:`Loaded`})})};var W={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/permissions/add`,body:`json`};function Fe(e){return e.usage(`$0 intel indicator-feeds permissions create
|
|
35
|
+
|
|
36
|
+
Grants access permissions for a custom threat indicator feed to other accounts.`).option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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:`create`,describe:`Grant permission to indicator feed`,builder:Fe,handler:async e=>u({command:`intel indicator-feeds permissions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds permissions create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/permissions/add`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(W,{body:t,account_id:a}));s(r,{successLabel:`Updated`});return}let u=f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}),m=await l(`Updating`,async()=>n.send(W,{body:u,account_id:a}));s(m,{successLabel:`Updated`})})};var G={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/permissions/remove`,body:`json`};function Le(e){return e.usage(`$0 intel indicator-feeds permissions delete
|
|
37
|
+
|
|
38
|
+
Revokes access permissions for a custom threat indicator feed.`).option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Re={command:`delete`,describe:`Revoke permission to indicator feed`,builder:Le,handler:async e=>u({command:`intel indicator-feeds permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds permissions delete`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/permissions/remove`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await g({force:!!e.force,message:`This operation destructively removes a permission entry.`})){process.stderr.write(`Aborted.
|
|
39
|
+
`);return}if(e.body){let t=d(e.body),r=await l(`Deleting`,async()=>n.send(G,{body:t,account_id:a}));s(r,{successLabel:`Deleted`});return}let u=f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}),m=await l(`Deleting`,async()=>n.send(G,{body:u,account_id:a}));s(m,{successLabel:`Deleted`})})};var ze={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/permissions/view`};function Be(e){return e.usage(`$0 intel indicator-feeds permissions list
|
|
40
|
+
|
|
41
|
+
Lists current access permissions for custom threat indicator feeds.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ve={command:`list`,describe:`List indicator feed permissions`,builder:Be,handler:async e=>u({command:`intel indicator-feeds permissions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel indicator-feeds permissions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/permissions/view`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ze,{account_id:a}));s(u,{successLabel:`Loaded`})})},He={command:`permissions`,describe:`Operations for indicator-feeds.permissions`,builder:e=>e.command(Ie).command(Re).command(Ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id_path}/intel/indicator-feeds/permissions/createProvider`,body:`json`};function Ue(e){return e.usage(`$0 intel indicator-feeds providers create <account-id-path>
|
|
42
|
+
|
|
43
|
+
Creates a new indicator feed provider for an account. Only available to Intel accounts.`).positional(`account-id-path`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`account-id`,{type:`number`,description:`The numeric account ID to create the provider for. Distinct from the
|
|
44
|
+
path \`account_id\` parameter, which carries the account identifier
|
|
45
|
+
string used for routing.
|
|
46
|
+
`}).option(`name`,{type:`string`,description:`The name of the provider`}).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 We={command:`create <account-id-path>`,describe:`Create indicator feed provider`,builder:Ue,handler:async e=>u({command:`intel indicator-feeds providers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel indicator-feeds providers create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/intel/indicator-feeds/permissions/createProvider`,pathParams:{"account-id-path":String(e[`account-id-path`]??``)},bodyKind:`json`,body:e.body===void 0?f({account_id:e[`account-id`],name:p(e.name,`name`,`text`)}):d(e.body)});return}let t=await r(e);if(e.body){let n=d(e.body),r=await l(`Updating`,async()=>t.send(K,{body:n,account_id_path:e[`account-id-path`]}));s(r,{successLabel:`Updated`});return}if(e[`account-id`]===void 0)throw Error(`--account-id is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await h(`name`,`The name of the provider`));let n=f({account_id:e[`account-id`],name:p(e.name,`name`,`text`)}),i=await l(`Updating`,async()=>t.send(K,{body:n,account_id_path:e[`account-id-path`]}));s(i,{successLabel:`Updated`})})},Ge={command:`providers`,describe:`Operations for indicator-feeds.providers`,builder:e=>e.command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ke(e){return e.usage("$0 intel indicator-feeds snapshots update <feed-id>\n\nRevises the raw data entries in a custom threat indicator feed. Accepts both plain and gzipped STIX2/CRDF bodies. Gzip is detected by RFC 1952 magic bytes (`0x1f 0x8b`) and/or a `.gz` filename suffix (case-insensitive) — either signal alone is sufficient to trigger the gzip path; if the body is not valid gzip, the upload fails fast. Customers are encouraged to gzip larger uploads — the api-gateway 500 MB body cap applies to the on-the-wire (compressed) size, so gzip lets a single upload carry several GiB of decompressed STIX.").positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`cf-async-upload`,{type:`string`,description:"Set to the literal value `1` to enqueue the upload and receive a\n`202` response with a polling URL. Any other value uses the legacy\nsynchronous response."}).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(`source`,{type:`string`,description:"The file to upload. Either a plain STIX2/CRDF body or a gzipped one (recognised by `0x1f 0x8b` magic bytes or a `.gz` filename suffix). "})}const qe={command:`update <feed-id>`,describe:`Update indicator feed data`,builder:Ke,handler:async e=>u({command:`intel indicator-feeds snapshots update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={};if(e[`cf-async-upload`]!==void 0&&(a[`Cf-Async-Upload`]=String(e[`cf-async-upload`])),e.dryRun){let t=await i();c({command:`cf intel indicator-feeds snapshots update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/snapshot`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,source:e.source}});return}let u=await r(e),d=e.local?t:await o();if(e.accountId=d,e.file!==void 0||e.body!==void 0||e.source!==void 0){let t=new FormData;if(e.file){let n=m(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);e.source!==void 0&&t.append(`source`,String(p(e.source,`source`,`text`)??``));let r=await l(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(e[`feed-id`]))}/snapshot`,{body:t,headers:Object.keys(a).length>0?a:void 0}));s(r,{successLabel:`Updated`});return}if(e.body){let t=p(e.body,`body`,`binary`),r=await l(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(e[`feed-id`]))}/snapshot`,{body:t,headers:{"Content-Type":`multipart/form-data`,...a}}));s(r,{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.`)})},Je={command:`snapshots`,describe:`Operations for indicator-feeds.snapshots`,builder:e=>e.command(qe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/${t.feed_id}`,body:`json`};function Ye(e){return e.usage(`$0 intel indicator-feeds update <feed-id>
|
|
47
|
+
|
|
48
|
+
Revises details for a specific custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The new description of the feed`}).option(`is-attributable`,{type:`boolean`,description:`The new is_attributable value of the feed`}).option(`is-downloadable`,{type:`boolean`,description:`The new is_downloadable value of the feed`}).option(`is-public`,{type:`boolean`,description:`The new is_public value of the feed`}).option(`name`,{type:`string`,description:`The new name of the feed`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Xe={command:`update <feed-id>`,describe:`Update indicator feed metadata`,builder:Ye,handler:async e=>u({command:`intel indicator-feeds update`,classification:{safeFlags:[`is-attributable`,`is-downloadable`,`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),is_attributable:e[`is-attributable`],is_downloadable:e[`is-downloadable`],is_public:e[`is-public`],name:p(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(q,{body:t,account_id:a,feed_id:e[`feed-id`]}));s(r,{successLabel:`Updated`});return}let u=f({description:p(e.description,`description`,`text`),is_attributable:e[`is-attributable`],is_downloadable:e[`is-downloadable`],is_public:e[`is-public`],name:p(e.name,`name`,`text`)}),m=await l(`Updating`,async()=>n.send(q,{body:u,account_id:a,feed_id:e[`feed-id`]}));s(m,{successLabel:`Updated`})})},Ze={command:`indicator-feeds`,describe:`Threat indicator feeds — subscribe to and manage curated lists of malicious IPs, domains, and URLs`,builder:e=>e.command(Se).command(we).command(je).command(Pe).command(Xe).command(Oe).command(He).command(Ge).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/ip-lists`};function $e(e){return e.usage(`$0 intel ip-lists get
|
|
49
|
+
|
|
50
|
+
Returns a list of available IP list categories (e.g., anonymizer, botnetcc, malware, tor, vpn, open_proxies). This endpoint provides metadata about which IP lists are available in the system.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const et={command:`get`,describe:`Get Available IP Lists`,builder:$e,handler:async e=>u({command:`intel ip-lists get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel ip-lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/ip-lists`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Qe,{account_id:a}));s(u,{successLabel:`Loaded`})})},tt={command:`ip-lists`,describe:`Curated IP lists used for threat detection and policy enforcement`,builder:e=>e.command(et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/ip`,query:[`ipv4`,`ipv6`]};function rt(e){return e.usage("$0 intel ips get\n\nGets the geolocation, ASN, infrastructure type of the ASN, and any security threat categories of an IP address. **Must provide ip query parameters.** For example, `/intel/ip?ipv4=1.1.1.1` or `/intel/ip?ipv6=2001:db8::1`.").option(`ipv4`,{type:`string`,description:`Ipv4`}).option(`ipv6`,{type:`string`,description:`Ipv6`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get`,describe:`Get IP Overview`,builder:rt,handler:async e=>u({command:`intel ips get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={ipv4:e.ipv4,ipv6:e.ipv6};if(e.dryRun){let e=await i();c({command:`cf intel ips get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/ip`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(nt,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},at={command:`ips`,describe:`IP address intelligence — geolocation, risk assessment, and hosting provider details`,builder:e=>e.command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/intel/miscategorization`,body:`json`};function ot(e){return e.usage("$0 intel miscategorizations create\n\nAllows you to submit requests to change a domain’s category. Requests that include category `169` (New Domains) or category `177` (Newly Seen) in any of `content_adds`, `content_removes`, `security_adds`, or `security_removes` will be rejected with a `400 Bad Request`. These categories are automatically managed and fall off 30 days after they are applied.").option(`content-adds`,{type:`string`,array:!0,description:`Content category IDs to add.`}).option(`content-removes`,{type:`string`,array:!0,description:`Content category IDs to remove.`}).option(`indicator-type`,{type:`string`,description:`The indicator_type field`,choices:[`domain`,`ipv4`,`ipv6`,`url`]}).coerce(`indicator-type`,e=>p(e,`indicator-type`,`text`)).option(`ip`,{type:`string`,description:"Provide only if indicator_type is `ipv4` or `ipv6`."}).option(`security-adds`,{type:`string`,array:!0,description:`Security category IDs to add.`}).option(`security-removes`,{type:`string`,array:!0,description:`Security category IDs to remove.`}).option(`url`,{type:`string`,description:"Provide only if indicator_type is `domain` or `url`. Example if indicator_type is `domain`: `example.com`. Example if indicator_type is `url`: `https://example.com/news/`."}).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 Miscategorization`,builder:ot,handler:async e=>u({command:`intel miscategorizations create`,classification:{safeFlags:[`indicator-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel miscategorizations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/miscategorization`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({content_adds:e[`content-adds`],content_removes:e[`content-removes`],indicator_type:e[`indicator-type`],ip:p(e.ip,`ip`,`text`),security_adds:e[`security-adds`],security_removes:e[`security-removes`],url:p(e.url,`url`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(J,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}let u=f({content_adds:e[`content-adds`],content_removes:e[`content-removes`],indicator_type:e[`indicator-type`],ip:p(e.ip,`ip`,`text`),security_adds:e[`security-adds`],security_removes:e[`security-removes`],url:p(e.url,`url`,`text`)}),m=await l(`Creating`,async()=>n.send(J,{body:u,account_id:a}));s(m,{successLabel:`Created`})})},ct={command:`miscategorizations`,describe:`Report and track domain miscategorization corrections`,builder:e=>e.command(st).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes`,body:`json`};function lt(e){return e.usage(`$0 intel sinkholes create
|
|
51
|
+
|
|
52
|
+
Create a new sinkhole. Logs of large request bodies will be truncated, but the full request body can be recorded in R2. If you wish to record large request bodies in R2, include the R2 key ID, key secret, and bucket name in the request body.`).option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ut={command:`create`,describe:`Create a new sinkhole for your account`,builder:lt,handler:async e=>u({command:`intel sinkholes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel sinkholes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),r2_bucket:p(e[`r2-bucket`],`r2-bucket`,`text`),r2_id:p(e[`r2-id`],`r2-id`,`text`),r2_secret:p(e[`r2-secret`],`r2-secret`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Creating`,async()=>n.send(Y,{body:t,account_id:a}));s(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`The name of the sinkhole.`));let u=f({name:p(e.name,`name`,`text`),r2_bucket:p(e[`r2-bucket`],`r2-bucket`,`text`),r2_id:p(e[`r2-id`],`r2-id`,`text`),r2_secret:p(e[`r2-secret`],`r2-secret`,`text`)}),m=await l(`Creating`,async()=>n.send(Y,{body:u,account_id:a}));s(m,{successLabel:`Created`})})};var dt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes/${t.sinkhole_id}`,errors:{409:`ConflictError`}};function ft(e){return e.usage(`$0 intel sinkholes delete <sinkhole-id>
|
|
53
|
+
|
|
54
|
+
Delete the specified sinkhole. The sinkhole must not have any active ingress rules defined. A 409 response code indicates that this condition is not met.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const pt={command:`delete <sinkhole-id>`,describe:`Delete a sinkhole`,builder:ft,handler:async e=>u({command:`intel sinkholes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel sinkholes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
55
|
+
`);return}let u=await l(`Deleting`,async()=>n.send(dt,{account_id:a,sinkhole_id:e[`sinkhole-id`]}));s(u,{successLabel:`Deleted`})})};var mt={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes/${t.sinkhole_id}`};function ht(e){return e.usage(`$0 intel sinkholes get <sinkhole-id>
|
|
56
|
+
|
|
57
|
+
Get the specified sinkhole by its unique identifier.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const gt={command:`get <sinkhole-id>`,describe:`Get a sinkhole`,builder:ht,handler:async e=>u({command:`intel sinkholes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel sinkholes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(mt,{account_id:a,sinkhole_id:e[`sinkhole-id`]}));s(u,{successLabel:`Loaded`})})};var X={method:`POST`,path:t=>e`/zones/${t.zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses`,body:`json`};function _t(e){return e.usage(`$0 intel sinkholes ingresses create <sinkhole-id>
|
|
58
|
+
|
|
59
|
+
Create a new ingress rule for the specified sinkhole. The CIDR block must be a Cloudflare BYOIP associated with your account. The zone_id must be a zone with the ability to create Spectrum Apps. The sinkhole must belong to the same account as the zone.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).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 vt={command:`create <sinkhole-id>`,describe:`Create an ingress rule`,builder:_t,handler:async e=>u({command:`intel sinkholes ingresses create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({cidr:p(e.cidr,`cidr`,`text`)}):d(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=d(e.body),i=await l(`Creating`,async()=>t.send(X,{body:r,zone_id:n,sinkhole_id:e[`sinkhole-id`]}));s(i,{successLabel:`Created`});return}e.cidr===void 0&&(e.cidr=await h(`cidr`,`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`));let i=f({cidr:p(e.cidr,`cidr`,`text`)}),o=await l(`Creating`,async()=>t.send(X,{body:i,zone_id:n,sinkhole_id:e[`sinkhole-id`]}));s(o,{successLabel:`Created`})})};var yt={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses/${t.ingress_id}`};function bt(e){return e.usage(`$0 intel sinkholes ingresses delete <ingress-id>
|
|
60
|
+
|
|
61
|
+
Delete the specified ingress rule. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,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 xt={command:`delete <ingress-id>`,describe:`Delete an ingress rule`,builder:bt,handler:async e=>u({command:`intel sinkholes ingresses delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await g({force:!!e.force})){process.stderr.write(`Aborted.
|
|
62
|
+
`);return}let i=await l(`Deleting`,async()=>t.send(yt,{zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));s(i,{successLabel:`Deleted`})})};var St={method:`GET`,path:t=>e`/zones/${t.zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses/${t.ingress_id}`};function Ct(e){return e.usage(`$0 intel sinkholes ingresses get <ingress-id>
|
|
63
|
+
|
|
64
|
+
Get the specified ingress rule associated with a sinkhole. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const wt={command:`get <ingress-id>`,describe:`Get an ingress rule`,builder:Ct,handler:async e=>u({command:`intel sinkholes ingresses get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n;let i=await l(`Loading`,async()=>t.send(St,{zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));s(i,{successLabel:`Loaded`})})};var Tt={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses`};function Et(e){return e.usage(`$0 intel sinkholes ingresses list
|
|
65
|
+
|
|
66
|
+
Returns all ingress rules associated with the specified sinkhole.`).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Dt={command:`list`,describe:`List ingresses for a sinkhole`,builder:Et,handler:async e=>u({command:`intel sinkholes ingresses list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf intel sinkholes ingresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(Tt,{account_or_zone:u,account_or_zone_id:d,sinkhole_id:e[`sinkhole-id`]}));s(f,{successLabel:`Loaded`})})};var Z={method:`PUT`,path:t=>e`/zones/${t.zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses/${t.ingress_id}`,body:`json`};function Ot(e){return e.usage(`$0 intel sinkholes ingresses update <ingress-id>
|
|
67
|
+
|
|
68
|
+
Replaces the specified ingress rule. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).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 kt={command:`update <ingress-id>`,describe:`Update an ingress rule`,builder:Ot,handler:async e=>u({command:`intel sinkholes ingresses update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({cidr:p(e.cidr,`cidr`,`text`)}):d(e.body)});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=d(e.body),i=await l(`Updating`,async()=>t.send(Z,{body:r,zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));s(i,{successLabel:`Updated`});return}e.cidr===void 0&&(e.cidr=await h(`cidr`,`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`));let i=f({cidr:p(e.cidr,`cidr`,`text`)}),o=await l(`Updating`,async()=>t.send(Z,{body:i,zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));s(o,{successLabel:`Updated`})})},At={command:`ingresses`,describe:`Operations for sinkholes.ingresses`,builder:e=>e.command(vt).command(xt).command(wt).command(Dt).command(kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var jt={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes`};function Mt(e){return e.usage(`$0 intel sinkholes list
|
|
69
|
+
|
|
70
|
+
Lists sinkholes owned by the account for redirecting malicious traffic.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Nt={command:`list`,describe:`List sinkholes owned by this account`,builder:Mt,handler:async e=>u({command:`intel sinkholes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel sinkholes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(jt,{account_id:a}));s(u,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes/${t.sinkhole_id}`,body:`json`};function Pt(e){return e.usage(`$0 intel sinkholes update <sinkhole-id>
|
|
71
|
+
|
|
72
|
+
Replaces the name or R2 configuration of the specified sinkhole. This is a full replacement. All fields, including r2_secret, must be re-supplied. Omitting r2_secret overwrites the stored value with an empty string.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).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:`update <sinkhole-id>`,describe:`Update a sinkhole`,builder:Pt,handler:async e=>u({command:`intel sinkholes update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel sinkholes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),r2_bucket:p(e[`r2-bucket`],`r2-bucket`,`text`),r2_id:p(e[`r2-id`],`r2-id`,`text`),r2_secret:p(e[`r2-secret`],`r2-secret`,`text`)}):d(e.body)});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,e.body){let t=d(e.body),r=await l(`Updating`,async()=>n.send(Q,{body:t,account_id:a,sinkhole_id:e[`sinkhole-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await h(`name`,`The name of the sinkhole.`));let u=f({name:p(e.name,`name`,`text`),r2_bucket:p(e[`r2-bucket`],`r2-bucket`,`text`),r2_id:p(e[`r2-id`],`r2-id`,`text`),r2_secret:p(e[`r2-secret`],`r2-secret`,`text`)}),m=await l(`Updating`,async()=>n.send(Q,{body:u,account_id:a,sinkhole_id:e[`sinkhole-id`]}));s(m,{successLabel:`Updated`})})},It={command:`sinkholes`,describe:`Operations for sinkholes`,builder:e=>e.command(ut).command(pt).command(gt).command(Nt).command(Ft).command(At).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Lt={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/url`,query:[`url`]};function Rt(e){return e.usage(`$0 intel urls get
|
|
73
|
+
|
|
74
|
+
Gets security information about a URL, including content categories and risk types. The URL must be provided as a query parameter.`).option(`url`,{type:`string`,description:`The URL to look up.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const zt={command:`get`,describe:`Get URL Intelligence`,builder:Rt,handler:async e=>u({command:`intel urls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={url:e.url};if(e.dryRun){let e=await i();c({command:`cf intel urls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/url`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Lt,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},$={command:`urls`,describe:`Operations for urls`,builder:e=>e.command(zt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Bt={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/whois`,query:[`domain`]};function Vt(e){return e.usage(`$0 intel whois get
|
|
75
|
+
|
|
76
|
+
Retrieves WHOIS registration data for a domain, including registrant and nameserver information.`).option(`domain`,{type:`string`,description:`Domain`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ht={command:`get`,describe:`Get WHOIS Record`,builder:Vt,handler:async e=>u({command:`intel whois get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={domain:e.domain};if(e.dryRun){let e=await i();c({command:`cf intel whois get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/whois`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(Bt,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Ut={command:`whois`,describe:`WHOIS registration data for domains including registrant, registrar, and nameservers`,builder:e=>e.command(Ht).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Wt={command:`intel`,describe:`Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds`,builder:e=>e.command(ce).command(F).command(z).command(fe).command(be).command(Ze).command(tt).command(at).command(ct).command(It).command($).command(Ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Wt as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{n as e}from"./auth-C6u9qIGO.mjs";import{t}from"./output-Co4xdFf6.mjs";import{t as n}from"./dry-run-C2KjGX10.mjs";import{t as r}from"./progress-D5po7ScB.mjs";import{t as i}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";var a={method:`GET`,path:()=>`/ips`,query:[`networks`]};function o(e){return e.usage(`$0 ips list
|
|
3
|
+
|
|
4
|
+
Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:o,handler:async o=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let i={networks:o.networks};if(o.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let s=await e(o),c=await r(`Loading`,async()=>s.send(a,i));t(c,{successLabel:`Loaded`})})},c={command:`ips`,describe:`ips`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-C6u9qIGO.mjs";import{a as r,t as i}from"./context-A6T-NKPI.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-D5po7ScB.mjs";import{t as c}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-BAJpE3jV.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/k2/streams`,body:`json`};function h(e){return e.usage("$0 k2 streams create\n\nCreate a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.").option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`name`,{type:`string`,description:`Specifies the name of the K2 stream.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`,default:604800}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).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)`}).check(e=>{if([`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0)){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const g={command:`create`,describe:`Create K2 stream`,builder:h,handler:async e=>c({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`Specifies the name of the K2 stream.`));let h=u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p}));a(g,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function v(e){return e.usage(`$0 k2 streams delete <stream-id>
|
|
3
|
+
|
|
4
|
+
Delete a K2 stream in an account. Deleting a stream that does not exist also succeeds.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <stream-id>`,describe:`Delete K2 stream`,builder:v,handler:async e=>c({command:`k2 streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force})){process.stderr.write(`Aborted.
|
|
5
|
+
`);return}let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Deleted`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function x(e){return e.usage(`$0 k2 streams get <stream-id>
|
|
6
|
+
|
|
7
|
+
Get K2 stream details.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <stream-id>`,describe:`Get K2 stream`,builder:x,handler:async e=>c({command:`k2 streams get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(b,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Loaded`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams`,query:[`name`,`page`,`per_page`]};function w(e){return e.usage(`$0 k2 streams list
|
|
8
|
+
|
|
9
|
+
List or filter K2 streams in an account.`).option(`name`,{type:`string`,description:`Filters K2 streams by name using a case-insensitive substring.`}).option(`page`,{type:`number`,description:`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 T={command:`list`,describe:`List K2 streams`,builder:w,handler:async e=>c({command:`k2 streams list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf k2 streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(C,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}/subscriptions`};function D(e){return e.usage(`$0 k2 streams subscriptions list
|
|
10
|
+
|
|
11
|
+
Lists every subscription on one stream, oldest first. Lag uses committed positions, not reserved read positions. A failed tail observation preserves subscription metadata and returns unavailable lag.`).option(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List K2 stream subscriptions`,builder:D,handler:async e=>c({command:`k2 streams subscriptions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams subscriptions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}/subscriptions`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(E,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Loaded`})})},k={command:`subscriptions`,describe:`Subscriptions that consume a K2 stream, with committed-position lag`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`,body:`json`};function j(e){return e.usage("$0 k2 streams update <stream-id>\n\nUpdate a K2 stream. Omitted `http` settings, such as `authentication` and `cors`, keep their current values. Disabling HTTP keeps them, so enabling HTTP again restores them. At least one input must remain enabled.").positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).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)`}).check(e=>{if([`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0)){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const M={command:`update <stream-id>`,describe:`Update K2 stream`,builder:j,handler:async e=>c({command:`k2 streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):l(e.body)});return}let c=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(A,{body:t,account_id:d,stream_id:e[`stream-id`]}));a(n,{successLabel:`Updated`});return}let f=u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),p=await s(`Updating`,async()=>c.send(A,{body:f,account_id:d,stream_id:e[`stream-id`]}));a(p,{successLabel:`Updated`})})},N={command:`streams`,describe:`K2 streams, their retention, and the HTTP and Workers binding inputs used to produce records`,builder:e=>e.command(g).command(y).command(S).command(T).command(M).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`k2`,describe:`Durable, ordered event streams that you produce records to and consume from with subscriptions`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{P as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-C6u9qIGO.mjs";import{i as n}from"./context-A6T-NKPI.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-D5po7ScB.mjs";import{t as o}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{a as u,n as d}from"./prompt-BAJpE3jV.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/keyless_certificates`,body:`json`};function p(e){return e.usage(`$0 keyless-certificates create
|
|
3
|
+
|
|
4
|
+
Creates a Keyless SSL configuration that allows SSL/TLS termination without exposing private keys to Cloudflare. Keys remain on your infrastructure.`).option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).coerce(`bundle-method`,e=>l(e,`bundle-method`,`text`)).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or SSL certificate and intermediate(s).`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`,default:24008}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).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)`}).check(e=>{if([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --tunnel-* flag is set`)}return!0})}const m={command:`create`,describe:`Create Keyless SSL Configuration`,builder:p,handler:async e=>o({command:`keyless-certificates create`,classification:{safeFlags:[`bundle-method`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf keyless-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({bundle_method:e[`bundle-method`],certificate:l(e.certificate,`certificate`,`text`),host:l(e.host,`host`,`text`),name:l(e.name,`name`,`text`),port:e.port,tunnel:{private_ip:l(e[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:l(e[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):s(e.body)});return}let o=await t(e),d=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=d,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(f,{body:t,zone_id:d}));r(n,{successLabel:`Created`});return}if(e.certificate===void 0&&(e.certificate=await u(`certificate`,`The zone's SSL certificate or SSL certificate and intermediate(s).`)),e.host===void 0&&(e.host=await u(`host`,`The keyless SSL name.`)),e.port===void 0)throw Error(`--port is required (or pass --body with this field set).`);let p=c({bundle_method:e[`bundle-method`],certificate:l(e.certificate,`certificate`,`text`),host:l(e.host,`host`,`text`),name:l(e.name,`name`,`text`),port:e.port,tunnel:{private_ip:l(e[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:l(e[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}),m=await a(`Creating`,async()=>o.send(f,{body:p,zone_id:d}));r(m,{successLabel:`Created`})})};var h={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/keyless_certificates/${t.keyless_certificate_id}`};function g(e){return e.usage(`$0 keyless-certificates delete <keyless-certificate-id>
|
|
5
|
+
|
|
6
|
+
Removes a Keyless SSL configuration. SSL connections will no longer use the keyless server for cryptographic operations.`).positional(`keyless-certificate-id`,{type:`string`,description:`Keyless certificate identifier tag.`,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 _={command:`delete <keyless-certificate-id>`,describe:`Delete Keyless SSL Configuration`,builder:g,handler:async e=>o({command:`keyless-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf keyless-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/keyless_certificates/${e[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(e[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(e[`keyless-certificate-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await d({force:!!e.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let c=await a(`Deleting`,async()=>o.send(h,{zone_id:s,keyless_certificate_id:e[`keyless-certificate-id`]}));r(c,{successLabel:`Deleted`})})};var v={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/keyless_certificates/${t.keyless_certificate_id}`,body:`json`};function y(e){return e.usage(`$0 keyless-certificates edit <keyless-certificate-id>
|
|
8
|
+
|
|
9
|
+
This will update attributes of a Keyless SSL. Consists of one or more of the following: host,name,port.`).positional(`keyless-certificate-id`,{type:`string`,description:`Keyless certificate identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether or not the Keyless SSL is on or off.`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).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)`}).check(e=>{if([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --tunnel-* flag is set`)}return!0})}const b={command:`edit <keyless-certificate-id>`,describe:`Edit Keyless SSL Configuration`,builder:y,handler:async e=>o({command:`keyless-certificates edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf keyless-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/keyless_certificates/${e[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(e[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(e[`keyless-certificate-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({enabled:e.enabled,host:l(e.host,`host`,`text`),name:l(e.name,`name`,`text`),port:e.port,tunnel:{private_ip:l(e[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:l(e[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(v,{body:t,zone_id:u,keyless_certificate_id:e[`keyless-certificate-id`]}));r(n,{successLabel:`Updated`});return}let d=c({enabled:e.enabled,host:l(e.host,`host`,`text`),name:l(e.name,`name`,`text`),port:e.port,tunnel:{private_ip:l(e[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:l(e[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}),f=await a(`Updating`,async()=>o.send(v,{body:d,zone_id:u,keyless_certificate_id:e[`keyless-certificate-id`]}));r(f,{successLabel:`Updated`})})};var x={method:`GET`,path:t=>e`/zones/${t.zone_id}/keyless_certificates/${t.keyless_certificate_id}`};function S(e){return e.usage(`$0 keyless-certificates get <keyless-certificate-id>
|
|
10
|
+
|
|
11
|
+
Get details for one Keyless SSL configuration.`).positional(`keyless-certificate-id`,{type:`string`,description:`Keyless certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <keyless-certificate-id>`,describe:`Get Keyless SSL Configuration`,builder:S,handler:async e=>o({command:`keyless-certificates get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf keyless-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/keyless_certificates/${e[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(e[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(e[`keyless-certificate-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(x,{zone_id:s,keyless_certificate_id:e[`keyless-certificate-id`]}));r(c,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/zones/${t.zone_id}/keyless_certificates`};function T(e){return e.usage(`$0 keyless-certificates list
|
|
12
|
+
|
|
13
|
+
List all Keyless SSL configurations for a given zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Keyless SSL Configurations`,builder:T,handler:async e=>o({command:`keyless-certificates list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf keyless-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(w,{zone_id:s}));r(c,{successLabel:`Loaded`})})},D={command:`keyless-certificates`,describe:`keyless-certificates`,builder:e=>e.command(m).command(_).command(b).command(C).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{D as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-C6u9qIGO.mjs";import{a as r,t as i}from"./context-A6T-NKPI.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-D5po7ScB.mjs";import{t as c}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/tags/keys`,query:[`cursor`]};function u(e){return e.usage(`$0 keys list
|
|
3
|
+
|
|
4
|
+
Lists all distinct tag keys used across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`list`,describe:`List tag keys`,builder:u,handler:async e=>c({command:`keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={cursor:e.cursor};if(e.dryRun){let e=await r();o({command:`cf keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/keys`,pathParams:{},query:c,bodyKind:`none`});return}let u=await n(e),d=e.local?t:await i();e.accountId=d;let f=await s(`Loading`,async()=>u.send(l,{account_id:d,...c}));a(f,{successLabel:`Loaded`})})},f={command:`keys`,describe:`keys`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{i as n,n as r}from"./auth-C6u9qIGO.mjs";import{a as i,t as a}from"./context-A6T-NKPI.mjs";import{t as o}from"./output-Co4xdFf6.mjs";import{t as s}from"./dry-run-C2KjGX10.mjs";import{t as c}from"./progress-D5po7ScB.mjs";import{t as l}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f,t as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-BAJpE3jV.mjs";import{n as g,t as _}from"./raw-fetch-yY-wX5Xx.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
|
|
3
|
+
|
|
4
|
+
Deletes up to 10,000 key-value pairs from the specified Workers KV namespace. Send a JSON array of the key names to delete. The result reports the number of successful deletions and any keys that failed and should be retried.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:v,handler:async e=>l({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let l=await r(e),d=e.local?t:await a();if(e.accountId=d,!await h({force:!!e.force,message:`This operation deletes the specified keys and their values from the Workers KV namespace.`})){process.stderr.write(`Aborted.
|
|
5
|
+
`);return}if(e.body){let t=u(e.body);if(Array.isArray(t)&&t.length>1e4){let r=Math.ceil(t.length/1e4),i=null;for(let a=0;a<t.length;a+=1e4){let o=t.slice(a,a+1e4),s=Math.floor(a/1e4)+1;i=await c(`Deleting: batch ${s}/${r}`,async()=>n(l,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,{body:o}))}o(i,{successLabel:`Deleted`});return}let r=await c(`Deleting`,async()=>n(l,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,{body:t}));o(r,{successLabel:`Deleted`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk/get`,body:`json`};function x(e){return e.usage("$0 kv bulk get <namespace-id>\n\nRetrieves the text-based values of up to 100 keys from the specified Workers KV namespace. The result maps each requested key to its value. Set `type` to `json` to parse JSON values instead of returning strings, and set `withMetadata` to `true` to include metadata with each value. Binary values are not supported by this operation.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:"Return values as strings with `text`, or parse stored JSON values with `json`.",choices:[`text`,`json`],default:`text`}).coerce(`type`,e=>f(e,`type`,`text`)).option(`with-metadata`,{type:`boolean`,description:`Whether to include metadata in the response.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:x,handler:async e=>l({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(b,{body:t,account_id:l,namespace_id:e[`namespace-id`]}));o(r,{successLabel:`Created`});return}if(e.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let f=d({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}),p=await c(`Creating`,async()=>n.send(b,{body:f,account_id:l,namespace_id:e[`namespace-id`]}));o(p,{successLabel:`Created`})})};function C(e){return e.usage("$0 kv bulk put <namespace-id>\n\nWrites up to 10,000 key-value pairs to the specified Workers KV namespace from a JSON array, with optional metadata and expiration settings for each pair. Existing values and expirations are overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence. The entire request must be 100 megabytes or less. The result reports the number of successful writes and any keys that failed and should be retried.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`put <namespace-id>`,describe:`Write multiple key-value pairs`,builder:C,handler:async e=>l({command:`kv bulk put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body)});return}let l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body){let t=u(e.body);if(Array.isArray(t)&&t.length>1e4){let r=Math.ceil(t.length/1e4),i=null;for(let a=0;a<t.length;a+=1e4){let o=t.slice(a,a+1e4),s=Math.floor(a/1e4)+1;i=await c(`Updating: batch ${s}/${r}`,async()=>n(l,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk`,{body:o}))}o(i,{successLabel:`Updated`});return}let r=await c(`Updating`,async()=>n(l,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/bulk`,{body:t}));o(r,{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.`)})},T={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(y).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var E={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/values/${t.key_name}`};function D(e){return e.usage("$0 kv keys delete <key-name>\n\nDeletes the specified key and its value from the Workers KV namespace. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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 O={command:`delete <key-name>`,describe:`Delete a key-value pair`,builder:D,handler:async e=>l({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"key-name":String(e[`key-name`]??``),"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the selected key-value pair from the Workers KV namespace.`})){process.stderr.write(`Aborted.
|
|
6
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(E,{account_id:l,namespace_id:e[`namespace-id`],key_name:e[`key-name`]}));o(u,{successLabel:`Deleted`})})};function k(e){return e.usage("$0 kv keys get <key-name>\n\nReturns the value stored under the specified key in the Workers KV namespace as raw bytes. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If the key-value pair expires, the `expiration` response header contains its expiration time in seconds since the UNIX epoch.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const A={command:`get <key-name>`,describe:`Get a key's value`,builder:k,handler:async e=>l({command:`kv keys get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"key-name":String(e[`key-name`]??``),"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await a();e.accountId=n;let o=await c(`Loading`,async()=>_(`/accounts/${n}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));g(e.text===!0?o.toString(`utf-8`):o)})};var j={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/keys`,query:[`limit`,`prefix`,`cursor`]};function M(e){return e.usage("$0 kv keys list\n\nLists key names in the specified Workers KV namespace, with expiration times and metadata when present. Use `prefix` to filter names and `cursor` to request the next page. Values are not included.").option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`limit`,{type:`number`,description:"Maximum number of keys to return in one response. Pass `result_info.cursor` from the response as `cursor` to request the next page."}).option(`prefix`,{type:`string`,description:`Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.`}).option(`cursor`,{type:`string`,description:"Opaque pagination token from `result_info.cursor` in the previous response. Pass it unchanged to request the next page of keys."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List keys in a namespace`,builder:M,handler:async e=>l({command:`kv keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,prefix:e.prefix,cursor:e.cursor};if(e.dryRun){let t=await i();s({command:`cf kv keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/keys`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(j,{account_id:u,namespace_id:e[`namespace-id`],...n}));o(d,{successLabel:`Loaded`})})};function P(e){return e.usage("$0 kv keys put <key-name>\n\nWrites a value under the specified key in the Workers KV namespace, creating the key-value pair or replacing its existing value, expiration, and metadata. Send the value as an `application/octet-stream` request body, or use `multipart/form-data` with a `value` part and an optional JSON `metadata` part. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`expiration`,{type:`number`,description:`Expires the key at a certain time, measured in number of seconds since the UNIX epoch.`}).option(`expiration-ttl`,{type:`number`,description:"Number of seconds until the key expires. Must be at least 60. Takes precedence over `expiration` when both are specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A byte sequence to be stored, up to 25 MiB in length.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`Associates arbitrary JSON data with a key/value pair.`})}const F={command:`put <key-name>`,describe:`Write a key-value pair with optional metadata`,builder:P,handler:async e=>l({command:`kv keys put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={expiration:e.expiration,expiration_ttl:e[`expiration-ttl`]};if(e.dryRun){let t=await i();s({command:`cf kv keys put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"key-name":String(e[`key-name`]??``),"namespace-id":String(e[`namespace-id`]??``)},query:l,bodyKind:e.metadata===void 0?`octet-stream`:`multipart`,body:e.metadata===void 0?e.body:{body:e.body,file:e.file,metadata:e.metadata}});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,e.metadata!==void 0){let t=new FormData;if(e.file){let n=p(e.file);t.append(`value`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`value`,e.body);e.metadata!==void 0&&t.append(`metadata`,String(f(e.metadata,`metadata`,`text`)??``));let r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{body:t}));o(r,{successLabel:`Updated`});return}if(e.file){let t=p(e.file),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`}}));o(r,{successLabel:`Updated`});return}if(e.body){let t=f(e.body,`body`,`binary`),r=new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}${r?`?`+r:``}`,{body:t,headers:{"Content-Type":`application/octet-stream`}}));o(i,{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ee={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(O).command(A).command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var I={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/metadata/${t.key_name}`};function L(e){return e.usage("$0 kv metadata get <key-name>\n\nReturns the JSON metadata associated with the specified key in the Workers KV namespace, without retrieving its value. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get <key-name>`,describe:`Get a key's metadata`,builder:L,handler:async e=>l({command:`kv metadata get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/metadata/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"key-name":String(e[`key-name`]??``),"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(I,{account_id:l,namespace_id:e[`namespace-id`],key_name:e[`key-name`]}));o(u,{successLabel:`Loaded`})})},z={command:`metadata`,describe:`Operations for metadata`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces`,body:`json`};function V(e){return e.usage(`$0 kv namespaces create
|
|
7
|
+
|
|
8
|
+
Creates a Workers KV namespace in the specified account with the given title. Returns \`400\` if the account already owns a namespace with that title; an existing namespace must be explicitly deleted before it can be replaced. An optional jurisdiction restricts where data is durably stored and can only be set at creation time.`).option(`jurisdiction`,{type:`string`,description:`Specify the jurisdiction to restrict the KV namespace to durably store data within. Can only be set at namespace creation time.`,choices:[`eu`,`fedramp`,`us`]}).coerce(`jurisdiction`,e=>f(e,`jurisdiction`,`text`)).option(`namespace-mode`,{type:`string`,description:"The mode of the Workers KV namespace. Specify `instant` when creating a namespace to create a KV Instant namespace. Omit this field when creating a namespace to create a classic namespace. Currently, `instant` is the only supported explicit value.",choices:[`instant`]}).coerce(`namespace-mode`,e=>f(e,`namespace-mode`,`text`)).option(`title`,{type:`string`,description:`Human-readable string name for a Workers KV namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`create`,describe:`Create a namespace`,builder:V,handler:async e=>l({command:`kv namespaces create`,classification:{safeFlags:[`jurisdiction`,`namespace-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({jurisdiction:e.jurisdiction,mode:e[`namespace-mode`],title:f(e.title,`title`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n.send(B,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.title===void 0&&(e.title=await m(`title`,`Human-readable string name for a Workers KV namespace.`));let p=d({jurisdiction:e.jurisdiction,mode:e[`namespace-mode`],title:f(e.title,`title`,`text`)}),h=await c(`Creating`,async()=>n.send(B,{body:p,account_id:l}));o(h,{successLabel:`Created`})})};var U={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}`};function W(e){return e.usage(`$0 kv namespaces delete <namespace-id>
|
|
9
|
+
|
|
10
|
+
Deletes the specified Workers KV namespace and its stored key-value pairs from the account.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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 <namespace-id>`,describe:`Delete a namespace`,builder:W,handler:async e=>l({command:`kv namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the selected Workers KV namespace and all of its key-value pairs.`})){process.stderr.write(`Aborted.
|
|
11
|
+
`);return}let u=await c(`Deleting`,async()=>n.send(U,{account_id:l,namespace_id:e[`namespace-id`]}));o(u,{successLabel:`Deleted`})})};var K={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}`};function q(e){return e.usage(`$0 kv namespaces get <namespace-id>
|
|
12
|
+
|
|
13
|
+
Returns the Workers KV namespace for the specified account and namespace ID.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get <namespace-id>`,describe:`Get a namespace`,builder:q,handler:async e=>l({command:`kv namespaces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(K,{account_id:l,namespace_id:e[`namespace-id`]}));o(u,{successLabel:`Loaded`})})};var Y={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces`,query:[`page`,`per_page`,`order`,`direction`]};function X(e){return e.usage("$0 kv namespaces list\n\nLists Workers KV namespaces owned by the specified account. Use `page` and `per_page` to select a page of results, and `order` and `direction` to control sorting.").option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:"Namespace field to sort by (`id` or `title`).",choices:[`id`,`title`]}).option(`direction`,{type:`string`,description:"Sort namespaces in ascending (`asc`) or descending (`desc`) order.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List namespaces`,builder:X,handler:async e=>l({command:`kv namespaces list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf kv namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Y,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var Q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}`,body:`json`};function $(e){return e.usage(`$0 kv namespaces update <namespace-id>
|
|
14
|
+
|
|
15
|
+
Changes the title of the specified Workers KV namespace and returns the updated namespace. The namespace ID and stored key-value pairs are unchanged.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`title`,{type:`string`,description:`Human-readable string name for a Workers KV namespace.`}).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:`update <namespace-id>`,describe:`Rename a namespace`,builder:$,handler:async e=>l({command:`kv namespaces update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv namespaces update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({title:f(e.title,`title`,`text`)}):u(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=u(e.body),r=await c(`Updating`,async()=>n.send(Q,{body:t,account_id:l,namespace_id:e[`namespace-id`]}));o(r,{successLabel:`Updated`});return}e.title===void 0&&(e.title=await m(`title`,`Human-readable string name for a Workers KV namespace.`));let p=d({title:f(e.title,`title`,`text`)}),h=await c(`Updating`,async()=>n.send(Q,{body:p,account_id:l,namespace_id:e[`namespace-id`]}));o(h,{successLabel:`Updated`})})},ne={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(H).command(G).command(J).command(Z).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},re={command:`kv`,describe:`kv`,builder:e=>e.command(T).command(ee).command(z).command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{re as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-
|
|
2
|
+
function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-CUNhH5CQ.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-C6u9qIGO.mjs";import{i as n}from"./context-A6T-NKPI.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-D5po7ScB.mjs";import{t as o}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-BAJpE3jV.mjs";var d={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`,body:`json`};function f(e){return e.usage(`$0 leaked-credential-checks detections create
|
|
3
|
+
|
|
4
|
+
Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const p={command:`create`,describe:`Create a custom detection location for a zone.`,builder:f,handler:async e=>o({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(d,{body:t,zone_id:u}));r(n,{successLabel:`Created`});return}let f=c({password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}),p=await a(`Creating`,async()=>o.send(d,{body:f,zone_id:u}));r(p,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function h(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
|
|
5
|
+
|
|
6
|
+
Delete a user-defined detection location, identified by its detection ID. Incoming requests are then scanned using only the default scan locations and the detection locations that remain.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,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 <detection-id>`,describe:`Delete a custom detection location from a zone.`,builder:h,handler:async e=>o({command:`leaked-credential-checks detections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections/${e[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(e[`detection-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"detection-id":String(e[`detection-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force,message:`This operation deletes a Leaked Credential Checks custom detection location.`})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let c=await a(`Deleting`,async()=>o.send(m,{zone_id:s,detection_id:e[`detection-id`]}));r(c,{successLabel:`Deleted`})})};var _={method:`GET`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function v(e){return e.usage(`$0 leaked-credential-checks detections get <detection-id>
|
|
8
|
+
|
|
9
|
+
Get the username and password expressions of a single user-defined detection location, identified by its detection ID.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <detection-id>`,describe:`Get a custom detection location of a zone.`,builder:v,handler:async e=>o({command:`leaked-credential-checks detections get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections/${e[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(e[`detection-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"detection-id":String(e[`detection-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(_,{zone_id:s,detection_id:e[`detection-id`]}));r(c,{successLabel:`Loaded`})})};var b={method:`GET`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`};function x(e){return e.usage(`$0 leaked-credential-checks detections list
|
|
10
|
+
|
|
11
|
+
List the user-defined detection locations configured for Leaked Credential Checks, each with its own identifier. A custom detection location tells the WAF where to find the username and password in requests to your application.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List the custom detection locations of a zone.`,builder:x,handler:async e=>o({command:`leaked-credential-checks detections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(b,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var C={method:`PUT`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`,body:`json`};function w(e){return e.usage(`$0 leaked-credential-checks detections update <detection-id>
|
|
12
|
+
|
|
13
|
+
Update the username and password expressions of an existing detection location, identified by its detection ID. Both expressions are overwritten, so omitting the password expression clears it.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const T={command:`update <detection-id>`,describe:`Update a custom detection location of a zone.`,builder:w,handler:async e=>o({command:`leaked-credential-checks detections update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections/${e[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(e[`detection-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"detection-id":String(e[`detection-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}):s(e.body)});return}let o=await t(e),u=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=u,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(C,{body:t,zone_id:u,detection_id:e[`detection-id`]}));r(n,{successLabel:`Updated`});return}let d=c({password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}),f=await a(`Updating`,async()=>o.send(C,{body:d,zone_id:u,detection_id:e[`detection-id`]}));r(f,{successLabel:`Updated`})})},E={command:`detections`,describe:`Custom detection locations that tell the WAF where to find usernames and passwords in requests`,builder:e=>e.command(p).command(g).command(y).command(S).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`GET`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks`};function O(e){return e.usage(`$0 leaked-credential-checks get
|
|
14
|
+
|
|
15
|
+
Get the current Leaked Credential Checks status for the zone. While enabled, Cloudflare scans incoming requests for usernames and passwords that were exposed in known data breaches.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`Get the Leaked Credential Checks status for a zone.`,builder:O,handler:async e=>o({command:`leaked-credential-checks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(D,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var A={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks`,body:`json`};function j(e){return e.usage(`$0 leaked-credential-checks update
|
|
16
|
+
|
|
17
|
+
Update the Leaked Credential Checks status for the zone, enabling or disabling the detection. While enabled, the detection populates the \`cf.waf.credential_check.*\` fields, which you can reference in custom rules and rate limiting rules to challenge or block requests carrying compromised credentials.`).option(`enabled`,{type:`boolean`,description:`Determines whether or not Leaked Credential Checks are enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Defines the overall status for Leaked Credential Checks.`})}const M={command:`update`,describe:`Update the Leaked Credential Checks status for a zone.`,builder:j,handler:async e=>o({command:`leaked-credential-checks update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({enabled:e.enabled}):s(e.body)});return}let o=await t(e),l=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=l,!await u({force:!!e.force,message:`This operation toggles Leaked Credential Checks for a zone.`})){process.stderr.write(`Aborted.
|
|
18
|
+
`);return}if(e.body){let t=s(e.body),n=await a(`Deleting`,async()=>o.send(A,{body:t,zone_id:l}));r(n,{successLabel:`Deleted`});return}let d=c({enabled:e.enabled}),f=await a(`Deleting`,async()=>o.send(A,{body:d,zone_id:l}));r(f,{successLabel:`Deleted`})})},N={command:`leaked-credential-checks`,describe:`Detect compromised credentials in login requests by checking against known breach databases`,builder:e=>e.command(k).command(M).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{N as default};
|