cf 1.0.0-beta.13 → 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 +5039 -2465
- package/dist/_meta/hand-written-commands.json +375 -22
- package/dist/_meta/schemas.json +2607 -1038
- package/dist/abuse-reports-CnQBtN1G.mjs +24 -0
- package/dist/access-BzmXSwzj.mjs +2 -0
- 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-pNQrX_9O.mjs → auth-token-DkkYg4DP.mjs} +1 -1
- package/dist/{autoconfig-sD7Frryg.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-HmSXqjGn.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-C1_SEtRK.mjs → chunk-DSGVRFIS-C5SqiTOz.mjs} +1 -1
- package/dist/{cli-DeJc9U8z.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--1Ws1RJy.mjs → cloudflared-By8BzYXc.mjs} +1 -1
- package/dist/cloudforce-one-J-rU6k1U.mjs +405 -0
- package/dist/{command-Dh7RmjFu.mjs → command-0BOb1pgV.mjs} +1 -1
- package/dist/{command-DUhX8Dcr.mjs → command-BCJN-ZM2.mjs} +1 -1
- package/dist/{command-BvfKhMl7.mjs → command-BG-kLOnS.mjs} +1 -1
- package/dist/{command-Cu7dcaHT.mjs → command-BIsI-mMX.mjs} +1 -1
- package/dist/{command-83uVfXh9.mjs → command-BKDbbA-L.mjs} +1 -1
- package/dist/command-BWQIKu6I.mjs +2 -0
- package/dist/{command-D3fyhdy-.mjs → command-Bdy69UFU.mjs} +1 -1
- package/dist/{command-BDe67N_n.mjs → command-Bgb-3yPg.mjs} +1 -1
- package/dist/{command-_rqD0hXF.mjs → command-C6w1OdoC.mjs} +1 -1
- package/dist/{command-oNVwyjGB.mjs → command-CKW6UhTh.mjs} +1 -1
- package/dist/{command-Bpzp8Mz2.mjs → command-DCQgsd2U.mjs} +1 -1
- package/dist/{command-CcuLC6CJ.mjs → command-DIs-Nqtl.mjs} +1 -1
- package/dist/command-DPn5ANHs.mjs +2 -0
- package/dist/{command-CG6RvZs0.mjs → command-DZfKHiru.mjs} +1 -1
- package/dist/{command-BlIb6RR2.mjs → command-DppVezAB.mjs} +1 -1
- package/dist/{completions-D06AO7A8.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-q7UaYK69.mjs → context-A6T-NKPI.mjs} +2 -2
- package/dist/cps-1BoOLtTq.mjs +6 -0
- 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-DujBmzLa.mjs +94 -0
- 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-Cc0_2QlW.mjs → deploy-input-BqJ7GVZ-.mjs} +1 -1
- package/dist/{deploy-CWNm1-5v.mjs → deploy-wNujfGUJ.mjs} +1 -1
- package/dist/{dev-ZA8itQE7.mjs → dev-EtnMYA7K.mjs} +1 -1
- package/dist/diagnostics-B3TYPVRi.mjs +15 -0
- package/dist/dist-DZRTPMMA.mjs +449 -0
- 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/hand-written-dry-run-B82fRl2N.mjs +2 -0
- package/dist/healthchecks-C3ScnKss.mjs +22 -0
- package/dist/{hostnames-sF999-6H.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-1w_mcgk3.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-BDiIwpss.mjs → lazy-command-CaZ1kdlW.mjs} +1 -1
- package/dist/leaked-credential-checks-Bsi2WpSU.mjs +18 -0
- package/dist/load-balancers-0gXZNCeI.mjs +76 -0
- package/dist/{local-DlT72Xpn.mjs → local-Dil4fTWX.mjs} +1 -1
- package/dist/local-DxWDQDnG.mjs +2 -0
- package/dist/{local-runtime-CokO6qaX.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-mspHHU5U.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-CkBtOOf8.mjs +54 -0
- 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-DrQLcbkq.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-CHowrQsZ.mjs → registry-CRnk93ur.mjs} +1 -1
- package/dist/reporting-3kDVF5c8.mjs +14 -0
- package/dist/{request-headers-DiJeDAn1.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-BvHwWWUX.mjs → run-DASYqJsY.mjs} +1 -1
- package/dist/{schema-elj12WOx.mjs → schema-S3pUZwpI.mjs} +1 -1
- package/dist/{schema-flags-BzoBGPWk.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-IysxuTNW.mjs → spawn-DQttFH05.mjs} +1 -1
- package/dist/spectrum-Bs2g1BmK.mjs +83 -0
- 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-CdJWgNjd.mjs → startup-profile-BOaseXnO.mjs} +1 -1
- package/dist/startup-profile-BwEZFVGS.mjs +2 -0
- package/dist/{state-BDSvdSdP.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-CA1xMM96.mjs → tags-3Hq-B9qp.mjs} +2 -2
- package/dist/{telemetry-Cm39QJ-M.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-CThOI3qH.mjs +29 -0
- 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-CMXSdres.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-CdKzIuSi.mjs +112 -0
- 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-BNR1HvAP.mjs +53 -0
- 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 +17 -20
- package/dist/Page-BShsqCXr.mjs +0 -2
- package/dist/abuse-reports-BjU1s8cf.mjs +0 -24
- package/dist/access-C_G2MZnA.mjs +0 -2
- package/dist/account-tags-CaXDDeZ4.mjs +0 -15
- package/dist/accounts-BALwxDQY.mjs +0 -131
- package/dist/acm-CP9EaXQN.mjs +0 -15
- package/dist/addressing-DRlaxqrI.mjs +0 -93
- package/dist/agent-memory-vGhlfZBx.mjs +0 -34
- package/dist/ai-CJtbWfB9.mjs +0 -31
- package/dist/ai-audit-C0BJNqZZ.mjs +0 -6
- package/dist/ai-gateway-BQtv3U3x.mjs +0 -80
- package/dist/ai-search-DGU1Y5By.mjs +0 -79
- package/dist/ai-security-CFTaYk_X.mjs +0 -10
- package/dist/alerting-1hun27JC.mjs +0 -56
- package/dist/analytics-DXUSjvzT.mjs +0 -17
- package/dist/analytics_engine-CQsnL09C.mjs +0 -4
- package/dist/api-security-BXhrfR6-.mjs +0 -154
- package/dist/argo-LPUCTnee.mjs +0 -14
- package/dist/args-CfbYkeXd.mjs +0 -2
- package/dist/artifacts-Dt6easua.mjs +0 -43
- package/dist/audit-logs-CVznAM2Z.mjs +0 -4
- package/dist/auth-CGLsxbc6.mjs +0 -2
- package/dist/auth-CrmVwfpJ.mjs +0 -2
- package/dist/auth-eQr-kQCH.mjs +0 -2
- package/dist/banner-D03JEqRs.mjs +0 -2
- package/dist/basin-catalog-ZQICw-zF.mjs +0 -46
- package/dist/billing-Dy1-dV_B.mjs +0 -23
- package/dist/bot-management-DTgPwL7O.mjs +0 -9
- package/dist/botnet-feed-xb98Cj3Y.mjs +0 -11
- package/dist/brand-protection-Ck3okE2k.mjs +0 -27
- package/dist/browser-run-DJGJSzFX.mjs +0 -42
- package/dist/build-B1L6xrgC.mjs +0 -2
- package/dist/builds-CYxcZtkG.mjs +0 -71
- package/dist/cache-D9tSfovH.mjs +0 -45
- package/dist/certificate-authorities-CpiveTFC.mjs +0 -6
- package/dist/cf-BxsXrVeh.mjs +0 -18
- package/dist/chunk-NDZDTP46-Bjx_wtJe.mjs +0 -361
- package/dist/cli-types-9oYmRTHJ.mjs +0 -2
- package/dist/client-certificates-CF6YZyvP.mjs +0 -13
- package/dist/client-side-security-BLoe9kS5.mjs +0 -63
- package/dist/cloud-connector-DXRUHsjt.mjs +0 -6
- package/dist/cloudforce-one-CBLxXi6v.mjs +0 -447
- package/dist/command-DwXiDOeH.mjs +0 -2
- package/dist/command-UiHLJ8Ji.mjs +0 -2
- package/dist/connector-interrupts-DelTmNyw.mjs +0 -6
- package/dist/connector-telemetry-events-BwxR3G8d.mjs +0 -6
- package/dist/connector-telemetry-snapshots-Bqq-hrpJ.mjs +0 -6
- package/dist/connectors-D-m3rEpk.mjs +0 -15
- package/dist/containers-CVNfEjJs.mjs +0 -78
- package/dist/containers-DeoZyeQe.mjs +0 -375
- package/dist/content-scan-W0BNzbQp.mjs +0 -14
- package/dist/cps-BZ6hqRb5.mjs +0 -6
- package/dist/csamScanner-Bo1t3CLh.mjs +0 -10
- package/dist/ct-alerting-E03faC7p.mjs +0 -5
- package/dist/custom-certificates-CUySSPzi.mjs +0 -17
- package/dist/custom-csrs-gNpWkJPQ.mjs +0 -11
- package/dist/custom-hostnames-abGBAbx7.mjs +0 -27
- package/dist/custom-nameservers-BgNXol1P.mjs +0 -9
- package/dist/custom-pages-DMKX3aoD.mjs +0 -21
- package/dist/d1-CE08YqYk.mjs +0 -93
- package/dist/dcv-delegation-B5YUEWu0.mjs +0 -4
- package/dist/deploy-context-Dr6bxNcB.mjs +0 -56
- package/dist/diagnostics-UMbG6m4n.mjs +0 -15
- package/dist/dist-BHEmAAHr.mjs +0 -487
- package/dist/dls-DIl16mLp.mjs +0 -17
- package/dist/dns-QUpgljRG.mjs +0 -144
- package/dist/dns-firewall-BZwJXHLj.mjs +0 -71
- package/dist/durable-objects-BCj4ykpU.mjs +0 -6
- package/dist/email-auth-DlHIYhCk.mjs +0 -6
- package/dist/email-routing-UKVS4DYy.mjs +0 -45
- package/dist/email-security-CZjfRIg0.mjs +0 -158
- package/dist/email-sending-Dquc880C.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-BbwDRquU.mjs +0 -9
- package/dist/firewall--mTfDnCJ.mjs +0 -36
- package/dist/flagship-cfoSwwM9.mjs +0 -28
- package/dist/fraud-Dcsq3EYK.mjs +0 -22
- package/dist/google-tag-gateway-DPKSkZQi.mjs +0 -6
- package/dist/healthchecks-D78hIIBC.mjs +0 -22
- package/dist/hyperdrive-qWACKfA4.mjs +0 -37
- package/dist/iam-Bvg_PayW.mjs +0 -52
- package/dist/images-DI_lEZ4L.mjs +0 -71
- package/dist/intel-BxElBUMP.mjs +0 -76
- package/dist/ips-DWoaKxi7.mjs +0 -4
- package/dist/k2-tFjaftl-.mjs +0 -11
- package/dist/keyless-certificates-BrvxHU4J.mjs +0 -13
- package/dist/keys-DcwTYKRf.mjs +0 -4
- package/dist/kv-htXS-7uP.mjs +0 -15
- package/dist/leaked-credential-checks-bvGrLOmQ.mjs +0 -18
- package/dist/load-balancers-BNTUt4yG.mjs +0 -76
- package/dist/local-DlDumOSC.mjs +0 -2
- package/dist/login-BGF_I_LT.mjs +0 -5
- package/dist/login-Ccw-mYwT.mjs +0 -2
- package/dist/logo-matches-tE8LTKgg.mjs +0 -6
- package/dist/logos-Bj845Mcw.mjs +0 -7
- package/dist/logpush-Cs8JdvKi.mjs +0 -46
- package/dist/logs-C92XZvNu.mjs +0 -36
- package/dist/magic-cloud-networking-hNp5MMw-.mjs +0 -71
- package/dist/magic-network-monitoring-68GuWAnv.mjs +0 -36
- package/dist/magic-transit-DNd7gu4j.mjs +0 -383
- package/dist/managed-defense-B_wCAuFD.mjs +0 -18
- package/dist/managed-transforms-DZdxHPOh.mjs +0 -9
- package/dist/matches-B65CkflD.mjs +0 -6
- package/dist/mcp-DrJW5ayK.mjs +0 -32
- package/dist/mesh-DfVzYTn1.mjs +0 -26
- package/dist/monetization-BGaI8CMO.mjs +0 -20
- package/dist/mtls-certificates-BsU2emDD.mjs +0 -13
- package/dist/network-BEMD8P0U.mjs +0 -50
- package/dist/network-interconnects-DMu_fcbo.mjs +0 -68
- package/dist/o11y-C1a4gDGF.mjs +0 -93
- package/dist/oauth-Bj5Ne1o8.mjs +0 -9
- package/dist/oauth-clients-p4Etdqy_.mjs +0 -16
- package/dist/oauth-scopes-B2IabFza.mjs +0 -4
- package/dist/organization-CdXt7AVZ.mjs +0 -75
- package/dist/organizations-5S6xEp7T.mjs +0 -4
- package/dist/origin-ca-certificates-_VJAoK1D.mjs +0 -11
- package/dist/origin-post-quantum-encryption-GcldDsT2.mjs +0 -6
- package/dist/origin-tls-client-auth-DZHld9fA.mjs +0 -30
- package/dist/output-BOe-3AQG.mjs +0 -2
- package/dist/page-rules-o1tAMMsD.mjs +0 -39
- package/dist/pages-CmiOhjSl.mjs +0 -54
- package/dist/pay-per-crawl-BsnOxGYU.mjs +0 -38
- package/dist/pay-per-use-BXWMCSyE.mjs +0 -33
- package/dist/pipelines-DWLQC0F6.mjs +0 -44
- package/dist/precursor-B6DjBib6.mjs +0 -4
- package/dist/previews-dUKEBGSM.mjs +0 -4
- package/dist/progress-BtkTVcHI.mjs +0 -2
- package/dist/prompt-RlgRrmbm.mjs +0 -3
- package/dist/queries-yLwoJRHV.mjs +0 -9
- package/dist/queues-CnJRaE1o.mjs +0 -57
- package/dist/r2-CuC6-zQX.mjs +0 -128
- package/dist/raw-fetch-B4NvWuZD.mjs +0 -2
- package/dist/realtime-CjsnzHxD.mjs +0 -172
- package/dist/registrar-BgOsxTnX.mjs +0 -43
- package/dist/registrar-sandbox-3ikBD9fB.mjs +0 -56
- package/dist/reporting-hE127s5r.mjs +0 -14
- package/dist/request-tracers-BCwLxmPN.mjs +0 -4
- package/dist/resolve-CaTBV-c6.mjs +0 -2
- package/dist/resolve-DCGSzUDQ.mjs +0 -2
- package/dist/resource-sharing-2qvWUuMa.mjs +0 -40
- package/dist/resource-tagging-Dwx7iL3v.mjs +0 -4
- package/dist/rules-DxVQ6jIg.mjs +0 -18
- package/dist/rulesets-Cdh8YjI9.mjs +0 -37
- package/dist/rum-a4CMq4Qu.mjs +0 -30
- package/dist/run-CkbrPJPx.mjs +0 -2
- package/dist/scim-B8XlXl8v.mjs +0 -18
- package/dist/secrets-store-Cqhedh_i.mjs +0 -24
- package/dist/security-insights-le2-DteL.mjs +0 -40
- package/dist/security-txt-cCArWXur.mjs +0 -9
- package/dist/session-C1BhT1ZJ.mjs +0 -2
- package/dist/shared-BPjcpXuA.mjs +0 -2
- package/dist/smart-shield-Csyh8hwB.mjs +0 -24
- package/dist/snippets-DUWx25q6.mjs +0 -20
- package/dist/spectrum-Da3UYSOR.mjs +0 -83
- package/dist/speed-NxlMnB2e.mjs +0 -24
- package/dist/sql-CNdHAlQ8.mjs +0 -4
- package/dist/src-JfLDUxFr.mjs +0 -125
- package/dist/ssl-BtaX2WEJ.mjs +0 -45
- package/dist/startup-profile-B2l0ChVu.mjs +0 -2
- package/dist/state-JB4_BU1o.mjs +0 -2
- package/dist/stream-C1Ijjzn4.mjs +0 -102
- package/dist/submit-MdkuU_Pt.mjs +0 -4
- package/dist/telemetry-BsYO3nxG.mjs +0 -2
- package/dist/tenant-BB6Oszcl.mjs +0 -10
- package/dist/tenant-custom-nameservers-BsbgYAEo.mjs +0 -9
- package/dist/theme-CQ_TYifs.mjs +0 -6
- package/dist/tunnels-CRFtyHWz.mjs +0 -29
- package/dist/turnstile-DBXWo_Xe.mjs +0 -33
- package/dist/ui-YmjF66Ct.mjs +0 -5
- package/dist/update-check-C2oVEbXx.mjs +0 -2
- package/dist/url-info-t-XAs0Mk.mjs +0 -4
- package/dist/url-normalization-Cs4F8e0a.mjs +0 -9
- package/dist/url-scanner-CBIoDbTx.mjs +0 -16
- package/dist/user-CevdOMoa.mjs +0 -112
- package/dist/values-CjNlkbIh.mjs +0 -4
- package/dist/vectorize-9d9tPmg5.mjs +0 -32
- package/dist/version-BdVUXLnK.mjs +0 -2
- package/dist/waiting-rooms--5WmrWb3.mjs +0 -53
- package/dist/web-assets-BHot_MU8.mjs +0 -64
- package/dist/web3-CYfWAF6b.mjs +0 -28
- package/dist/workers-S17M0n3h.mjs +0 -40
- package/dist/workers-builds-Dw7ho3So.mjs +0 -14
- package/dist/workers-for-platforms-A3yjyLh3.mjs +0 -40
- package/dist/workers-vpc-BZ2xXtC3.mjs +0 -13
- package/dist/workflows-BgGrVpSR.mjs +0 -43
- package/dist/zaraz-BsD2dMI3.mjs +0 -22
- package/dist/zero-trust-CA3iGQbG.mjs +0 -837
- package/dist/zone-D2M4EZD0.mjs +0 -4
- package/dist/zones-BoOC_JzC.mjs +0 -124
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./lazy-command-CaZ1kdlW.mjs";import"./api-eMuS5GI1.mjs";import{t}from"./path-DRw6Y-nd.mjs";import{t as n}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as r}from"./local-Dil4fTWX.mjs";import{n as i}from"./auth-C6u9qIGO.mjs";import{a,t as o}from"./context-A6T-NKPI.mjs";import{t as s}from"./output-Co4xdFf6.mjs";import{t as c}from"./dry-run-C2KjGX10.mjs";import{t as l}from"./progress-D5po7ScB.mjs";import{t as u}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-BAJpE3jV.mjs";import{t as g}from"./create-OXylMu6m.mjs";import{t as _}from"./get-iPUHxD1r.mjs";var v={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/configurations`};function y(e){return e.usage(`$0 tunnels config get <tunnel-id>
|
|
3
|
+
|
|
4
|
+
Retrieves the configuration for a remotely managed Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <tunnel-id>`,describe:`Get Tunnel configuration`,builder:y,handler:async e=>u({command:`tunnels config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(v,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})};var b={method:`PUT`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/configurations`,body:`json`};function x(e){return e.usage(`$0 tunnels config update <tunnel-id>
|
|
5
|
+
|
|
6
|
+
Replaces the configuration for a remotely managed Cloudflare Tunnel, including its ingress rules and origin request settings.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`config-origin-request-access-aud-tag`,{type:`string`,array:!0,description:`Access applications that are allowed to reach this hostname for this Tunnel. Audience tags can be identified in the dashboard or via the List Access policies API.`}).option(`config-origin-request-access-required`,{type:`boolean`,description:`Deny traffic that has not fulfilled Access authorization.`}).option(`config-origin-request-access-team-name`,{type:`string`,description:`The config.originRequest.access.teamName field`}).option(`config-origin-request-ca-pool`,{type:`string`,description:`Path to the certificate authority (CA) for the certificate of your origin. This option should be used only if your certificate is not signed by Cloudflare.`}).option(`config-origin-request-connect-timeout`,{type:`number`,description:`Timeout for establishing a new TCP connection to your origin server. This excludes the time taken to establish TLS, which is controlled by tlsTimeout.`}).option(`config-origin-request-disable-chunked-encoding`,{type:`boolean`,description:`Disables chunked transfer encoding. Useful if you are running a WSGI server.`}).option(`config-origin-request-http2origin`,{type:`boolean`,description:`Attempt to connect to origin using HTTP2. Origin must be configured as https.`}).option(`config-origin-request-http-host-header`,{type:`string`,description:`Sets the HTTP Host header on requests sent to the local service.`}).option(`config-origin-request-keep-alive-connections`,{type:`number`,description:`Maximum number of idle keepalive connections between Tunnel and your origin. This does not restrict the total number of concurrent connections.`}).option(`config-origin-request-keep-alive-timeout`,{type:`number`,description:`Timeout after which an idle keepalive connection can be discarded.`}).option(`config-origin-request-match-snito-host`,{type:`boolean`,description:`Auto configure the Hostname on the origin server certificate.`}).option(`config-origin-request-no-happy-eyeballs`,{type:`boolean`,description:`Disable the “happy eyeballs” algorithm for IPv4/IPv6 fallback if your local network has misconfigured one of the protocols.`}).option(`config-origin-request-no-tlsverify`,{type:`boolean`,description:`Disables TLS verification of the certificate presented by your origin. Will allow any certificate from the origin to be accepted.`}).option(`config-origin-request-origin-server-name`,{type:`string`,description:`Hostname that cloudflared should expect from your origin server certificate.`}).option(`config-origin-request-proxy-type`,{type:`string`,description:`cloudflared starts a proxy server to translate HTTP traffic into TCP when proxying, for example, SSH or RDP. This configures what type of proxy will be started. Valid options are: "" for the regular proxy and "socks" for a SOCKS5 proxy.
|
|
7
|
+
`}).option(`config-origin-request-tcp-keep-alive`,{type:`number`,description:`The timeout after which a TCP keepalive packet is sent on a connection between Tunnel and the origin server.`}).option(`config-origin-request-tls-timeout`,{type:`number`,description:`Timeout for completing a TLS handshake to your origin server, if you have chosen to connect Tunnel to an HTTPS server.`}).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([`config-origin-request-access-aud-tag`,`config-origin-request-access-required`,`config-origin-request-access-team-name`,`config-origin-request-ca-pool`,`config-origin-request-connect-timeout`,`config-origin-request-disable-chunked-encoding`,`config-origin-request-http2origin`,`config-origin-request-http-host-header`,`config-origin-request-keep-alive-connections`,`config-origin-request-keep-alive-timeout`,`config-origin-request-match-snito-host`,`config-origin-request-no-happy-eyeballs`,`config-origin-request-no-tlsverify`,`config-origin-request-origin-server-name`,`config-origin-request-proxy-type`,`config-origin-request-tcp-keep-alive`,`config-origin-request-tls-timeout`].some(t=>e[t]!==void 0)){let t=[`config-origin-request-access-aud-tag`,`config-origin-request-access-team-name`].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 --config-* flag is set`)}return!0})}const S={command:`update <tunnel-id>`,describe:`Update Tunnel configuration`,builder:x,handler:async e=>u({command:`tunnels config update`,classification:{safeFlags:[`config-origin-request-access-required`,`config-origin-request-disable-chunked-encoding`,`config-origin-request-http2origin`,`config-origin-request-match-snito-host`,`config-origin-request-no-happy-eyeballs`,`config-origin-request-no-tlsverify`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({config:{originRequest:{access:{audTag:e[`config-origin-request-access-aud-tag`],required:e[`config-origin-request-access-required`],teamName:p(e[`config-origin-request-access-team-name`],`config-origin-request-access-team-name`,`text`)},caPool:p(e[`config-origin-request-ca-pool`],`config-origin-request-ca-pool`,`text`),connectTimeout:e[`config-origin-request-connect-timeout`],disableChunkedEncoding:e[`config-origin-request-disable-chunked-encoding`],http2Origin:e[`config-origin-request-http2origin`],httpHostHeader:p(e[`config-origin-request-http-host-header`],`config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`config-origin-request-match-snito-host`],noHappyEyeballs:e[`config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`config-origin-request-no-tlsverify`],originServerName:p(e[`config-origin-request-origin-server-name`],`config-origin-request-origin-server-name`,`text`),proxyType:p(e[`config-origin-request-proxy-type`],`config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`config-origin-request-tcp-keep-alive`],tlsTimeout:e[`config-origin-request-tls-timeout`]}}}):d(e.body)});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=d(e.body),i=await l(`Updating`,async()=>t.send(b,{body:r,account_id:n,tunnel_id:e[`tunnel-id`]}));s(i,{successLabel:`Updated`});return}let u=f({config:{originRequest:{access:{audTag:e[`config-origin-request-access-aud-tag`],required:e[`config-origin-request-access-required`],teamName:p(e[`config-origin-request-access-team-name`],`config-origin-request-access-team-name`,`text`)},caPool:p(e[`config-origin-request-ca-pool`],`config-origin-request-ca-pool`,`text`),connectTimeout:e[`config-origin-request-connect-timeout`],disableChunkedEncoding:e[`config-origin-request-disable-chunked-encoding`],http2Origin:e[`config-origin-request-http2origin`],httpHostHeader:p(e[`config-origin-request-http-host-header`],`config-origin-request-http-host-header`,`text`),keepAliveConnections:e[`config-origin-request-keep-alive-connections`],keepAliveTimeout:e[`config-origin-request-keep-alive-timeout`],matchSNItoHost:e[`config-origin-request-match-snito-host`],noHappyEyeballs:e[`config-origin-request-no-happy-eyeballs`],noTLSVerify:e[`config-origin-request-no-tlsverify`],originServerName:p(e[`config-origin-request-origin-server-name`],`config-origin-request-origin-server-name`,`text`),proxyType:p(e[`config-origin-request-proxy-type`],`config-origin-request-proxy-type`,`text`),tcpKeepAlive:e[`config-origin-request-tcp-keep-alive`],tlsTimeout:e[`config-origin-request-tls-timeout`]}}}),m=await l(`Updating`,async()=>t.send(b,{body:u,account_id:n,tunnel_id:e[`tunnel-id`]}));s(m,{successLabel:`Updated`})})},C={command:`config`,describe:`Operations for config`,builder:e=>e.command(ee).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var w={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/connections`,query:[`client_id`]};function T(e){return e.usage(`$0 tunnels connections cleanup <tunnel-id>
|
|
8
|
+
|
|
9
|
+
Removes a connection (aka Cloudflare Tunnel Connector) from a Cloudflare Tunnel independently of its current state. If no connector id (client_id) is provided all connectors will be removed. We recommend running this command after rotating tokens.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`client-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`cleanup <tunnel-id>`,describe:`Clean up Cloudflare Tunnel connections`,builder:T,handler:async e=>u({command:`tunnels connections cleanup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={client_id:e[`client-id`]};if(e.dryRun){let n=await a();c({command:`cf tunnels connections cleanup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},query:t,bodyKind:`none`});return}let n=await i(e),u=e.local?r:await o();if(e.accountId=u,!await h({force:!!e.force,message:`This operation removes Cloudflare Tunnel connections.`})){process.stderr.write(`Aborted.
|
|
10
|
+
`);return}let d=await l(`Deleting`,async()=>n.send(w,{account_id:u,tunnel_id:e[`tunnel-id`],...t}));s(d,{successLabel:`Deleted`})})};var D={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/connections`};function O(e){return e.usage(`$0 tunnels connections list
|
|
11
|
+
|
|
12
|
+
Lists the connections for a Cloudflare Tunnel, including connector IDs, cloudflared versions, and Cloudflare locations.`).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List Cloudflare Tunnel connections`,builder:O,handler:async e=>u({command:`tunnels connections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(D,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})},A={command:`connections`,describe:`Operations for connections`,builder:e=>e.command(E).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}/connectors/${e.connector_id}`};function M(e){return e.usage(`$0 tunnels connectors get <connector-id>
|
|
13
|
+
|
|
14
|
+
Retrieves a connector and its connection details for a Cloudflare Tunnel, including its cloudflared version, architecture, and connected Cloudflare locations.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get <connector-id>`,describe:`Get Cloudflare Tunnel connector`,builder:M,handler:async e=>u({command:`tunnels connectors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``),"connector-id":String(e[`connector-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(j,{account_id:n,tunnel_id:e[`tunnel-id`],connector_id:e[`connector-id`]}));s(u,{successLabel:`Loaded`})})},P={command:`connectors`,describe:`Operations for connectors`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel`,body:`json`};function I(e){return e.usage(`$0 tunnels create
|
|
15
|
+
|
|
16
|
+
Creates a remotely or locally managed Cloudflare Tunnel in an account. After creation, retrieve its token and run cloudflared to establish the connector connection.`).option(`config-source`,{type:`string`,description:"Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.",choices:[`local`,`cloudflare`],default:`local`}).coerce(`config-source`,e=>p(e,`config-source`,`text`)).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).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 L={command:`create`,describe:`Create a Cloudflare Tunnel`,builder:I,handler:async e=>u({command:`tunnels create`,classification:{safeFlags:[`config-source`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({config_src:e[`config-source`],name:p(e.name,`name`,`text`),tunnel_secret:p(e[`tunnel-secret`],`tunnel-secret`,`text`)}):d(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=d(e.body),i=await l(`Creating`,async()=>t.send(F,{body:r,account_id:n}));s(i,{successLabel:`Created`});return}e.name===void 0&&(e.name=await m(`name`,`A user-friendly name for a tunnel.`));let u=f({config_src:e[`config-source`],name:p(e.name,`name`,`text`),tunnel_secret:p(e[`tunnel-secret`],`tunnel-secret`,`text`)}),h=await l(`Creating`,async()=>t.send(F,{body:u,account_id:n}));s(h,{successLabel:`Created`})})};var R={method:`DELETE`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}`};function z(e){return e.usage(`$0 tunnels delete <tunnel-id>
|
|
17
|
+
|
|
18
|
+
Permanently deletes a Cloudflare Tunnel from an account. The tunnel must have no active connections.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,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 te={command:`delete <tunnel-id>`,describe:`Delete a Cloudflare Tunnel`,builder:z,handler:async e=>u({command:`tunnels delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,!await h({force:!!e.force,message:`This operation permanently deletes a Cloudflare Tunnel.`})){process.stderr.write(`Aborted.
|
|
19
|
+
`);return}let u=await l(`Deleting`,async()=>t.send(R,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Deleted`})})};var B={method:`PATCH`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}`,body:`json`};function V(e){return e.usage(`$0 tunnels edit <tunnel-id>
|
|
20
|
+
|
|
21
|
+
Updates the name or secret of an existing Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`edit <tunnel-id>`,describe:`Update a Cloudflare Tunnel`,builder:V,handler:async e=>u({command:`tunnels edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),tunnel_secret:p(e[`tunnel-secret`],`tunnel-secret`,`text`)}):d(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=d(e.body),i=await l(`Updating`,async()=>t.send(B,{body:r,account_id:n,tunnel_id:e[`tunnel-id`]}));s(i,{successLabel:`Updated`});return}let u=f({name:p(e.name,`name`,`text`),tunnel_secret:p(e[`tunnel-secret`],`tunnel-secret`,`text`)}),m=await l(`Updating`,async()=>t.send(B,{body:u,account_id:n,tunnel_id:e[`tunnel-id`]}));s(m,{successLabel:`Updated`})})};var U={method:`GET`,path:e=>t`/accounts/${e.account_id}/cfd_tunnel/${e.tunnel_id}`};function W(e){return e.usage(`$0 tunnels get <tunnel-id>
|
|
22
|
+
|
|
23
|
+
Fetches a single Cloudflare Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel`,builder:W,handler:async e=>u({command:`tunnels get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(U,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})};var K={method:`GET`,path:e=>t`/accounts/${e.account_id}/tunnels`,query:[`name`,`is_deleted`,`existed_at`,`uuid`,`was_active_at`,`was_inactive_at`,`include_prefix`,`exclude_prefix`,`tun_types`,`status`,`per_page`,`page`]};function q(e){return e.usage(`$0 tunnels list
|
|
24
|
+
|
|
25
|
+
Lists and filters all types of Tunnels in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`tun-types`,{type:`string`,description:`The types of tunnels to filter by, separated by commas.`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`List All Tunnels`,builder:q,handler:async e=>u({command:`tunnels list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},e,async()=>{let t={name:e.name,is_deleted:e[`is-deleted`],existed_at:e[`existed-at`],uuid:e.uuid,was_active_at:e[`was-active-at`],was_inactive_at:e[`was-inactive-at`],include_prefix:e[`include-prefix`],exclude_prefix:e[`exclude-prefix`],tun_types:e[`tun-types`],status:e.status,per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await a();c({command:`cf tunnels list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tunnels`,pathParams:{},query:t,bodyKind:`none`});return}let n=await i(e),u=e.local?r:await o();e.accountId=u;let d=await l(`Loading`,async()=>n.send(K,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 tunnels management-token create <tunnel-id>
|
|
26
|
+
|
|
27
|
+
Creates a short-lived management token for the requested Tunnel management resources, such as streaming logs. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`resources`,{type:`string`,array:!0,description:`The resources 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 X={command:`create <tunnel-id>`,describe:`Get a Cloudflare Tunnel management token`,builder:Y,handler:async e=>u({command:`tunnels management-token create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels management-token create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/management`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({resources:e.resources}):d(e.body)});return}let t=await i(e),n=e.local?r:await o();if(e.accountId=n,e.body){let r=d(e.body),i=await l(`Creating`,async()=>t.send(g,{body:r,account_id:n,tunnel_id:e[`tunnel-id`]}));s(i,{successLabel:`Created`});return}if(e.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let u=f({resources:e.resources}),p=await l(`Creating`,async()=>t.send(g,{body:u,account_id:n,tunnel_id:e[`tunnel-id`]}));s(p,{successLabel:`Created`})})},Z={command:`management-token`,describe:`Operations for management-token`,builder:e=>e.command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.usage(`$0 tunnels token get <tunnel-id>
|
|
28
|
+
|
|
29
|
+
Retrieves the token used to run cloudflared and associate it with a specific Cloudflare Tunnel. Treat the token as a secret.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <tunnel-id>`,describe:`Get a Cloudflare Tunnel token`,builder:Q,handler:async e=>u({command:`tunnels token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();c({command:`cf tunnels token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cfd_tunnel/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=e.local?r:await o();e.accountId=n;let u=await l(`Loading`,async()=>t.send(_,{account_id:n,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})},re={command:`token`,describe:`Operations for token`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ie=e(`diag`,`Create a diagnostic report from a local cloudflared instance.`,()=>import(`./command-Bgb-3yPg.mjs`),{command:`tunnels diag`,recordArgs:!1}),ae=e(`login`,`Authorize cloudflared and download an origin certificate for locally managed tunnels.`,()=>import(`./command-Bdy69UFU.mjs`),{command:`tunnels login`,recordArgs:!1}),oe=e(`quick-start <url>`,`Expose a local URL with a temporary trycloudflare.com tunnel. The tunnel remains active until cf exits.`,()=>import(`./command-DZfKHiru.mjs`),{command:`tunnels quick-start`,recordArgs:!1}),$=e(`ready`,`Check the /ready endpoint exposed by a local cloudflared instance.`,()=>import(`./command-C6w1OdoC.mjs`),{command:`tunnels ready`,recordArgs:!1}),se=e(`run [tunnel]`,`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,()=>import(`./command-BWQIKu6I.mjs`),{command:`tunnels run`,recordArgs:!1}),ce=e(`tail [tunnel-id]`,`Stream logs from a remote cloudflared instance.`,()=>import(`./command-DPn5ANHs.mjs`),{command:`tunnels tail`,recordArgs:!1});const le={command:`tunnels`,describe:`tunnels`,builder:e=>e.command(L).command(te).command(n(ie,`preview`)).command(H).command(G).command(J).command(n(ae,`preview`)).command(n(oe,`preview`)).command(n($,`preview`)).command(n(se,`preview`)).command(n(ce,`preview`)).command(C).command(A).command(P).command(Z).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{le as default};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-C6u9qIGO.mjs";import{a as r,t as i}from"./context-A6T-NKPI.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-D5po7ScB.mjs";import{t as c}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-BAJpE3jV.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/challenges/widgets`,query:[`page`,`per_page`,`order`,`direction`,`filter`],body:`json`};function g(e){return e.usage(`$0 turnstile widgets create
|
|
3
|
+
|
|
4
|
+
Creates a Turnstile widget for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field. The `name` field uses case-insensitive\nsubstring matching; `sitekey` uses exact matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
|
|
5
|
+
expensive challenges in response to malicious bots (ENT only).
|
|
6
|
+
`}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
|
|
7
|
+
this setting can determine the clearance level to be set
|
|
8
|
+
`,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).coerce(`clearance-level`,e=>d(e,`clearance-level`,`text`)).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
|
|
9
|
+
`}).option(`widget-mode`,{type:`string`,description:`Widget Mode`,choices:[`non-interactive`,`invisible`,`managed`]}).coerce(`widget-mode`,e=>d(e,`widget-mode`,`text`)).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
|
|
10
|
+
set this to a meaningful string to make it easier to identify your
|
|
11
|
+
widget, and where it is used.
|
|
12
|
+
`}).option(`offlabel`,{type:`boolean`,description:`Do not show any Cloudflare branding on the widget (ENT only).
|
|
13
|
+
`}).option(`region`,{type:`string`,description:`Region where this widget can be used. This cannot be changed after creation.
|
|
14
|
+
`,choices:[`world`,`china`],default:`world`}).coerce(`region`,e=>d(e,`region`,`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 _={command:`create`,describe:`Create a Turnstile Widget`,builder:g,handler:async e=>c({command:`turnstile widgets create`,classification:{safeFlags:[`order`,`direction`,`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`widget-mode`,`offlabel`,`region`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,filter:e.filter};if(e.dryRun){let t=await r();o({command:`cf turnstile widgets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/challenges/widgets`,pathParams:{},query:c,bodyKind:`json`,body:e.body===void 0?u({bot_fight_mode:e[`bot-fight-mode`],clearance_level:e[`clearance-level`],domains:e.domains,ephemeral_id:e[`ephemeral-id`],mode:e[`widget-mode`],name:d(e.name,`name`,`text`),offlabel:e.offlabel,region:e.region}):l(e.body)});return}let m=await n(e),g=e.local?t:await i();if(e.accountId=g,e.body){let t=l(e.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Creating`,async()=>m.send(h,{body:t,account_id:g,...c}));a(n,{successLabel:`Created`});return}if(e.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);e[`widget-mode`]===void 0&&(e[`widget-mode`]=await p(`widget-mode`,`Widget Mode`,[`non-interactive`,`invisible`,`managed`])),e.name===void 0&&(e.name=await f(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let _=u({bot_fight_mode:e[`bot-fight-mode`],clearance_level:e[`clearance-level`],domains:e.domains,ephemeral_id:e[`ephemeral-id`],mode:e[`widget-mode`],name:d(e.name,`name`,`text`),offlabel:e.offlabel,region:e.region});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let v=await s(`Creating`,async()=>m.send(h,{body:_,account_id:g,...c}));a(v,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/challenges/widgets/${t.sitekey}`};function y(e){return e.usage(`$0 turnstile widgets delete <sitekey>
|
|
15
|
+
|
|
16
|
+
Deletes a Turnstile widget from an account.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <sitekey>`,describe:`Delete a Turnstile Widget`,builder:y,handler:async e=>c({command:`turnstile widgets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf turnstile widgets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/challenges/widgets/${e.sitekey==null?`<sitekey>`:encodeURIComponent(String(e.sitekey))}`,pathParams:{sitekey:String(e.sitekey??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await m({force:!!e.force})){process.stderr.write(`Aborted.
|
|
17
|
+
`);return}let u=await s(`Deleting`,async()=>c.send(v,{account_id:l,sitekey:e.sitekey}));a(u,{successLabel:`Deleted`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/challenges/widgets/${t.sitekey}`};function S(e){return e.usage(`$0 turnstile widgets get <sitekey>
|
|
18
|
+
|
|
19
|
+
Returns the configuration of a Turnstile widget.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <sitekey>`,describe:`Turnstile Widget Details`,builder:S,handler:async e=>c({command:`turnstile widgets get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf turnstile widgets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/challenges/widgets/${e.sitekey==null?`<sitekey>`:encodeURIComponent(String(e.sitekey))}`,pathParams:{sitekey:String(e.sitekey??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(x,{account_id:l,sitekey:e.sitekey}));a(u,{successLabel:`Loaded`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/challenges/widgets`,query:[`page`,`per_page`,`order`,`direction`,`filter`]};function T(e){return e.usage(`$0 turnstile widgets list
|
|
20
|
+
|
|
21
|
+
Lists Turnstile widgets for an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field. The `name` field uses case-insensitive\nsubstring matching; `sitekey` uses exact matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Turnstile Widgets`,builder:T,handler:async e=>c({command:`turnstile widgets list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,filter:e.filter};if(e.dryRun){let e=await r();o({command:`cf turnstile widgets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/challenges/widgets`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(w,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var D={method:`POST`,path:t=>e`/accounts/${t.account_id}/challenges/widgets/${t.sitekey}/rotate_secret`,body:`json`};function O(e){return e.usage("$0 turnstile widgets rotate-secret <sitekey>\n\nGenerates a new secret key for this widget. If `invalidate_immediately` is set to `false`, the previous secret remains valid for 2 hours. Note that secrets cannot be rotated again during the grace period.").positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`invalidate-immediately`,{type:`boolean`,description:"If `invalidate_immediately` is set to `false`, the previous secret will\nremain valid for two hours. Otherwise, the secret is immediately\ninvalidated, and requests using it will be rejected.\n",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 k={command:`rotate-secret <sitekey>`,describe:`Rotate Secret for a Turnstile Widget`,builder:O,handler:async e=>c({command:`turnstile widgets rotate-secret`,classification:{safeFlags:[`invalidate-immediately`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf turnstile widgets rotate-secret`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/challenges/widgets/${e.sitekey==null?`<sitekey>`:encodeURIComponent(String(e.sitekey))}/rotate_secret`,pathParams:{sitekey:String(e.sitekey??``)},bodyKind:`json`,body:e.body===void 0?u({invalidate_immediately:e[`invalidate-immediately`]}):l(e.body)});return}let c=await n(e),d=e.local?t:await i();if(e.accountId=d,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(D,{body:t,account_id:d,sitekey:e.sitekey}));a(n,{successLabel:`Created`});return}let f=u({invalidate_immediately:e[`invalidate-immediately`]}),p=await s(`Creating`,async()=>c.send(D,{body:f,account_id:d,sitekey:e.sitekey}));a(p,{successLabel:`Created`})})};var A={method:`PUT`,path:t=>e`/accounts/${t.account_id}/challenges/widgets/${t.sitekey}`,body:`json`};function j(e){return e.usage(`$0 turnstile widgets update <sitekey>
|
|
22
|
+
|
|
23
|
+
Updates the configuration of a Turnstile widget.`).positional(`sitekey`,{type:`string`,description:`Unique identifier for a Turnstile widget.`,demandOption:!0}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
|
|
24
|
+
expensive challenges in response to malicious bots (ENT only).
|
|
25
|
+
`}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
|
|
26
|
+
this setting can determine the clearance level to be set
|
|
27
|
+
`,choices:[`no_clearance`,`jschallenge`,`managed`,`interactive`]}).coerce(`clearance-level`,e=>d(e,`clearance-level`,`text`)).option(`domains`,{type:`string`,array:!0,description:`The domains field`}).option(`ephemeral-id`,{type:`boolean`,description:`Return the Ephemeral ID in /siteverify (ENT only).
|
|
28
|
+
`}).option(`widget-mode`,{type:`string`,description:`Widget Mode`,choices:[`non-interactive`,`invisible`,`managed`]}).coerce(`widget-mode`,e=>d(e,`widget-mode`,`text`)).option(`name`,{type:`string`,description:`Human readable widget name. Not unique. Cloudflare suggests that you
|
|
29
|
+
set this to a meaningful string to make it easier to identify your
|
|
30
|
+
widget, and where it is used.
|
|
31
|
+
`}).option(`offlabel`,{type:`boolean`,description:`Do not show any Cloudflare branding on the widget (ENT only).
|
|
32
|
+
`}).option(`region`,{type:`string`,description:`Region where this widget can be used. This cannot be changed after creation.
|
|
33
|
+
`,choices:[`world`,`china`]}).coerce(`region`,e=>d(e,`region`,`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 M={command:`update <sitekey>`,describe:`Update a Turnstile Widget`,builder:j,handler:async e=>c({command:`turnstile widgets update`,classification:{safeFlags:[`bot-fight-mode`,`clearance-level`,`ephemeral-id`,`widget-mode`,`offlabel`,`region`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf turnstile widgets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/challenges/widgets/${e.sitekey==null?`<sitekey>`:encodeURIComponent(String(e.sitekey))}`,pathParams:{sitekey:String(e.sitekey??``)},bodyKind:`json`,body:e.body===void 0?u({bot_fight_mode:e[`bot-fight-mode`],clearance_level:e[`clearance-level`],domains:e.domains,ephemeral_id:e[`ephemeral-id`],mode:e[`widget-mode`],name:d(e.name,`name`,`text`),offlabel:e.offlabel,region:e.region}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(A,{body:t,account_id:m,sitekey:e.sitekey}));a(n,{successLabel:`Updated`});return}if(e.domains===void 0)throw Error(`--domains is required (or pass --body with this field set).`);e[`widget-mode`]===void 0&&(e[`widget-mode`]=await p(`widget-mode`,`Widget Mode`,[`non-interactive`,`invisible`,`managed`])),e.name===void 0&&(e.name=await f(`name`,`Human readable widget name. Not unique. Cloudflare suggests that you set this to a meaningful string to make it easier to identify your widget, and where it is used. `));let h=u({bot_fight_mode:e[`bot-fight-mode`],clearance_level:e[`clearance-level`],domains:e.domains,ephemeral_id:e[`ephemeral-id`],mode:e[`widget-mode`],name:d(e.name,`name`,`text`),offlabel:e.offlabel,region:e.region}),g=await s(`Updating`,async()=>c.send(A,{body:h,account_id:m,sitekey:e.sitekey}));a(g,{successLabel:`Updated`})})},N={command:`widgets`,describe:`Turnstile widget configurations — site keys, secret rotation, and challenge mode settings`,builder:e=>e.command(_).command(b).command(C).command(E).command(k).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`turnstile`,describe:`CAPTCHA-free bot verification widgets that protect forms and APIs without degrading user experience`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{P as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,n as t}from"./source-mXUcrTVw.mjs";import{n}from"./version-
|
|
2
|
+
import{i as e,n as t}from"./source-mXUcrTVw.mjs";import{n}from"./version-B6MnUIqV.mjs";import{i as r}from"./cf-Bq4pA4n6.mjs";import{r as i,t as a}from"./gt-3bcLGJ7V.mjs";import{closeSync as o,mkdirSync as s,openSync as c,readFileSync as l,renameSync as u,statSync as d,unlinkSync as f,writeFileSync as p}from"node:fs";import{dirname as m,join as h}from"node:path";import{fileURLToPath as g}from"node:url";import{spawn as _}from"node:child_process";var v=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t)=>new n(e,t).major})),y=/* @__PURE__ */ t(((e,t)=>{let n=i();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),b=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),x=/* @__PURE__ */ t(((e,t)=>{let n=y();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),S=/* @__PURE__ */ e(a(),1),C=/* @__PURE__ */ e(v(),1),w=/* @__PURE__ */ e(b(),1),T=/* @__PURE__ */ e(x(),1);const E=864e5;function D(e){return(0,w.default)(e)?.includes(`beta`)?`beta`:`latest`}function O(e=n){return h(r(),`cache`,`update-check-${D(e)}.json`)}function k(e=O()){try{let t=JSON.parse(l(e,`utf8`));if(typeof t!=`object`||!t||Array.isArray(t))return{};let n=t;return{lastAttemptedAt:typeof n.lastAttemptedAt==`number`&&Number.isFinite(n.lastAttemptedAt)?n.lastAttemptedAt:void 0,lastSuccessfulAt:typeof n.lastSuccessfulAt==`number`&&Number.isFinite(n.lastSuccessfulAt)?n.lastSuccessfulAt:void 0,latestVersion:typeof n.latestVersion==`string`&&(0,T.default)(n.latestVersion)?n.latestVersion:void 0}}catch{return{}}}function A(e,t=O()){let n=`${t}.${process.pid}.tmp`;try{return s(m(t),{recursive:!0}),p(n,`${JSON.stringify(e)}\n`,{encoding:`utf8`,mode:384}),u(n,t),!0}catch{try{f(n)}catch{}return!1}}function j(e,t,n){let r=`${e}.lock`,i;try{s(m(e),{recursive:!0});try{i=c(r,`wx`,384)}catch{try{if(t-d(r).mtimeMs<=5e3)return;f(r),i=c(r,`wx`,384)}catch{return}}return n()}catch{return}finally{if(i!==void 0)try{o(i),f(r)}catch{}}}function M(e,t){if(!(0,T.default)(e)||!t.latestVersion||!(0,S.default)(t.latestVersion,e))return;let n=(0,C.default)(t.latestVersion)>(0,C.default)(e);return{latestVersion:t.latestVersion,isMajor:n}}function N(e,t=O(e)){return M(e,k(t))}function P(){let e=import.meta.url.endsWith(`.ts`),t=new URL(e?`../update-check-worker.ts`:`./update-check-worker.mjs`,import.meta.url),n=e?[...process.execArgv,g(t)]:[g(t)];_(process.execPath,n,{detached:!0,stdio:`ignore`,windowsHide:!0}).unref()}function F(e={}){let t=e.cachePath??O(e.currentVersion??n),r=e.now??Date.now();if(j(t,r,()=>{let e=k(t);return e.lastAttemptedAt!==void 0&&r-e.lastAttemptedAt<864e5?!1:A({...e,lastAttemptedAt:r},t)}))try{(e.spawnWorker??P)()}catch{}}async function I(e,t,r,i){if(!(0,T.default)(t))return{status:`failed`};let a=await i(`https://registry.npmjs.org/${encodeURIComponent(e)}/${r}`,{headers:{accept:`application/json`,"user-agent":`cf-cli/${n}`},signal:AbortSignal.timeout(3e3)});if(!a.ok)return{status:`failed`};let o=await a.json();if(typeof o!=`object`||!o||Array.isArray(o))return{status:`failed`};let s=o;return s.name!==e||typeof s.version!=`string`||!(0,T.default)(s.version)?{status:`failed`}:(0,S.default)(s.version,t)?{status:`update-available`,latest:s.version}:{status:`up-to-date`}}async function L(e={}){let t=e.currentVersion??n,r=e.cachePath??O(t),i=e.now??Date.now();try{let n=await(e.check??((t,n,r)=>I(t,n,r,e.fetch??globalThis.fetch)))(`cf`,t,`latest`);if(n.status===`failed`)return;let a=n.status===`update-available`?n.latest:t;if(!(0,T.default)(a))return;A({...k(r),latestVersion:a,lastSuccessfulAt:i},r)}catch{}}export{L as i,N as n,F as r,E as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e}from"./update-check-
|
|
2
|
+
import{i as e}from"./update-check-jb89ih_g.mjs";await e();export{};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-C6u9qIGO.mjs";import{a as r,t as i}from"./context-A6T-NKPI.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-D5po7ScB.mjs";import{t as c}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/brand-protection/url-info`};function u(e){return e.usage(`$0 url-info get
|
|
3
|
+
|
|
4
|
+
Return submitted URLs based on ID`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Read submitted URLs by ID`,builder:u,handler:async e=>c({command:`url-info get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf url-info get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/url-info`,pathParams:{},bodyKind:`none`});return}let c=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>c.send(l,{account_id:u}));a(d,{successLabel:`Loaded`})})},f={command:`url-info`,describe:`url-info`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-C6u9qIGO.mjs";import{i as n}from"./context-A6T-NKPI.mjs";import{t as r}from"./output-Co4xdFf6.mjs";import{t as i}from"./dry-run-C2KjGX10.mjs";import{t as a}from"./progress-D5po7ScB.mjs";import{t as o}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{i as u,n as d}from"./prompt-BAJpE3jV.mjs";var f={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/url_normalization`,response:!1};function p(e){return e.usage(`$0 url-normalization delete
|
|
3
|
+
|
|
4
|
+
Deletes the URL Normalization settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const m={command:`delete`,describe:`Delete URL Normalization settings`,builder:p,handler:async e=>o({command:`url-normalization delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf url-normalization delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await d({force:!!e.force})){process.stderr.write(`Aborted.
|
|
5
|
+
`);return}let c=await a(`Deleting`,async()=>o.send(f,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/url_normalization`};function g(e){return e.usage(`$0 url-normalization get
|
|
6
|
+
|
|
7
|
+
Fetches the current URL Normalization settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get`,describe:`Get URL Normalization settings`,builder:g,handler:async e=>o({command:`url-normalization get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf url-normalization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(h,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var v={method:`PUT`,path:t=>e`/zones/${t.zone_id}/url_normalization`,body:`json`};function y(e){return e.usage(`$0 url-normalization update
|
|
8
|
+
|
|
9
|
+
Updates the URL Normalization settings.`).option(`scope`,{type:`string`,description:`The scope of the URL normalization.`,choices:[`incoming`,`both`,`none`]}).coerce(`scope`,e=>l(e,`scope`,`text`)).option(`type`,{type:`string`,description:`The type of URL normalization performed by Cloudflare.`,choices:[`cloudflare`,`rfc3986`]}).coerce(`type`,e=>l(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A URL Normalization object.`})}const b={command:`update`,describe:`Update URL Normalization settings`,builder:y,handler:async e=>o({command:`url-normalization update`,classification:{safeFlags:[`scope`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf url-normalization update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/url_normalization`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({scope:e.scope,type:e.type}):s(e.body)});return}let o=await t(e),l=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=l,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(v,{body:t,zone_id:l}));r(n,{successLabel:`Updated`});return}e.scope===void 0&&(e.scope=await u(`scope`,`The scope of the URL normalization.`,[`incoming`,`both`,`none`])),e.type===void 0&&(e.type=await u(`type`,`The type of URL normalization performed by Cloudflare.`,[`cloudflare`,`rfc3986`]));let d=c({scope:e.scope,type:e.type}),f=await a(`Updating`,async()=>o.send(v,{body:d,zone_id:l}));r(f,{successLabel:`Updated`})})},x={command:`url-normalization`,describe:`url-normalization`,builder:e=>e.command(m).command(_).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{x as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-C6u9qIGO.mjs";import{a as r,t as i}from"./context-A6T-NKPI.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-D5po7ScB.mjs";import{t as c}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f}from"./prompt-BAJpE3jV.mjs";import{n as p,t as m}from"./raw-fetch-yY-wX5Xx.mjs";function h(e){return e.usage("$0 url-scanner responses get <response-id>\n\nReturns the raw response of the network request. Find the `response_id` in the `data.requests.response.hash`.").positional(`response-id`,{type:`string`,description:`Response hash.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <response-id>`,describe:`Get raw response`,builder:h,handler:async e=>c({command:`url-scanner responses get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner responses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/responses/${e[`response-id`]==null?`<response-id>`:encodeURIComponent(String(e[`response-id`]))}`,pathParams:{"response-id":String(e[`response-id`]??``)},bodyKind:`none`});return}await n(e);let a=e.local?t:await i();e.accountId=a;let c=await s(`Loading`,async()=>m(`/accounts/${a}/urlscanner/v2/responses/${encodeURIComponent(String(e[`response-id`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));p(c.toString(`utf-8`))})},_={command:`responses`,describe:`Raw HTTP response data captured during URL scans`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/bulk`,body:`json`,errors:{400:`BadRequestError`,429:`TooManyRequestsError`}};function y(e){return e.usage(`$0 url-scanner scans bulk-create
|
|
3
|
+
|
|
4
|
+
Submit URLs to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/ and take into account scans submitted in bulk have lower priority and may take longer to finish.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of urls to scan (up to a 100).`})}const b={command:`bulk-create`,describe:`Bulk create URL Scans`,builder:y,handler:async e=>c({command:`url-scanner scans bulk-create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?void 0:l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(v,{body:t,account_id:u}));a(n,{successLabel:`Created`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/scan`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,429:`TooManyRequestsError`}};function S(e){return e.usage(`$0 url-scanner scans create
|
|
5
|
+
|
|
6
|
+
Submit a URL to scan. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/.`).option(`agent-readiness`,{type:`boolean`,description:`Enable agent readiness checks.`}).option(`country`,{type:`string`,description:`Country to geo egress from`,choices:/* @__PURE__ */ `AF.AL.DZ.AD.AO.AG.AR.AM.AU.AT.AZ.BH.BD.BB.BY.BE.BZ.BJ.BM.BT.BO.BA.BW.BR.BN.BG.BF.BI.KH.CM.CA.CV.KY.CF.TD.CL.CN.CO.KM.CG.CR.CI.HR.CU.CY.CZ.CD.DK.DJ.DM.DO.EC.EG.SV.GQ.ER.EE.SZ.ET.FJ.FI.FR.GA.GE.DE.GH.GR.GL.GD.GT.GN.GW.GY.HT.HN.HU.IS.IN.ID.IR.IQ.IE.IL.IT.JM.JP.JO.KZ.KE.KI.KW.KG.LA.LV.LB.LS.LR.LY.LI.LT.LU.MO.MG.MW.MY.MV.ML.MR.MU.MX.FM.MD.MC.MN.MS.MA.MZ.MM.NA.NR.NP.NL.NZ.NI.NE.NG.KP.MK.NO.OM.PK.PS.PA.PG.PY.PE.PH.PL.PT.QA.RO.RU.RW.SH.KN.LC.VC.WS.SM.ST.SA.SN.RS.SC.SL.SK.SI.SB.SO.ZA.KR.SS.ES.LK.SD.SR.SE.CH.SY.TW.TJ.TZ.TH.BS.GM.TL.TG.TO.TT.TN.TR.TM.UG.UA.AE.GB.US.UY.UZ.VU.VE.VN.YE.ZM.ZW`.split(`.`)}).coerce(`country`,e=>d(e,`country`,`text`)).option(`customagent`,{type:`string`,description:`The customagent field`}).option(`referer`,{type:`string`,description:`The referer field`}).option(`screenshots-resolutions`,{type:`string`,array:!0,description:`Take multiple screenshots targeting different device types.`}).option(`url`,{type:`string`,description:`The url field`}).option(`visibility`,{type:`string`,description:"The option `Public` means it will be included in listings like recent scans and search results. `Unlisted` means it will not be included in the aforementioned listings, users will need to have the scan's ID to access it. A a scan will be automatically marked as unlisted if it fails, if it contains potential PII or other sensitive material.",choices:[`Public`,`Unlisted`],default:`Public`}).coerce(`visibility`,e=>d(e,`visibility`,`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 C={command:`create`,describe:`Create URL Scan`,builder:S,handler:async e=>c({command:`url-scanner scans create`,classification:{safeFlags:[`agent-readiness`,`country`,`visibility`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/scan`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({agentReadiness:e[`agent-readiness`],country:e.country,customagent:d(e.customagent,`customagent`,`text`),referer:d(e.referer,`referer`,`text`),screenshotsResolutions:e[`screenshots-resolutions`],url:d(e.url,`url`,`text`),visibility:e.visibility}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(x,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.url===void 0&&(e.url=await f(`url`,`The url field`));let m=u({agentReadiness:e[`agent-readiness`],country:e.country,customagent:d(e.customagent,`customagent`,`text`),referer:d(e.referer,`referer`,`text`),screenshotsResolutions:e[`screenshots-resolutions`],url:d(e.url,`url`,`text`),visibility:e.visibility}),h=await s(`Creating`,async()=>c.send(x,{body:m,account_id:p}));a(h,{successLabel:`Created`})})};function w(e){return e.usage(`$0 url-scanner scans dom <scan-id>
|
|
7
|
+
|
|
8
|
+
Returns a plain text response, with the scan's DOM content as rendered by Chrome.`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`dom <scan-id>`,describe:`Get URL scan's DOM`,builder:w,handler:async e=>c({command:`url-scanner scans dom`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans dom`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/dom/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}await n(e);let a=e.local?t:await i();e.accountId=a;let c=await s(`Loading`,async()=>m(`/accounts/${a}/urlscanner/v2/dom/${encodeURIComponent(String(e[`scan-id`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));p(c.toString(`utf-8`))})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/result/${t.scan_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function D(e){return e.usage(`$0 url-scanner scans get <scan-id>
|
|
9
|
+
|
|
10
|
+
Get URL scan by uuid`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <scan-id>`,describe:`Get URL scan`,builder:D,handler:async e=>c({command:`url-scanner scans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/result/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(E,{account_id:l,scan_id:e[`scan-id`]}));a(u,{successLabel:`Loaded`})})};var k={method:`GET`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/har/${t.scan_id}`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function A(e){return e.usage(`$0 url-scanner scans har <scan-id>
|
|
11
|
+
|
|
12
|
+
Get a URL scan's HAR file. See HAR spec at http://www.softwareishard.com/blog/har-12-spec/.`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`har <scan-id>`,describe:`Get URL scan's HAR`,builder:A,handler:async e=>c({command:`url-scanner scans har`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf url-scanner scans har`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/har/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(k,{account_id:l,scan_id:e[`scan-id`]}));a(u,{successLabel:`Loaded`})})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/urlscanner/v2/search`,query:[`size`,`q`],errors:{400:`BadRequestError`}};function N(e){return e.usage(`$0 url-scanner scans list
|
|
13
|
+
|
|
14
|
+
Use a subset of ElasticSearch Query syntax to filter scans. Some example queries:<br/> <br/>- 'path:"/bundles/jquery.js"': Searches for scans who requested resources with the given path.<br/>- 'page.asn:AS24940 AND hash:xxx': Websites hosted in AS24940 where a resource with the given hash was downloaded.<br/>- 'page.domain:microsoft* AND verdicts.malicious:true AND NOT page.domain:microsoft.com': malicious scans whose hostname starts with "microsoft".<br/>- 'apikey:me AND date:[2025-01 TO 2025-02]': my scans from 2025 January to 2025 February.`).option(`size`,{type:`number`,description:`Limit the number of objects in the response.`}).option(`query`,{type:`string`,description:`Filter scans`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`Search URL scans`,builder:N,handler:async e=>c({command:`url-scanner scans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={size:e.size,q:e.query};if(e.dryRun){let e=await r();o({command:`cf url-scanner scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/urlscanner/v2/search`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(M,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 url-scanner scans screenshot <scan-id>
|
|
15
|
+
|
|
16
|
+
Get scan's screenshot by resolution (desktop/mobile/tablet).`).positional(`scan-id`,{type:`string`,description:`Scan UUID.`,demandOption:!0}).option(`resolution`,{type:`string`,description:`Target device type.`,choices:[`desktop`,`mobile`,`tablet`]}).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 I={command:`screenshot <scan-id>`,describe:`Get screenshot`,builder:F,handler:async e=>c({command:`url-scanner scans screenshot`,classification:{safeFlags:[`resolution`,`dry-run`,`text`]}},e,async()=>{let a={resolution:e.resolution};if(e.dryRun){let t=await r();o({command:`cf url-scanner scans screenshot`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/urlscanner/v2/screenshots/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}.png`,pathParams:{"scan-id":String(e[`scan-id`]??``)},query:a,bodyKind:`none`});return}await n(e);let c=e.local?t:await i();e.accountId=c;let l=new URLSearchParams(Object.entries(a).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await s(`Loading`,async()=>m(`/accounts/${c}/urlscanner/v2/screenshots/${encodeURIComponent(String(e[`scan-id`]))}.png${l?`?`+l:``}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));p(e.text===!0?u.toString(`utf-8`):u)})},L={command:`scans`,describe:`URL scan requests and results — submit URLs for analysis and retrieve threat verdicts`,builder:e=>e.command(b).command(C).command(T).command(O).command(j).command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},R={command:`url-scanner`,describe:`Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results`,builder:e=>e.command(_).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{R as default};
|