cf 1.0.0-beta.14 → 1.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/_meta/commands.json +3409 -621
- package/dist/_meta/hand-written-commands.json +33 -0
- package/dist/_meta/schemas.json +2160 -246
- package/dist/abuse-reports-CnQBtN1G.mjs +24 -0
- package/dist/{access-k1QjF5rE.mjs → access-BzmXSwzj.mjs} +1 -1
- package/dist/account-tags-2qPWbW17.mjs +15 -0
- package/dist/accounts-B0Byg-AV.mjs +132 -0
- package/dist/acm-DgAu0cnk.mjs +15 -0
- package/dist/addressing-J1oa0ML2.mjs +105 -0
- package/dist/agent-memory-4KGou-tm.mjs +34 -0
- package/dist/ai-WY7wVQfA.mjs +31 -0
- package/dist/ai-audit-D38HaEoZ.mjs +6 -0
- package/dist/ai-gateway-C0gIipT8.mjs +80 -0
- package/dist/ai-search-ClwnPU-9.mjs +79 -0
- package/dist/ai-security-BIsvFPYV.mjs +10 -0
- package/dist/alerting-MHhv28oO.mjs +56 -0
- package/dist/analytics-BfBz7bqB.mjs +17 -0
- package/dist/analytics_engine-CXVdBF1n.mjs +4 -0
- package/dist/api-eMuS5GI1.mjs +3 -0
- package/dist/api-security-DUCfcdC1.mjs +154 -0
- package/dist/argo-CUlzI4v3.mjs +14 -0
- package/dist/artifacts-BLfWGzBg.mjs +43 -0
- package/dist/audit-logs-CsfIm2QS.mjs +4 -0
- package/dist/auth-8Sm4uLGM.mjs +2 -0
- package/dist/auth-C6u9qIGO.mjs +2 -0
- package/dist/auth-CGRemu5W.mjs +2 -0
- package/dist/{auth-token-Dop0wLCw.mjs → auth-token-DkkYg4DP.mjs} +1 -1
- package/dist/{autoconfig-RQ3HS4m1.mjs → autoconfig-B0ESZ8DJ.mjs} +2 -2
- package/dist/basin-catalog-CrKRYJ0b.mjs +46 -0
- package/dist/billing-NxehgXrR.mjs +23 -0
- package/dist/blocks-Bat9A8V_.mjs +5 -0
- package/dist/bot-management-C993iQKL.mjs +9 -0
- package/dist/botnet-feed-CZ4vYk5y.mjs +11 -0
- package/dist/brand-protection-ADVgIi0l.mjs +27 -0
- package/dist/browser-run-CEptKZYl.mjs +42 -0
- package/dist/build-Bm6kGyzo.mjs +2 -0
- package/dist/{build-CCe7IrWT.mjs → build-sBpqm9ga.mjs} +1 -1
- package/dist/builds-DqtiTH7p.mjs +71 -0
- package/dist/cache-hX5QxmI0.mjs +45 -0
- package/dist/certificate-authorities-BOcybjc1.mjs +6 -0
- package/dist/cf-Bq4pA4n6.mjs +18 -0
- package/dist/{chunk-TAK63GWY-DdMktrgc.mjs → chunk-2HLTAS5V-D7COzUOd.mjs} +2 -2
- package/dist/chunk-2K52M2W5-CYxfQXUq.mjs +363 -0
- package/dist/{chunk-DSGVRFIS-CPI5cYtB.mjs → chunk-DSGVRFIS-C5SqiTOz.mjs} +1 -1
- package/dist/{cli-ht4q6i2y.mjs → cli-R8h3OKZI.mjs} +1 -1
- package/dist/client-certificates-Bez_ArKE.mjs +13 -0
- package/dist/client-side-security-CSmA50Bv.mjs +63 -0
- package/dist/cloud-connector-0Wivqi7S.mjs +6 -0
- package/dist/{cloudflared-D83U8Yn3.mjs → cloudflared-By8BzYXc.mjs} +1 -1
- package/dist/cloudforce-one-J-rU6k1U.mjs +405 -0
- package/dist/{command-9VAc7b30.mjs → command-0BOb1pgV.mjs} +1 -1
- package/dist/{command-CyJQ40fc.mjs → command-BCJN-ZM2.mjs} +1 -1
- package/dist/{command-OHov3PEc.mjs → command-BG-kLOnS.mjs} +1 -1
- package/dist/{command-B_Ixlz8Q.mjs → command-BIsI-mMX.mjs} +1 -1
- package/dist/{command-SmWD-MeI.mjs → command-BKDbbA-L.mjs} +1 -1
- package/dist/command-BWQIKu6I.mjs +2 -0
- package/dist/{command-Ckb9FufU.mjs → command-Bdy69UFU.mjs} +1 -1
- package/dist/{command-CtVUNm__.mjs → command-Bgb-3yPg.mjs} +1 -1
- package/dist/{command-DtgJilOK.mjs → command-C6w1OdoC.mjs} +1 -1
- package/dist/{command-BtDY_MKv.mjs → command-CKW6UhTh.mjs} +1 -1
- package/dist/{command-Bpzp8Mz2.mjs → command-DCQgsd2U.mjs} +1 -1
- package/dist/{command-DjEJaOwV.mjs → command-DIs-Nqtl.mjs} +1 -1
- package/dist/command-DPn5ANHs.mjs +2 -0
- package/dist/{command-CUNMrMou.mjs → command-DZfKHiru.mjs} +1 -1
- package/dist/{command-DXaRn1ls.mjs → command-DppVezAB.mjs} +1 -1
- package/dist/{completions-CuqAO3N_.mjs → completions-CpNGTlUX.mjs} +1 -1
- package/dist/config.mjs +0 -0
- package/dist/connector-interrupts-CH-DaLuo.mjs +6 -0
- package/dist/connector-telemetry-events-X3Fod9nl.mjs +6 -0
- package/dist/connector-telemetry-snapshots-D-WR4npQ.mjs +6 -0
- package/dist/connectors-CORKD31m.mjs +15 -0
- package/dist/containers-BboUbx3k.mjs +78 -0
- package/dist/containers-Di3_Vopq.mjs +376 -0
- package/dist/content-scan-DXGREAXa.mjs +14 -0
- package/dist/{context-BBLtgdR1.mjs → context-A6T-NKPI.mjs} +2 -2
- package/dist/{cps-C5phNoVU.mjs → cps-1BoOLtTq.mjs} +3 -3
- package/dist/create-OXylMu6m.mjs +2 -0
- package/dist/csamScanner-CHfbfeup.mjs +10 -0
- package/dist/ct-alerting-DlH4ILQo.mjs +5 -0
- package/dist/custom-certificates-zJqJZ2Th.mjs +17 -0
- package/dist/custom-csrs-DoLIGqYL.mjs +11 -0
- package/dist/custom-hostnames-YfV-aoAK.mjs +27 -0
- package/dist/custom-nameservers-BV43gmgt.mjs +9 -0
- package/dist/custom-pages-CoOU1Cdx.mjs +21 -0
- package/dist/{d1-EQMUlHTJ.mjs → d1-DujBmzLa.mjs} +31 -31
- package/dist/dcv-delegation-CPLsVYOl.mjs +4 -0
- package/dist/delegate.mjs +0 -0
- package/dist/deploy-context-tEhwEXnA.mjs +56 -0
- package/dist/{deploy-input-BCjcuP6u.mjs → deploy-input-BqJ7GVZ-.mjs} +1 -1
- package/dist/{deploy-B22sEVHd.mjs → deploy-wNujfGUJ.mjs} +1 -1
- package/dist/{dev-ClhhXuNU.mjs → dev-EtnMYA7K.mjs} +1 -1
- package/dist/diagnostics-B3TYPVRi.mjs +15 -0
- package/dist/{dist-DmRM6WSZ.mjs → dist-DZRTPMMA.mjs} +4 -4
- package/dist/dls-CWm1HRF0.mjs +17 -0
- package/dist/dns-CjAFU7Z9.mjs +144 -0
- package/dist/dns-firewall-BooBP9ap.mjs +71 -0
- package/dist/docs-C5XB7HdG.mjs +3 -0
- package/dist/{dotenv-DpXaxfho.mjs → dotenv-usOKkeW7.mjs} +3 -3
- package/dist/{dry-run-DRj2_uV3.mjs → dry-run-C2KjGX10.mjs} +1 -1
- package/dist/durable-objects-CSrMQDCE.mjs +6 -0
- package/dist/email-auth-Bp1Mui-n.mjs +6 -0
- package/dist/email-routing-CVF6SwQt.mjs +45 -0
- package/dist/email-security-mYZtazae.mjs +158 -0
- package/dist/email-sending-BqaKU_Xu.mjs +47 -0
- package/dist/error-sanitization-CIQOep3I.mjs +2 -0
- package/dist/error-sanitization-pOyzm2F1.mjs +2 -0
- package/dist/fieldExtractors-CAGZVmYg.mjs +9 -0
- package/dist/firewall-DgTDsYOt.mjs +36 -0
- package/dist/flagship-Db3PxxyZ.mjs +28 -0
- package/dist/fraud-BEOQczy8.mjs +22 -0
- package/dist/get-By1q8YlI.mjs +2 -0
- package/dist/get-CRKvqCu6.mjs +2 -0
- package/dist/get-iPUHxD1r.mjs +2 -0
- package/dist/google-tag-gateway-DjLQ9wo0.mjs +6 -0
- package/dist/healthchecks-C3ScnKss.mjs +22 -0
- package/dist/{hostnames-DvaUSzsj.mjs → hostnames-DU0k-xO9.mjs} +6 -6
- package/dist/hyperdrive-IpCCLCRd.mjs +37 -0
- package/dist/iam-96CYM8Vw.mjs +52 -0
- package/dist/images-AB9EgZgT.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-Da8pe296.mjs → init-D2nPoW4f.mjs} +2 -2
- package/dist/intel-BKb4RLvS.mjs +76 -0
- package/dist/ips-z9APCV_b.mjs +4 -0
- package/dist/k2-Bv-HiJ29.mjs +11 -0
- package/dist/keyless-certificates-ChgSGHq4.mjs +13 -0
- package/dist/keys-BhngDsDa.mjs +4 -0
- package/dist/kv-CB5MQVGP.mjs +15 -0
- package/dist/{lazy-command-CDWwCsD2.mjs → lazy-command-CaZ1kdlW.mjs} +1 -1
- package/dist/leaked-credential-checks-Bsi2WpSU.mjs +18 -0
- package/dist/{load-balancers-Bu9pd2SV.mjs → load-balancers-0gXZNCeI.mjs} +40 -40
- package/dist/{local-BcPM4I0s.mjs → local-Dil4fTWX.mjs} +1 -1
- package/dist/local-DxWDQDnG.mjs +2 -0
- package/dist/{local-runtime-BHKyRlCP.mjs → local-runtime-B7TKFu6E.mjs} +1 -1
- package/dist/login-CiQGR8ha.mjs +5 -0
- package/dist/login-Ik98G4K6.mjs +2 -0
- package/dist/logo-matches-DmoF5Otu.mjs +6 -0
- package/dist/logos-BL6ohIMH.mjs +7 -0
- package/dist/logpush-UVopW68t.mjs +46 -0
- package/dist/logs-BVfxiEiM.mjs +36 -0
- package/dist/magic-cloud-networking-B5S3aM6f.mjs +71 -0
- package/dist/magic-network-monitoring-CDSJPP47.mjs +36 -0
- package/dist/magic-transit-TcDTKM43.mjs +386 -0
- package/dist/managed-defense-C88HL0pg.mjs +18 -0
- package/dist/managed-transforms-Ja41Tahl.mjs +9 -0
- package/dist/matches-BL_Y-9Yq.mjs +6 -0
- package/dist/mcp-BWp5Q09R.mjs +32 -0
- package/dist/mesh-lFPLRWhV.mjs +26 -0
- package/dist/{migrate-CZNq63Uj.mjs → migrate-6e5mJ79R.mjs} +1 -1
- package/dist/monetization-BIc4Bwo2.mjs +20 -0
- package/dist/mtls-certificates-CVBw-Jli.mjs +13 -0
- package/dist/network-Wig0qbaC.mjs +50 -0
- package/dist/network-interconnects-C16z1HuQ.mjs +72 -0
- package/dist/o11y-Bhy4qDRm.mjs +93 -0
- package/dist/oauth-CfEedDZi.mjs +4 -0
- package/dist/oauth-clients-eXjmK5yf.mjs +16 -0
- package/dist/{oauth-n8um6MFk.mjs → oauth-oWaW7ICv.mjs} +1 -1
- package/dist/oauth-scopes-DZWn50EA.mjs +4 -0
- package/dist/organization-QdAQTrKa.mjs +71 -0
- package/dist/organizations-CgAQYdK5.mjs +4 -0
- package/dist/origin-ca-certificates-BklXqp8X.mjs +11 -0
- package/dist/origin-post-quantum-encryption-Dg16ueT4.mjs +6 -0
- package/dist/origin-tls-client-auth-d8bDU5zU.mjs +30 -0
- package/dist/output-Co4xdFf6.mjs +2 -0
- package/dist/page-rules-CgMkC6YR.mjs +39 -0
- package/dist/{pages-Bn0Sg1ay.mjs → pages-CkBtOOf8.mjs} +29 -29
- package/dist/path-DRw6Y-nd.mjs +2 -0
- package/dist/pay-per-crawl-CnGXOWyz.mjs +38 -0
- package/dist/pay-per-use-HbfxpATr.mjs +33 -0
- package/dist/pipelines-CnO9CCs0.mjs +44 -0
- package/dist/precursor-Bc55XJdQ.mjs +4 -0
- package/dist/previews-C7vZrajd.mjs +7 -0
- package/dist/progress-D5po7ScB.mjs +2 -0
- package/dist/prompt-BAJpE3jV.mjs +4 -0
- package/dist/queries-BJAH4B74.mjs +9 -0
- package/dist/queues-D4G8vvwi.mjs +57 -0
- package/dist/r2-CJ8rD6Jb.mjs +128 -0
- package/dist/{radar-CdvQL4xm.mjs → radar-DgaxOdcd.mjs} +150 -150
- package/dist/raw-fetch-yY-wX5Xx.mjs +2 -0
- package/dist/realtime-DU09m7L7.mjs +172 -0
- package/dist/registrar-Cj7OfvGs.mjs +43 -0
- package/dist/registrar-sandbox-CA0Mua-j.mjs +56 -0
- package/dist/{registry-PI6sO95I.mjs → registry-CRnk93ur.mjs} +1 -1
- package/dist/reporting-3kDVF5c8.mjs +14 -0
- package/dist/{request-headers-D8L95bEQ.mjs → request-headers-D_eQn93b.mjs} +1 -1
- package/dist/request-tracers-VBD4R3s3.mjs +4 -0
- package/dist/resolve-BpgXeklt.mjs +2 -0
- package/dist/resolve-C3FmNlSO.mjs +2 -0
- package/dist/resource-sharing-BtUF3psS.mjs +40 -0
- package/dist/resource-tagging--90INP8_.mjs +4 -0
- package/dist/rules-CcwPngVo.mjs +18 -0
- package/dist/rulesets-CfdruY82.mjs +37 -0
- package/dist/rum-RLkdfSL7.mjs +30 -0
- package/dist/run-CUNhH5CQ.mjs +2 -0
- package/dist/{run-CW2Cgi0S.mjs → run-DASYqJsY.mjs} +1 -1
- package/dist/{schema-elj12WOx.mjs → schema-S3pUZwpI.mjs} +1 -1
- package/dist/{schema-flags-BTItUu1K.mjs → schema-flags-CShtn7ya.mjs} +1 -1
- package/dist/scim-BZYsTPIL.mjs +18 -0
- package/dist/secrets-store-C_-FkSH_.mjs +24 -0
- package/dist/security-insights-BVBEaZmD.mjs +40 -0
- package/dist/security-txt--IoHrHee.mjs +9 -0
- package/dist/session-Cq3YNLoI.mjs +2 -0
- package/dist/shared-zNQNv1im.mjs +2 -0
- package/dist/smart-shield-CByC4_60.mjs +24 -0
- package/dist/snippets-DB-jiZAV.mjs +20 -0
- package/dist/{spawn-D07wH-MH.mjs → spawn-DQttFH05.mjs} +1 -1
- package/dist/{spectrum-B6qkjR_Z.mjs → spectrum-Bs2g1BmK.mjs} +14 -14
- package/dist/speed-Bq4evEnJ.mjs +24 -0
- package/dist/sql-XGci7hZC.mjs +4 -0
- package/dist/src-GiuwAT55.mjs +125 -0
- package/dist/ssl-KJTLW1NR.mjs +45 -0
- package/dist/{startup-profile-CrtCP-6-.mjs → startup-profile-BOaseXnO.mjs} +1 -1
- package/dist/startup-profile-BwEZFVGS.mjs +2 -0
- package/dist/{state-DIiIGEtR.mjs → state-Boubf1X6.mjs} +1 -1
- package/dist/state-CODDG9Nx.mjs +2 -0
- package/dist/stream-BotgYspF.mjs +102 -0
- package/dist/submit-C5VytaHP.mjs +4 -0
- package/dist/{tags-CX23P4jg.mjs → tags-3Hq-B9qp.mjs} +2 -2
- package/dist/{telemetry-ZlCi5Xhc.mjs → telemetry-3FJOXl_C.mjs} +1 -1
- package/dist/telemetry-BhKfwxyh.mjs +2 -0
- package/dist/tenant-BgX5onPc.mjs +10 -0
- package/dist/tenant-custom-nameservers-BVG8v1Xo.mjs +9 -0
- package/dist/theme-BGHWSKCw.mjs +6 -0
- package/dist/{tools-CSc5DmFi.mjs → tools-BCCRUENY.mjs} +1 -1
- package/dist/{tunnels-NzYpsfi_.mjs → tunnels-CThOI3qH.mjs} +15 -15
- package/dist/turnstile-BgZaUx-g.mjs +33 -0
- package/dist/ui-BtIBQeaG.mjs +2 -0
- package/dist/update-check-Yy7Ivq2V.mjs +2 -0
- package/dist/{update-check-HFkPml6x.mjs → update-check-jb89ih_g.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-DQERN0Xq.mjs +4 -0
- package/dist/url-normalization-Cb1hofqv.mjs +9 -0
- package/dist/url-scanner-gHgx1bW7.mjs +16 -0
- package/dist/{user-rXca0J9M.mjs → user-CdKzIuSi.mjs} +58 -58
- package/dist/values-EwA8Sx0w.mjs +4 -0
- package/dist/vectorize-DejgIJIv.mjs +32 -0
- package/dist/version-B6MnUIqV.mjs +2 -0
- package/dist/{waiting-rooms-DrA3-0bw.mjs → waiting-rooms-BNR1HvAP.mjs} +25 -25
- package/dist/web-assets-iglnzkTV.mjs +64 -0
- package/dist/web3-JBUU6IVt.mjs +28 -0
- package/dist/workers-CDp4kLTJ.mjs +40 -0
- package/dist/workers-builds-CSb9Dglt.mjs +14 -0
- package/dist/workers-for-platforms-D4srNZvt.mjs +40 -0
- package/dist/workers-vpc-LPC8TadH.mjs +13 -0
- package/dist/workflows-DN_VqWJC.mjs +52 -0
- package/dist/{wrangler-migration-C6FKHER1.mjs → wrangler-migration-DxTB5yPT.mjs} +1 -1
- package/dist/zaraz-DDErl5yc.mjs +22 -0
- package/dist/zero-trust-M88XX3uD.mjs +957 -0
- package/dist/zone-BsGvedmN.mjs +4 -0
- package/dist/zones-l_sRKrVl.mjs +124 -0
- package/package.json +15 -18
- package/dist/Page-BShsqCXr.mjs +0 -2
- package/dist/abuse-reports-CVv52Q2w.mjs +0 -24
- package/dist/account-tags-RhvWOkOf.mjs +0 -15
- package/dist/accounts--3lrEkmu.mjs +0 -125
- package/dist/acm-BJxINEcu.mjs +0 -15
- package/dist/addressing-BqByG9JW.mjs +0 -105
- package/dist/agent-memory-D4dQMGbh.mjs +0 -34
- package/dist/ai-CRkQ4pjC.mjs +0 -31
- package/dist/ai-audit-fMSn4c5L.mjs +0 -6
- package/dist/ai-gateway-CbhvQK4L.mjs +0 -80
- package/dist/ai-search-CvVSnOA0.mjs +0 -79
- package/dist/ai-security-Z_qpI92I.mjs +0 -10
- package/dist/alerting-CpbCB8br.mjs +0 -56
- package/dist/analytics-DkY9dOP1.mjs +0 -17
- package/dist/analytics_engine-DE_jvlx_.mjs +0 -4
- package/dist/api-security-BHnOU5MM.mjs +0 -154
- package/dist/argo-DhC5L_aN.mjs +0 -14
- package/dist/args-CfbYkeXd.mjs +0 -2
- package/dist/artifacts-CrIupY7P.mjs +0 -43
- package/dist/audit-logs-BjeBxTox.mjs +0 -4
- package/dist/auth-BNYfOMl0.mjs +0 -2
- package/dist/auth-CAWalgW0.mjs +0 -2
- package/dist/auth-DOwC01PW.mjs +0 -2
- package/dist/banner-D03JEqRs.mjs +0 -2
- package/dist/basin-catalog-DZ7QV-_N.mjs +0 -46
- package/dist/billing-BFyte9fL.mjs +0 -23
- package/dist/bot-management-DXcbV3am.mjs +0 -9
- package/dist/botnet-feed-bGGp_cwX.mjs +0 -11
- package/dist/brand-protection-DN36XkxH.mjs +0 -27
- package/dist/browser-run-hHD1RT43.mjs +0 -42
- package/dist/build-BhpWYgNm.mjs +0 -2
- package/dist/builds-6aO61R9R.mjs +0 -71
- package/dist/cache-C5YJpMqi.mjs +0 -45
- package/dist/certificate-authorities-CbqDAktQ.mjs +0 -6
- package/dist/cf-oRSQKirD.mjs +0 -18
- package/dist/chunk-NDZDTP46-Civns3WA.mjs +0 -361
- package/dist/cli-types-9oYmRTHJ.mjs +0 -2
- package/dist/client-certificates-balaN_my.mjs +0 -13
- package/dist/client-side-security-3_4Ermmg.mjs +0 -63
- package/dist/cloud-connector-avx27sLw.mjs +0 -6
- package/dist/cloudforce-one-CXdeqJ9l.mjs +0 -405
- package/dist/command-DPX9sJVi.mjs +0 -2
- package/dist/command-OWe3v69l.mjs +0 -2
- package/dist/connector-interrupts-ftd10Du-.mjs +0 -6
- package/dist/connector-telemetry-events-TwDZYdEM.mjs +0 -6
- package/dist/connector-telemetry-snapshots-CZxkOuC3.mjs +0 -6
- package/dist/connectors-6lVSr-fd.mjs +0 -15
- package/dist/containers-Dqs_ZnO2.mjs +0 -78
- package/dist/containers-ncw3bd3a.mjs +0 -376
- package/dist/content-scan-BWFbqfQ0.mjs +0 -14
- package/dist/csamScanner-BwZNZu0A.mjs +0 -10
- package/dist/ct-alerting-DPp3qLqO.mjs +0 -5
- package/dist/custom-certificates-pfpZcr06.mjs +0 -17
- package/dist/custom-csrs-DrvGRAkl.mjs +0 -11
- package/dist/custom-hostnames-wGtmFbz1.mjs +0 -27
- package/dist/custom-nameservers-HTG6MPKv.mjs +0 -9
- package/dist/custom-pages-DqEHBSVt.mjs +0 -21
- package/dist/dcv-delegation-D6nj0Z5N.mjs +0 -4
- package/dist/deploy-context-DmG9rgPO.mjs +0 -56
- package/dist/diagnostics-tqHjq-Pl.mjs +0 -15
- package/dist/dls-BEHj4X9T.mjs +0 -17
- package/dist/dns-firewall-zwbkutyf.mjs +0 -71
- package/dist/dns-n4mfYBZg.mjs +0 -144
- package/dist/durable-objects-CQ2dHhho.mjs +0 -6
- package/dist/email-auth-DOi6yOt3.mjs +0 -6
- package/dist/email-routing-WcSPt22u.mjs +0 -45
- package/dist/email-security-BXu3OGay.mjs +0 -158
- package/dist/email-sending-B9zTlIjt.mjs +0 -47
- package/dist/error-sanitization-DE_zSrXw.mjs +0 -2
- package/dist/error-sanitization-DOCQ9Ykh.mjs +0 -2
- package/dist/errors-_sob7Ihu.mjs +0 -3
- package/dist/fieldExtractors-B37m2lKW.mjs +0 -9
- package/dist/firewall-CRtYO0Ha.mjs +0 -36
- package/dist/flagship-DvTFZSay.mjs +0 -28
- package/dist/fraud-uSyibsit.mjs +0 -22
- package/dist/google-tag-gateway-BFXiiokq.mjs +0 -6
- package/dist/healthchecks-27u7b7Jb.mjs +0 -22
- package/dist/hyperdrive-BzJvPdu6.mjs +0 -37
- package/dist/iam-Dl3cU9GI.mjs +0 -52
- package/dist/images-C2OkI1j7.mjs +0 -71
- package/dist/intel-DoB1g_K7.mjs +0 -76
- package/dist/ips-BRt68epr.mjs +0 -4
- package/dist/k2-_eq5ZY2t.mjs +0 -11
- package/dist/keyless-certificates-DaO2yqYu.mjs +0 -13
- package/dist/keys-7BQ3Zq6Y.mjs +0 -4
- package/dist/kv-BTYCXKML.mjs +0 -15
- package/dist/leaked-credential-checks-CPHOK_dE.mjs +0 -18
- package/dist/local-BundUuDT.mjs +0 -2
- package/dist/login-BBYC_BtH.mjs +0 -2
- package/dist/login-D2uoWhWh.mjs +0 -5
- package/dist/logo-matches-Bc1DQ4-g.mjs +0 -6
- package/dist/logos-X5B8z7Iv.mjs +0 -7
- package/dist/logpush-C2ENi1et.mjs +0 -46
- package/dist/logs-BKDz7kBW.mjs +0 -36
- package/dist/magic-cloud-networking-B60Gld8A.mjs +0 -71
- package/dist/magic-network-monitoring-CxXI3Y-H.mjs +0 -36
- package/dist/magic-transit-ZCSaCbl8.mjs +0 -386
- package/dist/managed-defense-DrxMb7xi.mjs +0 -18
- package/dist/managed-transforms-AI7KrRU1.mjs +0 -9
- package/dist/matches-rPMLS3Ip.mjs +0 -6
- package/dist/mcp-DXUMvEWt.mjs +0 -32
- package/dist/mesh-MmBCQ37q.mjs +0 -26
- package/dist/monetization-DQE5VtUO.mjs +0 -20
- package/dist/mtls-certificates-DwkEb-Hy.mjs +0 -13
- package/dist/network-BcfobxQY.mjs +0 -50
- package/dist/network-interconnects-BU3tN_Ab.mjs +0 -72
- package/dist/o11y-BBv7nedp.mjs +0 -93
- package/dist/oauth-BUr8bPwo.mjs +0 -9
- package/dist/oauth-clients-qWVImhHE.mjs +0 -16
- package/dist/oauth-scopes-CdeIgJIx.mjs +0 -4
- package/dist/organization-CJeOVWH7.mjs +0 -71
- package/dist/organizations-BpfoqZcG.mjs +0 -4
- package/dist/origin-ca-certificates-Bimf07RF.mjs +0 -11
- package/dist/origin-post-quantum-encryption-CM-If38w.mjs +0 -6
- package/dist/origin-tls-client-auth-BPwYPhc9.mjs +0 -30
- package/dist/output-BOe-3AQG.mjs +0 -2
- package/dist/page-rules-DOeekMrj.mjs +0 -39
- package/dist/pay-per-crawl-qJpseNNx.mjs +0 -38
- package/dist/pay-per-use-C1MWKJ4O.mjs +0 -33
- package/dist/pipelines-rCwXQw6S.mjs +0 -44
- package/dist/precursor-Bk8Pp6jT.mjs +0 -4
- package/dist/previews-BEheHO3T.mjs +0 -4
- package/dist/progress-CQqDtgmF.mjs +0 -2
- package/dist/prompt-C8FyienX.mjs +0 -3
- package/dist/queries-DJ8looyq.mjs +0 -9
- package/dist/queues-BBH9Q-Tt.mjs +0 -57
- package/dist/r2-CdJKpP2w.mjs +0 -128
- package/dist/raw-fetch-DbXN3SlE.mjs +0 -2
- package/dist/realtime-onrXppzh.mjs +0 -172
- package/dist/registrar-CbEBc5IE.mjs +0 -43
- package/dist/registrar-sandbox-BJhn1HFT.mjs +0 -56
- package/dist/reporting-bXZY6obP.mjs +0 -14
- package/dist/request-tracers-CihskC2A.mjs +0 -4
- package/dist/resolve-CaTBV-c6.mjs +0 -2
- package/dist/resolve-DCGSzUDQ.mjs +0 -2
- package/dist/resource-sharing-DDqcCHVs.mjs +0 -40
- package/dist/resource-tagging-D63RpBce.mjs +0 -4
- package/dist/rules-CAW0-Wde.mjs +0 -18
- package/dist/rulesets-CPir63Qc.mjs +0 -37
- package/dist/rum-BfwTcuup.mjs +0 -30
- package/dist/run-DEynXvCc.mjs +0 -2
- package/dist/scim-CtZ1FeQE.mjs +0 -18
- package/dist/secrets-store-BIuBYUJT.mjs +0 -24
- package/dist/security-insights-DfUus0bs.mjs +0 -40
- package/dist/security-txt-CgZOsAIZ.mjs +0 -9
- package/dist/session-BcM8Vyyx.mjs +0 -2
- package/dist/shared-CpS23WwR.mjs +0 -2
- package/dist/smart-shield-ClgB7r-9.mjs +0 -24
- package/dist/snippets-DLO3iFAg.mjs +0 -20
- package/dist/speed-DX5X2EIR.mjs +0 -24
- package/dist/sql-CF044HDW.mjs +0 -4
- package/dist/src-BMATTZU_.mjs +0 -125
- package/dist/ssl-CM-rChEC.mjs +0 -45
- package/dist/startup-profile-D662WI9s.mjs +0 -2
- package/dist/state-D7uNYnoi.mjs +0 -2
- package/dist/stream-5EmUOQvy.mjs +0 -102
- package/dist/submit-lEAaRSMR.mjs +0 -4
- package/dist/telemetry-0Y5hAtCX.mjs +0 -2
- package/dist/tenant-DnI7QziH.mjs +0 -10
- package/dist/tenant-custom-nameservers-MR0dlcGm.mjs +0 -9
- package/dist/theme-CQ_TYifs.mjs +0 -6
- package/dist/turnstile-M7sKCEz3.mjs +0 -33
- package/dist/ui-YmjF66Ct.mjs +0 -5
- package/dist/update-check-aTutXNRd.mjs +0 -2
- package/dist/url-info-Dos9VOXV.mjs +0 -4
- package/dist/url-normalization-CZbFOq_v.mjs +0 -9
- package/dist/url-scanner-B7quLPGW.mjs +0 -16
- package/dist/values-D-rrZrDa.mjs +0 -4
- package/dist/vectorize-D2tf_oA8.mjs +0 -32
- package/dist/version-BGnqDvNR.mjs +0 -2
- package/dist/web-assets-DQAfvPT9.mjs +0 -64
- package/dist/web3-MI0GQDnu.mjs +0 -28
- package/dist/workers-By6Pf8fv.mjs +0 -40
- package/dist/workers-builds-6YsWsCmC.mjs +0 -14
- package/dist/workers-for-platforms-DL8fC1qR.mjs +0 -40
- package/dist/workers-vpc-BYx6sbgd.mjs +0 -13
- package/dist/workflows-ByQLnV0E.mjs +0 -52
- package/dist/zaraz-CgbpmA85.mjs +0 -22
- package/dist/zero-trust-CpjTkkWt.mjs +0 -837
- package/dist/zone-DnKIe6po.mjs +0 -4
- package/dist/zones--5ZzsDmQ.mjs +0 -124
package/dist/iam-Dl3cU9GI.mjs
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-C8FyienX.mjs";import{t as m}from"./cli-types-9oYmRTHJ.mjs";function h(e){return e.usage(`$0 iam permission-groups get <permission-group-id>
|
|
3
|
-
|
|
4
|
-
Get information about a specific permission group in an account.`).positional(`permission-group-id`,{type:`string`,description:`Permission Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <permission-group-id>`,describe:`Permission Group Details`,builder:h,handler:async c=>s({command:`iam permission-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam permission-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/permission_groups/${c[`permission-group-id`]==null?`<permission-group-id>`:encodeURIComponent(String(c[`permission-group-id`]))}`,pathParams:{"permission-group-id":String(c[`permission-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.permissionGroups.get({account_id:l,permission_group_id:c[`permission-group-id`]}));i(u,{successLabel:`Loaded`})})};function ee(e){return e.usage(`$0 iam permission-groups list
|
|
5
|
-
|
|
6
|
-
List all the permissions groups for an account.`).option(`id`,{type:`string`,description:`ID of the permission group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the permission group to be fetched.`}).option(`label`,{type:`string`,description:`Label of the permission group to be fetched.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List Account Permission Groups`,builder:ee,handler:async c=>s({command:`iam permission-groups list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={id:c.id,name:c.name,label:c.label,page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf iam permission-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/permission_groups`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.iam.permissionGroups.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},v={command:`permission-groups`,describe:`View the permission groups that can be assigned to API tokens and policies`,builder:e=>e.command(g).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 iam resource-groups create
|
|
7
|
-
|
|
8
|
-
Create a new Resource Group under the specified account.`).option(`name`,{type:`string`,description:`Name of the resource group`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create`,describe:`Create Resource Group`,builder:y,handler:async l=>s({command:`iam resource-groups create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam resource-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.iam.resourceGroups.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Name of the resource group`));let m=u({name:d(l.name,`name`,`text`)}),h=await o(`Creating`,async()=>s.iam.resourceGroups.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function x(e){return e.usage(`$0 iam resource-groups delete <resource-group-id>
|
|
9
|
-
|
|
10
|
-
Remove a resource group from an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group 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 S={command:`delete <resource-group-id>`,describe:`Remove Resource Group`,builder:x,handler:async c=>s({command:`iam resource-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam resource-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups/${c[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(c[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(c[`resource-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
11
|
-
`);return}let u=await o(`Deleting`,async()=>s.iam.resourceGroups.delete({account_id:l,resource_group_id:c[`resource-group-id`]}));i(u,{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 iam resource-groups get <resource-group-id>
|
|
12
|
-
|
|
13
|
-
Get information about a specific resource group in an account.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <resource-group-id>`,describe:`Resource Group Details`,builder:C,handler:async c=>s({command:`iam resource-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam resource-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups/${c[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(c[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(c[`resource-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.resourceGroups.get({account_id:l,resource_group_id:c[`resource-group-id`]}));i(u,{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 iam resource-groups list
|
|
14
|
-
|
|
15
|
-
List all the resource groups for an account.`).option(`id`,{type:`string`,description:`ID of the resource group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the resource group to be fetched.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Resource Groups`,builder:T,handler:async c=>s({command:`iam resource-groups list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={id:c.id,name:c.name};if(c.dryRun){let e=await n();a({command:`cf iam resource-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.iam.resourceGroups.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 iam resource-groups update <resource-group-id>
|
|
16
|
-
|
|
17
|
-
Modify an existing resource group.`).positional(`resource-group-id`,{type:`string`,description:`Resource Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the resource group`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`update <resource-group-id>`,describe:`Update Resource Group`,builder:D,handler:async l=>s({command:`iam resource-groups update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam resource-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/resource_groups/${l[`resource-group-id`]==null?`<resource-group-id>`:encodeURIComponent(String(l[`resource-group-id`]))}`,pathParams:{"resource-group-id":String(l[`resource-group-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.iam.resourceGroups.update({...e,account_id:f,resource_group_id:l[`resource-group-id`]}));i(t,{successLabel:`Updated`});return}let p=u({name:d(l.name,`name`,`text`)}),m=await o(`Updating`,async()=>s.iam.resourceGroups.update({...p,account_id:f,resource_group_id:l[`resource-group-id`]}));i(m,{successLabel:`Updated`})})},k={command:`resource-groups`,describe:`Define scopes that limit which account resources a policy or token can access`,builder:e=>e.command(b).command(S).command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 iam sso begin-verification <sso-connector-id>
|
|
18
|
-
|
|
19
|
-
Validates the user has added the DNS TXT record required for validating ownership of the domain they are trying to set up a connector for.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`begin-verification <sso-connector-id>`,describe:`Begin SSO connector verification`,builder:A,handler:async c=>s({command:`iam sso begin-verification`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam sso begin-verification`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors/${c[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(c[`sso-connector-id`]))}/begin_verification`,pathParams:{"sso-connector-id":String(c[`sso-connector-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Creating`,async()=>s.iam.sso.beginVerification({account_id:l,sso_connector_id:c[`sso-connector-id`]}));i(u,{successLabel:`Created`})})};function M(e){return e.usage(`$0 iam sso create
|
|
20
|
-
|
|
21
|
-
Creates a new SSO connector for logging into Cloudflare through an identity provider.`).option(`begin-verification`,{type:`boolean`,description:`Begin the verification process after creation`,default:!0}).option(`email-domain`,{type:`string`,description:`Email domain of the new SSO connector`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`,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 N={command:`create`,describe:`Initialize new SSO connector`,builder:M,handler:async l=>s({command:`iam sso create`,classification:{safeFlags:[`begin-verification`,`use-fedramp-language`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam sso create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({begin_verification:l[`begin-verification`],email_domain:d(l[`email-domain`],`email-domain`,`text`),use_fedramp_language:l[`use-fedramp-language`]}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.iam.sso.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}l[`email-domain`]===void 0&&(l[`email-domain`]=await f(`email-domain`,`Email domain of the new SSO connector`));let m=u({begin_verification:l[`begin-verification`],email_domain:d(l[`email-domain`],`email-domain`,`text`),use_fedramp_language:l[`use-fedramp-language`]}),h=await o(`Creating`,async()=>s.iam.sso.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function P(e){return e.usage(`$0 iam sso delete <sso-connector-id>
|
|
22
|
-
|
|
23
|
-
Deletes an SSO connector from the account.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector 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 F={command:`delete <sso-connector-id>`,describe:`Delete SSO connector`,builder:P,handler:async c=>s({command:`iam sso delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam sso delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors/${c[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(c[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(c[`sso-connector-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
24
|
-
`);return}let u=await o(`Deleting`,async()=>s.iam.sso.delete({account_id:l,sso_connector_id:c[`sso-connector-id`]}));i(u,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 iam sso get <sso-connector-id>
|
|
25
|
-
|
|
26
|
-
Retrieves details for a specific SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <sso-connector-id>`,describe:`Get single SSO connector`,builder:I,handler:async c=>s({command:`iam sso get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam sso get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors/${c[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(c[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(c[`sso-connector-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.sso.get({account_id:l,sso_connector_id:c[`sso-connector-id`]}));i(u,{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 iam sso list
|
|
27
|
-
|
|
28
|
-
Lists all SSO connectors configured for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`Get all SSO connectors`,builder:R,handler:async c=>s({command:`iam sso list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam sso list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.sso.list({account_id:l}));i(u,{successLabel:`Loaded`})})};function B(e){return e.usage(`$0 iam sso update <sso-connector-id>
|
|
29
|
-
|
|
30
|
-
Updates the state or configuration of an SSO connector.`).positional(`sso-connector-id`,{type:`string`,description:`SSO Connector identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`SSO Connector enabled state`}).option(`use-fedramp-language`,{type:`boolean`,description:`Controls the display of FedRAMP language to the user during SSO login`}).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 <sso-connector-id>`,describe:`Update SSO connector state`,builder:B,handler:async l=>s({command:`iam sso update`,classification:{safeFlags:[`enabled`,`use-fedramp-language`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam sso update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/sso_connectors/${l[`sso-connector-id`]==null?`<sso-connector-id>`:encodeURIComponent(String(l[`sso-connector-id`]))}`,pathParams:{"sso-connector-id":String(l[`sso-connector-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({enabled:l.enabled,use_fedramp_language:l[`use-fedramp-language`]}):c(l.body)});return}let s=await t(l),d=l.local?e:await r();if(l.accountId=d,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.iam.sso.update({...e,account_id:d,sso_connector_id:l[`sso-connector-id`]}));i(t,{successLabel:`Updated`});return}let f=u({enabled:l.enabled,use_fedramp_language:l[`use-fedramp-language`]}),p=await o(`Updating`,async()=>s.iam.sso.update({...f,account_id:d,sso_connector_id:l[`sso-connector-id`]}));i(p,{successLabel:`Updated`})})},V={command:`sso`,describe:`Configure single sign-on connectors to authenticate account members through an external identity provider`,builder:e=>e.command(j).command(N).command(F).command(L).command(z).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage(`$0 iam user-groups create
|
|
31
|
-
|
|
32
|
-
Create a new user group under the specified account.`).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const U={command:`create`,describe:`Create User Group`,builder:H,handler:async p=>s({command:`iam user-groups create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=await n();a({command:`cf iam user-groups create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({name:d(p.name,`name`,`text`),policies:l(p.policies,`policies`)}):c(p.body)});return}let s=await t(p),m=p.local?e:await r();if(p.accountId=m,p.body){let e=c(p.body),t=await o(`Creating`,async()=>s.iam.userGroups.create({...e,account_id:m}));i(t,{successLabel:`Created`});return}p.name===void 0&&(p.name=await f(`name`,`Name of the User group.`));let h=u({name:d(p.name,`name`,`text`),policies:l(p.policies,`policies`)}),g=await o(`Creating`,async()=>s.iam.userGroups.create({...h,account_id:m}));i(g,{successLabel:`Created`})})};function W(e){return e.usage(`$0 iam user-groups delete <user-group-id>
|
|
33
|
-
|
|
34
|
-
Remove a user group from an account.`).positional(`user-group-id`,{type:`string`,description:`User Group 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 G={command:`delete <user-group-id>`,describe:`Remove User Group`,builder:W,handler:async c=>s({command:`iam user-groups delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam user-groups delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
35
|
-
`);return}let u=await o(`Deleting`,async()=>s.iam.userGroups.delete({account_id:l,user_group_id:c[`user-group-id`]}));i(u,{successLabel:`Deleted`})})};function K(e){return e.usage(`$0 iam user-groups get <user-group-id>
|
|
36
|
-
|
|
37
|
-
Get information about a specific user group in an account.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`get <user-group-id>`,describe:`User Group Details`,builder:K,handler:async c=>s({command:`iam user-groups get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam user-groups get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.userGroups.get({account_id:l,user_group_id:c[`user-group-id`]}));i(u,{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 iam user-groups list
|
|
38
|
-
|
|
39
|
-
List all the user groups for an account.`).option(`id`,{type:`string`,description:`ID of the user group to be fetched.`}).option(`name`,{type:`string`,description:`Name of the user group to be fetched.`}).option(`fuzzy-name`,{type:`string`,description:`A string used for searching for user groups containing that substring.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`direction`,{type:`string`,description:`The sort order of returned user groups by name (ascending or descending).`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List User Groups`,builder:m(J),handler:async c=>s({command:`iam user-groups list`,classification:{safeFlags:[`direction`,`dry-run`]}},c,async()=>{let s={id:c.id,name:c.name,fuzzyName:c[`fuzzy-name`],page:c.page,per_page:c[`per-page`],direction:c.direction};if(c.dryRun){let e=await n();a({command:`cf iam user-groups list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.iam.userGroups.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 iam user-groups members create <user-group-id>
|
|
40
|
-
|
|
41
|
-
Add members to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,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 Z={command:`create <user-group-id>`,describe:`Add User Group Members`,builder:X,handler:async l=>s({command:`iam user-groups members create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam user-groups members create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${l[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(l[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(l[`user-group-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await t(l),u=l.local?e:await r();if(l.accountId=u,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.iam.userGroups.members.create({body:e,account_id:u,user_group_id:l[`user-group-id`]}));i(t,{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function Q(e){return e.usage(`$0 iam user-groups members delete <member-id>
|
|
42
|
-
|
|
43
|
-
Remove a member from User Group`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group 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 ne={command:`delete <member-id>`,describe:`Remove User Group Member`,builder:Q,handler:async c=>s({command:`iam user-groups members delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam user-groups members delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}/members/${c[`member-id`]==null?`<member-id>`:encodeURIComponent(String(c[`member-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``),"member-id":String(c[`member-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
44
|
-
`);return}let u=await o(`Deleting`,async()=>s.iam.userGroups.members.delete({account_id:l,user_group_id:c[`user-group-id`],member_id:c[`member-id`]}));i(u,{successLabel:`Deleted`})})};function re(e){return e.usage(`$0 iam user-groups members get <member-id>
|
|
45
|
-
|
|
46
|
-
Get details of a specific member in a user group.`).positional(`member-id`,{type:`string`,description:`The identifier of an existing account Member.`,demandOption:!0}).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <member-id>`,describe:`Get User Group Member`,builder:re,handler:async c=>s({command:`iam user-groups members get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf iam user-groups members get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}/members/${c[`member-id`]==null?`<member-id>`:encodeURIComponent(String(c[`member-id`]))}`,pathParams:{"user-group-id":String(c[`user-group-id`]??``),"member-id":String(c[`member-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.iam.userGroups.members.get({account_id:l,user_group_id:c[`user-group-id`],member_id:c[`member-id`]}));i(u,{successLabel:`Loaded`})})};function ae(e){return e.usage(`$0 iam user-groups members list
|
|
47
|
-
|
|
48
|
-
List all the members attached to a user group.`).option(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`fuzzy-email`,{type:`string`,description:`A string used for filtering members by partial email match.`}).option(`direction`,{type:`string`,description:`The sort order of returned user group members by email.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`List User Group Members`,builder:m(ae),handler:async c=>s({command:`iam user-groups members list`,classification:{safeFlags:[`direction`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],fuzzyEmail:c[`fuzzy-email`],direction:c.direction};if(c.dryRun){let e=await n();a({command:`cf iam user-groups members list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${c[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(c[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(c[`user-group-id`]??``)},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.iam.userGroups.members.list({account_id:u,user_group_id:c[`user-group-id`],...s}));i(d,{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 iam user-groups members update <user-group-id>
|
|
49
|
-
|
|
50
|
-
Replace the set of members attached to a User Group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Set/Replace members to a user group.`})}const se={command:`update <user-group-id>`,describe:`Update User Group Members`,builder:$,handler:async l=>s({command:`iam user-groups members update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf iam user-groups members update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${l[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(l[`user-group-id`]))}/members`,pathParams:{"user-group-id":String(l[`user-group-id`]??``)},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let s=await t(l),u=l.local?e:await r();if(l.accountId=u,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.iam.userGroups.members.update({body:e,account_id:u,user_group_id:l[`user-group-id`]}));i(t,{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},ce={command:`members`,describe:`Operations for user-groups.members`,builder:e=>e.command(Z).command(ne).command(ie).command(oe).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function le(e){return e.usage(`$0 iam user-groups update <user-group-id>
|
|
51
|
-
|
|
52
|
-
Modify an existing user group.`).positional(`user-group-id`,{type:`string`,description:`User Group identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`Name of the User group.`}).option(`policies`,{type:`string`,description:`Policies attached to the User group. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`update <user-group-id>`,describe:`Update User Group`,builder:le,handler:async f=>s({command:`iam user-groups update`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){let e=await n();a({command:`cf iam user-groups update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/iam/user_groups/${f[`user-group-id`]==null?`<user-group-id>`:encodeURIComponent(String(f[`user-group-id`]))}`,pathParams:{"user-group-id":String(f[`user-group-id`]??``)},bodyKind:`json`,body:f.body===void 0?u({name:d(f.name,`name`,`text`),policies:l(f.policies,`policies`)}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Updating`,async()=>s.iam.userGroups.update({...e,account_id:p,user_group_id:f[`user-group-id`]}));i(t,{successLabel:`Updated`});return}let m=u({name:d(f.name,`name`,`text`),policies:l(f.policies,`policies`)}),h=await o(`Updating`,async()=>s.iam.userGroups.update({...m,account_id:p,user_group_id:f[`user-group-id`]}));i(h,{successLabel:`Updated`})})},de={command:`user-groups`,describe:`Organize account members into groups for easier permission assignment`,builder:e=>e.command(U).command(G).command(q).command(Y).command(ue).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},fe={command:`iam`,describe:`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,builder:e=>e.command(v).command(k).command(V).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{fe as default};
|
package/dist/images-C2OkI1j7.mjs
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,i,t as a}from"./context-BBLtgdR1.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-CQqDtgmF.mjs";import{t as l}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-C8FyienX.mjs";import{t as ee}from"./cli-types-9oYmRTHJ.mjs";import{n as te,t as v}from"./raw-fetch-DbXN3SlE.mjs";function y(e){return e.usage(`$0 images create
|
|
3
|
-
|
|
4
|
-
Upload an image to CF Images. Images up to 10 Megabytes can be uploaded using a single HTTP POST (multipart/form-data) request by sending an image file or passing a URL accessible to the API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`id`,{type:`string`,description:`An optional custom unique identifier for your image.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can use used for keeping references to another system of record for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token for the access.`}).option(`url`,{type:`string`,description:`A URL to fetch an image from origin. Only needed when type is uploading from a URL.`})}const b={command:`create`,describe:`Upload an image`,builder:y,handler:async i=>l({command:`images create`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=await r();s({command:`cf images create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1`,pathParams:{},bodyKind:`multipart`,body:{body:i.body,file:i.file,creator:i.creator,id:i.id,metadata:i.metadata,"require-signed-urls":i[`require-signed-urls`],url:i.url}});return}let l=await n(i),u=i.local?e:await a();if(i.accountId=u,i.file!==void 0||i.body!==void 0||i.creator!==void 0||i.id!==void 0||i.metadata!==void 0||i[`require-signed-urls`]!==void 0||i.url!==void 0){let e=new FormData;if(i.file){let t=m(i.file);e.append(`file`,new Blob([t]),i.file.split(/[\\/]/).filter(Boolean).pop())}else i.body!==void 0&&e.append(`file`,i.body);if(i.creator!==void 0&&e.append(`creator`,String(p(i.creator,`creator`,`text`)??``)),i.id!==void 0&&e.append(`id`,String(p(i.id,`id`,`text`)??``)),i.metadata!==void 0){let t=typeof i.metadata==`string`?p(i.metadata,`metadata`,`text`):i.metadata;e.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}i[`require-signed-urls`]!==void 0&&e.append(`requireSignedURLs`,String(i[`require-signed-urls`])),i.url!==void 0&&e.append(`url`,String(p(i.url,`url`,`text`)??``));let n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/images/v1`,{body:e}));o(n,{successLabel:`Created`});return}if(i.body){let e=p(i.body,`body`,`binary`),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/images/v1`,{body:e,headers:{"Content-Type":`multipart/form-data`}}));o(n,{successLabel:`Created`});return}let d=await c(`Creating`,async()=>l.images.create({account_id:u}));o(d,{successLabel:`Created`})})};function x(e){return e.usage(`$0 images delete <image-id>
|
|
5
|
-
|
|
6
|
-
Delete an image on Cloudflare Images. On success, all copies of the image are deleted and purged from cache.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <image-id>`,describe:`Delete image`,builder:x,handler:async t=>l({command:`images delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this image.`})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}let u=await c(`Deleting`,async()=>i.images.delete({account_id:l,image_id:t[`image-id`]}));o(u,{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 images direct-upload
|
|
8
|
-
|
|
9
|
-
Direct uploads allow users to upload images without API keys. A common use case are web apps, client-side applications, or mobile devices where users upload content directly to Cloudflare Images. This method creates a draft record for a future image. It returns an upload URL and an image identifier. To verify if the image itself has been uploaded, send an image details request (accounts/:account_identifier/images/v1/:identifier), and check that the \`draft: true\` property is not present.`).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(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`expiry`,{type:`string`,description:`The date after which the upload will not be accepted. Minimum: Now + 2 minutes. Maximum: Now + 6 hours.`}).option(`id`,{type:`string`,description:`Optional Image Custom ID. Up to 1024 chars. Can include any number of subpaths, and utf8 characters. Cannot start nor end with a / (forward slash). Cannot be a UUID.`}).option(`metadata`,{type:`string`,description:`User modifiable key-value store. Can be used for keeping references to another system of record, for managing images.`}).option(`require-signed-urls`,{type:`boolean`,description:`Indicates whether the image requires a signature token to be accessed.`})}const w={command:`direct-upload`,describe:`Create authenticated direct upload URL V2`,builder:C,handler:async i=>l({command:`images direct-upload`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=await r();s({command:`cf images direct-upload`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/direct_upload`,pathParams:{},bodyKind:`multipart`,body:{body:i.body,file:i.file,creator:i.creator,expiry:i.expiry,id:i.id,metadata:i.metadata,"require-signed-urls":i[`require-signed-urls`]}});return}let l=await n(i),u=i.local?e:await a();if(i.accountId=u,i.file!==void 0||i.body!==void 0||i.creator!==void 0||i.expiry!==void 0||i.id!==void 0||i.metadata!==void 0||i[`require-signed-urls`]!==void 0){let e=new FormData;if(i.file){let t=m(i.file);e.append(`file`,new Blob([t]),i.file.split(/[\\/]/).filter(Boolean).pop())}else i.body!==void 0&&e.append(`file`,i.body);if(i.creator!==void 0&&e.append(`creator`,String(p(i.creator,`creator`,`text`)??``)),i.expiry!==void 0&&e.append(`expiry`,String(p(i.expiry,`expiry`,`text`)??``)),i.id!==void 0&&e.append(`id`,String(p(i.id,`id`,`text`)??``)),i.metadata!==void 0){let t=typeof i.metadata==`string`?p(i.metadata,`metadata`,`text`):i.metadata;e.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}i[`require-signed-urls`]!==void 0&&e.append(`requireSignedURLs`,String(i[`require-signed-urls`]));let n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:e}));o(n,{successLabel:`Created`});return}if(i.body){let e=p(i.body,`body`,`binary`),n=await c(`Creating`,async()=>t(l,`POST`,`/accounts/${u}/images/v2/direct_upload`,{body:e,headers:{"Content-Type":`multipart/form-data`}}));o(n,{successLabel:`Created`});return}let d=await c(`Creating`,async()=>l.images.directUpload({account_id:u}));o(d,{successLabel:`Created`})})};function T(e){return e.usage(`$0 images edit <image-id>
|
|
10
|
-
|
|
11
|
-
Update a CF Images image's metadata, creator, or access control. On access control change, all copies of the image are purged from cache.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`creator`,{type:`string`,description:`Can set the creator field with an internal user ID.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the image can be accessed using only its UID. If set to `true`, a signed token needs to be generated with a signing key to view the image. Returns a new UID on a change. No change if not specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const E={command:`edit <image-id>`,describe:`Update image`,builder:T,handler:async t=>l({command:`images edit`,classification:{safeFlags:[`require-signed-urls`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({creator:p(t.creator,`creator`,`text`),requireSignedURLs:t[`require-signed-urls`]}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.images.edit({...e,account_id:l,image_id:t[`image-id`]}));o(n,{successLabel:`Updated`});return}let d=f({creator:p(t.creator,`creator`,`text`),requireSignedURLs:t[`require-signed-urls`]}),m=await c(`Updating`,async()=>i.images.edit({...d,account_id:l,image_id:t[`image-id`]}));o(m,{successLabel:`Updated`})})};function D(e){return e.usage(`$0 images flows get
|
|
12
|
-
|
|
13
|
-
Get the current transformation flows configuration for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get`,describe:`Get transformation flows`,builder:D,handler:async e=>l({command:`images flows get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf images flows get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/images/v1/flows`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.images.flows.get({zone_id:r}));o(a,{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 images flows update
|
|
14
|
-
|
|
15
|
-
Replace the entire transformation flows configuration for a zone.`).option(`etag`,{type:`string`,description:`The etag field`}).option(`flows`,{type:`string`,description:`The flows field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`config-version`,{type:`number`,description:`The version 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 A={command:`update`,describe:`Update transformation flows`,builder:k,handler:async e=>l({command:`images flows update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf images flows update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/images/v1/flows`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({etag:p(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.images.flows.update({...n,zone_id:r}));o(i,{successLabel:`Updated`});return}if(e.flows===void 0)throw Error(`--flows is required (or pass --body with this field set).`);if(e[`config-version`]===void 0)throw Error(`--config-version is required (or pass --body with this field set).`);let a=f({etag:p(e.etag,`etag`,`text`),flows:d(e.flows,`flows`),version:e[`config-version`]}),l=await c(`Updating`,async()=>t.images.flows.update({...a,zone_id:r}));o(l,{successLabel:`Updated`})})},j={command:`flows`,describe:`Zone-level transformation flows that control how images are resized and optimized on delivery`,builder:e=>e.command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 images get-blob <image-id>
|
|
16
|
-
|
|
17
|
-
Download an image from CF Images. For most images this will be the originally uploaded file. For larger images it can be a near-lossless version of the original.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,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 N={command:`get-blob <image-id>`,describe:`Download image`,builder:M,handler:async t=>l({command:`images get-blob`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images get-blob`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}/blob`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}await n(t);let i=t.local?e:await a();t.accountId=i;let o=await c(`Loading`,async()=>v(`/accounts/${i}/images/v1/${encodeURIComponent(String(t[`image-id`]))}/blob`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));te(t.text===!0?o.toString(`utf-8`):o)})};function P(e){return e.usage(`$0 images get <image-id>
|
|
18
|
-
|
|
19
|
-
Fetch details for a CF Images image.`).positional(`image-id`,{type:`string`,description:`Image unique identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <image-id>`,describe:`Image details`,builder:P,handler:async t=>l({command:`images get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/${t[`image-id`]==null?`<image-id>`:encodeURIComponent(String(t[`image-id`]))}`,pathParams:{"image-id":String(t[`image-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.images.get({account_id:l,image_id:t[`image-id`]}));o(u,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 images import abort <migration-id>
|
|
20
|
-
|
|
21
|
-
Abort a running CF Images import. Already imported images will remain.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`abort <migration-id>`,describe:`Abort a migration`,builder:I,handler:async t=>l({command:`images import abort`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import abort`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle/abort`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Updating`,async()=>i.images.import.abort({account_id:l,migration_id:t[`migration-id`]}));o(u,{successLabel:`Updated`})})};function R(e){return e.usage(`$0 images import create
|
|
22
|
-
|
|
23
|
-
Create a pending CF Images import from a configured source.`).option(`conflict-behaviour`,{type:`string`,description:`How to handle objects that already exist at the destination.`,choices:[`skip`,`overwrite`],default:`skip`}).coerce(`conflict-behaviour`,e=>p(e,`conflict-behaviour`,`text`)).option(`excluded-content-types`,{type:`string`,array:!0,description:`Content types to skip during migration.`}).option(`path-prefix`,{type:`string`,description:`Prefix to prepend to image custom IDs.`}).option(`root-directory`,{type:`string`,description:`Only import objects under this prefix in the source bucket.`}).option(`source-id`,{type:`string`,description:`The identifier of the source to migrate from.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`create`,describe:`Create a sourcing kit migration`,builder:R,handler:async t=>l({command:`images import create`,classification:{safeFlags:[`conflict-behaviour`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({conflictBehaviour:t[`conflict-behaviour`],excludedContentTypes:t[`excluded-content-types`],pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),rootDirectory:p(t[`root-directory`],`root-directory`,`text`),sourceId:p(t[`source-id`],`source-id`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.images.import.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}t[`source-id`]===void 0&&(t[`source-id`]=await h(`source-id`,`The identifier of the source to migrate from.`));let d=f({conflictBehaviour:t[`conflict-behaviour`],excludedContentTypes:t[`excluded-content-types`],pathPrefix:p(t[`path-prefix`],`path-prefix`,`text`),rootDirectory:p(t[`root-directory`],`root-directory`,`text`),sourceId:p(t[`source-id`],`source-id`,`text`)}),m=await c(`Creating`,async()=>i.images.import.create({...d,account_id:l}));o(m,{successLabel:`Created`})})};function B(e){return e.usage(`$0 images import delete <migration-id>
|
|
24
|
-
|
|
25
|
-
Delete a completed, failed, or aborted CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <migration-id>`,describe:`Delete a sourcing kit migration`,builder:B,handler:async t=>l({command:`images import delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this import migration.`})){process.stderr.write(`Aborted.
|
|
26
|
-
`);return}let u=await c(`Deleting`,async()=>i.images.import.delete({account_id:l,migration_id:t[`migration-id`]}));o(u,{successLabel:`Deleted`})})};function H(e){return e.usage(`$0 images import get <migration-id>
|
|
27
|
-
|
|
28
|
-
Get the configuration and status of a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <migration-id>`,describe:`Get sourcing kit migration`,builder:H,handler:async t=>l({command:`images import get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.images.import.get({account_id:l,migration_id:t[`migration-id`]}));o(u,{successLabel:`Loaded`})})};function W(e){return e.usage(`$0 images import list
|
|
29
|
-
|
|
30
|
-
List CF Images imports.`).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List sourcing kit migrations`,builder:W,handler:async t=>l({command:`images import list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit};if(t.dryRun){let e=await r();s({command:`cf images import list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.images.import.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 images import logs <migration-id>
|
|
31
|
-
|
|
32
|
-
List log entries for a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`logs <migration-id>`,describe:`List migration logs`,builder:K,handler:async t=>l({command:`images import logs`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit};if(t.dryRun){let e=await r();s({command:`cf images import logs`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/logs`,pathParams:{"migration-id":String(t[`migration-id`]??``)},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.images.import.logs({account_id:u,migration_id:t[`migration-id`],...i}));o(d,{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 images import progress <migration-id>
|
|
33
|
-
|
|
34
|
-
Get progress and object counts for a CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`progress <migration-id>`,describe:`Get migration progress`,builder:J,handler:async t=>l({command:`images import progress`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import progress`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.images.import.progress({account_id:l,migration_id:t[`migration-id`]}));o(u,{successLabel:`Loaded`})})};function X(e){return e.usage(`$0 images import sources check <source-id>
|
|
35
|
-
|
|
36
|
-
Check whether a source can still access its S3 bucket.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`check <source-id>`,describe:`Get source connectivity status`,builder:X,handler:async t=>l({command:`images import sources check`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import sources check`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}/connectivity`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.images.import.sources.check({account_id:l,source_id:t[`source-id`]}));o(u,{successLabel:`Loaded`})})};function Q(e){return e.usage(`$0 images import sources create
|
|
37
|
-
|
|
38
|
-
Configure an S3 source for CF Images imports.`).option(`account`,{type:`string`,description:`Account identifier for the bucket (required for R2 vendor).`}).option(`bucket`,{type:`string`,description:`The name of the storage bucket.`}).option(`name`,{type:`string`,description:`A human-readable name for the source.`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).coerce(`vendor`,e=>p(e,`vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`create`,describe:`Create a sourcing kit source`,builder:Q,handler:async t=>l({command:`images import sources create`,classification:{safeFlags:[`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import sources create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),name:p(t.name,`name`,`text`),vendor:t.vendor}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.images.import.sources.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}t.bucket===void 0&&(t.bucket=await h(`bucket`,`The name of the storage bucket.`)),t.name===void 0&&(t.name=await h(`name`,`A human-readable name for the source.`)),t.vendor===void 0&&(t.vendor=await g(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let d=f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),name:p(t.name,`name`,`text`),vendor:t.vendor}),m=await c(`Creating`,async()=>i.images.import.sources.create({...d,account_id:l}));o(m,{successLabel:`Created`})})};function re(e){return e.usage(`$0 images import sources delete <source-id>
|
|
39
|
-
|
|
40
|
-
Delete a source configured for CF Images imports. Sources used by active imports cannot be deleted.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ie={command:`delete <source-id>`,describe:`Delete a sourcing kit source`,builder:re,handler:async t=>l({command:`images import sources delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import sources delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this import source.`})){process.stderr.write(`Aborted.
|
|
41
|
-
`);return}let u=await c(`Deleting`,async()=>i.images.import.sources.delete({account_id:l,source_id:t[`source-id`]}));o(u,{successLabel:`Deleted`})})};function ae(e){return e.usage(`$0 images import sources get <source-id>
|
|
42
|
-
|
|
43
|
-
Get details of a source configured for CF Images imports.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get <source-id>`,describe:`Get sourcing kit source`,builder:ae,handler:async t=>l({command:`images import sources get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import sources get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.images.import.sources.get({account_id:l,source_id:t[`source-id`]}));o(u,{successLabel:`Loaded`})})};function se(e){return e.usage(`$0 images import sources list
|
|
44
|
-
|
|
45
|
-
List sources configured for CF Images imports.`).option(`offset`,{type:`number`,description:`Number of items to skip before returning results.`}).option(`limit`,{type:`number`,description:`Maximum number of items to return.`}).option(`name`,{type:`string`,description:`Filter sources by name (partial match).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`list`,describe:`List sourcing kit sources`,builder:se,handler:async t=>l({command:`images import sources list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={offset:t.offset,limit:t.limit,name:t.name};if(t.dryRun){let e=await r();s({command:`cf images import sources list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.images.import.sources.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function le(e){return e.usage(`$0 images import sources pre-check
|
|
46
|
-
|
|
47
|
-
Check S3 credentials without saving a source.`).option(`account`,{type:`string`,description:`Account identifier for the bucket (required for R2 vendor).`}).option(`bucket`,{type:`string`,description:`The name of the storage bucket.`}).option(`region`,{type:`string`,description:`The region hint for the bucket (S3 only).`}).option(`vendor`,{type:`string`,description:`The cloud storage vendor of the source bucket.`,choices:[`s3`,`r2`]}).coerce(`vendor`,e=>p(e,`vendor`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`pre-check`,describe:`Precheck source connectivity`,builder:le,handler:async t=>l({command:`images import sources pre-check`,classification:{safeFlags:[`vendor`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import sources pre-check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources/connectivity-precheck`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),region:p(t.region,`region`,`text`),vendor:t.vendor}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.images.import.sources.preCheck({...e,account_id:l}));o(n,{successLabel:`Created`});return}t.bucket===void 0&&(t.bucket=await h(`bucket`,`The name of the storage bucket.`)),t.vendor===void 0&&(t.vendor=await g(`vendor`,`The cloud storage vendor of the source bucket.`,[`s3`,`r2`]));let d=f({account:p(t.account,`account`,`text`),bucket:p(t.bucket,`bucket`,`text`),region:p(t.region,`region`,`text`),vendor:t.vendor}),m=await c(`Creating`,async()=>i.images.import.sources.preCheck({...d,account_id:l}));o(m,{successLabel:`Created`})})};function de(e){return e.usage(`$0 images import sources update <source-id>
|
|
48
|
-
|
|
49
|
-
Rename a source configured for CF Images imports.`).positional(`source-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`name`,{type:`string`,description:`Updated name for the source.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const fe={command:`update <source-id>`,describe:`Update a sourcing kit source`,builder:de,handler:async t=>l({command:`images import sources update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import sources update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/sources/${t[`source-id`]==null?`<source-id>`:encodeURIComponent(String(t[`source-id`]))}`,pathParams:{"source-id":String(t[`source-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({name:p(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.images.import.sources.update({...e,account_id:l,source_id:t[`source-id`]}));o(n,{successLabel:`Updated`});return}t.name===void 0&&(t.name=await h(`name`,`Updated name for the source.`));let d=f({name:p(t.name,`name`,`text`)}),m=await c(`Updating`,async()=>i.images.import.sources.update({...d,account_id:l,source_id:t[`source-id`]}));o(m,{successLabel:`Updated`})})},pe={command:`sources`,describe:`Operations for import.sources`,builder:e=>e.command(Z).command(ne).command(ie).command(oe).command(ce).command(ue).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return e.usage(`$0 images import start <migration-id>
|
|
50
|
-
|
|
51
|
-
Start a pending CF Images import.`).positional(`migration-id`,{type:`string`,description:`Sourcing kit resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`start <migration-id>`,describe:`Start a migration`,builder:me,handler:async t=>l({command:`images import start`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images import start`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2/sourcingkit/migrations/${t[`migration-id`]==null?`<migration-id>`:encodeURIComponent(String(t[`migration-id`]))}/lifecycle/start`,pathParams:{"migration-id":String(t[`migration-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Updating`,async()=>i.images.import.start({account_id:l,migration_id:t[`migration-id`]}));o(u,{successLabel:`Updated`})})},ge={command:`import`,describe:`Import images from S3`,builder:e=>e.command(L).command(z).command(V).command(U).command(G).command(q).command(Y).command(he).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(e){return e.usage(`$0 images keys create <signing-key-name>
|
|
52
|
-
|
|
53
|
-
Create a new CF Images signing key with specified name. Returns all keys available.`).positional(`signing-key-name`,{type:`string`,description:`Signing key name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`create <signing-key-name>`,describe:`Create a new Signing Key`,builder:_e,handler:async t=>l({command:`images keys create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images keys create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/keys/${t[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(t[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(t[`signing-key-name`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Updating`,async()=>i.images.keys.create({account_id:l,signing_key_name:t[`signing-key-name`]}));o(u,{successLabel:`Updated`})})};function ye(e){return e.usage(`$0 images keys delete <signing-key-name>
|
|
54
|
-
|
|
55
|
-
Delete a CF Images signing key with specified name. Returns all keys available. When the last key is removed, a new default signing key will be generated.`).positional(`signing-key-name`,{type:`string`,description:`Signing key name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const be={command:`delete <signing-key-name>`,describe:`Delete Signing Key`,builder:ye,handler:async t=>l({command:`images keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/keys/${t[`signing-key-name`]==null?`<signing-key-name>`:encodeURIComponent(String(t[`signing-key-name`]))}`,pathParams:{"signing-key-name":String(t[`signing-key-name`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this signing key. This will invalidate any URLs that are signed with this key.`})){process.stderr.write(`Aborted.
|
|
56
|
-
`);return}let u=await c(`Deleting`,async()=>i.images.keys.delete({account_id:l,signing_key_name:t[`signing-key-name`]}));o(u,{successLabel:`Deleted`})})};function xe(e){return e.usage(`$0 images keys list
|
|
57
|
-
|
|
58
|
-
List your CF Images signing keys.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`list`,describe:`List Signing Keys`,builder:xe,handler:async t=>l({command:`images keys list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/keys`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.images.keys.list({account_id:l}));o(u,{successLabel:`Loaded`})})},Ce={command:`keys`,describe:`Manage signing keys for generating private image URLs`,builder:e=>e.command(ve).command(be).command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function we(e){return e.usage("$0 images list\n\nList up to 10000 images from CF Images, with up to 1000 results per page. Use the optional parameters below to get a specific range of images. Pagination is supported via continuation_token. **Metadata Filtering (Optional):** You can optionally filter images by custom metadata fields using the `meta.<field>[<operator>]=<value>` syntax. **Supported Operators:** - `eq` / `eq:string` / `eq:number` / `eq:boolean` - Exact match - `gt` / `gt:number` - Greater than (number only) - `gte` / `gte:number` - Greater than or equal (number only) - `lt` / `lt:number` - Less than (number only) - `lte` / `lte:number` - Less than or equal (number only) - `in` / `in:string` / `in:number` - Match any value in list (pipe-separated) **Metadata Filter Constraints:** - Maximum 5 metadata filters per request - Maximum 5 levels of nesting (e.g., `meta.first.second.third.fourth.fifth`) - Maximum 10 elements for list operators (`in`) - Supports string, number, and boolean value types - Range operators (`gt`, `gte`, `lt`, `lte`) only accept numeric values **Filter Consistency:** Filters are combined with AND logic. The system does not validate whether filter combinations are logically consistent. For example, `meta.priority[eq:number]=5&meta.priority[lte:number]=3` will return zero results because no value can satisfy both conditions simultaneously. It is the caller's responsibility to ensure filter combinations make sense. **Examples:** ``` # List all images /images/v2 # Filter by metadata [eq] /images/v2?meta.status[eq:string]=active # Filter by metadata [in] /images/v2?meta.status[in]=pending|deleted|flagged # Filter by metadata [in:number] /images/v2?meta.ratings[in:number]=4|5 # Filter by metadata range [gte:number] /images/v2?meta.priority[gte:number]=1 # Filter by bounded range /images/v2?meta.priority[gte:number]=1&meta.priority[lte:number]=5 # Filter by nested metadata /images/v2?meta.region.name[eq]=eu-west # Combine metadata filters with creator /images/v2?meta.status[eq]=active&creator=user123 # Multiple metadata filters (AND logic) /images/v2?meta.status[eq]=active&meta.priority[eq:number]=5 ```").option(`continuation-token`,{type:`string`,description:`Continuation token to fetch next page. Passed as a query param when requesting List V2 api endpoint.`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`sort-order`,{type:`string`,description:`Sorting order by upload time`,choices:[`asc`,`desc`]}).option(`creator`,{type:`string`,description:`Internal user ID set within the creator field. Setting to empty string "" will return images where creator field is not set`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`list`,describe:`List images V2`,builder:ee(we),handler:async t=>l({command:`images list`,classification:{safeFlags:[`sort-order`,`dry-run`]}},t,async()=>{let i={continuation_token:t[`continuation-token`],per_page:t[`per-page`],sort_order:t[`sort-order`],creator:t.creator};if(t.dryRun){let e=await r();s({command:`cf images list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v2`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.images.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function Ee(e){return e.usage(`$0 images stats
|
|
59
|
-
|
|
60
|
-
Fetch image statistics details for Cloudflare Images. The returned statistics detail storage usage, including the current image count vs this account's allowance.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`stats`,describe:`Images usage statistics`,builder:Ee,handler:async t=>l({command:`images stats`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images stats`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/stats`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.images.stats({account_id:l}));o(u,{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 images variants create
|
|
61
|
-
|
|
62
|
-
Create a CF Images variant that allows you to resize images for different use cases.`).option(`id`,{type:`string`,description:`The id field`}).option(`never-require-signed-urls`,{type:`boolean`,description:`Indicates whether the variant can access an image without a signature, regardless of image access control.`,default:!1}).option(`options-fit`,{type:`string`,description:`The fit property describes how the width and height dimensions should be interpreted.`,choices:[`scale-down`,`contain`,`cover`,`crop`,`pad`]}).coerce(`options-fit`,e=>p(e,`options-fit`,`text`)).option(`options-height`,{type:`number`,description:`Maximum height in image pixels.`}).option(`options-metadata`,{type:`string`,description:`What EXIF data should be preserved in the output image.`,choices:[`keep`,`copyright`,`none`]}).coerce(`options-metadata`,e=>p(e,`options-metadata`,`text`)).option(`options-width`,{type:`number`,description:`Maximum width in image pixels.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Oe={command:`create`,describe:`Create a variant`,builder:$,handler:async t=>l({command:`images variants create`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images variants create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`json`,body:t.body===void 0?f({id:p(t.id,`id`,`text`),neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:t[`options-fit`],height:t[`options-height`],metadata:t[`options-metadata`],width:t[`options-width`]}}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.images.variants.create({body:e,account_id:l}));o(n,{successLabel:`Created`});return}if(t.id===void 0&&(t.id=await h(`id`,`The id field`)),t[`options-fit`]===void 0&&(t[`options-fit`]=await g(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),t[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(t[`options-metadata`]===void 0&&(t[`options-metadata`]=await g(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),t[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let d=f({id:p(t.id,`id`,`text`),neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:t[`options-fit`],height:t[`options-height`],metadata:t[`options-metadata`],width:t[`options-width`]}}),m=await c(`Creating`,async()=>i.images.variants.create({body:d,account_id:l}));o(m,{successLabel:`Created`})})};function ke(e){return e.usage(`$0 images variants delete <variant-id>
|
|
63
|
-
|
|
64
|
-
Delete a CF Images variant. This will purge the cache for all images associated with the variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ae={command:`delete <variant-id>`,describe:`Delete a variant`,builder:ke,handler:async t=>l({command:`images variants delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images variants delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await _({force:!!t.force,message:`This operation will delete this variant.`})){process.stderr.write(`Aborted.
|
|
65
|
-
`);return}let u=await c(`Deleting`,async()=>i.images.variants.delete({account_id:l,variant_id:t[`variant-id`]}));o(u,{successLabel:`Deleted`})})};function je(e){return e.usage(`$0 images variants edit <variant-id>
|
|
66
|
-
|
|
67
|
-
Update a CF Images variant. This will purge the cache for all images associated with the variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`never-require-signed-urls`,{type:`boolean`,description:`Indicates whether the variant can access an image without a signature, regardless of image access control.`}).option(`options-fit`,{type:`string`,description:`The fit property describes how the width and height dimensions should be interpreted.`,choices:[`scale-down`,`contain`,`cover`,`crop`,`pad`]}).coerce(`options-fit`,e=>p(e,`options-fit`,`text`)).option(`options-height`,{type:`number`,description:`Maximum height in image pixels.`}).option(`options-metadata`,{type:`string`,description:`What EXIF data should be preserved in the output image.`,choices:[`keep`,`copyright`,`none`]}).coerce(`options-metadata`,e=>p(e,`options-metadata`,`text`)).option(`options-width`,{type:`number`,description:`Maximum width in image pixels.`}).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 Me={command:`edit <variant-id>`,describe:`Update a variant`,builder:je,handler:async t=>l({command:`images variants edit`,classification:{safeFlags:[`never-require-signed-urls`,`options-fit`,`options-metadata`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images variants edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:t[`options-fit`],height:t[`options-height`],metadata:t[`options-metadata`],width:t[`options-width`]}}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.images.variants.edit({...e,account_id:l,variant_id:t[`variant-id`]}));o(n,{successLabel:`Updated`});return}if(t[`options-fit`]===void 0&&(t[`options-fit`]=await g(`options-fit`,`The fit property describes how the width and height dimensions should be interpreted.`,[`scale-down`,`contain`,`cover`,`crop`,`pad`])),t[`options-height`]===void 0)throw Error(`--options-height is required (or pass --body with this field set).`);if(t[`options-metadata`]===void 0&&(t[`options-metadata`]=await g(`options-metadata`,`What EXIF data should be preserved in the output image.`,[`keep`,`copyright`,`none`])),t[`options-width`]===void 0)throw Error(`--options-width is required (or pass --body with this field set).`);let d=f({neverRequireSignedURLs:t[`never-require-signed-urls`],options:{fit:t[`options-fit`],height:t[`options-height`],metadata:t[`options-metadata`],width:t[`options-width`]}}),p=await c(`Updating`,async()=>i.images.variants.edit({...d,account_id:l,variant_id:t[`variant-id`]}));o(p,{successLabel:`Updated`})})};function Ne(e){return e.usage(`$0 images variants get <variant-id>
|
|
68
|
-
|
|
69
|
-
Fetch details for a CF Images variant.`).positional(`variant-id`,{type:`string`,description:`Variant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`get <variant-id>`,describe:`Variant details`,builder:Ne,handler:async t=>l({command:`images variants get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images variants get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/variants/${t[`variant-id`]==null?`<variant-id>`:encodeURIComponent(String(t[`variant-id`]))}`,pathParams:{"variant-id":String(t[`variant-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.images.variants.get({account_id:l,variant_id:t[`variant-id`]}));o(u,{successLabel:`Loaded`})})};function Fe(e){return e.usage(`$0 images variants list
|
|
70
|
-
|
|
71
|
-
List existing CF Images variants.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`list`,describe:`List variants`,builder:Fe,handler:async t=>l({command:`images variants list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf images variants list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/images/v1/variants`,pathParams:{},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.images.variants.list({account_id:l}));o(u,{successLabel:`Loaded`})})},Le={command:`variants`,describe:`Manage named resize variants for transforming images on delivery`,builder:e=>e.command(Oe).command(Ae).command(Me).command(Pe).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Re={command:`images`,describe:`Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads`,builder:e=>e.command(b).command(S).command(w).command(E).command(F).command(N).command(Te).command(De).command(j).command(ge).command(Ce).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Re as default};
|
package/dist/intel-DoB1g_K7.mjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,i,t as a}from"./context-BBLtgdR1.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-CQqDtgmF.mjs";import{t as l}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as u,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-C8FyienX.mjs";import{t as g}from"./cli-types-9oYmRTHJ.mjs";import{n as ee,t as te}from"./raw-fetch-DbXN3SlE.mjs";function _(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 v={command:`get <asn>`,describe:`Get ASN Overview.`,builder:_,handler:async t=>l({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/asn/${t.asn==null?`<asn>`:encodeURIComponent(String(t.asn))}`,pathParams:{asn:String(t.asn??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.asn.get({account_id:l,asn:t.asn}));o(u,{successLabel:`Loaded`})})};function y(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 b={command:`get <asn>`,describe:`Get ASN Subnets`,builder:y,handler:async t=>l({command:`intel asn subnets get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel asn subnets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/asn/${t.asn==null?`<asn>`:encodeURIComponent(String(t.asn))}/subnets`,pathParams:{asn:String(t.asn??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.asn.subnets.get({account_id:l,asn:t.asn}));o(u,{successLabel:`Loaded`})})},x={command:`subnets`,describe:`Operations for asn.subnets`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},S={command:`asn`,describe:`ASN intelligence — ownership, geolocation, and subnet details for autonomous systems`,builder:e=>e.command(v).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(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 w={command:`get`,describe:`Retrieves Security Center Issues Types`,builder:C,handler:async t=>l({command:`intel attack-surface-report issue-types get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({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 i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.attackSurfaceReport.issueTypes.get({account_id:l}));o(u,{successLabel:`Loaded`})})},T={command:`issue-types`,describe:`Operations for attack-surface-report.issue-types`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(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 D={command:`class`,describe:`Retrieves Security Center Issue Counts by Class`,builder:g(E),handler:async t=>l({command:`intel attack-surface-report issues class`,classification:{safeFlags:[`dismissed`,`dry-run`]}},t,async()=>{let i={dismissed:t.dismissed,issue_class:t[`issue-class`],issue_type:t[`issue-type`],product:t.product,source:t.source,severity:t.severity,subject:t.subject};if(t.dryRun){let e=await r();s({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:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.class({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function O(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 k={command:`dismiss <issue-id>`,describe:`Archives Security Center Insight`,builder:O,handler:async t=>l({command:`intel attack-surface-report issues dismiss`,classification:{safeFlags:[`dismiss`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel attack-surface-report issues dismiss`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/attack-surface-report/issues/${t[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(t[`issue-id`]))}/dismiss`,pathParams:{"issue-id":String(t[`issue-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({dismiss:t.dismiss}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.intel.attackSurfaceReport.issues.dismiss({...e,account_id:l,issue_id:t[`issue-id`]}));o(n,{successLabel:`Updated`});return}let f=d({dismiss:t.dismiss}),p=await c(`Updating`,async()=>i.intel.attackSurfaceReport.issues.dismiss({...f,account_id:l,issue_id:t[`issue-id`]}));o(p,{successLabel:`Updated`})})};function A(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 j={command:`list`,describe:`Retrieves Security Center Issues`,builder:g(A),handler:async t=>l({command:`intel attack-surface-report issues list`,classification:{safeFlags:[`dismissed`,`dry-run`]}},t,async()=>{let i={dismissed:t.dismissed,issue_class:t[`issue-class`],issue_type:t[`issue-type`],product:t.product,source:t.source,severity:t.severity,subject:t.subject,page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({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:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function M(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 N={command:`severity`,describe:`Retrieves Security Center Issue Counts by Severity`,builder:g(M),handler:async t=>l({command:`intel attack-surface-report issues severity`,classification:{safeFlags:[`dismissed`,`dry-run`]}},t,async()=>{let i={dismissed:t.dismissed,issue_class:t[`issue-class`],issue_type:t[`issue-type`],product:t.product,source:t.source,severity:t.severity,subject:t.subject};if(t.dryRun){let e=await r();s({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:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.severity({account_id:u,...i}));o(d,{successLabel:`Loaded`})})};function P(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 F={command:`type`,describe:`Retrieves Security Center Issue Counts by Type`,builder:g(P),handler:async t=>l({command:`intel attack-surface-report issues type`,classification:{safeFlags:[`dismissed`,`dry-run`]}},t,async()=>{let i={dismissed:t.dismissed,issue_class:t[`issue-class`],issue_type:t[`issue-type`],product:t.product,source:t.source,severity:t.severity,subject:t.subject};if(t.dryRun){let e=await r();s({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:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.type({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},I={command:`issues`,describe:`Operations for attack-surface-report.issues`,builder:e=>e.command(D).command(k).command(j).command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`attack-surface-report`,describe:`Attack surface intelligence — exposed assets, vulnerabilities, and infrastructure mapping`,builder:e=>e.command(T).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(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 z={command:`list`,describe:`Get Passive DNS by IP`,builder:g(R),handler:async t=>l({command:`intel dns list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={start_end_params:t[`start-end-params`],ipv4:t.ipv4,page:t.page,per_page:t[`per-page`]};if(t.dryRun){let e=await r();s({command:`cf intel dns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/dns`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.dns.list({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},B={command:`dns`,describe:`Passive DNS data showing historical DNS resolution records for domains`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};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 t=>l({command:`intel domain-history get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={domain:t.domain};if(t.dryRun){let e=await r();s({command:`cf intel domain-history get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain-history`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.domainHistory.get({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},U={command:`domain-history`,describe:`Historical domain registration and categorization changes over time`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(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 G={command:`get`,describe:`Get Multiple Domain Details`,builder:W,handler:async t=>l({command:`intel domains bulks get`,classification:{safeFlags:[`include-ranking`,`skip-ranking`,`dry-run`]}},t,async()=>{let i={domain:t.domain,include_ranking:t[`include-ranking`],skip_ranking:t[`skip-ranking`]};if(t.dryRun){let e=await r();s({command:`cf intel domains bulks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain/bulk`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.domains.bulks.get({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},K={command:`bulks`,describe:`Operations for domains.bulks`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(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 J={command:`get`,describe:`Get Domain Details`,builder:q,handler:async t=>l({command:`intel domains get`,classification:{safeFlags:[`skip-dns`,`skip-ranking`,`dry-run`]}},t,async()=>{let i={domain:t.domain,skip_dns:t[`skip-dns`],skip_ranking:t[`skip-ranking`]};if(t.dryRun){let e=await r();s({command:`cf intel domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.domains.get({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},Y={command:`domains`,describe:`Domain intelligence — risk scores, categories, and associated infrastructure`,builder:e=>e.command(J).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(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 Z={command:`create`,describe:`Create new indicator feed`,builder:X,handler:async t=>l({command:`intel indicator-feeds create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel indicator-feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.intel.indicatorFeeds.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}let p=d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`)}),m=await c(`Creating`,async()=>i.intel.indicatorFeeds.create({...p,account_id:l}));o(m,{successLabel:`Created`})})};function Q(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 ne={command:`data <feed-id>`,describe:`Get indicator feed data`,builder:Q,handler:async t=>l({command:`intel indicator-feeds data`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel indicator-feeds data`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/data`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`none`});return}await n(t);let i=t.local?e:await a();t.accountId=i;let o=await c(`Loading`,async()=>te(`/accounts/${i}/intel/indicator-feeds/${encodeURIComponent(String(t[`feed-id`]))}/data`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));ee(o.toString(`utf-8`))})};function re(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 ie={command:`get <feed-id>`,describe:`Download indicator feed data`,builder:re,handler:async t=>l({command:`intel indicator-feeds downloads get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel indicator-feeds downloads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/download`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.indicatorFeeds.downloads.get({account_id:l,feed_id:t[`feed-id`]}));o(u,{successLabel:`Loaded`})})},ae={command:`downloads`,describe:`Operations for indicator-feeds.downloads`,builder:e=>e.command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(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 se={command:`get <feed-id>`,describe:`Get indicator feed metadata`,builder:oe,handler:async t=>l({command:`intel indicator-feeds get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel indicator-feeds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.indicatorFeeds.get({account_id:l,feed_id:t[`feed-id`]}));o(u,{successLabel:`Loaded`})})};function ce(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 le={command:`list`,describe:`Get indicator feeds owned by this account`,builder:ce,handler:async t=>l({command:`intel indicator-feeds list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({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 i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.indicatorFeeds.list({account_id:l}));o(u,{successLabel:`Loaded`})})};function ue(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 de={command:`create`,describe:`Grant permission to indicator feed`,builder:ue,handler:async t=>l({command:`intel indicator-feeds permissions create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel indicator-feeds permissions create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/permissions/add`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({account_tag:f(t[`account-tag`],`account-tag`,`text`),feed_id:t[`feed-id`]}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.intel.indicatorFeeds.permissions.create({body:e,account_id:l}));o(n,{successLabel:`Updated`});return}let p=d({account_tag:f(t[`account-tag`],`account-tag`,`text`),feed_id:t[`feed-id`]}),m=await c(`Updating`,async()=>i.intel.indicatorFeeds.permissions.create({body:p,account_id:l}));o(m,{successLabel:`Updated`})})};function fe(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 pe={command:`delete`,describe:`Revoke permission to indicator feed`,builder:fe,handler:async t=>l({command:`intel indicator-feeds permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel indicator-feeds permissions delete`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/permissions/remove`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({account_tag:f(t[`account-tag`],`account-tag`,`text`),feed_id:t[`feed-id`]}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await h({force:!!t.force,message:`This operation destructively removes a permission entry.`})){process.stderr.write(`Aborted.
|
|
39
|
-
`);return}if(t.body){let e=u(t.body),n=await c(`Deleting`,async()=>i.intel.indicatorFeeds.permissions.delete({body:e,account_id:l}));o(n,{successLabel:`Deleted`});return}let p=d({account_tag:f(t[`account-tag`],`account-tag`,`text`),feed_id:t[`feed-id`]}),m=await c(`Deleting`,async()=>i.intel.indicatorFeeds.permissions.delete({body:p,account_id:l}));o(m,{successLabel:`Deleted`})})};function me(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 he={command:`list`,describe:`List indicator feed permissions`,builder:me,handler:async t=>l({command:`intel indicator-feeds permissions list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({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 i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.indicatorFeeds.permissions.list({account_id:l}));o(u,{successLabel:`Loaded`})})},ge={command:`permissions`,describe:`Operations for indicator-feeds.permissions`,builder:e=>e.command(de).command(pe).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(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 ve={command:`create <account-id-path>`,describe:`Create indicator feed provider`,builder:_e,handler:async e=>l({command:`intel indicator-feeds providers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({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?d({account_id:e[`account-id`],name:f(e.name,`name`,`text`)}):u(e.body)});return}let t=await n(e);if(e.body){let n=u(e.body),r=await c(`Updating`,async()=>t.intel.indicatorFeeds.providers.create({...n,account_id_path:e[`account-id-path`]}));o(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 m(`name`,`The name of the provider`));let r=d({account_id:e[`account-id`],name:f(e.name,`name`,`text`)}),i=await c(`Updating`,async()=>t.intel.indicatorFeeds.providers.create({...r,account_id_path:e[`account-id-path`]}));o(i,{successLabel:`Updated`})})},ye={command:`providers`,describe:`Operations for indicator-feeds.providers`,builder:e=>e.command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function be(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 xe={command:`update <feed-id>`,describe:`Update indicator feed data`,builder:be,handler:async i=>l({command:`intel indicator-feeds snapshots update`,classification:{safeFlags:[`dry-run`]}},i,async()=>{let l={};if(i[`cf-async-upload`]!==void 0&&(l[`Cf-Async-Upload`]=String(i[`cf-async-upload`])),i.dryRun){let e=await r();s({command:`cf intel indicator-feeds snapshots update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/${i[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(i[`feed-id`]))}/snapshot`,pathParams:{"feed-id":String(i[`feed-id`]??``)},bodyKind:`multipart`,body:{body:i.body,file:i.file,source:i.source}});return}let u=await n(i),d=i.local?e:await a();if(i.accountId=d,i.file!==void 0||i.body!==void 0||i.source!==void 0){let e=new FormData;if(i.file){let t=p(i.file);e.append(`file`,new Blob([t]),i.file.split(/[\\/]/).filter(Boolean).pop())}else i.body!==void 0&&e.append(`file`,i.body);i.source!==void 0&&e.append(`source`,String(f(i.source,`source`,`text`)??``));let n=await c(`Updating`,async()=>t(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(i[`feed-id`]))}/snapshot`,{body:e,headers:Object.keys(l).length>0?l:void 0}));o(n,{successLabel:`Updated`});return}if(i.body){let e=f(i.body,`body`,`binary`),n=await c(`Updating`,async()=>t(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(i[`feed-id`]))}/snapshot`,{body:e,headers:{"Content-Type":`multipart/form-data`,...l}}));o(n,{successLabel:`Updated`});return}if(i.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Se={command:`snapshots`,describe:`Operations for indicator-feeds.snapshots`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ce(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 we={command:`update <feed-id>`,describe:`Update indicator feed metadata`,builder:Ce,handler:async t=>l({command:`intel indicator-feeds update`,classification:{safeFlags:[`is-attributable`,`is-downloadable`,`is-public`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel indicator-feeds update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({description:f(t.description,`description`,`text`),is_attributable:t[`is-attributable`],is_downloadable:t[`is-downloadable`],is_public:t[`is-public`],name:f(t.name,`name`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.intel.indicatorFeeds.update({...e,account_id:l,feed_id:t[`feed-id`]}));o(n,{successLabel:`Updated`});return}let p=d({description:f(t.description,`description`,`text`),is_attributable:t[`is-attributable`],is_downloadable:t[`is-downloadable`],is_public:t[`is-public`],name:f(t.name,`name`,`text`)}),m=await c(`Updating`,async()=>i.intel.indicatorFeeds.update({...p,account_id:l,feed_id:t[`feed-id`]}));o(m,{successLabel:`Updated`})})},Te={command:`indicator-feeds`,describe:`Threat indicator feeds — subscribe to and manage curated lists of malicious IPs, domains, and URLs`,builder:e=>e.command(Z).command(ne).command(se).command(le).command(we).command(ae).command(ge).command(ye).command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ee(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 De={command:`get`,describe:`Get Available IP Lists`,builder:Ee,handler:async t=>l({command:`intel ip-lists get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({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 i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.ipLists.get({account_id:l}));o(u,{successLabel:`Loaded`})})},Oe={command:`ip-lists`,describe:`Curated IP lists used for threat detection and policy enforcement`,builder:e=>e.command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ke(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 Ae={command:`get`,describe:`Get IP Overview`,builder:ke,handler:async t=>l({command:`intel ips get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={ipv4:t.ipv4,ipv6:t.ipv6};if(t.dryRun){let e=await r();s({command:`cf intel ips get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/ip`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.ips.get({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},je={command:`ips`,describe:`IP address intelligence — geolocation, risk assessment, and hosting provider details`,builder:e=>e.command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Me(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=>f(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 Ne={command:`create`,describe:`Create Miscategorization`,builder:Me,handler:async t=>l({command:`intel miscategorizations create`,classification:{safeFlags:[`indicator-type`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel miscategorizations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/miscategorization`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({content_adds:t[`content-adds`],content_removes:t[`content-removes`],indicator_type:t[`indicator-type`],ip:f(t.ip,`ip`,`text`),security_adds:t[`security-adds`],security_removes:t[`security-removes`],url:f(t.url,`url`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.intel.miscategorizations.create({...e,account_id:l}));o(n,{successLabel:`Created`});return}let p=d({content_adds:t[`content-adds`],content_removes:t[`content-removes`],indicator_type:t[`indicator-type`],ip:f(t.ip,`ip`,`text`),security_adds:t[`security-adds`],security_removes:t[`security-removes`],url:f(t.url,`url`,`text`)}),m=await c(`Creating`,async()=>i.intel.miscategorizations.create({...p,account_id:l}));o(m,{successLabel:`Created`})})},Pe={command:`miscategorizations`,describe:`Report and track domain miscategorization corrections`,builder:e=>e.command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fe(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 Ie={command:`create`,describe:`Create a new sinkhole for your account`,builder:Fe,handler:async t=>l({command:`intel sinkholes create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel sinkholes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({name:f(t.name,`name`,`text`),r2_bucket:f(t[`r2-bucket`],`r2-bucket`,`text`),r2_id:f(t[`r2-id`],`r2-id`,`text`),r2_secret:f(t[`r2-secret`],`r2-secret`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Creating`,async()=>i.intel.sinkholes.create({body:e,account_id:l}));o(n,{successLabel:`Created`});return}t.name===void 0&&(t.name=await m(`name`,`The name of the sinkhole.`));let p=d({name:f(t.name,`name`,`text`),r2_bucket:f(t[`r2-bucket`],`r2-bucket`,`text`),r2_id:f(t[`r2-id`],`r2-id`,`text`),r2_secret:f(t[`r2-secret`],`r2-secret`,`text`)}),h=await c(`Creating`,async()=>i.intel.sinkholes.create({body:p,account_id:l}));o(h,{successLabel:`Created`})})};function Le(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 Re={command:`delete <sinkhole-id>`,describe:`Delete a sinkhole`,builder:Le,handler:async t=>l({command:`intel sinkholes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel sinkholes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/sinkholes/${t[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(t[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(t[`sinkhole-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,!await h({force:!!t.force})){process.stderr.write(`Aborted.
|
|
55
|
-
`);return}let u=await c(`Deleting`,async()=>i.intel.sinkholes.delete({account_id:l,sinkhole_id:t[`sinkhole-id`]}));o(u,{successLabel:`Deleted`})})};function ze(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 Be={command:`get <sinkhole-id>`,describe:`Get a sinkhole`,builder:ze,handler:async t=>l({command:`intel sinkholes get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel sinkholes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/sinkholes/${t[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(t[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(t[`sinkhole-id`]??``)},bodyKind:`none`});return}let i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.sinkholes.get({account_id:l,sinkhole_id:t[`sinkhole-id`]}));o(u,{successLabel:`Loaded`})})};function Ve(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 He={command:`create <sinkhole-id>`,describe:`Create an ingress rule`,builder:Ve,handler:async e=>l({command:`intel sinkholes ingresses create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({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?d({cidr:f(e.cidr,`cidr`,`text`)}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Creating`,async()=>t.intel.sinkholes.ingresses.create({body:n,zone_id:r,sinkhole_id:e[`sinkhole-id`]}));o(i,{successLabel:`Created`});return}e.cidr===void 0&&(e.cidr=await m(`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 a=d({cidr:f(e.cidr,`cidr`,`text`)}),l=await c(`Creating`,async()=>t.intel.sinkholes.ingresses.create({body:a,zone_id:r,sinkhole_id:e[`sinkhole-id`]}));o(l,{successLabel:`Created`})})};function Ue(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 We={command:`delete <ingress-id>`,describe:`Delete an ingress rule`,builder:Ue,handler:async e=>l({command:`intel sinkholes ingresses delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
62
|
-
`);return}let a=await c(`Deleting`,async()=>t.intel.sinkholes.ingresses.delete({zone_id:r,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));o(a,{successLabel:`Deleted`})})};function Ge(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 Ke={command:`get <ingress-id>`,describe:`Get an ingress rule`,builder:Ge,handler:async e=>l({command:`intel sinkholes ingresses get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({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 n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.intel.sinkholes.ingresses.get({zone_id:r,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));o(a,{successLabel:`Loaded`})})};function qe(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 Je={command:`list`,describe:`List ingresses for a sinkhole`,builder:qe,handler:async t=>l({command:`intel sinkholes ingresses list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf intel sinkholes ingresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/intel/sinkholes/${t[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(t[`sinkhole-id`]))}/ingresses`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"sinkhole-id":String(t[`sinkhole-id`]??``)},bodyKind:`none`});return}let l=await n(t),u=t.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();u===`zones`?t.zoneId=d:t.accountId=d;let f=await c(`Loading`,async()=>l.intel.sinkholes.ingresses.list({account_or_zone:u,account_or_zone_id:d,sinkhole_id:t[`sinkhole-id`]}));o(f,{successLabel:`Loaded`})})};function $(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 Ye={command:`update <ingress-id>`,describe:`Update an ingress rule`,builder:$,handler:async e=>l({command:`intel sinkholes ingresses update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({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?d({cidr:f(e.cidr,`cidr`,`text`)}):u(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body),i=await c(`Updating`,async()=>t.intel.sinkholes.ingresses.update({body:n,zone_id:r,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));o(i,{successLabel:`Updated`});return}e.cidr===void 0&&(e.cidr=await m(`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 a=d({cidr:f(e.cidr,`cidr`,`text`)}),l=await c(`Updating`,async()=>t.intel.sinkholes.ingresses.update({body:a,zone_id:r,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));o(l,{successLabel:`Updated`})})},Xe={command:`ingresses`,describe:`Operations for sinkholes.ingresses`,builder:e=>e.command(He).command(We).command(Ke).command(Je).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ze(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 Qe={command:`list`,describe:`List sinkholes owned by this account`,builder:Ze,handler:async t=>l({command:`intel sinkholes list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({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 i=await n(t),l=t.local?e:await a();t.accountId=l;let u=await c(`Loading`,async()=>i.intel.sinkholes.list({account_id:l}));o(u,{successLabel:`Loaded`})})};function $e(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 et={command:`update <sinkhole-id>`,describe:`Update a sinkhole`,builder:$e,handler:async t=>l({command:`intel sinkholes update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();s({command:`cf intel sinkholes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/sinkholes/${t[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(t[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(t[`sinkhole-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({name:f(t.name,`name`,`text`),r2_bucket:f(t[`r2-bucket`],`r2-bucket`,`text`),r2_id:f(t[`r2-id`],`r2-id`,`text`),r2_secret:f(t[`r2-secret`],`r2-secret`,`text`)}):u(t.body)});return}let i=await n(t),l=t.local?e:await a();if(t.accountId=l,t.body){let e=u(t.body),n=await c(`Updating`,async()=>i.intel.sinkholes.update({body:e,account_id:l,sinkhole_id:t[`sinkhole-id`]}));o(n,{successLabel:`Updated`});return}t.name===void 0&&(t.name=await m(`name`,`The name of the sinkhole.`));let p=d({name:f(t.name,`name`,`text`),r2_bucket:f(t[`r2-bucket`],`r2-bucket`,`text`),r2_id:f(t[`r2-id`],`r2-id`,`text`),r2_secret:f(t[`r2-secret`],`r2-secret`,`text`)}),h=await c(`Updating`,async()=>i.intel.sinkholes.update({body:p,account_id:l,sinkhole_id:t[`sinkhole-id`]}));o(h,{successLabel:`Updated`})})},tt={command:`sinkholes`,describe:`Operations for sinkholes`,builder:e=>e.command(Ie).command(Re).command(Be).command(Qe).command(et).command(Xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function nt(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 rt={command:`get`,describe:`Get URL Intelligence`,builder:nt,handler:async t=>l({command:`intel urls get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={url:t.url};if(t.dryRun){let e=await r();s({command:`cf intel urls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/url`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.urls.get({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},it={command:`urls`,describe:`Operations for urls`,builder:e=>e.command(rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function at(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 ot={command:`get`,describe:`Get WHOIS Record`,builder:at,handler:async t=>l({command:`intel whois get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={domain:t.domain};if(t.dryRun){let e=await r();s({command:`cf intel whois get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/whois`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await a();t.accountId=u;let d=await c(`Loading`,async()=>l.intel.whois.get({account_id:u,...i}));o(d,{successLabel:`Loaded`})})},st={command:`whois`,describe:`WHOIS registration data for domains including registrant, registrar, and nameservers`,builder:e=>e.command(ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ct={command:`intel`,describe:`Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds`,builder:e=>e.command(S).command(L).command(B).command(U).command(Y).command(Te).command(Oe).command(je).command(Pe).command(tt).command(it).command(st).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ct as default};
|
package/dist/ips-BRt68epr.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-CAWalgW0.mjs";import{t}from"./output-BOe-3AQG.mjs";import{t as n}from"./dry-run-DRj2_uV3.mjs";import{t as r}from"./progress-CQqDtgmF.mjs";import{t as i}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";function a(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 o={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:a,handler:async a=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={networks:a.networks};if(a.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let o=await e(a),s=await r(`Loading`,async()=>o.ips.list(i));t(s,{successLabel:`Loaded`})})},s={command:`ips`,describe:`ips`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
|
package/dist/k2-_eq5ZY2t.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-C8FyienX.mjs";function p(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 m={command:`create`,describe:`Create K2 stream`,builder:p,handler:async f=>s({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=await n();a({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({http:{authentication:f[`http-authentication`],cors:{origins:f[`http-cors-origins`]},enabled:f[`http-enabled`]},name:u(f.name,`name`,`text`),retention_seconds:f[`retention-seconds`],worker_binding:{enabled:f[`worker-binding-enabled`]}}):c(f.body)});return}let s=await t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.k2.streams.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`Specifies the name of the K2 stream.`));let m=l({http:{authentication:f[`http-authentication`],cors:{origins:f[`http-cors-origins`]},enabled:f[`http-enabled`]},name:u(f.name,`name`,`text`),retention_seconds:f[`retention-seconds`],worker_binding:{enabled:f[`worker-binding-enabled`]}}),h=await o(`Creating`,async()=>s.k2.streams.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function h(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 g={command:`delete <stream-id>`,describe:`Delete K2 stream`,builder:h,handler:async c=>s({command:`k2 streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf k2 streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
5
|
-
`);return}let u=await o(`Deleting`,async()=>s.k2.streams.delete({account_id:l,stream_id:c[`stream-id`]}));i(u,{successLabel:`Deleted`})})};function _(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 v={command:`get <stream-id>`,describe:`Get K2 stream`,builder:_,handler:async c=>s({command:`k2 streams get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf k2 streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.k2.streams.get({account_id:l,stream_id:c[`stream-id`]}));i(u,{successLabel:`Loaded`})})};function y(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 b={command:`list`,describe:`List K2 streams`,builder:y,handler:async c=>s({command:`k2 streams list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={name:c.name,page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf k2 streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.k2.streams.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function x(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 S={command:`list`,describe:`List K2 stream subscriptions`,builder:x,handler:async c=>s({command:`k2 streams subscriptions list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf k2 streams subscriptions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}/subscriptions`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.k2.streams.subscriptions.list({account_id:l,stream_id:c[`stream-id`]}));i(u,{successLabel:`Loaded`})})},C={command:`subscriptions`,describe:`Subscriptions that consume a K2 stream, with committed-position lag`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(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 T={command:`update <stream-id>`,describe:`Update K2 stream`,builder:w,handler:async u=>s({command:`k2 streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},u,async()=>{if(u.dryRun){let e=await n();a({command:`cf k2 streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams/${u[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(u[`stream-id`]))}`,pathParams:{"stream-id":String(u[`stream-id`]??``)},bodyKind:`json`,body:u.body===void 0?l({http:{authentication:u[`http-authentication`],cors:{origins:u[`http-cors-origins`]},enabled:u[`http-enabled`]},retention_seconds:u[`retention-seconds`],worker_binding:{enabled:u[`worker-binding-enabled`]}}):c(u.body)});return}let s=await t(u),d=u.local?e:await r();if(u.accountId=d,u.body){let e=c(u.body),t=await o(`Updating`,async()=>s.k2.streams.update({...e,account_id:d,stream_id:u[`stream-id`]}));i(t,{successLabel:`Updated`});return}let f=l({http:{authentication:u[`http-authentication`],cors:{origins:u[`http-cors-origins`]},enabled:u[`http-enabled`]},retention_seconds:u[`retention-seconds`],worker_binding:{enabled:u[`worker-binding-enabled`]}}),p=await o(`Updating`,async()=>s.k2.streams.update({...f,account_id:d,stream_id:u[`stream-id`]}));i(p,{successLabel:`Updated`})})},E={command:`streams`,describe:`K2 streams, their retention, and the HTTP and Workers binding inputs used to produce records`,builder:e=>e.command(m).command(g).command(v).command(b).command(T).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},D={command:`k2`,describe:`Durable, ordered event streams that you produce records to and consume from with subscriptions`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{D as default};
|