cf 1.0.0-beta.14 → 1.0.0-beta.16
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 +6545 -3180
- package/dist/_meta/hand-written-commands.json +35 -2
- package/dist/_meta/schemas.json +7031 -4599
- package/dist/abuse-reports-17K-TRhO.mjs +24 -0
- package/dist/{access-k1QjF5rE.mjs → access-BwB7sg1D.mjs} +1 -1
- package/dist/account-tags-povXTDAu.mjs +15 -0
- package/dist/accounts-BnIGu_ac.mjs +132 -0
- package/dist/acm-CQRcu_zw.mjs +15 -0
- package/dist/addressing-Qcm9jd3C.mjs +105 -0
- package/dist/agent-memory-B3xN9I6-.mjs +34 -0
- package/dist/ai-BRKOCckA.mjs +31 -0
- package/dist/ai-audit-Cd9Rc2Fc.mjs +6 -0
- package/dist/ai-gateway-BWU5064V.mjs +80 -0
- package/dist/ai-search-CJ3b8eot.mjs +79 -0
- package/dist/ai-security-Dn0Ee6QS.mjs +10 -0
- package/dist/alerting-BXTiMfXo.mjs +56 -0
- package/dist/analytics-Jyd04TRW.mjs +17 -0
- package/dist/analytics-engine-CzrNfUeh.mjs +4 -0
- package/dist/api-eMuS5GI1.mjs +3 -0
- package/dist/api-security-DRBHZaf_.mjs +154 -0
- package/dist/argo-DiQt0pSb.mjs +14 -0
- package/dist/artifacts-eBZ4YN53.mjs +43 -0
- package/dist/audit-logs-Bb4HTZay.mjs +4 -0
- package/dist/auth-C6My1gI6.mjs +2 -0
- package/dist/auth-OFqV2M4q.mjs +2 -0
- package/dist/auth-eVI_UEt8.mjs +2 -0
- package/dist/{auth-token-Dop0wLCw.mjs → auth-token-Cfj2yehs.mjs} +1 -1
- package/dist/{autoconfig-RQ3HS4m1.mjs → autoconfig-B0ESZ8DJ.mjs} +2 -2
- package/dist/basin-catalog-Cwk1RSMX.mjs +46 -0
- package/dist/billing-CfV8oi6A.mjs +23 -0
- package/dist/blocks-Bat9A8V_.mjs +5 -0
- package/dist/bot-management-CH4_Kewx.mjs +9 -0
- package/dist/botnet-feed-Cg_Wp8ei.mjs +11 -0
- package/dist/brand-protection-Cp2ckWou.mjs +27 -0
- package/dist/browser-run-CfQ30dB6.mjs +42 -0
- package/dist/build-Bm6kGyzo.mjs +2 -0
- package/dist/{build-CCe7IrWT.mjs → build-sBpqm9ga.mjs} +1 -1
- package/dist/builds-B2RBgVL9.mjs +71 -0
- package/dist/cache-yvrYPvRI.mjs +45 -0
- package/dist/certificate-authorities-BdMRaOnD.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-CsnoQloF.mjs} +1 -1
- package/dist/client-certificates-CuWGvZSr.mjs +13 -0
- package/dist/client-side-security-D50iZjd_.mjs +63 -0
- package/dist/cloud-connector-wvSGdxWT.mjs +6 -0
- package/dist/{cloudflared-D83U8Yn3.mjs → cloudflared-By8BzYXc.mjs} +1 -1
- package/dist/cloudforce-one-j6vlmaMB.mjs +405 -0
- package/dist/{command-9VAc7b30.mjs → command-74P4_CTx.mjs} +1 -1
- package/dist/{command-B_Ixlz8Q.mjs → command-BDpm-U8z.mjs} +1 -1
- package/dist/{command-OHov3PEc.mjs → command-BSbhJRmu.mjs} +1 -1
- package/dist/{command-DjEJaOwV.mjs → command-BbO3sBQ2.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-CyJQ40fc.mjs → command-CM_f48gs.mjs} +1 -1
- package/dist/command-CmUtmu5j.mjs +2 -0
- package/dist/{command-Bpzp8Mz2.mjs → command-DCQgsd2U.mjs} +1 -1
- package/dist/{command-SmWD-MeI.mjs → command-DFRsim8q.mjs} +1 -1
- package/dist/command-DQojhTEQ.mjs +2 -0
- package/dist/{command-CUNMrMou.mjs → command-DZfKHiru.mjs} +1 -1
- package/dist/{command-BtDY_MKv.mjs → command-DiqRELHF.mjs} +1 -1
- package/dist/{command-DXaRn1ls.mjs → command-DppVezAB.mjs} +1 -1
- package/dist/{command-Ckb9FufU.mjs → command-Dr4PEvB2.mjs} +1 -1
- package/dist/{completions-CuqAO3N_.mjs → completions-oD1EcuHk.mjs} +1 -1
- package/dist/config.mjs +0 -0
- package/dist/connector-interrupts-DP4rbOe8.mjs +6 -0
- package/dist/connector-telemetry-events-BQGBQwzR.mjs +6 -0
- package/dist/connector-telemetry-snapshots-DBO0Mdcj.mjs +6 -0
- package/dist/connectors-BSVr3Kz1.mjs +15 -0
- package/dist/containers-BOpKpipz.mjs +376 -0
- package/dist/containers-BTqAeVV2.mjs +78 -0
- package/dist/content-scan-B9Keyxe-.mjs +14 -0
- package/dist/{context-BBLtgdR1.mjs → context-B-vEsyrK.mjs} +2 -2
- package/dist/{cps-C5phNoVU.mjs → cps-VRP794c5.mjs} +3 -3
- package/dist/create-OXylMu6m.mjs +2 -0
- package/dist/csam-scanner-C1jOgXVu.mjs +10 -0
- package/dist/ct-alerting-Y9vfa6Fo.mjs +5 -0
- package/dist/custom-certificates-CojTEC0E.mjs +17 -0
- package/dist/custom-csrs-DM5X-K6H.mjs +11 -0
- package/dist/custom-hostnames-BBjqaiFF.mjs +27 -0
- package/dist/custom-nameservers-C0NDMLPJ.mjs +9 -0
- package/dist/custom-pages-M4RUxcn6.mjs +21 -0
- package/dist/{d1-EQMUlHTJ.mjs → d1-hin5PmxW.mjs} +31 -31
- package/dist/dcv-delegation-KOO8syyQ.mjs +4 -0
- package/dist/delegate.mjs +0 -0
- package/dist/{deploy-B22sEVHd.mjs → deploy-Bo7FtE44.mjs} +1 -1
- package/dist/deploy-context-ClvBD87y.mjs +56 -0
- package/dist/{deploy-input-BCjcuP6u.mjs → deploy-input-BqJ7GVZ-.mjs} +1 -1
- package/dist/{dev-ClhhXuNU.mjs → dev-EtnMYA7K.mjs} +1 -1
- package/dist/diagnostics-LZuMrGjK.mjs +15 -0
- package/dist/{dist-DmRM6WSZ.mjs → dist-DZRTPMMA.mjs} +4 -4
- package/dist/dls-Bq8k3iy-.mjs +17 -0
- package/dist/dns-firewall-zavP5Qxj.mjs +71 -0
- package/dist/dns-ry5E2Bsa.mjs +144 -0
- package/dist/docs-B08YtL0U.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-B9fo41B1.mjs +6 -0
- package/dist/email-auth-D9LGjFlh.mjs +6 -0
- package/dist/email-routing-6iDnNPhY.mjs +45 -0
- package/dist/email-security-ty4ufRnJ.mjs +158 -0
- package/dist/email-sending-d7LO_Cz_.mjs +47 -0
- package/dist/error-sanitization-CIQOep3I.mjs +2 -0
- package/dist/error-sanitization-pOyzm2F1.mjs +2 -0
- package/dist/field-extractors-DkgQ7PSw.mjs +9 -0
- package/dist/firewall-Q88YyEwD.mjs +36 -0
- package/dist/flagship-CzI8zhd6.mjs +28 -0
- package/dist/fraud-CvFXTR0w.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-Y2zbyey8.mjs +6 -0
- package/dist/healthchecks-4Hz-6xYi.mjs +22 -0
- package/dist/{hostnames-DvaUSzsj.mjs → hostnames-B3k7fIUL.mjs} +6 -6
- package/dist/hyperdrive-BWGYz95H.mjs +37 -0
- package/dist/iam-AXco_qmt.mjs +52 -0
- package/dist/images-BzYh8y0u.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-Da8pe296.mjs → init-DlenHBtS.mjs} +2 -2
- package/dist/intel-BBi3i_GU.mjs +76 -0
- package/dist/ips-CWG2b7AM.mjs +4 -0
- package/dist/k2-DXdMe3Cb.mjs +11 -0
- package/dist/keyless-certificates-B4ta_OGS.mjs +13 -0
- package/dist/keys-B9zvFzrf.mjs +4 -0
- package/dist/kv-FUd7UdDu.mjs +15 -0
- package/dist/{lazy-command-CDWwCsD2.mjs → lazy-command-BC8rIlHu.mjs} +1 -1
- package/dist/leaked-credential-checks-BufVA9vL.mjs +18 -0
- package/dist/{load-balancers-Bu9pd2SV.mjs → load-balancers-CWd9mSWM.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-BJr2PBaJ.mjs +5 -0
- package/dist/login-DVbXZ_Tv.mjs +2 -0
- package/dist/logo-matches-BluaPvMa.mjs +6 -0
- package/dist/logos-CXtmYWEJ.mjs +7 -0
- package/dist/logpush-DCYgrqz0.mjs +46 -0
- package/dist/logs-as60IP29.mjs +36 -0
- package/dist/magic-cloud-networking-0RsHugUF.mjs +71 -0
- package/dist/magic-network-monitoring-CPqvZdcb.mjs +36 -0
- package/dist/magic-transit-ClPyGzOE.mjs +386 -0
- package/dist/managed-defense-P4_QWSbK.mjs +18 -0
- package/dist/managed-transforms-CUwQXMij.mjs +9 -0
- package/dist/matches-BjckDBW1.mjs +6 -0
- package/dist/mcp-C2EG2c7L.mjs +32 -0
- package/dist/mesh-CpMZA7Xt.mjs +26 -0
- package/dist/{migrate-CZNq63Uj.mjs → migrate-6e5mJ79R.mjs} +1 -1
- package/dist/monetization-DypuCZmU.mjs +20 -0
- package/dist/mtls-certificates-B5AWTU6u.mjs +13 -0
- package/dist/network-DQ5Ridgy.mjs +50 -0
- package/dist/network-interconnects-ifU4JhGE.mjs +72 -0
- package/dist/o11y-CzssfRHt.mjs +93 -0
- package/dist/{oauth-n8um6MFk.mjs → oauth-BDdhqasa.mjs} +1 -1
- package/dist/oauth-BNTiErBG.mjs +4 -0
- package/dist/oauth-clients-gknNcBdV.mjs +16 -0
- package/dist/oauth-scopes-BJeSanuF.mjs +4 -0
- package/dist/organization-CXAM41sd.mjs +71 -0
- package/dist/organizations-kfFFW4uO.mjs +4 -0
- package/dist/origin-ca-certificates-DwhYV3m_.mjs +11 -0
- package/dist/origin-post-quantum-encryption-DfrnptJ1.mjs +6 -0
- package/dist/origin-tls-client-auth-COSxTc2q.mjs +30 -0
- package/dist/output-Co4xdFf6.mjs +2 -0
- package/dist/page-rules-ByrDMDBZ.mjs +39 -0
- package/dist/{pages-Bn0Sg1ay.mjs → pages-DuGcBC6k.mjs} +29 -29
- package/dist/path-DRw6Y-nd.mjs +2 -0
- package/dist/pay-per-crawl-B3_Gn9Cj.mjs +38 -0
- package/dist/pay-per-use-49EXt75f.mjs +33 -0
- package/dist/pipelines-Bvgh1BQZ.mjs +44 -0
- package/dist/precursor-VobQf--m.mjs +4 -0
- package/dist/previews-DkwFHNRx.mjs +7 -0
- package/dist/progress-R-1tIuep.mjs +2 -0
- package/dist/prompt-dgLm0iFJ.mjs +4 -0
- package/dist/queries-EbIadtC5.mjs +9 -0
- package/dist/queues-C4GZ-O3f.mjs +57 -0
- package/dist/r2-DEuFfWBR.mjs +128 -0
- package/dist/{radar-CdvQL4xm.mjs → radar-CDOERVcR.mjs} +150 -150
- package/dist/raw-fetch-BapeoreV.mjs +2 -0
- package/dist/realtime-D_A9Qgly.mjs +172 -0
- package/dist/registrar-X1YLlnmg.mjs +43 -0
- package/dist/registrar-sandbox-BF3cYO3n.mjs +56 -0
- package/dist/{registry-PI6sO95I.mjs → registry-CRnk93ur.mjs} +1 -1
- package/dist/reporting-BWm9jIF8.mjs +14 -0
- package/dist/{request-headers-D8L95bEQ.mjs → request-headers-BRxv6NkA.mjs} +1 -1
- package/dist/request-tracers-CHWpiejG.mjs +4 -0
- package/dist/resolve-BpgXeklt.mjs +2 -0
- package/dist/resolve-C3FmNlSO.mjs +2 -0
- package/dist/resource-sharing-C186jZv0.mjs +40 -0
- package/dist/resource-tagging-BTagOZli.mjs +4 -0
- package/dist/rules-DYnGIU_0.mjs +18 -0
- package/dist/rulesets-BcNrbVcq.mjs +37 -0
- package/dist/rum-BDyRecfp.mjs +30 -0
- package/dist/{run-CW2Cgi0S.mjs → run-BvDCuZ8q.mjs} +1 -1
- package/dist/run-roYb_Odh.mjs +2 -0
- package/dist/{schema-elj12WOx.mjs → schema-S3pUZwpI.mjs} +1 -1
- package/dist/{schema-flags-BTItUu1K.mjs → schema-flags-DcKjAxI1.mjs} +1 -1
- package/dist/scim-zn-CNCsc.mjs +18 -0
- package/dist/secrets-store-CFhyQUV6.mjs +24 -0
- package/dist/security-insights-D8XgtCed.mjs +40 -0
- package/dist/security-txt-CCM-Vro0.mjs +9 -0
- package/dist/session-Cq3YNLoI.mjs +2 -0
- package/dist/shared-ouAF7o4S.mjs +2 -0
- package/dist/smart-shield-DwW7N92r.mjs +24 -0
- package/dist/snippets-B2jBY0m_.mjs +20 -0
- package/dist/{spawn-D07wH-MH.mjs → spawn-DQttFH05.mjs} +1 -1
- package/dist/{spectrum-B6qkjR_Z.mjs → spectrum-Cf_4cGE8.mjs} +16 -16
- package/dist/speed-DoXdyIYK.mjs +24 -0
- package/dist/sql-Bze4h80q.mjs +4 -0
- package/dist/src-BguQDHjS.mjs +125 -0
- package/dist/ssl-u_0gUhPA.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-BcReYIHJ.mjs +102 -0
- package/dist/submit-ldFVNfNC.mjs +4 -0
- package/dist/{tags-CX23P4jg.mjs → tags-D_Hc_A-r.mjs} +2 -2
- package/dist/{telemetry-ZlCi5Xhc.mjs → telemetry-Cojgz4Sv.mjs} +1 -1
- package/dist/telemetry-Ct_2AaO4.mjs +2 -0
- package/dist/tenant-AZ0EAsmT.mjs +10 -0
- package/dist/tenant-custom-nameservers-aozjaasc.mjs +9 -0
- package/dist/theme-BGHWSKCw.mjs +6 -0
- package/dist/{tools-CSc5DmFi.mjs → tools-BCCRUENY.mjs} +1 -1
- package/dist/tunnels-CXez5LPB.mjs +29 -0
- package/dist/turnstile-B2NQ8Nsk.mjs +33 -0
- package/dist/ui-BtIBQeaG.mjs +2 -0
- package/dist/{update-check-HFkPml6x.mjs → update-check-BlyKN8m0.mjs} +1 -1
- package/dist/update-check-BnGDxswi.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-D_UqGiWD.mjs +4 -0
- package/dist/url-normalization-CF1YHpIN.mjs +9 -0
- package/dist/url-scanner-ChF3GO2U.mjs +16 -0
- package/dist/{user-rXca0J9M.mjs → user-BfWRsdJh.mjs} +58 -58
- package/dist/values-CLfxkAUJ.mjs +4 -0
- package/dist/vectorize-CRYbWKg5.mjs +32 -0
- package/dist/version-CVlh2Zaq.mjs +2 -0
- package/dist/{waiting-rooms-DrA3-0bw.mjs → waiting-rooms-Crp7MVd9.mjs} +25 -25
- package/dist/web-assets-CgyrPnT-.mjs +64 -0
- package/dist/web3-Cd0Yd0eQ.mjs +28 -0
- package/dist/workers-CTwJpTfJ.mjs +40 -0
- package/dist/workers-builds-f2nVw7EZ.mjs +14 -0
- package/dist/workers-for-platforms-DjeKp2uy.mjs +40 -0
- package/dist/workers-vpc-B_L3TEg2.mjs +13 -0
- package/dist/workflows-CBPGf65x.mjs +52 -0
- package/dist/{wrangler-migration-C6FKHER1.mjs → wrangler-migration-DxTB5yPT.mjs} +1 -1
- package/dist/zaraz-3VDxl0gF.mjs +22 -0
- package/dist/zero-trust-B9xY8zcn.mjs +957 -0
- package/dist/zone-CmwVqTI2.mjs +4 -0
- package/dist/zones-Bf0VVpMf.mjs +124 -0
- package/package.json +17 -19
- 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/alerts-BSON-vFh.mjs +0 -2
- 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/autorag-kNrLiqDX.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/brands-bBJgbbOH.mjs +0 -2
- package/dist/browser-extension-C1_fcw7h.mjs +0 -2
- 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/clear-BW9vLgI3.mjs +0 -2
- 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-events-latest-BQdOvbWh.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CZxkOuC3.mjs +0 -6
- package/dist/connector-telemetry-snapshots-latest-CtdN_dGu.mjs +0 -2
- 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/domain-info-BkcBcyfF.mjs +0 -2
- 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/health-CTaCeVyC.mjs +0 -2
- 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/internal-BYS7hO8c.mjs +0 -2
- 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/live-BJE_YWE1.mjs +0 -2
- 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/r2-data-catalog-BRo-Rx2I.mjs +0 -2
- package/dist/rate-limit-analytics-BiRyU0Xd.mjs +0 -2
- package/dist/rate-limits-Cr2zpncO.mjs +0 -2
- package/dist/raw-fetch-DbXN3SlE.mjs +0 -2
- package/dist/ready-B3pLxnjc.mjs +0 -2
- package/dist/realtime-onrXppzh.mjs +0 -172
- package/dist/recent-submissions-JLOvuZq-.mjs +0 -2
- package/dist/refute-Dp3VodMn.mjs +0 -2
- 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/scan-logo-3Zr6CDJB.mjs +0 -2
- package/dist/scan-page-CxeudOzj.mjs +0 -2
- package/dist/scim-CtZ1FeQE.mjs +0 -18
- package/dist/search-B_P5ZTQj.mjs +0 -2
- 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/signed-url-D5RwvrQq.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/submission-info-_t78q2OE.mjs +0 -2
- 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/total-queries-CPrKEciQ.mjs +0 -2
- package/dist/tracked-domains-CTRItgFT.mjs +0 -2
- package/dist/tunnels-NzYpsfi_.mjs +0 -29
- 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/verify-5KcvRk-q.mjs +0 -2
- 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
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{a as l,n as u}from"./prompt-C8FyienX.mjs";function d(e){return e.usage(`$0 keyless-certificates create
|
|
3
|
-
|
|
4
|
-
Creates a Keyless SSL configuration that allows SSL/TLS termination without exposing private keys to Cloudflare. Keys remain on your infrastructure.`).option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).coerce(`bundle-method`,e=>c(e,`bundle-method`,`text`)).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or SSL certificate and intermediate(s).`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`,default:24008}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --tunnel-* flag is set`)}return!0})}const f={command:`create`,describe:`Create Keyless SSL Configuration`,builder:d,handler:async u=>a({command:`keyless-certificates create`,classification:{safeFlags:[`bundle-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf keyless-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({bundle_method:u[`bundle-method`],certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Creating`,async()=>a.keylessCertificates.create({...e,zone_id:d}));n(t,{successLabel:`Created`});return}if(u.certificate===void 0&&(u.certificate=await l(`certificate`,`The zone's SSL certificate or SSL certificate and intermediate(s).`)),u.host===void 0&&(u.host=await l(`host`,`The keyless SSL name.`)),u.port===void 0)throw Error(`--port is required (or pass --body with this field set).`);let f=s({bundle_method:u[`bundle-method`],certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}),p=await i(`Creating`,async()=>a.keylessCertificates.create({...f,zone_id:d}));n(p,{successLabel:`Created`})})};function p(e){return e.usage(`$0 keyless-certificates delete <keyless-certificate-id>
|
|
5
|
-
|
|
6
|
-
Removes a Keyless SSL configuration. SSL connections will no longer use the keyless server for cryptographic operations.`).positional(`keyless-certificate-id`,{type:`string`,description:`Keyless certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const m={command:`delete <keyless-certificate-id>`,describe:`Delete Keyless SSL Configuration`,builder:p,handler:async o=>a({command:`keyless-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf keyless-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/keyless_certificates/${o[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(o[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(o[`keyless-certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}let c=await i(`Deleting`,async()=>a.keylessCertificates.delete({zone_id:s,keyless_certificate_id:o[`keyless-certificate-id`]}));n(c,{successLabel:`Deleted`})})};function h(e){return e.usage(`$0 keyless-certificates edit <keyless-certificate-id>
|
|
8
|
-
|
|
9
|
-
This will update attributes of a Keyless SSL. Consists of one or more of the following: host,name,port.`).positional(`keyless-certificate-id`,{type:`string`,description:`Keyless certificate identifier tag.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether or not the Keyless SSL is on or off.`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --tunnel-* flag is set`)}return!0})}const g={command:`edit <keyless-certificate-id>`,describe:`Edit Keyless SSL Configuration`,builder:h,handler:async l=>a({command:`keyless-certificates edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf keyless-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/keyless_certificates/${l[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(l[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(l[`keyless-certificate-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({enabled:l.enabled,host:c(l.host,`host`,`text`),name:c(l.name,`name`,`text`),port:l.port,tunnel:{private_ip:c(l[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(l[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.keylessCertificates.edit({...e,zone_id:u,keyless_certificate_id:l[`keyless-certificate-id`]}));n(t,{successLabel:`Updated`});return}let d=s({enabled:l.enabled,host:c(l.host,`host`,`text`),name:c(l.name,`name`,`text`),port:l.port,tunnel:{private_ip:c(l[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(l[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}),f=await i(`Updating`,async()=>a.keylessCertificates.edit({...d,zone_id:u,keyless_certificate_id:l[`keyless-certificate-id`]}));n(f,{successLabel:`Updated`})})};function _(e){return e.usage(`$0 keyless-certificates get <keyless-certificate-id>
|
|
10
|
-
|
|
11
|
-
Get details for one Keyless SSL configuration.`).positional(`keyless-certificate-id`,{type:`string`,description:`Keyless certificate identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <keyless-certificate-id>`,describe:`Get Keyless SSL Configuration`,builder:_,handler:async o=>a({command:`keyless-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf keyless-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/keyless_certificates/${o[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(o[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(o[`keyless-certificate-id`]??``),"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.keylessCertificates.get({zone_id:s,keyless_certificate_id:o[`keyless-certificate-id`]}));n(c,{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 keyless-certificates list
|
|
12
|
-
|
|
13
|
-
List all Keyless SSL configurations for a given zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List Keyless SSL Configurations`,builder:y,handler:async o=>a({command:`keyless-certificates list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf keyless-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.keylessCertificates.list({zone_id:s}));n(c,{successLabel:`Loaded`})})},x={command:`keyless-certificates`,describe:`keyless-certificates`,builder:e=>e.command(f).command(m).command(g).command(v).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{x as default};
|
package/dist/keys-7BQ3Zq6Y.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";function c(e){return e.usage(`$0 keys list
|
|
3
|
-
|
|
4
|
-
Lists all distinct tag keys used across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`List tag keys`,builder:c,handler:async c=>s({command:`keys list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){let e=await n();a({command:`cf keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/tags/keys`,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.keys.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},u={command:`keys`,describe:`keys`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
|
package/dist/kv-BTYCXKML.mjs
DELETED
|
@@ -1,15 +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,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d,t as f}from"./input-validation-D7z60HJH.mjs";import{a as p,n as m}from"./prompt-C8FyienX.mjs";import{t as h}from"./cli-types-9oYmRTHJ.mjs";import{n as g,t as _}from"./raw-fetch-DbXN3SlE.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
|
|
3
|
-
|
|
4
|
-
Deletes up to 10,000 key-value pairs from the specified Workers KV namespace. Send a JSON array of the key names to delete. The result reports the number of successful deletions and any keys that failed and should be retried.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:v,handler:async u=>c({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){let e=await r();o({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await n(u),d=u.local?e:await i();if(u.accountId=d,!await m({force:!!u.force,message:`This operation deletes the specified keys and their values from the Workers KV namespace.`})){process.stderr.write(`Aborted.
|
|
5
|
-
`);return}if(u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let n=Math.ceil(e.length/1e4),r=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4),o=Math.floor(i/1e4)+1;r=await s(`Deleting: batch ${o}/${n}`,async()=>t(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:a}))}a(r,{successLabel:`Deleted`});return}let n=await s(`Deleting`,async()=>t(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:e}));a(n,{successLabel:`Deleted`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function b(e){return e.usage("$0 kv bulk get <namespace-id>\n\nRetrieves the text-based values of up to 100 keys from the specified Workers KV namespace. The result maps each requested key to its value. Set `type` to `json` to parse JSON values instead of returning strings, and set `withMetadata` to `true` to include metadata with each value. Binary values are not supported by this operation.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:"Return values as strings with `text`, or parse stored JSON values with `json`.",choices:[`text`,`json`],default:`text`}).coerce(`type`,e=>d(e,`type`,`text`)).option(`with-metadata`,{type:`boolean`,description:`Whether to include metadata in the response.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:b,handler:async t=>c({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`json`,body:t.body===void 0?u({keys:t.keys,type:t.type,withMetadata:t[`with-metadata`]}):l(t.body)});return}let c=await n(t),d=t.local?e:await i();if(t.accountId=d,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.kv.bulk.get({...e,account_id:d,namespace_id:t[`namespace-id`]}));a(n,{successLabel:`Created`});return}if(t.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let f=u({keys:t.keys,type:t.type,withMetadata:t[`with-metadata`]}),p=await s(`Creating`,async()=>c.kv.bulk.get({...f,account_id:d,namespace_id:t[`namespace-id`]}));a(p,{successLabel:`Created`})})};function S(e){return e.usage("$0 kv bulk put <namespace-id>\n\nWrites up to 10,000 key-value pairs to the specified Workers KV namespace from a JSON array, with optional metadata and expiration settings for each pair. Existing values and expirations are overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence. The entire request must be 100 megabytes or less. The result reports the number of successful writes and any keys that failed and should be retried.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`put <namespace-id>`,describe:`Write multiple key-value pairs`,builder:S,handler:async u=>c({command:`kv bulk put`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){let e=await r();o({command:`cf kv bulk put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await n(u),d=u.local?e:await i();if(u.accountId=d,u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let n=Math.ceil(e.length/1e4),r=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4),o=Math.floor(i/1e4)+1;r=await s(`Updating: batch ${o}/${n}`,async()=>t(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:a}))}a(r,{successLabel:`Updated`});return}let n=await s(`Updating`,async()=>t(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:e}));a(n,{successLabel:`Updated`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},w={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage("$0 kv keys delete <key-name>\n\nDeletes the specified key and its value from the Workers KV namespace. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const E={command:`delete <key-name>`,describe:`Delete a key-value pair`,builder:T,handler:async t=>c({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}/values/${t[`key-name`]==null?`<key-name>`:encodeURIComponent(String(t[`key-name`]))}`,pathParams:{"key-name":String(t[`key-name`]??``),"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await m({force:!!t.force,message:`This operation deletes the selected key-value pair from the Workers KV namespace.`})){process.stderr.write(`Aborted.
|
|
6
|
-
`);return}let u=await s(`Deleting`,async()=>c.kv.keys.delete({account_id:l,namespace_id:t[`namespace-id`],key_name:t[`key-name`]}));a(u,{successLabel:`Deleted`})})};function D(e){return e.usage("$0 kv keys get <key-name>\n\nReturns the value stored under the specified key in the Workers KV namespace as raw bytes. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If the key-value pair expires, the `expiration` response header contains its expiration time in seconds since the UNIX epoch.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const O={command:`get <key-name>`,describe:`Get a key's value`,builder:D,handler:async t=>c({command:`kv keys get`,classification:{safeFlags:[`dry-run`,`text`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}/values/${t[`key-name`]==null?`<key-name>`:encodeURIComponent(String(t[`key-name`]))}`,pathParams:{"key-name":String(t[`key-name`]??``),"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`none`});return}await n(t);let a=t.local?e:await i();t.accountId=a;let c=await s(`Loading`,async()=>_(`/accounts/${a}/storage/kv/namespaces/${encodeURIComponent(String(t[`namespace-id`]))}/values/${encodeURIComponent(String(t[`key-name`]))}`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));g(t.text===!0?c.toString(`utf-8`):c)})};function k(e){return e.usage("$0 kv keys list\n\nLists key names in the specified Workers KV namespace, with expiration times and metadata when present. Use `prefix` to filter names and `cursor` to request the next page. Values are not included.").option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`limit`,{type:`number`,description:"Maximum number of keys to return in one response. Pass `result_info.cursor` from the response as `cursor` to request the next page."}).option(`prefix`,{type:`string`,description:`Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.`}).option(`cursor`,{type:`string`,description:"Opaque pagination token from `result_info.cursor` in the previous response. Pass it unchanged to request the next page of keys."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List keys in a namespace`,builder:k,handler:async t=>c({command:`kv keys list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={limit:t.limit,prefix:t.prefix,cursor:t.cursor};if(t.dryRun){let e=await r();o({command:`cf kv keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}/keys`,pathParams:{"namespace-id":String(t[`namespace-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.kv.keys.list({account_id:u,namespace_id:t[`namespace-id`],...c}));a(d,{successLabel:`Loaded`})})};function j(e){return e.usage("$0 kv keys put <key-name>\n\nWrites a value under the specified key in the Workers KV namespace, creating the key-value pair or replacing its existing value, expiration, and metadata. Send the value as an `application/octet-stream` request body, or use `multipart/form-data` with a `value` part and an optional JSON `metadata` part. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`expiration`,{type:`number`,description:`Expires the key at a certain time, measured in number of seconds since the UNIX epoch.`}).option(`expiration-ttl`,{type:`number`,description:"Number of seconds until the key expires. Must be at least 60. Takes precedence over `expiration` when both are specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A byte sequence to be stored, up to 25 MiB in length.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`Associates arbitrary JSON data with a key/value pair.`})}const M={command:`put <key-name>`,describe:`Write a key-value pair with optional metadata`,builder:j,handler:async l=>c({command:`kv keys put`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={expiration:l.expiration,expiration_ttl:l[`expiration-ttl`]};if(l.dryRun){let e=await r();o({command:`cf kv keys put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${l[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(l[`namespace-id`]))}/values/${l[`key-name`]==null?`<key-name>`:encodeURIComponent(String(l[`key-name`]))}`,pathParams:{"key-name":String(l[`key-name`]??``),"namespace-id":String(l[`namespace-id`]??``)},query:c,bodyKind:l.metadata===void 0?`octet-stream`:`multipart`,body:l.metadata===void 0?l.body:{body:l.body,file:l.file,metadata:l.metadata}});return}let u=await n(l),p=l.local?e:await i();if(l.accountId=p,l.metadata!==void 0){let e=new FormData;if(l.file){let t=f(l.file);e.append(`value`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`value`,l.body);l.metadata!==void 0&&e.append(`metadata`,String(d(l.metadata,`metadata`,`text`)??``));let n=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}`,{body:e}));a(n,{successLabel:`Updated`});return}if(l.file){let e=f(l.file),n=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}}));a(n,{successLabel:`Updated`});return}if(l.body){let e=d(l.body,`body`,`binary`),n=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r=await s(`Updating`,async()=>t(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}${n?`?`+n:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}}));a(r,{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.`)})},N={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage("$0 kv metadata get <key-name>\n\nReturns the JSON metadata associated with the specified key in the Workers KV namespace, without retrieving its value. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <key-name>`,describe:`Get a key's metadata`,builder:P,handler:async t=>c({command:`kv metadata get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}/metadata/${t[`key-name`]==null?`<key-name>`:encodeURIComponent(String(t[`key-name`]))}`,pathParams:{"key-name":String(t[`key-name`]??``),"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.kv.metadata.get({account_id:l,namespace_id:t[`namespace-id`],key_name:t[`key-name`]}));a(u,{successLabel:`Loaded`})})},I={command:`metadata`,describe:`Operations for metadata`,builder:e=>e.command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 kv namespaces create
|
|
7
|
-
|
|
8
|
-
Creates a Workers KV namespace in the specified account with the given title. Returns \`400\` if the account already owns a namespace with that title; an existing namespace must be explicitly deleted before it can be replaced. An optional jurisdiction restricts where data is durably stored and can only be set at creation time.`).option(`jurisdiction`,{type:`string`,description:`Specify the jurisdiction to restrict the KV namespace to durably store data within. Can only be set at namespace creation time.`,choices:[`eu`,`fedramp`,`us`]}).coerce(`jurisdiction`,e=>d(e,`jurisdiction`,`text`)).option(`namespace-mode`,{type:`string`,description:"The mode of the Workers KV namespace. Specify `instant` when creating a namespace to create a KV Instant namespace. Omit this field when creating a namespace to create a classic namespace. Currently, `instant` is the only supported explicit value.",choices:[`instant`]}).coerce(`namespace-mode`,e=>d(e,`namespace-mode`,`text`)).option(`title`,{type:`string`,description:`Human-readable string name for a Workers KV namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`create`,describe:`Create a namespace`,builder:L,handler:async t=>c({command:`kv namespaces create`,classification:{safeFlags:[`jurisdiction`,`namespace-mode`,`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces`,pathParams:{},bodyKind:`json`,body:t.body===void 0?u({jurisdiction:t.jurisdiction,mode:t[`namespace-mode`],title:d(t.title,`title`,`text`)}):l(t.body)});return}let c=await n(t),f=t.local?e:await i();if(t.accountId=f,t.body){let e=l(t.body),n=await s(`Creating`,async()=>c.kv.namespaces.create({...e,account_id:f}));a(n,{successLabel:`Created`});return}t.title===void 0&&(t.title=await p(`title`,`Human-readable string name for a Workers KV namespace.`));let m=u({jurisdiction:t.jurisdiction,mode:t[`namespace-mode`],title:d(t.title,`title`,`text`)}),h=await s(`Creating`,async()=>c.kv.namespaces.create({...m,account_id:f}));a(h,{successLabel:`Created`})})};function z(e){return e.usage(`$0 kv namespaces delete <namespace-id>
|
|
9
|
-
|
|
10
|
-
Deletes the specified Workers KV namespace and its stored key-value pairs from the account.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`delete <namespace-id>`,describe:`Delete a namespace`,builder:z,handler:async t=>c({command:`kv namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}`,pathParams:{"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await m({force:!!t.force,message:`This operation deletes the selected Workers KV namespace and all of its key-value pairs.`})){process.stderr.write(`Aborted.
|
|
11
|
-
`);return}let u=await s(`Deleting`,async()=>c.kv.namespaces.delete({account_id:l,namespace_id:t[`namespace-id`]}));a(u,{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 kv namespaces get <namespace-id>
|
|
12
|
-
|
|
13
|
-
Returns the Workers KV namespace for the specified account and namespace ID.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <namespace-id>`,describe:`Get a namespace`,builder:V,handler:async t=>c({command:`kv namespaces get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}`,pathParams:{"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();t.accountId=l;let u=await s(`Loading`,async()=>c.kv.namespaces.get({account_id:l,namespace_id:t[`namespace-id`]}));a(u,{successLabel:`Loaded`})})};function U(e){return e.usage("$0 kv namespaces list\n\nLists Workers KV namespaces owned by the specified account. Use `page` and `per_page` to select a page of results, and `order` and `direction` to control sorting.").option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:"Namespace field to sort by (`id` or `title`).",choices:[`id`,`title`]}).option(`direction`,{type:`string`,description:"Sort namespaces in ascending (`asc`) or descending (`desc`) order.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List namespaces`,builder:h(U),handler:async t=>c({command:`kv namespaces list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},t,async()=>{let c={page:t.page,per_page:t[`per-page`],order:t.order,direction:t.direction};if(t.dryRun){let e=await r();o({command:`cf kv namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.kv.namespaces.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 kv namespaces update <namespace-id>
|
|
14
|
-
|
|
15
|
-
Changes the title of the specified Workers KV namespace and returns the updated namespace. The namespace ID and stored key-value pairs are unchanged.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`title`,{type:`string`,description:`Human-readable string name for a Workers KV namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`update <namespace-id>`,describe:`Rename a namespace`,builder:G,handler:async t=>c({command:`kv namespaces update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf kv namespaces update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces/${t[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(t[`namespace-id`]))}`,pathParams:{"namespace-id":String(t[`namespace-id`]??``)},bodyKind:`json`,body:t.body===void 0?u({title:d(t.title,`title`,`text`)}):l(t.body)});return}let c=await n(t),f=t.local?e:await i();if(t.accountId=f,t.body){let e=l(t.body),n=await s(`Updating`,async()=>c.kv.namespaces.update({...e,account_id:f,namespace_id:t[`namespace-id`]}));a(n,{successLabel:`Updated`});return}t.title===void 0&&(t.title=await p(`title`,`Human-readable string name for a Workers KV namespace.`));let m=u({title:d(t.title,`title`,`text`)}),h=await s(`Updating`,async()=>c.kv.namespaces.update({...m,account_id:f,namespace_id:t[`namespace-id`]}));a(h,{successLabel:`Updated`})})},q={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(R).command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`kv`,describe:`kv`,builder:e=>e.command(w).command(N).command(I).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-CAWalgW0.mjs";import{i as t}from"./context-BBLtgdR1.mjs";import{t as n}from"./output-BOe-3AQG.mjs";import{t as r}from"./dry-run-DRj2_uV3.mjs";import{t as i}from"./progress-CQqDtgmF.mjs";import{t as a}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as o,t as s}from"./body-parser-DkHKPkJ7.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{n as l}from"./prompt-C8FyienX.mjs";function u(e){return e.usage(`$0 leaked-credential-checks detections create
|
|
3
|
-
|
|
4
|
-
Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const d={command:`create`,describe:`Create a custom detection location for a zone.`,builder:u,handler:async l=>a({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:e,zone_id:u}));n(t,{successLabel:`Created`});return}let d=s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}),f=await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:d,zone_id:u}));n(f,{successLabel:`Created`})})};function f(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
|
|
5
|
-
|
|
6
|
-
Delete a user-defined detection location, identified by its detection ID. Incoming requests are then scanned using only the default scan locations and the detection locations that remain.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const p={command:`delete <detection-id>`,describe:`Delete a custom detection location from a zone.`,builder:f,handler:async o=>a({command:`leaked-credential-checks detections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf leaked-credential-checks detections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/leaked-credential-checks/detections/${o[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(o[`detection-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"detection-id":String(o[`detection-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await l({force:!!o.force,message:`This operation deletes a Leaked Credential Checks custom detection location.`})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}let c=await i(`Deleting`,async()=>a.leakedCredentialChecks.detections.delete({zone_id:s,detection_id:o[`detection-id`]}));n(c,{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 leaked-credential-checks detections get <detection-id>
|
|
8
|
-
|
|
9
|
-
Get the username and password expressions of a single user-defined detection location, identified by its detection ID.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <detection-id>`,describe:`Get a custom detection location of a zone.`,builder:m,handler:async o=>a({command:`leaked-credential-checks detections get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf leaked-credential-checks detections get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/leaked-credential-checks/detections/${o[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(o[`detection-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"detection-id":String(o[`detection-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.leakedCredentialChecks.detections.get({zone_id:s,detection_id:o[`detection-id`]}));n(c,{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 leaked-credential-checks detections list
|
|
10
|
-
|
|
11
|
-
List the user-defined detection locations configured for Leaked Credential Checks, each with its own identifier. A custom detection location tells the WAF where to find the username and password in requests to your application.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List the custom detection locations of a zone.`,builder:g,handler:async o=>a({command:`leaked-credential-checks detections list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf leaked-credential-checks detections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.leakedCredentialChecks.detections.list({zone_id:s}));n(c,{successLabel:`Loaded`})})};function v(e){return e.usage(`$0 leaked-credential-checks detections update <detection-id>
|
|
12
|
-
|
|
13
|
-
Update the username and password expressions of an existing detection location, identified by its detection ID. Both expressions are overwritten, so omitting the password expression clears it.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const y={command:`update <detection-id>`,describe:`Update a custom detection location of a zone.`,builder:v,handler:async l=>a({command:`leaked-credential-checks detections update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf leaked-credential-checks detections update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/leaked-credential-checks/detections/${l[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(l[`detection-id`]))}`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``),"detection-id":String(l[`detection-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}):o(l.body)});return}let a=await e(l),u=await t({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body),t=await i(`Updating`,async()=>a.leakedCredentialChecks.detections.update({body:e,zone_id:u,detection_id:l[`detection-id`]}));n(t,{successLabel:`Updated`});return}let d=s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}),f=await i(`Updating`,async()=>a.leakedCredentialChecks.detections.update({body:d,zone_id:u,detection_id:l[`detection-id`]}));n(f,{successLabel:`Updated`})})},b={command:`detections`,describe:`Custom detection locations that tell the WAF where to find usernames and passwords in requests`,builder:e=>e.command(d).command(p).command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 leaked-credential-checks get
|
|
14
|
-
|
|
15
|
-
Get the current Leaked Credential Checks status for the zone. While enabled, Cloudflare scans incoming requests for usernames and passwords that were exposed in known data breaches.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get the Leaked Credential Checks status for a zone.`,builder:x,handler:async o=>a({command:`leaked-credential-checks get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf leaked-credential-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.leakedCredentialChecks.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 leaked-credential-checks update
|
|
16
|
-
|
|
17
|
-
Update the Leaked Credential Checks status for the zone, enabling or disabling the detection. While enabled, the detection populates the \`cf.waf.credential_check.*\` fields, which you can reference in custom rules and rate limiting rules to challenge or block requests carrying compromised credentials.`).option(`enabled`,{type:`boolean`,description:`Determines whether or not Leaked Credential Checks are enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Defines the overall status for Leaked Credential Checks.`})}const w={command:`update`,describe:`Update the Leaked Credential Checks status for a zone.`,builder:C,handler:async c=>a({command:`leaked-credential-checks update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){r({command:`cf leaked-credential-checks update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({enabled:c.enabled}):o(c.body)});return}let a=await e(c),u=await t({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=u,!await l({force:!!c.force,message:`This operation toggles Leaked Credential Checks for a zone.`})){process.stderr.write(`Aborted.
|
|
18
|
-
`);return}if(c.body){let e=o(c.body),t=await i(`Deleting`,async()=>a.leakedCredentialChecks.update({body:e,zone_id:u}));n(t,{successLabel:`Deleted`});return}let d=s({enabled:c.enabled}),f=await i(`Deleting`,async()=>a.leakedCredentialChecks.update({body:d,zone_id:u}));n(f,{successLabel:`Deleted`})})},T={command:`leaked-credential-checks`,describe:`Detect compromised credentials in login requests by checking against known breach databases`,builder:e=>e.command(S).command(w).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};
|
package/dist/live-BJE_YWE1.mjs
DELETED
package/dist/local-BundUuDT.mjs
DELETED
package/dist/login-BBYC_BtH.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-CQ_TYifs.mjs";import{r as t}from"./banner-D03JEqRs.mjs";import"./ui-YmjF66Ct.mjs";import{n}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as r,t as i}from"./login-D2uoWhWh.mjs";const a={...i,describe:!1,handler:async n=>{n.quiet||console.error(t(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`)),await i.handler(n)}};var o=n(a,{command:`login`,classification:r});export{o as default};
|
package/dist/login-D2uoWhWh.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-CQ_TYifs.mjs";import{m as t,o as n}from"./chunk-NDZDTP46-Civns3WA.mjs";import{a as r,n as i,r as a}from"./banner-D03JEqRs.mjs";import"./ui-YmjF66Ct.mjs";import{c as o,d as s,i as c,l,o as u,p as d,r as f,s as p,u as m}from"./oauth-BUr8bPwo.mjs";import{t as h}from"./output-BOe-3AQG.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(n({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async n=>{_(n,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),t(n.name);let r=u().configs.exists(n.name);await l({browser:n.browser,device:n.device,scopes:n.scopes,profile:n.name}),console.log(a(r?`Profile "${n.name}" re-authenticated.`:`Profile "${n.name}" created.`)),console.log(i(`Run ${e.code(`cf auth activate ${n.name}`)} to use this profile in a directory.`))}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async n=>{_(n,`delete`),v(),t(n.name);let r=u();if(!r.configs.exists(n.name))throw Error(`Profile "${n.name}" does not exist.`);let o=r.bindings.removeAllBindingsForProfile(n.name);if(o.length>0){console.log(a(`Removed directory bindings:`));for(let e of o)console.log(` ${e}`)}await m(n.name),r.configs.delete(n.name),console.log(a(`Profile "${n.name}" deleted.`));let s=r.bindings.getProfileForDirectory(process.cwd());s?console.log(a(`Active profile for this directory: ${s}.`)):r.configs.exists(`default`)?console.log(a(`This directory now uses the default profile.`)):console.log(i(`No active profile for this directory. Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`))}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:e=>{_(e,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),t(e.name);let n=u();if(!n.configs.exists(e.name))throw Error(`Profile "${e.name}" does not exist. Run \`cf auth create ${e.name}\` first.`);let r=e.dir??process.cwd();n.bindings.activate(e.name,r),console.log(a(`Profile "${e.name}" activated for "${g.resolve(r)}".`))}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:t=>{_(t,`deactivate`),v();let n=u(),r=t.dir??process.cwd(),{removedProfile:o,newResolution:s}=n.bindings.deactivate(r);console.log(a(`Profile "${o}" deactivated from "${g.resolve(r)}".`)),s.profile===void 0?console.log(i(`Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`)):s.profile==="default"?console.log(a(`This directory now uses the default profile.`)):console.log(a(`Now using: ${s.profile} (${s.source}).`))}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async t=>{_(t,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let n=f();if(n!=="default"&&console.log(r(`This directory has profile "${n}" active. \`cf auth login\` updates the default profile, not "${n}".\nTo re-authenticate "${n}", run \`cf auth create ${n}\`.`)),d(`default`),!t.force&&o()){if(await p()){let t=s();console.log(a(`You are already logged in.`)),console.log(`${e.info(`Config file:`)} ${e.muted(c())}`),t?.expiration_time&&console.log(`${e.info(`Token expires:`)} ${new Date(t.expiration_time).toLocaleString()}`),console.log(i(`Run ${e.code(`cf auth login --force`)} to re-authenticate, or ${e.code(`cf auth logout`)} to log out.`));return}console.log(r(`Existing tokens are invalid or expired. Starting fresh login...
|
|
3
|
-
`))}else t.force&&o()&&console.log(a(`Re-authenticating...
|
|
4
|
-
`));if(console.log(a(`Starting OAuth login flow...
|
|
5
|
-
`)),!await l({browser:t.browser,device:t.device,scopes:t.scopes,profile:`default`})){console.log(r(`CLOUDFLARE_API_TOKEN is set and takes precedence. Unset it to log in via OAuth.`));return}let u=s();console.log(`${e.info(`Config file:`)} ${e.muted(c())}`),u?.scopes&&(u.scopes.length>5?(console.log(`${e.info(`Scopes:`)} ${u.scopes.length} selected`),console.log(i(`Run ${e.code(`cf auth whoami`)} to see the full list.`))):console.log(`${e.info(`Scopes:`)} ${u.scopes.join(`, `)}`)),u?.expiration_time&&console.log(`${e.info(`Token expires:`)} ${new Date(u.expiration_time).toLocaleString()}`)}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,t as r}from"./context-BBLtgdR1.mjs";import{t as i}from"./output-BOe-3AQG.mjs";import{t as a}from"./dry-run-DRj2_uV3.mjs";import{t as o}from"./progress-CQqDtgmF.mjs";import{t as s}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";function c(e){return e.usage(`$0 logo-matches download get
|
|
3
|
-
|
|
4
|
-
Return matches as CSV for logo queries based on ID`).option(`logo-id`,{type:`string`,description:`Logo ID`}).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Download matches for logo queries by ID`,builder:c,handler:async c=>s({command:`logo-matches download get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){let e=await n();a({command:`cf logo-matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/logo-matches/download`,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.logoMatches.download.get({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 logo-matches get
|
|
5
|
-
|
|
6
|
-
Return matches for logo queries based on ID`).option(`logo-id`,{type:`string`,description:`Logo ID`}).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Read matches for logo queries by ID`,builder:d,handler:async c=>s({command:`logo-matches get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){let e=await n();a({command:`cf logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/logo-matches`,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.logoMatches.get({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},p={command:`logo-matches`,describe:`logo-matches`,builder:e=>e.command(f).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
|
package/dist/logos-X5B8z7Iv.mjs
DELETED
|
@@ -1,7 +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,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,t as u}from"./input-validation-D7z60HJH.mjs";import{n as d}from"./prompt-C8FyienX.mjs";function f(e){return e.usage(`$0 logos create
|
|
3
|
-
|
|
4
|
-
Return new saved logo queries created from image files`).option(`tag`,{type:`string`,description:`Tag`}).option(`match-type`,{type:`string`,description:`Match type`}).option(`threshold`,{type:`number`,description:`Threshold`}).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`})}const p={command:`create`,describe:`Create new saved logo queries from image files`,builder:f,handler:async d=>c({command:`logos create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{let c={tag:d.tag,match_type:d[`match-type`],threshold:d.threshold};if(d.dryRun){let e=await r();o({command:`cf logos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/logos`,pathParams:{},query:c,bodyKind:`octet-stream`,body:d.body});return}let f=await n(d),p=d.local?e:await i();if(d.accountId=p,d.file){let e=u(d.file),n=await s(`Creating`,async()=>t(f,`POST`,`/accounts/${p}/brand-protection/logos`,{body:e,headers:{"Content-Type":`application/x-www-form-urlencoded`}}));a(n,{successLabel:`Created`});return}if(d.body){let e=l(d.body,`body`,`binary`),n=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),r=await s(`Creating`,async()=>t(f,`POST`,`/accounts/${p}/brand-protection/logos${n?`?`+n:``}`,{body:e,headers:{"Content-Type":`application/x-www-form-urlencoded`}}));a(r,{successLabel:`Created`});return}if(d.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function m(e){return e.usage(`$0 logos delete <logo-id>
|
|
5
|
-
|
|
6
|
-
Return a success message after deleting saved logo queries by ID`).positional(`logo-id`,{type:`string`,description:`Logo 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 h={command:`delete <logo-id>`,describe:`Delete saved logo queries by ID`,builder:m,handler:async t=>c({command:`logos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){let e=await r();o({command:`cf logos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/logos/${t[`logo-id`]==null?`<logo-id>`:encodeURIComponent(String(t[`logo-id`]))}`,pathParams:{"logo-id":String(t[`logo-id`]??``)},bodyKind:`none`});return}let c=await n(t),l=t.local?e:await i();if(t.accountId=l,!await d({force:!!t.force})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}let u=await s(`Deleting`,async()=>c.logos.delete({account_id:l,logo_id:t[`logo-id`]}));a(u,{successLabel:`Deleted`})})},g={command:`logos`,describe:`logos`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{n as t}from"./auth-CAWalgW0.mjs";import{a as n,i as r,t as i}from"./context-BBLtgdR1.mjs";import{t as a}from"./output-BOe-3AQG.mjs";import{t as o}from"./dry-run-DRj2_uV3.mjs";import{t as s}from"./progress-CQqDtgmF.mjs";import{t as c}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as l,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";function m(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
|
|
3
|
-
|
|
4
|
-
Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <dataset-id>`,describe:`List fields`,builder:m,handler:async l=>c({command:`logpush account-datasets fields get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/datasets/${l[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(l[`dataset-id`]))}/fields`,pathParams:{"account-or-zone":String(t),"dataset-id":String(l[`dataset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.logpush.accountDatasets.fields.get({account_or_zone:u,account_or_zone_id:d,dataset_id:l[`dataset-id`]}));a(f,{successLabel:`Loaded`})})},g={command:`fields`,describe:`Operations for account-datasets.fields`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 logpush account-datasets jobs get <dataset-id>
|
|
5
|
-
|
|
6
|
-
Lists Logpush jobs for an account or zone for a dataset.`).positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <dataset-id>`,describe:`List Logpush jobs for a dataset`,builder:_,handler:async l=>c({command:`logpush account-datasets jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-datasets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/datasets/${l[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(l[`dataset-id`]))}/jobs`,pathParams:{"account-or-zone":String(t),"dataset-id":String(l[`dataset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.logpush.accountDatasets.jobs.get({account_or_zone:u,account_or_zone_id:d,dataset_id:l[`dataset-id`]}));a(f,{successLabel:`Loaded`})})},v={command:`jobs`,describe:`Operations for account-datasets.jobs`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`account-datasets`,describe:`Operations for account-datasets`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 logpush account-jobs create
|
|
7
|
-
|
|
8
|
-
Creates a new Logpush job for an account or zone.`).option(`dataset`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,choices:/* @__PURE__ */ `access_requests.account_abuse_protection_events.audit_logs.audit_logs_v2.biso_user_actions.casb_findings.device_posture_results.dex_application_tests.dex_device_state_events.dlp_forensic_copies.dns_firewall_logs.dns_logs.email_security_alerts.email_security_post_delivery_events.firewall_events.gateway_dns.gateway_http.gateway_network.http_requests.ipsec_logs.magic_bgp_logs.magic_ids_detections.mcp_portal_logs.mnm_flow_logs.nel_reports.network_analytics_logs.page_shield_events.sinkhole_http_logs.spectrum_events.ssh_logs.turnstile_events.warp_config_changes.warp_toggle_changes.websocket_analytics.workers_trace_events.zaraz_events.zero_trust_network_sessions`.split(`.`),default:`http_requests`}).coerce(`dataset`,e=>d(e,`dataset`,`text`)).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`,default:!1}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets.",default:!1}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`],default:`high`}).coerce(`frequency`,e=>d(e,`frequency`,`text`)).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`],default:``}).coerce(`kind`,e=>d(e,`kind`,`text`)).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).coerce(`output-options-output-type`,e=>d(e,`output-options-output-type`,`text`)).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).coerce(`output-options-timestamp-format`,e=>d(e,`output-options-timestamp-format`,`text`)).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).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`,describe:`Create Logpush job`,builder:b,handler:async p=>c({command:`logpush account-jobs create`,classification:{safeFlags:[`dataset`,`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({dataset:p.dataset,destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:p.frequency,kind:p.kind,logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:p[`output-options-output-type`],record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:p[`output-options-timestamp-format`]},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}):l(p.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let c=await t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.logpush.accountJobs.create({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({dataset:p.dataset,destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:p.frequency,kind:p.kind,logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:p[`output-options-output-type`],record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:p[`output-options-timestamp-format`]},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}),_=await s(`Creating`,async()=>c.logpush.accountJobs.create({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{successLabel:`Created`})})};function S(e){return e.usage(`$0 logpush account-jobs delete <job-id>
|
|
9
|
-
|
|
10
|
-
Deletes a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,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 C={command:`delete <job-id>`,describe:`Delete Logpush job`,builder:S,handler:async l=>c({command:`logpush account-jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"account-or-zone":String(t),"job-id":String(l[`job-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();if(u===`zones`?l.zoneId=d:l.accountId=d,!await p({force:!!l.force,message:`This operation deletes the Logpush job.`})){process.stderr.write(`Aborted.
|
|
11
|
-
`);return}let f=await s(`Deleting`,async()=>c.logpush.accountJobs.delete({account_or_zone:u,account_or_zone_id:d,job_id:l[`job-id`]}));a(f,{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 logpush account-jobs get <job-id>
|
|
12
|
-
|
|
13
|
-
Gets the details of a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <job-id>`,describe:`Get Logpush job details`,builder:w,handler:async l=>c({command:`logpush account-jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"account-or-zone":String(t),"job-id":String(l[`job-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.logpush.accountJobs.get({account_or_zone:u,account_or_zone_id:d,job_id:l[`job-id`]}));a(f,{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 logpush account-jobs list
|
|
14
|
-
|
|
15
|
-
Lists Logpush jobs for an account or zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List Logpush jobs`,builder:E,handler:async l=>c({command:`logpush account-jobs list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await t(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await i();u===`zones`?l.zoneId=d:l.accountId=d;let f=await s(`Loading`,async()=>c.logpush.accountJobs.list({account_or_zone:u,account_or_zone_id:d}));a(f,{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 logpush account-jobs update <job-id>
|
|
16
|
-
|
|
17
|
-
Updates a Logpush job.`).positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets."}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`]}).coerce(`frequency`,e=>d(e,`frequency`,`text`)).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`]}).coerce(`kind`,e=>d(e,`kind`,`text`)).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).coerce(`output-options-output-type`,e=>d(e,`output-options-output-type`,`text`)).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Specifies the sampling rate as a floating number greater than 0 and at most 1. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).coerce(`output-options-timestamp-format`,e=>d(e,`output-options-timestamp-format`,`text`)).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).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:`update <job-id>`,describe:`Update Logpush job`,builder:O,handler:async f=>c({command:`logpush account-jobs update`,classification:{safeFlags:[`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await n():void 0,t=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf logpush account-jobs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/jobs/${f[`job-id`]==null?`<job-id>`:encodeURIComponent(String(f[`job-id`]))}`,pathParams:{"account-or-zone":String(t),"job-id":String(f[`job-id`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:f.body===void 0?u({destination_conf:d(f[`destination-conf`],`destination-conf`,`text`),enabled:f.enabled,filter:d(f.filter,`filter`,`text`),filter_attack_traffic:f[`filter-attack-traffic`],frequency:f.frequency,kind:f.kind,logpull_options:d(f[`logpull-options`],`logpull-options`,`text`),name:d(f.name,`name`,`text`),output_options:{"CVE-2021-44228":f[`output-options-cve-2021-44228`],batch_prefix:d(f[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(f[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(f[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:f[`output-options-field-names`],merge_subrequests:f[`output-options-merge-subrequests`],output_type:f[`output-options-output-type`],record_delimiter:d(f[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(f[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(f[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(f[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:f[`output-options-sample-rate`],timestamp_format:f[`output-options-timestamp-format`]},ownership_challenge:d(f[`ownership-challenge`],`ownership-challenge`,`text`)}):l(f.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let c=await t(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await i();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body),t=await s(`Updating`,async()=>c.logpush.accountJobs.update({...e,account_or_zone:p,account_or_zone_id:m,job_id:f[`job-id`]}));a(t,{successLabel:`Updated`});return}let h=u({destination_conf:d(f[`destination-conf`],`destination-conf`,`text`),enabled:f.enabled,filter:d(f.filter,`filter`,`text`),filter_attack_traffic:f[`filter-attack-traffic`],frequency:f.frequency,kind:f.kind,logpull_options:d(f[`logpull-options`],`logpull-options`,`text`),name:d(f.name,`name`,`text`),output_options:{"CVE-2021-44228":f[`output-options-cve-2021-44228`],batch_prefix:d(f[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(f[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(f[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:f[`output-options-field-names`],merge_subrequests:f[`output-options-merge-subrequests`],output_type:f[`output-options-output-type`],record_delimiter:d(f[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(f[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(f[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(f[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:f[`output-options-sample-rate`],timestamp_format:f[`output-options-timestamp-format`]},ownership_challenge:d(f[`ownership-challenge`],`ownership-challenge`,`text`)}),g=await s(`Updating`,async()=>c.logpush.accountJobs.update({...h,account_or_zone:p,account_or_zone_id:m,job_id:f[`job-id`]}));a(g,{successLabel:`Updated`})})},A={command:`account-jobs`,describe:`Operations for account-jobs`,builder:e=>e.command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 logpush account-ownership create
|
|
18
|
-
|
|
19
|
-
Gets a new ownership challenge sent to your destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`create`,describe:`Get ownership challenge`,builder:j,handler:async p=>c({command:`logpush account-ownership create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/ownership`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}):l(p.body),sensitiveBodyPaths:[[`destination_conf`]]});return}let c=await t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.logpush.accountOwnership.create({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}),_=await s(`Creating`,async()=>c.logpush.accountOwnership.create({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{successLabel:`Created`})})};function N(e){return e.usage(`$0 logpush account-ownership validate create
|
|
20
|
-
|
|
21
|
-
Validates ownership challenge of the destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`create`,describe:`Validate ownership challenge`,builder:N,handler:async p=>c({command:`logpush account-ownership validate create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-ownership validate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/ownership/validate`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}):l(p.body),sensitiveBodyPaths:[[`destination_conf`],[`ownership_challenge`]]});return}let c=await t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.logpush.accountOwnership.validate.create({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`})),p[`ownership-challenge`]===void 0&&(p[`ownership-challenge`]=await f(`ownership-challenge`,`Ownership challenge token to prove destination ownership.`,{kind:`secret`}));let g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}),_=await s(`Creating`,async()=>c.logpush.accountOwnership.validate.create({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{successLabel:`Created`})})},F={command:`validate`,describe:`Operations for account-ownership.validate`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`account-ownership`,describe:`Operations for account-ownership`,builder:e=>e.command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 logpush account-validate destination-exists-delete
|
|
22
|
-
|
|
23
|
-
Checks if there is an existing job with a destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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 R={command:`destination-exists-delete`,describe:`Check destination exists`,builder:L,handler:async p=>c({command:`logpush account-validate destination-exists-delete`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-validate destination-exists-delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/validate/destination/exists`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}):l(p.body),sensitiveBodyPaths:[[`destination_conf`]]});return}let c=await t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.logpush.accountValidate.destinationExistsDelete({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}),_=await s(`Creating`,async()=>c.logpush.accountValidate.destinationExistsDelete({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{successLabel:`Created`})})};function z(e){return e.usage(`$0 logpush account-validate destination delete
|
|
24
|
-
|
|
25
|
-
Validates destination.`).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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:`delete`,describe:`Validate destination`,builder:z,handler:async p=>c({command:`logpush account-validate destination delete`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-validate destination delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/validate/destination`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}):l(p.body),sensitiveBodyPaths:[[`destination_conf`]]});return}let c=await t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.logpush.accountValidate.destination.delete({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}),_=await s(`Creating`,async()=>c.logpush.accountValidate.destination.delete({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{successLabel:`Created`})})},V={command:`destination`,describe:`Operations for account-validate.destination`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.usage(`$0 logpush account-validate origin create
|
|
26
|
-
|
|
27
|
-
Validates logpull origin with logpull_options.`).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`create`,describe:`Validate origin`,builder:te,handler:async p=>c({command:`logpush account-validate origin create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await n():void 0,t=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-validate origin create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logpush/validate/origin`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({logpull_options:d(p[`logpull-options`],`logpull-options`,`text`)}):l(p.body)});return}let c=await t(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await i();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body),t=await s(`Creating`,async()=>c.logpush.accountValidate.origin.create({...e,account_or_zone:m,account_or_zone_id:h}));a(t,{successLabel:`Created`});return}p[`logpull-options`]===void 0&&(p[`logpull-options`]=await f(`logpull-options`,"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."));let g=u({logpull_options:d(p[`logpull-options`],`logpull-options`,`text`)}),_=await s(`Creating`,async()=>c.logpush.accountValidate.origin.create({...g,account_or_zone:m,account_or_zone_id:h}));a(_,{successLabel:`Created`})})},U={command:`origin`,describe:`Operations for account-validate.origin`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},W={command:`account-validate`,describe:`Operations for account-validate`,builder:e=>e.command(R).command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 logpush edge create
|
|
28
|
-
|
|
29
|
-
Creates a new Instant Logs job for a zone.`).option(`fields`,{type:`string`,description:`Comma-separated list of fields.`}).option(`filter`,{type:`string`,description:`Filters to drill down into specific events.`}).option(`sample`,{type:`number`,description:`The sample parameter is the sample rate of the records set by the client: "sample": 1 is 100% of records "sample": 10 is 10% and so 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 K={command:`create`,describe:`Create Instant Logs job`,builder:G,handler:async e=>c({command:`logpush edge create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf logpush edge create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/edge/jobs`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({fields:d(e.fields,`fields`,`text`),filter:d(e.filter,`filter`,`text`),sample:e.sample}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.logpush.edge.create({...t,zone_id:i}));a(r,{successLabel:`Created`});return}let c=u({fields:d(e.fields,`fields`,`text`),filter:d(e.filter,`filter`,`text`),sample:e.sample}),f=await s(`Creating`,async()=>n.logpush.edge.create({...c,zone_id:i}));a(f,{successLabel:`Created`})})};function q(e){return e.usage(`$0 logpush edge get
|
|
30
|
-
|
|
31
|
-
Lists Instant Logs jobs for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get`,describe:`List Instant Logs jobs`,builder:q,handler:async e=>c({command:`logpush edge get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf logpush edge get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/edge/jobs`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.logpush.edge.get({zone_id:i}));a(c,{successLabel:`Loaded`})})},Y={command:`edge`,describe:`Operations for edge`,builder:e=>e.command(K).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return e.usage(`$0 logpush transformers content get <transformer-id>
|
|
32
|
-
|
|
33
|
-
Returns the SQL query content for a transformer. Without query params, returns the latest version. With \`version_id\`, returns the specified version.`).positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`version-id`,{type:`number`,description:`Specific version ID to retrieve. When omitted, the latest version is returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get <transformer-id>`,describe:`Get transformer content`,builder:X,handler:async r=>c({command:`logpush transformers content get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={version_id:r[`version-id`]};if(r.dryRun){let e=await n();o({command:`cf logpush transformers content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logpush/transformers/${r[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(r[`transformer-id`]))}/content`,pathParams:{"transformer-id":String(r[`transformer-id`]??``)},query:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Loading`,async()=>l.logpush.transformers.content.get({account_id:u,transformer_id:r[`transformer-id`],...c}));a(d,{successLabel:`Loaded`})})},Q={command:`content`,describe:`Operations for transformers.content`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 logpush transformers create
|
|
34
|
-
|
|
35
|
-
Creates a new custom log transformer for an account.`).option(`code`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).option(`description`,{type:`string`,description:`Optional customer-provided description.`}).option(`name`,{type:`string`,description:`Customer-provided name for identification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`create`,describe:`Create transformer`,builder:ne,handler:async r=>c({command:`logpush transformers create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf logpush transformers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({code:d(r.code,`code`,`text`),description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)}):l(r.body)});return}let c=await t(r),p=r.local?e:await i();if(r.accountId=p,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.logpush.transformers.create({...e,account_id:p}));a(t,{successLabel:`Created`});return}r.code===void 0&&(r.code=await f(`code`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`)),r.name===void 0&&(r.name=await f(`name`,`Customer-provided name for identification.`));let m=u({code:d(r.code,`code`,`text`),description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)}),h=await s(`Creating`,async()=>c.logpush.transformers.create({...m,account_id:p}));a(h,{successLabel:`Created`})})};function ie(e){return e.usage(`$0 logpush transformers delete <transformer-id>
|
|
36
|
-
|
|
37
|
-
Deletes a custom log transformer. Returns 409 Conflict if any active logpush jobs reference the transformer.`).positional(`transformer-id`,{type:`string`,description:`The transformer 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 <transformer-id>`,describe:`Delete transformer`,builder:ie,handler:async r=>c({command:`logpush transformers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf logpush transformers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logpush/transformers/${r[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(r[`transformer-id`]))}`,pathParams:{"transformer-id":String(r[`transformer-id`]??``)},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();if(r.accountId=l,!await p({force:!!r.force})){process.stderr.write(`Aborted.
|
|
38
|
-
`);return}let u=await s(`Deleting`,async()=>c.logpush.transformers.delete({account_id:l,transformer_id:r[`transformer-id`]}));a(u,{successLabel:`Deleted`})})};function oe(e){return e.usage(`$0 logpush transformers get <transformer-id>
|
|
39
|
-
|
|
40
|
-
Gets a single custom log transformer by ID.`).positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <transformer-id>`,describe:`Get transformer`,builder:oe,handler:async r=>c({command:`logpush transformers get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf logpush transformers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logpush/transformers/${r[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(r[`transformer-id`]))}`,pathParams:{"transformer-id":String(r[`transformer-id`]??``)},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.logpush.transformers.get({account_id:l,transformer_id:r[`transformer-id`]}));a(u,{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 logpush transformers list
|
|
41
|
-
|
|
42
|
-
Lists all custom log transformers for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List transformers`,builder:ce,handler:async r=>c({command:`logpush transformers list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf logpush transformers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.logpush.transformers.list({account_id:l}));a(u,{successLabel:`Loaded`})})};function ue(e){return e.usage(`$0 logpush transformers preview
|
|
43
|
-
|
|
44
|
-
Executes a SQL transformer against a single input record and returns the transformed output. This is a stateless endpoint — nothing is persisted.`).option(`sql`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).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:`preview`,describe:`Preview transformer`,builder:ue,handler:async r=>c({command:`logpush transformers preview`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf logpush transformers preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logpush/transformers/preview`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({sql:d(r.sql,`sql`,`text`)}):l(r.body)});return}let c=await t(r),p=r.local?e:await i();if(r.accountId=p,r.body){let e=l(r.body),t=await s(`Loading`,async()=>c.logpush.transformers.preview({...e,account_id:p}));a(t,{successLabel:`Loaded`});return}r.sql===void 0&&(r.sql=await f(`sql`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`));let m=u({sql:d(r.sql,`sql`,`text`)}),h=await s(`Loading`,async()=>c.logpush.transformers.preview({...m,account_id:p}));a(h,{successLabel:`Loaded`})})};function fe(e){return e.usage("$0 logpush transformers update <transformer-id>\n\nUpdates an existing custom log transformer. When `code` is provided, the SQL query is validated and a new version is created. When `code` is omitted, only the name and description are updated. Omitting `description` clears the existing description.").positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`code`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).option(`description`,{type:`string`,description:`Optional customer-provided description.`}).option(`name`,{type:`string`,description:`Customer-provided name for identification.`}).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 pe={command:`update <transformer-id>`,describe:`Update transformer`,builder:fe,handler:async r=>c({command:`logpush transformers update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf logpush transformers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logpush/transformers/${r[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(r[`transformer-id`]))}`,pathParams:{"transformer-id":String(r[`transformer-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({code:d(r.code,`code`,`text`),description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)}):l(r.body)});return}let c=await t(r),p=r.local?e:await i();if(r.accountId=p,r.body){let e=l(r.body),t=await s(`Updating`,async()=>c.logpush.transformers.update({...e,account_id:p,transformer_id:r[`transformer-id`]}));a(t,{successLabel:`Updated`});return}r.name===void 0&&(r.name=await f(`name`,`Customer-provided name for identification.`));let m=u({code:d(r.code,`code`,`text`),description:d(r.description,`description`,`text`),name:d(r.name,`name`,`text`)}),h=await s(`Updating`,async()=>c.logpush.transformers.update({...m,account_id:p,transformer_id:r[`transformer-id`]}));a(h,{successLabel:`Updated`})})};function $(e){return e.usage(`$0 logpush transformers versions list
|
|
45
|
-
|
|
46
|
-
Returns version metadata for a transformer, newest first. Each version corresponds to a SQL query update.`).option(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Maximum number of versions to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List transformer versions`,builder:$,handler:async r=>c({command:`logpush transformers versions list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit};if(r.dryRun){let e=await n();o({command:`cf logpush transformers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logpush/transformers/${r[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(r[`transformer-id`]))}/versions`,pathParams:{"transformer-id":String(r[`transformer-id`]??``)},query:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Loading`,async()=>l.logpush.transformers.versions.list({account_id:u,transformer_id:r[`transformer-id`],...c}));a(d,{successLabel:`Loaded`})})},he={command:`versions`,describe:`Operations for transformers.versions`,builder:e=>e.command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ge={command:`transformers`,describe:`Operations for transformers`,builder:e=>e.command(re).command(ae).command(se).command(le).command(de).command(pe).command(Q).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_e={command:`logpush`,describe:`logpush`,builder:e=>e.command(y).command(A).command(I).command(W).command(Y).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_e as default};
|
package/dist/logs-BKDz7kBW.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-BcPM4I0s.mjs";import{i as t,n}from"./auth-CAWalgW0.mjs";import{a as r,i,t as a}from"./context-BBLtgdR1.mjs";import{t as o}from"./output-BOe-3AQG.mjs";import{t as s}from"./dry-run-DRj2_uV3.mjs";import{t as c}from"./progress-CQqDtgmF.mjs";import{t as l}from"./run-CW2Cgi0S.mjs";import"./telemetry-0Y5hAtCX.mjs";import{n as u,r as d,t as f}from"./body-parser-DkHKPkJ7.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-C8FyienX.mjs";import{t as _}from"./cli-types-9oYmRTHJ.mjs";function v(e){return e.usage(`$0 logs datasets available
|
|
3
|
-
|
|
4
|
-
Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`available`,describe:`List available account or zone datasets`,builder:v,handler:async t=>l({command:`logs datasets available`,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 logs datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(t),u=t.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();u===`zones`?t.zoneId=d:t.accountId=d;let f=await c(`Loading`,async()=>l.logs.datasets.available({account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 logs datasets create
|
|
5
|
-
|
|
6
|
-
Create a new Log Explorer dataset for the account or zone. List available account or zone datasets to see the dataset types and fields you can use. The \`fields\` property is optional. If not specified, all available fields will be enabled. For dataset field definitions, see: https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/`).option(`dataset`,{type:`string`,description:"Dataset type name to create (e.g. `http_requests`)."}).option(`fields`,{type:`string`,description:`Controls which fields the API ingests. Defaults to all available
|
|
7
|
-
fields when absent.
|
|
8
|
-
. Provide as a JSON array of objects or @path/to/file.json.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are ingested.
|
|
9
|
-
See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
|
|
10
|
-
for syntax and examples.
|
|
11
|
-
`}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. Defaults to\n`true` for supported datasets when omitted. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).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`,describe:`Create an account or zone dataset`,builder:b,handler:async t=>l({command:`logs datasets create`,classification:{safeFlags:[`filter-attack-traffic`,`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 logs datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:t.body===void 0?f({dataset:p(t.dataset,`dataset`,`text`),fields:d(t.fields,`fields`),filter:p(t.filter,`filter`,`text`),filter_attack_traffic:t[`filter-attack-traffic`]}):u(t.body)});return}let l=await n(t),m=t.zone===void 0?`accounts`:`zones`,g=m===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();if(m===`zones`?t.zoneId=g:t.accountId=g,t.body){let e=u(t.body),n=await c(`Creating`,async()=>l.logs.datasets.create({...e,account_or_zone:m,account_or_zone_id:g}));o(n,{successLabel:`Created`});return}t.dataset===void 0&&(t.dataset=await h(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let _=f({dataset:p(t.dataset,`dataset`,`text`),fields:d(t.fields,`fields`),filter:p(t.filter,`filter`,`text`),filter_attack_traffic:t[`filter-attack-traffic`]}),v=await c(`Creating`,async()=>l.logs.datasets.create({..._,account_or_zone:m,account_or_zone_id:g}));o(v,{successLabel:`Created`})})};function S(e){return e.usage(`$0 logs datasets delete <dataset-id>
|
|
12
|
-
|
|
13
|
-
Deletes a Log Explorer dataset for the account or zone. Dataset deletion must not be protected.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset 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 C={command:`delete <dataset-id>`,describe:`Delete an account or zone dataset`,builder:S,handler:async t=>l({command:`logs datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},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 logs datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logs/explorer/datasets/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"dataset-id":String(t[`dataset-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();if(u===`zones`?t.zoneId=d:t.accountId=d,!await g({force:!!t.force,message:`This operation deletes a Log Explorer dataset for the account.`})){process.stderr.write(`Aborted.
|
|
14
|
-
`);return}let f=await c(`Deleting`,async()=>l.logs.datasets.delete({account_or_zone:u,account_or_zone_id:d,dataset_id:t[`dataset-id`]}));o(f,{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 logs datasets get <dataset-id>
|
|
15
|
-
|
|
16
|
-
Retrieve a single Log Explorer dataset by ID for the account or zone.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <dataset-id>`,describe:`Get an account or zone dataset`,builder:w,handler:async t=>l({command:`logs datasets get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){let e=t.zone===void 0?await r():void 0,n=t.zone===void 0?`accounts`:`zones`,i=t.zone??e??`<account-id>`;s({command:`cf logs datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logs/explorer/datasets/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"dataset-id":String(t[`dataset-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.logs.datasets.get({account_or_zone:u,account_or_zone_id:d,dataset_id:t[`dataset-id`]}));o(f,{successLabel:`Loaded`})})};function E(e){return e.usage("$0 logs datasets list\n\nReturns all Log Explorer datasets configured for the account or zone. Pass `include_zones=true` to also include zone-level datasets that belong to this account or zone. List responses omit the `fields` property; use the single-dataset endpoint to retrieve field configuration.").option(`include-zones`,{type:`boolean`,description:`Set to true to include zone-scoped datasets belonging to this account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List account or zone datasets`,builder:E,handler:async t=>l({command:`logs datasets list`,classification:{safeFlags:[`include-zones`,`dry-run`]}},t,async()=>{let l={include_zones:t[`include-zones`]};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 logs datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(t),d=t.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:t.zone},u,{quiet:t.quiet}):t.local?e:await a();d===`zones`?t.zoneId=f:t.accountId=f;let p=await c(`Loading`,async()=>u.logs.datasets.list({account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 logs datasets update <dataset-id>
|
|
17
|
-
|
|
18
|
-
Updates the enabled state and/or field configuration of an account or zone dataset.`).positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`deletion-protection`,{type:`boolean`,description:"Set to `false` to allow deletion of this dataset."}).option(`enabled`,{type:`boolean`,description:`Whether to enable or disable log ingest for this dataset.`}).option(`fields`,{type:`string`,description:`Controls which fields the API ingests after the update. Defaults
|
|
19
|
-
to all available fields when absent.
|
|
20
|
-
. Provide as a JSON array of objects or @path/to/file.json.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are
|
|
21
|
-
ingested. If omitted, the existing filter is left unchanged. Set
|
|
22
|
-
to an empty string (\`""\`) to clear the filter. Otherwise,
|
|
23
|
-
replaces the dataset's filter entirely.
|
|
24
|
-
See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
|
|
25
|
-
for syntax and examples.
|
|
26
|
-
`}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. If omitted,\nthe existing setting is left unchanged. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).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:`update <dataset-id>`,describe:`Update an account or zone dataset`,builder:O,handler:async t=>l({command:`logs datasets update`,classification:{safeFlags:[`deletion-protection`,`enabled`,`filter-attack-traffic`,`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 logs datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/logs/explorer/datasets/${t[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(t[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"dataset-id":String(t[`dataset-id`]??``)},bodyKind:`json`,body:t.body===void 0?f({deletion_protection:t[`deletion-protection`],enabled:t.enabled,fields:d(t.fields,`fields`),filter:p(t.filter,`filter`,`text`),filter_attack_traffic:t[`filter-attack-traffic`]}):u(t.body)});return}let l=await n(t),m=t.zone===void 0?`accounts`:`zones`,h=m===`zones`?await i({zone:t.zone},l,{quiet:t.quiet}):t.local?e:await a();if(m===`zones`?t.zoneId=h:t.accountId=h,t.body){let e=u(t.body),n=await c(`Updating`,async()=>l.logs.datasets.update({...e,account_or_zone:m,account_or_zone_id:h,dataset_id:t[`dataset-id`]}));o(n,{successLabel:`Updated`});return}if(t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let g=f({deletion_protection:t[`deletion-protection`],enabled:t.enabled,fields:d(t.fields,`fields`),filter:p(t.filter,`filter`,`text`),filter_attack_traffic:t[`filter-attack-traffic`]}),_=await c(`Updating`,async()=>l.logs.datasets.update({...g,account_or_zone:m,account_or_zone_id:h,dataset_id:t[`dataset-id`]}));o(_,{successLabel:`Updated`})})},A={command:`datasets`,describe:`Operations for datasets`,builder:e=>e.command(y).command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 logs list get
|
|
27
|
-
|
|
28
|
-
Lists R2 objects containing logs matching the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`limit`,{type:`number`,description:`Maximum number of results to return.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get`,describe:`List log files`,builder:j,handler:async i=>l({command:`logs list get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{let l={start:i.start,end:i.end,bucket:i.bucket,prefix:i.prefix,limit:i.limit},u={};if(i[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(i[`r2-access-key-id`])),i[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(i[`r2-secret-access-key`])),i.dryRun){let e=await r();s({command:`cf logs list get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/list`,pathParams:{},query:l,bodyKind:`none`});return}let d=await n(i),f=i.local?e:await a();i.accountId=f;let p=await c(`Loading`,async()=>t(d,`GET`,`/accounts/${f}/logs/list`,{query:l,headers:Object.keys(u).length>0?u:void 0}));o(p,{successLabel:`Loaded`})})},N={command:`list`,describe:`Operations for list`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 logs query
|
|
29
|
-
|
|
30
|
-
Run a SQL query against account or zone-level datasets. Timestamp fields are RFC3339 strings. Filter with: WHERE {timestamp_field} >= now() - INTERVAL '30' DAY WHERE {timestamp_field} >= '2026-04-01T00:00:00Z' WHERE {timestamp_field} BETWEEN '2026-04-01T00:00:00Z' AND '2026-04-30T23:59:59Z' List configured account or zone datasets to see enabled account or zone-level datasets. Zone-level datasets will not appear here. List available account or zone datasets to inspect their schemas and timestamp fields. For more information about the datasets, and the meaning of each field, check out https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/`).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`})}const F={command:`query`,describe:`Run a log query`,builder:P,handler:async u=>l({command:`logs query`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await r():void 0,t=u.zone===void 0?`accounts`:`zones`,n=u.zone??e??`<account-id>`;s({command:`cf logs query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logs/explorer/query/sql`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`octet-stream`,body:u.body});return}let l=await n(u),d=u.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:u.zone},l,{quiet:u.quiet}):u.local?e:await a();if(d===`zones`?u.zoneId=f:u.accountId=f,u.file){let e=m(u.file),n=await c(`Loading`,async()=>t(l,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}}));o(n,{successLabel:`Loaded`});return}if(u.body){let e=p(u.body,`body`,`binary`),n=await c(`Loading`,async()=>t(l,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}}));o(n,{successLabel:`Loaded`});return}let h=await c(`Loading`,async()=>l.logs.query({account_or_zone:d,account_or_zone_id:f}));o(h,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 logs rayid get <ray-id>
|
|
31
|
-
|
|
32
|
-
The \`/rayids\` api route allows lookups by specific rayid. The rayids route will return zero, one, or more records (ray ids are not unique).`).positional(`ray-id`,{type:`string`,description:`Ray identifier.`,demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <ray-id>`,describe:`Get logs RayIDs`,builder:_(I),handler:async e=>l({command:`logs rayid get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={fields:e.fields,timestamps:e.timestamps};if(e.dryRun){s({command:`cf logs rayid get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/rayids/${e[`ray-id`]==null?`<ray-id>`:encodeURIComponent(String(e[`ray-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ray-id":String(e[`ray-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.logs.rayid.get({zone_id:a,ray_id:e[`ray-id`],...t}));o(l,{successLabel:`Loaded`})})},R={command:`rayid`,describe:`Operations for rayid`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 logs received fields get
|
|
33
|
-
|
|
34
|
-
Lists all fields available. The response is json object with key-value pairs, where keys are field names, and values are descriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get`,describe:`List fields`,builder:z,handler:async e=>l({command:`logs received fields get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf logs received fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received/fields`,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.logs.received.fields.get({zone_id:r}));o(a,{successLabel:`Loaded`})})},V={command:`fields`,describe:`Operations for received.fields`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage('$0 logs received get\n\nThe `/received` api route allows customers to retrieve their edge HTTP logs. The basic access pattern is "give me all the logs for zone Z for minute M", where the minute M refers to the time records were received at Cloudflare\'s central data center. `start` is inclusive, and `end` is exclusive. Because of that, to get all data, at minutely cadence, starting at 10AM, the proper values are: `start=2018-05-20T10:00:00Z&end=2018-05-20T10:01:00Z`, then `start=2018-05-20T10:01:00Z&end=2018-05-20T10:02:00Z` and so on; the overlap will be handled properly.').option(`start`,{type:`string`,description:`Sets the (inclusive) beginning of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than seven days.`}).option(`end`,{type:`string`,description:"Sets the (exclusive) end of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. `end` must be at least five minutes earlier than now and must be later than `start`. Difference between `start` and `end` must be not greater than one hour.",demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`sample`,{type:`number`,description:"When `?sample=` is provided, a sample of matching records is returned. If `sample=0.1` then 10% of records will be returned. Sampling is random: repeated calls will not only return different records, but likely will also vary slightly in number of returned records. When `?count=` is also specified, `count` is applied to the number of returned records, not the sampled records. So, with `sample=0.05` and `count=7`, when there is a total of 100 records available, approximately five will be returned. When there are 1000 records, seven will be returned. When there are 10,000 records, seven will be returned."}).option(`count`,{type:`number`,description:"When `?count=` is provided, the response will contain up to `count` results. Since results are not sorted, you are likely to get different data for repeated requests. `count` must be an integer > 0."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get`,describe:`Get logs received`,builder:_(H),handler:async e=>l({command:`logs received get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={start:e.start,end:e.end,fields:e.fields,sample:e.sample,count:e.count,timestamps:e.timestamps};if(e.dryRun){s({command:`cf logs received get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.logs.received.get({zone_id:a,...t}));o(l,{successLabel:`Loaded`})})},W={command:`received`,describe:`Received log operations`,builder:e=>e.command(U).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 logs retrieve get
|
|
35
|
-
|
|
36
|
-
Returns logs stored in R2 that match the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get`,describe:`Retrieve logs`,builder:G,handler:async i=>l({command:`logs retrieve get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{let l={start:i.start,end:i.end,bucket:i.bucket,prefix:i.prefix},u={};if(i[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(i[`r2-access-key-id`])),i[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(i[`r2-secret-access-key`])),i.dryRun){let e=await r();s({command:`cf logs retrieve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/logs/retrieve`,pathParams:{},query:l,bodyKind:`none`});return}let d=await n(i),f=i.local?e:await a();i.accountId=f;let p=await c(`Loading`,async()=>t(d,`GET`,`/accounts/${f}/logs/retrieve`,{query:l,headers:Object.keys(u).length>0?u:void 0}));o(p,{successLabel:`Loaded`})})},q={command:`retrieve`,describe:`Operations for retrieve`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`logs`,describe:`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,builder:e=>e.command(F).command(A).command(N).command(R).command(W).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
|