cf 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +6724 -3970
- package/dist/_meta/hand-written-commands.json +150 -32
- package/dist/_meta/schemas.json +2083 -2159
- package/dist/abuse-reports-BAQR1w79.mjs +26 -0
- package/dist/access-C8KMplzp.mjs +27 -0
- package/dist/account-B-KQSR0L.mjs +12 -0
- package/dist/account-tags-EncLJpLc.mjs +15 -0
- package/dist/accounts-BA4Mp3A_.mjs +132 -0
- package/dist/acm-ByxUJcqF.mjs +15 -0
- package/dist/addressing-C-ym0h0G.mjs +93 -0
- package/dist/agent-memory-CkPSiZDI.mjs +34 -0
- package/dist/ai-DkE_Q64s.mjs +31 -0
- package/dist/ai-audit-pPcjYWI5.mjs +6 -0
- package/dist/ai-gateway-DtrwF1lQ.mjs +147 -0
- package/dist/ai-search-DLD_kDS1.mjs +79 -0
- package/dist/ai-security-jyZcBl9g.mjs +10 -0
- package/dist/alerting-DOROjm8E.mjs +56 -0
- package/dist/analytics-rQ-h-plT.mjs +21 -0
- package/dist/analytics_engine-Cg9gCAMt.mjs +4 -0
- package/dist/{lifecycle-XswDq0ZB.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
- package/dist/api-security-B8p8vp8u.mjs +154 -0
- package/dist/argo-g8SjUb_t.mjs +10 -0
- package/dist/artifacts-B1PaeF5h.mjs +43 -0
- package/dist/audit-logs-DmU_PHy_.mjs +4 -0
- package/dist/auth-CZqics6E.mjs +2 -0
- package/dist/auth-Cp7gT-AF.mjs +8 -0
- package/dist/billing-CvTbUg-H.mjs +23 -0
- package/dist/bot-management-z53tbcbH.mjs +9 -0
- package/dist/botnet-feed-CSBbJdr_.mjs +11 -0
- package/dist/brand-protection-DzV211IQ.mjs +27 -0
- package/dist/browser-extension-C0Hi9CHX.mjs +15 -0
- package/dist/browser-run-DYQvMAyo.mjs +46 -0
- package/dist/build-BPIp8J5F.mjs +2 -0
- package/dist/build-OC77a1zq.mjs +2 -0
- package/dist/builds-CwKRqjQ5.mjs +71 -0
- package/dist/cache-CugNPPsJ.mjs +45 -0
- package/dist/certificate-authorities-DaEnJYge.mjs +6 -0
- package/dist/cf-oadujOtC.mjs +18 -0
- package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
- package/dist/chunk-DL5FNmn1.mjs +2 -0
- package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
- package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
- package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
- package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
- package/dist/client-certificates-DZUIqBTB.mjs +13 -0
- package/dist/client-side-security-Dk6F1ENG.mjs +63 -0
- package/dist/cloud-connector-avpf86kG.mjs +6 -0
- package/dist/cloudflared-DhItYrCq.mjs +2 -0
- package/dist/cloudforce-one-DNRhUD8z.mjs +456 -0
- package/dist/command-B2Qe-WUa.mjs +2 -0
- package/dist/command-CF0giIIc.mjs +3 -0
- package/dist/command-D45NW-R3.mjs +2 -0
- package/dist/command-DIvPLK8x.mjs +2 -0
- package/dist/{completions-nPO9PdSu.mjs → completions-xPLd1cvL.mjs} +3 -3
- package/dist/{config-B8lwPpVl.mjs → config-B4vIa0zp.mjs} +1 -1
- package/dist/config.d.mts +1 -1729
- package/dist/config.mjs +1 -1
- package/dist/connector-interrupts-BSztJ-Ko.mjs +6 -0
- package/dist/connector-telemetry-events-_M8CCK6_.mjs +6 -0
- package/dist/connector-telemetry-snapshots-DySvmR9a.mjs +6 -0
- package/dist/connectors-BSmhzNB7.mjs +15 -0
- package/dist/containers-B5vDcFzo.mjs +78 -0
- package/dist/{shared-YJtB5KZB.mjs → containers-CFzvhmyz.mjs} +85 -84
- package/dist/content-scan-CeLZAcbT.mjs +14 -0
- package/dist/cps-BlI_Od72.mjs +6 -0
- package/dist/csamScanner-Cn7d0HWS.mjs +10 -0
- package/dist/ct-alerting-lhgFPu-y.mjs +5 -0
- package/dist/custom-certificates-Ba4Do5qt.mjs +17 -0
- package/dist/custom-csrs-MNUIx8yX.mjs +11 -0
- package/dist/custom-hostnames-Dj1SBd0J.mjs +27 -0
- package/dist/custom-nameservers-C7nzhNzV.mjs +9 -0
- package/dist/custom-pages-BgfhGksj.mjs +21 -0
- package/dist/d1-P2kWbdID.mjs +45 -0
- package/dist/data-security-pBIozmRL.mjs +71 -0
- package/dist/dcv-delegation-Bpy9WnKZ.mjs +4 -0
- package/dist/delegate-GctF_lrq.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-QTGENpOM.mjs → deploy-CVYdt3NK.mjs} +1 -1
- package/dist/{deploy-input-C7W1Bsji.mjs → deploy-input-DpOgndz4.mjs} +1 -1
- package/dist/dev-PPUBjWcm.mjs +4 -0
- package/dist/diagnostics-C62habGQ.mjs +15 -0
- package/dist/dialog-C_ccBiZp.mjs +2 -0
- package/dist/dist-B4pQ4CXK.mjs +48 -0
- package/dist/{dist-DW5BPGFs.mjs → dist-BpadEMNY.mjs} +1 -1
- package/dist/dist-dc4E1u01.mjs +272 -0
- package/dist/dls-CpkcyQ8C.mjs +17 -0
- package/dist/dns-DG1X4Wap.mjs +135 -0
- package/dist/dns-firewall-B1gGHEDo.mjs +71 -0
- package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
- package/dist/dry-run-CLX6Pbtq.mjs +2 -0
- package/dist/durable-objects-D214VhxH.mjs +8 -0
- package/dist/email-auth-Ba4ONan2.mjs +6 -0
- package/dist/email-routing-BlqKnqNM.mjs +45 -0
- package/dist/email-security-Dl1E1Dko.mjs +160 -0
- package/dist/email-sending-DIRSSRIz.mjs +47 -0
- package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
- package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
- package/dist/fieldExtractors-zqYKMCEn.mjs +9 -0
- package/dist/firewall-DdsDh8GD.mjs +56 -0
- package/dist/flagship-CkUIVW7c.mjs +28 -0
- package/dist/fraud-BUpZgvQT.mjs +22 -0
- package/dist/google-tag-gateway-Bi1uLnEU.mjs +6 -0
- package/dist/healthchecks-DjQWb3EM.mjs +22 -0
- package/dist/hostnames-ClBLPbct.mjs +11 -0
- package/dist/hyperdrive-U54xZsWU.mjs +37 -0
- package/dist/iam-T-wWmOep.mjs +52 -0
- package/dist/images-ia5UG1GW.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/intel-BhswZLMI.mjs +76 -0
- package/dist/interactive-B6woOLo-.mjs +32 -0
- package/dist/interactive-DnUvQHjc.mjs +2 -0
- package/dist/ips-Dad_EvhM.mjs +4 -0
- package/dist/keyless-certificates-BhHaxLjM.mjs +13 -0
- package/dist/keys-DjIPvqj4.mjs +4 -0
- package/dist/kv-DzXVnK94.mjs +21 -0
- package/dist/leaked-credential-checks-B9G_ZTNH.mjs +18 -0
- package/dist/lifecycle-Ichnb2x1.mjs +2 -0
- package/dist/load-balancers-3wGHPsYz.mjs +76 -0
- package/dist/local-B6b2OIBW.mjs +2 -0
- package/dist/local-BrfySqnx.mjs +2 -0
- package/dist/{local-runtime-BUGCbx8r.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
- package/dist/login-CEQbOgBM.mjs +5 -0
- package/dist/login-DEWvGuaU.mjs +2 -0
- package/dist/logo-matches-YGRPstPi.mjs +6 -0
- package/dist/logos-BirufUgo.mjs +7 -0
- package/dist/logpush-BlNbUHyV.mjs +46 -0
- package/dist/logs-DmFlVF9q.mjs +48 -0
- package/dist/magic-cloud-networking-B3Wj2dhJ.mjs +71 -0
- package/dist/magic-network-monitoring-ry63w2Rw.mjs +36 -0
- package/dist/magic-transit-CBVOK2aa.mjs +387 -0
- package/dist/managed-defense-BdW6s483.mjs +18 -0
- package/dist/managed-transforms-BIeiofIS.mjs +9 -0
- package/dist/matches-CAnwci0P.mjs +6 -0
- package/dist/mcp-BfhOMGFE.mjs +32 -0
- package/dist/mesh-CxUL2Wf-.mjs +26 -0
- package/dist/mtls-certificates-CzmTw4zs.mjs +13 -0
- package/dist/network-C68psMbz.mjs +50 -0
- package/dist/network-interconnects-CLsMrTuk.mjs +73 -0
- package/dist/oauth-D4bkeMAw.mjs +14 -0
- package/dist/oauth-DouM-qz0.mjs +2 -0
- package/dist/oauth-clients-DbUmVE_5.mjs +16 -0
- package/dist/oauth-scopes-CQ18rwBg.mjs +4 -0
- package/dist/observability-DpYxkFeZ.mjs +80 -0
- package/dist/{open-PBXRGS4R-DARSUDEI.mjs → open-PBXRGS4R-C4CKEADM.mjs} +3 -3
- package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
- package/dist/organization-Dg55Xfz7.mjs +75 -0
- package/dist/organizations-QnyzGjB2.mjs +4 -0
- package/dist/origin-ca-certificates-Co5lqIGL.mjs +11 -0
- package/dist/origin-post-quantum-encryption-Cz8JZamC.mjs +6 -0
- package/dist/origin-tls-client-auth-Dd0T1Kfv.mjs +30 -0
- package/dist/{output-COcSQsfn.mjs → output-Bia1u2k5.mjs} +1 -1
- package/dist/page-rules--D3eXrCf.mjs +39 -0
- package/dist/pages-Ce8DDgNr.mjs +60 -0
- package/dist/pay-per-crawl-CpkEbasz.mjs +65 -0
- package/dist/pay-per-use-fyM1DWgY.mjs +6 -0
- package/dist/pipelines-CAqCgBLh.mjs +44 -0
- package/dist/precursor-DBnn4Q35.mjs +4 -0
- package/dist/previews-y_nSqWK5.mjs +4 -0
- package/dist/progress-Bi02B6v4.mjs +2 -0
- package/dist/project-settings-DSXevRvj.mjs +3 -0
- package/dist/prompt-Bx2PB-tt.mjs +3 -0
- package/dist/queries-dg-CVXjf.mjs +9 -0
- package/dist/queues-C_ilLbRI.mjs +63 -0
- package/dist/r2-data-catalog-DGv6aROr.mjs +44 -0
- package/dist/r2-hZAkra-l.mjs +127 -0
- package/dist/radar-BO9b0aZy.mjs +300 -0
- package/dist/{raw-fetch-BVYQR6C5.mjs → raw-fetch-DNTQkXbg.mjs} +1 -1
- package/dist/realtime-eSavuSeE.mjs +172 -0
- package/dist/registrar-Ct30kOXZ.mjs +43 -0
- package/dist/registrar-sandbox-Dmn9zGUk.mjs +56 -0
- package/dist/{registry-CWUfXloz.mjs → registry-vreNkX6u.mjs} +1 -1
- package/dist/reporting-B-F5aWUJ.mjs +14 -0
- package/dist/request-headers-Dnbzv6RZ.mjs +2 -0
- package/dist/request-tracers-CaubpUFV.mjs +4 -0
- package/dist/resolve-BXemCSyA.mjs +2 -0
- package/dist/resolve-CUDKxUrW.mjs +2 -0
- package/dist/resource-sharing-6Snv-b69.mjs +40 -0
- package/dist/resource-tagging-W_LFiX2J.mjs +4 -0
- package/dist/rules-C26eyeA5.mjs +18 -0
- package/dist/rulesets-BKzIwVtJ.mjs +37 -0
- package/dist/rum-Xdw5hyWY.mjs +30 -0
- package/dist/run-BBBMrSrs.mjs +2 -0
- package/dist/run-BRucX7Rz.mjs +2 -0
- package/dist/{schema-C8hU6G9R.mjs → schema-DqtYndhB.mjs} +1 -1
- package/dist/{schema-flags-DC4c6dka.mjs → schema-flags-CebDI0f1.mjs} +4 -4
- package/dist/scim-odJTXiIe.mjs +18 -0
- package/dist/{sdk-C12y5qCN.mjs → sdk-CvIO3tWS.mjs} +1 -1
- package/dist/secrets-store-RYpWWzaw.mjs +24 -0
- package/dist/security-center-B3D95vCa.mjs +30 -0
- package/dist/security-txt-BSytVv-9.mjs +9 -0
- package/dist/shared-D67owd9x.mjs +2 -0
- package/dist/smart-shield-C83Sfnf4.mjs +24 -0
- package/dist/snippets-B6oE9WIa.mjs +20 -0
- package/dist/source-BR4_k2ad.mjs +6 -0
- package/dist/spawn-CKqJ9J4_.mjs +523 -0
- package/dist/spectrum-CfxY--X_.mjs +83 -0
- package/dist/speed-DzK-kiWt.mjs +24 -0
- package/dist/src-B3h6tKMt.mjs +108 -0
- package/dist/ssl-dnjzPcSB.mjs +45 -0
- package/dist/startup-profile-CYEokTVe.mjs +2 -0
- package/dist/startup-profile-CgWHy4rE.mjs +17 -0
- package/dist/state-BxCejn42.mjs +2 -0
- package/dist/state-DSzkxXML.mjs +2 -0
- package/dist/stream-oFyhS4Wi.mjs +102 -0
- package/dist/submit-4f-ravmC.mjs +4 -0
- package/dist/tags-DrIP6Uiq.mjs +4 -0
- package/dist/{telemetry-DjGNSlkU.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
- package/dist/telemetry-Ds4epd3D.mjs +2 -0
- package/dist/telemetry-mKEb8lYB.mjs +2 -0
- package/dist/tenant-C-gc3NWv.mjs +12 -0
- package/dist/tenant-custom-nameservers-DduTQIwh.mjs +9 -0
- package/dist/{tools-D9RZkZRc.mjs → tools-BMKpYraQ.mjs} +1 -1
- package/dist/tunnels-D0QYsskp.mjs +29 -0
- package/dist/turnstile-C6Q3spRB.mjs +33 -0
- package/dist/ui-DH95w1Qk.mjs +5 -0
- package/dist/undici-DTSBJHNS.mjs +96 -0
- package/dist/update-check-BBS1K1jt.mjs +2 -0
- package/dist/update-check-CTLoakFV.mjs +2 -0
- package/dist/update-check-worker.mjs +2 -0
- package/dist/url-info-Cs0V89qq.mjs +4 -0
- package/dist/url-normalization-DaEQYy5h.mjs +9 -0
- package/dist/url-scanner-C4YVeQ4v.mjs +16 -0
- package/dist/user-BV1VY3Kl.mjs +112 -0
- package/dist/values-qDS63E43.mjs +4 -0
- package/dist/vectorize-NFzD3mP5.mjs +32 -0
- package/dist/version-W6_TN_kN.mjs +2 -0
- package/dist/waiting-rooms-Y9YGj3ih.mjs +53 -0
- package/dist/web-assets-Gd6z8dbt.mjs +64 -0
- package/dist/web3-DCJx4NRp.mjs +28 -0
- package/dist/workers-B-j-1ygi.mjs +36 -0
- package/dist/workers-builds-DPrNKjZW.mjs +14 -0
- package/dist/workers-for-platforms-BjKAhMLA.mjs +25 -0
- package/dist/workers-vpc-C5YoCnQK.mjs +13 -0
- package/dist/workflows-C2KKIJjl.mjs +43 -0
- package/dist/zaraz-CVLCs1IX.mjs +22 -0
- package/dist/zero-trust-BtJi4OXF.mjs +795 -0
- package/dist/zone-hKgt0WzO.mjs +4 -0
- package/dist/zones-CCNyaD3J.mjs +124 -0
- package/package.json +15 -12
- package/dist/_meta/agent-context.json +0 -193
- package/dist/abuse-reports-BbaHw4ST.mjs +0 -8
- package/dist/access-D6Xz892p.mjs +0 -11
- package/dist/account-DvxcqeaK.mjs +0 -2
- package/dist/account-tags-CeqfEWpz.mjs +0 -9
- package/dist/accounts-Bx-8BMH9.mjs +0 -30
- package/dist/acm--0opdSGE.mjs +0 -3
- package/dist/addressing-BS1ynzLA.mjs +0 -13
- package/dist/agent-context-BPhyrSns.mjs +0 -8
- package/dist/agent-memory-DczzpEw5.mjs +0 -6
- package/dist/ai-CDdCTcQl.mjs +0 -5
- package/dist/ai-audit-Bx9KMQYh.mjs +0 -2
- package/dist/ai-gateway-BSXJEaYS.mjs +0 -13
- package/dist/ai-search-DRQj1aMu.mjs +0 -7
- package/dist/ai-security-C_Rb0lGT.mjs +0 -4
- package/dist/alerting-BAR9eFs2.mjs +0 -6
- package/dist/analytics-BaUZwNc5.mjs +0 -4
- package/dist/analytics_engine-DkEzlhfT.mjs +0 -2
- package/dist/api-security-jA0lOk6a.mjs +0 -50
- package/dist/argo-Cz4pDagx.mjs +0 -2
- package/dist/artifacts-BcLTGfAv.mjs +0 -5
- package/dist/audit-logs-DbIv4n6u.mjs +0 -2
- package/dist/auth-rW5d3jtr.mjs +0 -5
- package/dist/auth-tvDdC1J-.mjs +0 -8
- package/dist/billing-Md87QjqW.mjs +0 -3
- package/dist/bot-management-VHMo4hpU.mjs +0 -5
- package/dist/botnet-feed-BHqfo3sa.mjs +0 -3
- package/dist/brand-protection-HUeR6Pof.mjs +0 -3
- package/dist/browser-extension-199oZg3X.mjs +0 -3
- package/dist/browser-run-DDasyux-.mjs +0 -4
- package/dist/build-0QlYUfFS.mjs +0 -2
- package/dist/builds-B-lXn6JR.mjs +0 -9
- package/dist/cache-CevKpiTM.mjs +0 -9
- package/dist/certificate-authorities-DAg-aO1B.mjs +0 -2
- package/dist/cf-C11NGkjx.mjs +0 -18
- package/dist/chunk-LQW53VED-CoECHA3R.mjs +0 -119
- package/dist/chunk-QBZBEHZB-BuiXJn8j.mjs +0 -2
- package/dist/chunk-vbHwaUoU.mjs +0 -2
- package/dist/client-certificates-Bay7oPLE.mjs +0 -3
- package/dist/client-side-security-CbU9xn0k.mjs +0 -37
- package/dist/cloud-connector-AH2ClcSL.mjs +0 -2
- package/dist/cloudforce-one-DwOfS75V.mjs +0 -32
- package/dist/command-CMzMsll4.mjs +0 -2
- package/dist/connector-interrupts-DcLrqM2V.mjs +0 -2
- package/dist/connector-telemetry-events-PrJWgNs9.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CIjJm5yu.mjs +0 -2
- package/dist/connectors-CEAy30E-.mjs +0 -3
- package/dist/containers-BsbDqbSn.mjs +0 -58
- package/dist/content-scan-BdK936iO.mjs +0 -4
- package/dist/cps-oP97-qkm.mjs +0 -2
- package/dist/csamScanner-DUNN4INg.mjs +0 -6
- package/dist/ct-alerting-dV_gsV2w.mjs +0 -3
- package/dist/custom-certificates-DYspvjo4.mjs +0 -5
- package/dist/custom-csrs-DjSWLQRu.mjs +0 -3
- package/dist/custom-hostnames-df1lH6IY.mjs +0 -5
- package/dist/custom-nameservers-CLTbN-9R.mjs +0 -3
- package/dist/custom-pages-DzKnSgL3.mjs +0 -3
- package/dist/d1-JBEqjJoj.mjs +0 -20
- package/dist/data-security-CIktWnXt.mjs +0 -7
- package/dist/dcv-delegation-_r6Vc6VL.mjs +0 -2
- package/dist/dev-CAubuxCc.mjs +0 -4
- package/dist/diagnostics-B0DRh714.mjs +0 -3
- package/dist/dist-12KzRsBM.mjs +0 -387
- package/dist/dist-BCVqQpg2.mjs +0 -2
- package/dist/dist-Cp3uJN1x.mjs +0 -48
- package/dist/dist-S9K_8gq9.mjs +0 -9
- package/dist/dls-CFzTHcZM.mjs +0 -3
- package/dist/dns-Dw6u-NV1.mjs +0 -29
- package/dist/dns-firewall-CIPptslp.mjs +0 -57
- package/dist/dry-run-DiVy1lVo.mjs +0 -2
- package/dist/durable-objects-CCkeqqBq.mjs +0 -2
- package/dist/email-auth-kdxO51Oz.mjs +0 -2
- package/dist/email-routing-BLggZdQq.mjs +0 -6
- package/dist/email-security-DjADlgdM.mjs +0 -18
- package/dist/email-sending-Cz7E7GoP.mjs +0 -7
- package/dist/error-sanitization-DfLijlBJ.mjs +0 -2
- package/dist/fieldExtractors-BWaMi6lD.mjs +0 -3
- package/dist/firewall-5t6OBIOl.mjs +0 -8
- package/dist/flagship-CzG_VoNR.mjs +0 -4
- package/dist/fraud-UOg_69Ob.mjs +0 -20
- package/dist/google-tag-gateway-DirkD-Q2.mjs +0 -2
- package/dist/healthchecks-BkHZGTp1.mjs +0 -4
- package/dist/hostnames-EUYOZm21.mjs +0 -3
- package/dist/hyperdrive-ZoLJlJCL.mjs +0 -21
- package/dist/iam-BQ2xSgYN.mjs +0 -6
- package/dist/images-CkEq6ScP.mjs +0 -8
- package/dist/intel-DDWEdGyl.mjs +0 -8
- package/dist/interactive-B2E03Fs-.mjs +0 -11
- package/dist/interactive-_B-EqD0Y.mjs +0 -23
- package/dist/ips-54Qmy-Uw.mjs +0 -2
- package/dist/keyless-certificates-CXHLc3Qz.mjs +0 -3
- package/dist/keys-rvI4TC3Z.mjs +0 -2
- package/dist/kv-CAeN1zBy.mjs +0 -5
- package/dist/leaked-credential-checks-CbbwtG-p.mjs +0 -4
- package/dist/load-balancers-BFwdwAIU.mjs +0 -6
- package/dist/local-C6XsFD_W.mjs +0 -2
- package/dist/logexplorer-D8rOPB5I.mjs +0 -17
- package/dist/logo-matches-Y3PxVn7t.mjs +0 -2
- package/dist/logos-BN8SvJhS.mjs +0 -3
- package/dist/logpush-BnLA4WVm.mjs +0 -4
- package/dist/logs-CDo7Y5sA.mjs +0 -3
- package/dist/magic-cloud-networking-wPuLwu-F.mjs +0 -5
- package/dist/magic-network-monitoring-BNERUpxS.mjs +0 -4
- package/dist/magic-transit-6tvVOECW.mjs +0 -111
- package/dist/managed-defense-AYwBOYIH.mjs +0 -2
- package/dist/managed-transforms-HZZNrkC7.mjs +0 -3
- package/dist/matches-Dp91L3dL.mjs +0 -2
- package/dist/mcp-P7pcieiT.mjs +0 -4
- package/dist/mesh-DjFrk6PL.mjs +0 -4
- package/dist/mtls-certificates-DZMoef2H.mjs +0 -3
- package/dist/network-7cd1U6-I.mjs +0 -6
- package/dist/network-interconnects-CQ7cPZjK.mjs +0 -41
- package/dist/oauth-DH3kMXSs.mjs +0 -14
- package/dist/oauth-clients-P9t-eMnx.mjs +0 -4
- package/dist/oauth-scopes-C3r9Qh_y.mjs +0 -2
- package/dist/observability-M1DnLhMR.mjs +0 -10
- package/dist/organization-cUE7GDCt.mjs +0 -45
- package/dist/organizations-C-Hcpd0w.mjs +0 -2
- package/dist/origin-ca-certificates-C8cJMyQH.mjs +0 -3
- package/dist/origin-post-quantum-encryption-DjZJCk8M.mjs +0 -2
- package/dist/origin-tls-client-auth-BsjR5EAV.mjs +0 -4
- package/dist/page-rules-B-zq1EUb.mjs +0 -27
- package/dist/pages-B6YpkPos.mjs +0 -14
- package/dist/pay-per-crawl-B4wx0lUb.mjs +0 -4
- package/dist/pipelines-BJc_RylD.mjs +0 -6
- package/dist/precursor-CLQu7suY.mjs +0 -4
- package/dist/progress-V6SZV3Ux.mjs +0 -2
- package/dist/prompt-DjRTpML4.mjs +0 -3
- package/dist/public-BMg6-Hxh-BfUOZTDP.mjs +0 -2
- package/dist/queries-DSrrket-.mjs +0 -3
- package/dist/queues-Tf7kPBpn.mjs +0 -7
- package/dist/r2-DmKNnxtC.mjs +0 -25
- package/dist/r2-data-catalog-DBxoifOq.mjs +0 -16
- package/dist/radar-Csk7Ab-b.mjs +0 -2
- package/dist/realtime-CDehZVhV.mjs +0 -20
- package/dist/registrar-sandbox-BxVdfnam.mjs +0 -56
- package/dist/registrar-vflzeNQ9.mjs +0 -43
- package/dist/reporting-BaPZ1PHN.mjs +0 -2
- package/dist/request-headers-CC4eHmI2.mjs +0 -3
- package/dist/request-tracers-C_UVBexV.mjs +0 -2
- package/dist/resolve-B8CyM1mi.mjs +0 -2
- package/dist/resource-sharing-CoB4S9j1.mjs +0 -6
- package/dist/resource-tagging-CUiUC5g4.mjs +0 -2
- package/dist/rules-4O8076_s.mjs +0 -4
- package/dist/rulesets-C84MxTYo.mjs +0 -5
- package/dist/rum-Bvwkrntx.mjs +0 -4
- package/dist/run-CRfinkSe.mjs +0 -2
- package/dist/schemas-O_ZNaF8R.mjs +0 -65
- package/dist/scim-BvxQmde6.mjs +0 -4
- package/dist/secrets-store-DOKWiC-j.mjs +0 -7
- package/dist/security-center-Bhy_aC-w.mjs +0 -2
- package/dist/security-txt-L7HJ9tq5.mjs +0 -3
- package/dist/smart-shield-COMXuQ1S.mjs +0 -4
- package/dist/snippets-DffQhlKt.mjs +0 -4
- package/dist/spawn-C1AISA2V.mjs +0 -526
- package/dist/spectrum-Cmf7SqQE.mjs +0 -63
- package/dist/speed-m8cdhLFS.mjs +0 -4
- package/dist/src-C8phrg-8.mjs +0 -109
- package/dist/ssl-D4ffsdSw.mjs +0 -15
- package/dist/startup-profile-Dx95Y5cl.mjs +0 -17
- package/dist/state-CHif8Y5I.mjs +0 -2
- package/dist/stream-DPF5fojV.mjs +0 -16
- package/dist/submit-Br8hfP0_.mjs +0 -2
- package/dist/tags-Bnt4JuxQ.mjs +0 -2
- package/dist/telemetry-Ch1vCICm.mjs +0 -2
- package/dist/tenant-D8u0CxoC.mjs +0 -2
- package/dist/tenant-custom-nameservers-BrWMyslZ.mjs +0 -3
- package/dist/tunnels-BkNPpTHa.mjs +0 -5
- package/dist/turnstile-MgwRECJv.mjs +0 -23
- package/dist/ui-DQSZeaG5.mjs +0 -5
- package/dist/url-info-Ddp7MgcI.mjs +0 -2
- package/dist/url-normalization-3ptK9ntV.mjs +0 -3
- package/dist/url-scanner-Psb9ollR.mjs +0 -2
- package/dist/user-DWdshcIu.mjs +0 -12
- package/dist/values-CDKQL1z2.mjs +0 -2
- package/dist/vectorize-CTYYUyQj.mjs +0 -4
- package/dist/waiting-rooms-BUdmwXDY.mjs +0 -11
- package/dist/web-assets-CpDwDEx8.mjs +0 -8
- package/dist/web3-YsjDyAzH.mjs +0 -4
- package/dist/workers-BKKxaZcz.mjs +0 -6
- package/dist/workers-builds-BWo5vUA9.mjs +0 -2
- package/dist/workers-for-platforms-ASJsxYdM.mjs +0 -5
- package/dist/workers-vpc-RkTnRvA2.mjs +0 -3
- package/dist/workflows-KrIFI9ns.mjs +0 -5
- package/dist/zaraz-DglXbVzZ.mjs +0 -2
- package/dist/zero-trust-RilTdSjX.mjs +0 -91
- package/dist/zone-DsBtVkvT.mjs +0 -2
- package/dist/zones-BFxvWFQW.mjs +0 -44
- /package/dist/{alerts-B2SJO4nd.mjs → alerts-CstOk8n0.mjs} +0 -0
- /package/dist/{autorag-iNjZXw1n.mjs → autorag-PRTwXGgn.mjs} +0 -0
- /package/dist/{body-parser-DIlfApuJ.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
- /package/dist/{brands-BrVnNrT3.mjs → brands-BHRXlWDm.mjs} +0 -0
- /package/dist/{clear-an9o3dJ3.mjs → clear-UvKESVx3.mjs} +0 -0
- /package/dist/{cli-types-CrSoSMPF.mjs → cli-types-tt_LZMbn.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-BqWfopFc.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-C1m9U1En.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
- /package/dist/{domain-info-B0Ykqv5l.mjs → domain-info-BqTDXNBo.mjs} +0 -0
- /package/dist/{health-CIUg1C5o.mjs → health-CwPzzrV6.mjs} +0 -0
- /package/dist/{input-validation-BxchZ9jE.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
- /package/dist/{internal-DmpATljO.mjs → internal-WLHfxX64.mjs} +0 -0
- /package/dist/{live-B66u3_0g.mjs → live-D_k7eHdv.mjs} +0 -0
- /package/dist/{metadata-D062SVyy.mjs → metadata-APBiectA.mjs} +0 -0
- /package/dist/{rate-limit-analytics-BknoecoM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
- /package/dist/{rate-limits-cdChIg_S.mjs → rate-limits-C3K9smdl.mjs} +0 -0
- /package/dist/{ready-C-H2cwp_.mjs → ready-CvwvbdTX.mjs} +0 -0
- /package/dist/{recent-submissions-DyuH_n5u.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
- /package/dist/{refute-uSlzkQKq.mjs → refute-CIAFMj00.mjs} +0 -0
- /package/dist/{scan-logo-DMk--WT7.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
- /package/dist/{scan-page-DEHnAOJo.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
- /package/dist/{search-BlKeSfVD.mjs → search-12jA1b4l.mjs} +0 -0
- /package/dist/{signed-url-CiGmGkLQ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
- /package/dist/{submission-info-DHlTHDrs.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
- /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
- /package/dist/{total-queries-D5WvVfYi.mjs → total-queries-CJTc9Pde.mjs} +0 -0
- /package/dist/{tracked-domains-9deBK9bp.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
- /package/dist/{verify-S-TmhUDr.mjs → verify-CZW5Fo1q.mjs} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-Bx2PB-tt.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";import{n as m,t as h}from"./raw-fetch-DNTQkXbg.mjs";function ee(e){return e.usage(`$0 artifacts namespaces create
|
|
3
|
+
|
|
4
|
+
Creates an empty Artifacts namespace for an account.`).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`unrestricted`,`us`,`eu`,`fedramp`],default:`unrestricted`}).option(`namespace`,{type:`string`,description:`The namespace field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create a namespace`,builder:ee,handler:async f=>s({command:`artifacts namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf artifacts namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({jurisdiction:u(f.jurisdiction,`jurisdiction`,`text`),namespace:u(f.namespace,`namespace`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.artifacts.namespaces.create({...e,account_id:p})),{successLabel:`Created`});return}f.namespace===void 0&&(f.namespace=await d(`namespace`,`The namespace field`));let m=l({jurisdiction:u(f.jurisdiction,`jurisdiction`,`text`),namespace:u(f.namespace,`namespace`,`text`)});i(await o(`Creating`,async()=>s.artifacts.namespaces.create({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 artifacts namespaces delete <namespace>
|
|
5
|
+
|
|
6
|
+
Deletes an empty Artifacts namespace.`).positional(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const v={command:`delete <namespace>`,describe:`Delete a namespace`,builder:_,handler:async c=>s({command:`artifacts namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf artifacts namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}`,pathParams:{namespace:String(c.namespace??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}i(await o(`Deleting`,async()=>s.artifacts.namespaces.delete({account_id:l,namespace:c.namespace})),{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 artifacts namespaces get <namespace>
|
|
8
|
+
|
|
9
|
+
Returns an Artifacts namespace summary.`).positional(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <namespace>`,describe:`Get a namespace`,builder:y,handler:async c=>s({command:`artifacts namespaces get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf artifacts namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}`,pathParams:{namespace:String(c.namespace??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.artifacts.namespaces.get({account_id:l,namespace:c.namespace})),{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 artifacts namespaces list
|
|
10
|
+
|
|
11
|
+
Lists Artifacts namespaces for an account.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List namespaces`,builder:x,handler:async c=>s({command:`artifacts namespaces list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={limit:c.limit,cursor:c.cursor};if(c.dryRun){a({command:`cf artifacts namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.artifacts.namespaces.list({account_id:u,...s})),{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 artifacts namespaces repos blobs get <hash>
|
|
12
|
+
|
|
13
|
+
Returns raw bytes for an immutable Git blob object. Blob responses are cacheable forever by hash.`).positional(`hash`,{type:`string`,description:`40-character lowercase hexadecimal Git object hash.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,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 w={command:`get <hash>`,describe:`Read a Git blob`,builder:C,handler:async i=>s({command:`artifacts namespaces repos blobs get`,classification:{safeFlags:[`dry-run`,`text`]}},i,async()=>{if(i.dryRun){a({command:`cf artifacts namespaces repos blobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${i.namespace==null?`<namespace>`:encodeURIComponent(String(i.namespace))}/repos/${i.name==null?`<name>`:encodeURIComponent(String(i.name))}/blob/${i.hash==null?`<hash>`:encodeURIComponent(String(i.hash))}`,pathParams:{namespace:String(i.namespace??``),name:String(i.name??``),hash:String(i.hash??``)},bodyKind:`none`});return}await r(i);let s=i.local?e:await t();i.accountId=s;let c=await o(`Loading`,async()=>h(`/accounts/${s}/artifacts/namespaces/${encodeURIComponent(String(i.namespace))}/repos/${encodeURIComponent(String(i.name))}/blob/${encodeURIComponent(String(i.hash))}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}));m(i.text===!0?c.toString(`utf-8`):c)})},T={command:`blobs`,describe:`Operations for namespaces.repos.blobs`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 artifacts namespaces repos commits get <hash>
|
|
14
|
+
|
|
15
|
+
Returns decoded metadata for an immutable Git commit object. Commit responses are cacheable forever by hash.`).positional(`hash`,{type:`string`,description:`40-character lowercase hexadecimal Git object hash.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <hash>`,describe:`Read a Git commit`,builder:E,handler:async c=>s({command:`artifacts namespaces repos commits get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf artifacts namespaces repos commits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/repos/${c.name==null?`<name>`:encodeURIComponent(String(c.name))}/commit/${c.hash==null?`<hash>`:encodeURIComponent(String(c.hash))}`,pathParams:{namespace:String(c.namespace??``),name:String(c.name??``),hash:String(c.hash??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.artifacts.namespaces.repos.commits.get({account_id:l,namespace:c.namespace,name:c.name,hash:c.hash})),{successLabel:`Loaded`})})},O={command:`commits`,describe:`Operations for namespaces.repos.commits`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.usage(`$0 artifacts namespaces repos create <namespace>
|
|
16
|
+
|
|
17
|
+
Creates a Git-compatible Artifacts repository in a namespace.`).positional(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`default-branch`,{type:`string`,description:`Git branch name. Must match /^[a-zA-Z0-9][a-zA-Z0-9._/-]*$/, must not contain '..', and must not end with '/' or '.'.`}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`The name field`}).option(`read-only`,{type:`boolean`,description:`The read_only field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`create <namespace>`,describe:`Create a repository`,builder:k,handler:async f=>s({command:`artifacts namespaces repos create`,classification:{safeFlags:[`read-only`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf artifacts namespaces repos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${f.namespace==null?`<namespace>`:encodeURIComponent(String(f.namespace))}/repos`,pathParams:{namespace:String(f.namespace??``)},bodyKind:`json`,body:f.body===void 0?l({default_branch:u(f[`default-branch`],`default-branch`,`text`),description:u(f.description,`description`,`text`),name:u(f.name,`name`,`text`),read_only:f[`read-only`]}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.artifacts.namespaces.repos.create({...e,account_id:p,namespace:f.namespace})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`The name field`));let m=l({default_branch:u(f[`default-branch`],`default-branch`,`text`),description:u(f.description,`description`,`text`),name:u(f.name,`name`,`text`),read_only:f[`read-only`]});i(await o(`Creating`,async()=>s.artifacts.namespaces.repos.create({...m,account_id:p,namespace:f.namespace})),{successLabel:`Created`})})};function j(e){return e.usage(`$0 artifacts namespaces repos delete <name>
|
|
18
|
+
|
|
19
|
+
Deletes a repository and schedules cleanup of its backing data.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const M={command:`delete <name>`,describe:`Delete a repository`,builder:j,handler:async c=>s({command:`artifacts namespaces repos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf artifacts namespaces repos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/repos/${c.name==null?`<name>`:encodeURIComponent(String(c.name))}`,pathParams:{namespace:String(c.namespace??``),name:String(c.name??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
20
|
+
`);return}i(await o(`Deleting`,async()=>s.artifacts.namespaces.repos.delete({account_id:l,namespace:c.namespace,name:c.name})),{successLabel:`Deleted`})})};function N(e){return e.usage(`$0 artifacts namespaces repos files get <name>
|
|
21
|
+
|
|
22
|
+
Returns raw bytes for a file resolved by ref and path.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`ref`,{type:`string`,description:`Git ref, branch, tag, or commit hash.`,demandOption:!0}).option(`path`,{type:`string`,description:`File path.`,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 P={command:`get <name>`,describe:`Read a file`,builder:N,handler:async i=>s({command:`artifacts namespaces repos files get`,classification:{safeFlags:[`dry-run`,`text`]}},i,async()=>{let s={ref:i.ref,path:i.path};if(i.dryRun){a({command:`cf artifacts namespaces repos files get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${i.namespace==null?`<namespace>`:encodeURIComponent(String(i.namespace))}/repos/${i.name==null?`<name>`:encodeURIComponent(String(i.name))}/file`,pathParams:{namespace:String(i.namespace??``),name:String(i.name??``)},query:s,bodyKind:`none`});return}await r(i);let c=i.local?e:await t();i.accountId=c;let l=new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),u=await o(`Loading`,async()=>h(`/accounts/${c}/artifacts/namespaces/${encodeURIComponent(String(i.namespace))}/repos/${encodeURIComponent(String(i.name))}/file${l?`?`+l:``}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}));m(i.text===!0?u.toString(`utf-8`):u)})},F={command:`files`,describe:`Operations for namespaces.repos.files`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(e){return e.usage(`$0 artifacts namespaces repos fork <name>
|
|
23
|
+
|
|
24
|
+
Forks a source repository into a new repository.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`default-branch-only`,{type:`boolean`,description:`The default_branch_only field`}).option(`description`,{type:`string`,description:`The description field`}).option(`read-only`,{type:`boolean`,description:`The read_only field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`fork <name>`,describe:`Fork a repository`,builder:I,handler:async d=>s({command:`artifacts namespaces repos fork`,classification:{safeFlags:[`default-branch-only`,`read-only`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf artifacts namespaces repos fork`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${d.namespace==null?`<namespace>`:encodeURIComponent(String(d.namespace))}/repos/${d.name==null?`<name>`:encodeURIComponent(String(d.name))}/fork`,pathParams:{namespace:String(d.namespace??``),name:String(d.name??``)},bodyKind:`json`,body:d.body===void 0?l({default_branch_only:d[`default-branch-only`],description:u(d.description,`description`,`text`),read_only:d[`read-only`]}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.artifacts.namespaces.repos.fork({...e,account_id:f,namespace:d.namespace,name:d.name})),{successLabel:`Created`});return}let p=l({default_branch_only:d[`default-branch-only`],description:u(d.description,`description`,`text`),read_only:d[`read-only`]});i(await o(`Creating`,async()=>s.artifacts.namespaces.repos.fork({...p,account_id:f,namespace:d.namespace,name:d.name})),{successLabel:`Created`})})};function R(e){return e.usage(`$0 artifacts namespaces repos get <name>
|
|
25
|
+
|
|
26
|
+
Returns repository metadata.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <name>`,describe:`Get a repository`,builder:R,handler:async c=>s({command:`artifacts namespaces repos get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf artifacts namespaces repos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/repos/${c.name==null?`<name>`:encodeURIComponent(String(c.name))}`,pathParams:{namespace:String(c.namespace??``),name:String(c.name??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.artifacts.namespaces.repos.get({account_id:l,namespace:c.namespace,name:c.name})),{successLabel:`Loaded`})})};function te(e){return e.usage(`$0 artifacts namespaces repos import <name>
|
|
27
|
+
|
|
28
|
+
Imports an HTTPS Git repository into an Artifacts repository.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`branch`,{type:`string`,description:`Git branch name. Must match /^[a-zA-Z0-9][a-zA-Z0-9._/-]*$/, must not contain '..', and must not end with '/' or '.'.`}).option(`depth`,{type:`number`,description:`The depth field`}).option(`read-only`,{type:`boolean`,description:`The read_only field`}).option(`url`,{type:`string`,description:`The url field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const B={command:`import <name>`,describe:`Import a repository`,builder:te,handler:async f=>s({command:`artifacts namespaces repos import`,classification:{safeFlags:[`read-only`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf artifacts namespaces repos import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${f.namespace==null?`<namespace>`:encodeURIComponent(String(f.namespace))}/repos/${f.name==null?`<name>`:encodeURIComponent(String(f.name))}/import`,pathParams:{namespace:String(f.namespace??``),name:String(f.name??``)},bodyKind:`json`,body:f.body===void 0?l({branch:u(f.branch,`branch`,`text`),depth:f.depth,read_only:f[`read-only`],url:u(f.url,`url`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.artifacts.namespaces.repos.import({...e,account_id:p,namespace:f.namespace,name:f.name})),{successLabel:`Created`});return}f.url===void 0&&(f.url=await d(`url`,`The url field`));let m=l({branch:u(f.branch,`branch`,`text`),depth:f.depth,read_only:f[`read-only`],url:u(f.url,`url`,`text`)});i(await o(`Creating`,async()=>s.artifacts.namespaces.repos.import({...m,account_id:p,namespace:f.namespace,name:f.name})),{successLabel:`Created`})})};function V(e){return e.usage(`$0 artifacts namespaces repos list
|
|
29
|
+
|
|
30
|
+
Lists repositories in a namespace.`).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`search`,{type:`string`,description:`Search`}).option(`sort`,{type:`string`,description:`Sort`,choices:[`created_at`,`updated_at`,`last_push_at`,`name`]}).option(`direction`,{type:`string`,description:`Direction`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List repositories`,builder:p(V),handler:async c=>s({command:`artifacts namespaces repos list`,classification:{safeFlags:[`sort`,`direction`,`dry-run`]}},c,async()=>{let s={limit:c.limit,cursor:c.cursor,search:c.search,sort:c.sort,direction:c.direction};if(c.dryRun){a({command:`cf artifacts namespaces repos list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/repos`,pathParams:{namespace:String(c.namespace??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.artifacts.namespaces.repos.list({account_id:u,namespace:c.namespace,...s})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 artifacts namespaces repos logs get <name>
|
|
31
|
+
|
|
32
|
+
Returns commit metadata walking backwards from a ref, branch, tag, or HEAD.`).positional(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`ref`,{type:`string`,description:`Git ref, branch, tag, or commit hash. Defaults to HEAD.`}).option(`limit`,{type:`number`,description:`Limit`}).option(`offset`,{type:`number`,description:`Offset`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`get <name>`,describe:`Read commit history`,builder:U,handler:async c=>s({command:`artifacts namespaces repos logs get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={ref:c.ref,limit:c.limit,offset:c.offset};if(c.dryRun){a({command:`cf artifacts namespaces repos logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/repos/${c.name==null?`<name>`:encodeURIComponent(String(c.name))}/log`,pathParams:{namespace:String(c.namespace??``),name:String(c.name??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.artifacts.namespaces.repos.logs.get({account_id:u,namespace:c.namespace,name:c.name,...s})),{successLabel:`Loaded`})})},G={command:`logs`,describe:`Operations for namespaces.repos.logs`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 artifacts namespaces repos raw get <path>
|
|
33
|
+
|
|
34
|
+
Returns file bytes resolved by ref and path, with a sniffed content type and browser-safe response headers.`).positional(`path`,{type:`string`,description:`File path. May contain slashes.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`ref`,{type:`string`,description:`Git ref, branch, tag, or 40-character commit hash.`,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 q={command:`get <path>`,describe:`Read a raw file with content type`,builder:K,handler:async i=>s({command:`artifacts namespaces repos raw get`,classification:{safeFlags:[`dry-run`,`text`]}},i,async()=>{if(i.dryRun){a({command:`cf artifacts namespaces repos raw get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${i.namespace==null?`<namespace>`:encodeURIComponent(String(i.namespace))}/repos/${i.name==null?`<name>`:encodeURIComponent(String(i.name))}/raw/${i.ref==null?`<ref>`:encodeURIComponent(String(i.ref))}/${i.path==null?`<path>`:encodeURIComponent(String(i.path))}`,pathParams:{namespace:String(i.namespace??``),name:String(i.name??``),ref:String(i.ref??``),path:String(i.path??``)},bodyKind:`none`});return}await r(i);let s=i.local?e:await t();i.accountId=s;let c=await o(`Loading`,async()=>h(`/accounts/${s}/artifacts/namespaces/${encodeURIComponent(String(i.namespace))}/repos/${encodeURIComponent(String(i.name))}/raw/${encodeURIComponent(String(i.ref))}/${encodeURIComponent(String(i.path))}`,{method:`GET`,local:i.local===!0,persistTo:i.persistTo}));m(i.text===!0?c.toString(`utf-8`):c)})},J={command:`raw`,describe:`Operations for namespaces.repos.raw`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Y(e){return e.usage(`$0 artifacts namespaces repos tokens list
|
|
35
|
+
|
|
36
|
+
Lists tokens for a repository.`).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`state`,{type:`string`,description:`State`,choices:[`active`,`expired`,`revoked`,`all`]}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`list`,describe:`List repository tokens`,builder:p(Y),handler:async c=>s({command:`artifacts namespaces repos tokens list`,classification:{safeFlags:[`state`,`dry-run`]}},c,async()=>{let s={state:c.state,page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf artifacts namespaces repos tokens list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/repos/${c.name==null?`<name>`:encodeURIComponent(String(c.name))}/tokens`,pathParams:{namespace:String(c.namespace??``),name:String(c.name??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.artifacts.namespaces.repos.tokens.list({account_id:u,namespace:c.namespace,name:c.name,...s})),{successLabel:`Loaded`})})},Z={command:`tokens`,describe:`Operations for namespaces.repos.tokens`,builder:e=>e.command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.usage(`$0 artifacts namespaces repos trees get <hash>
|
|
37
|
+
|
|
38
|
+
Returns decoded entries for an immutable Git tree object. Tree responses are cacheable forever by hash.`).positional(`hash`,{type:`string`,description:`40-character lowercase hexadecimal Git object hash.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`name`,{type:`string`,description:`Repository name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <hash>`,describe:`Read a Git tree`,builder:Q,handler:async c=>s({command:`artifacts namespaces repos trees get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf artifacts namespaces repos trees get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/repos/${c.name==null?`<name>`:encodeURIComponent(String(c.name))}/tree/${c.hash==null?`<hash>`:encodeURIComponent(String(c.hash))}`,pathParams:{namespace:String(c.namespace??``),name:String(c.name??``),hash:String(c.hash??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.artifacts.namespaces.repos.trees.get({account_id:l,namespace:c.namespace,name:c.name,hash:c.hash})),{successLabel:`Loaded`})})},re={command:`trees`,describe:`Operations for namespaces.repos.trees`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ie={command:`repos`,describe:`Operations for namespaces.repos`,builder:e=>e.command(A).command(M).command(L).command(z).command(B).command(H).command(T).command(O).command(F).command(G).command(J).command(Z).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.usage(`$0 artifacts namespaces tokens create <namespace>
|
|
39
|
+
|
|
40
|
+
Creates a scoped Git token for a repository.`).positional(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`repo`,{type:`string`,description:`The repo field`}).option(`scope`,{type:`string`,description:`The scope field`,choices:[`read`,`write`]}).option(`ttl`,{type:`number`,description:`The ttl field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const oe={command:`create <namespace>`,describe:`Create a repository token`,builder:ae,handler:async f=>s({command:`artifacts namespaces tokens create`,classification:{safeFlags:[`scope`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf artifacts namespaces tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${f.namespace==null?`<namespace>`:encodeURIComponent(String(f.namespace))}/tokens`,pathParams:{namespace:String(f.namespace??``)},bodyKind:`json`,body:f.body===void 0?l({repo:u(f.repo,`repo`,`text`),scope:u(f.scope,`scope`,`text`),ttl:f.ttl}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.artifacts.namespaces.tokens.create({...e,account_id:p,namespace:f.namespace})),{successLabel:`Created`});return}f.repo===void 0&&(f.repo=await d(`repo`,`The repo field`));let m=l({repo:u(f.repo,`repo`,`text`),scope:u(f.scope,`scope`,`text`),ttl:f.ttl});i(await o(`Creating`,async()=>s.artifacts.namespaces.tokens.create({...m,account_id:p,namespace:f.namespace})),{successLabel:`Created`})})};function $(e){return e.usage(`$0 artifacts namespaces tokens revoke <id>
|
|
41
|
+
|
|
42
|
+
Revokes an Artifacts repository token.`).positional(`id`,{type:`string`,description:`Token ID. Must match /^[0-9a-z]{16}$/.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Artifacts namespace name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const se={command:`revoke <id>`,describe:`Revoke a token`,builder:$,handler:async c=>s({command:`artifacts namespaces tokens revoke`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf artifacts namespaces tokens revoke`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/tokens/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{namespace:String(c.namespace??``),id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
43
|
+
`);return}i(await o(`Deleting`,async()=>s.artifacts.namespaces.tokens.revoke({account_id:l,namespace:c.namespace,id:c.id})),{successLabel:`Deleted`})})},ce={command:`tokens`,describe:`Operations for namespaces.tokens`,builder:e=>e.command(oe).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},le={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(g).command(v).command(b).command(S).command(ie).command(ce).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ue={command:`artifacts`,describe:`artifacts`,builder:e=>e.command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ue as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{t as c}from"./cli-types-tt_LZMbn.mjs";function l(e){return e.usage(`$0 audit-logs list
|
|
3
|
+
|
|
4
|
+
Gets a list of audit logs for an account. Can be filtered by who made the change, on which zone, and the timeframe of the change.`).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`export`,{type:`boolean`,description:`Indicates that this request is an export of logs in CSV format.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-ip`,{type:`string`,description:`Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.`}).option(`actor-email`,{type:`string`,description:`Filters by the email address of the actor that made the change.`}).option(`since`,{type:`string`,description:"Limits the returned results to logs newer than the specified date. A `full-date` that conforms to RFC3339."}).option(`before`,{type:`string`,description:"Limits the returned results to logs older than the specified date. A `full-date` that conforms to RFC3339."}).option(`zone-name`,{type:`string`,description:`Filters by the name of the zone associated to the change.`}).option(`direction`,{type:`string`,description:`Changes the direction of the chronological sorting.`,choices:[`desc`,`asc`]}).option(`per-page`,{type:`number`,description:`Sets the number of results to return per page.`}).option(`page`,{type:`number`,description:`Defines which page of results to return.`}).option(`hide-user-logs`,{type:`boolean`,description:`Indicates whether or not to hide user level audit logs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`Get account audit logs`,builder:c(l),handler:async c=>s({command:`audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},c,async()=>{let s={id:c.id,export:c.export,"action.type":c[`action-type`],"actor.ip":c[`actor-ip`],"actor.email":c[`actor-email`],since:c.since,before:c.before,"zone.name":c[`zone-name`],direction:c.direction,per_page:c[`per-page`],page:c.page,hide_user_logs:c[`hide-user-logs`]};if(c.dryRun){a({command:`cf audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/audit_logs`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.auditLogs.list({account_id:u,...s})),{successLabel:`Loaded`})})},d={command:`audit-logs`,describe:`audit-logs`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as e}from"./theme-BiIYWOed.mjs";import{a as t,i as n,r}from"./ui-DH95w1Qk.mjs";import{c as i,d as a,i as o,p as s,r as c,t as l,u}from"./oauth-D4bkeMAw.mjs";import{i as d,n as f}from"./auth-Cp7gT-AF.mjs";import{t as p}from"./output-Bia1u2k5.mjs";import{n as m}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{a as h,c as g,i as _,n as v,o as y,r as b,s as x,t as S}from"./login-CEQbOgBM.mjs";const C={command:`logout`,describe:`Log out and remove stored credentials`,handler:async a=>{_(a,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let l=c();l!==`default`&&console.log(t(`This directory has profile "${l}" active. \`cf auth logout\` removes the default profile's token, not "${l}".\nTo delete "${l}", run \`cf auth delete ${l}\`.`)),s(`default`);let d=i(),f=!!process.env.CLOUDFLARE_API_TOKEN;if(!d){f?(console.log(n(`No cf OAuth credentials found, but CLOUDFLARE_API_TOKEN environment variable is set.`)),console.log(n(`Unset it with: unset CLOUDFLARE_API_TOKEN`))):(console.log(n(`You are not currently logged in.`)),console.log(r(`Run ${e.code(`cf auth login`)} to authenticate.`)));return}console.log(n(`Logging out...`)),await u(`default`),console.log(`${e.info(`Removed:`)} OAuth tokens from ${e.muted(o())}`),f&&(console.log(``),console.log(t(`CLOUDFLARE_API_TOKEN environment variable is still set.`)),console.log(n(`You will remain authenticated via the env var. Unset it with: unset CLOUDFLARE_API_TOKEN`)))}},w={command:`whoami`,describe:`Show current user and authentication status`,builder:e=>e,handler:async e=>{let t=process.env.CLOUDFLARE_API_TOKEN,n=a(),r;r=t?`CLOUDFLARE_API_TOKEN environment variable`:n?.oauth_token?`OAuth token from ${o()}`:`none`;let i;try{i=await d()}catch{p({authenticated:!1,error:`Not logged in`});return}let s=f({apiToken:i}),c,u=[],[m,h]=await Promise.allSettled([s.user.get(),l()]);if(m.status===`fulfilled`){let e=m.value;e&&`email`in e&&typeof e.email==`string`&&(c=e.email)}else process.env.DEBUG&&console.error(`User lookup error:`,m.reason);h.status===`fulfilled`?u=h.value:process.env.DEBUG&&console.error(`Account lookup error:`,h.reason);let g=m.status===`fulfilled`||h.status===`fulfilled`,_={authenticated:!0,authSource:r,tokenValid:g,...c&&{email:c},accounts:u};n?.oauth_token&&(_.scopes=n.scopes,_.expiresAt=n.expiration_time),p(_)}},T={command:`auth`,describe:`Manage authentication and profiles`,builder:e=>e.command(m(S,{command:`auth login`,classification:v})).command(E(C,`auth logout`)).command(E(w,`auth whoami`)).command(E(h,`auth create`,[`browser`,`device`])).command(E(x,`auth delete`)).command(E(b,`auth activate`)).command(E(y,`auth deactivate`)).command(E(g,`auth list`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e,t,n=[],r){return m(e,{command:t,classification:{safeFlags:n,shortFlagAliases:r}})}export{T as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{n as e,r as t,t as n}from"./sdk-CvIO3tWS.mjs";import{E as r}from"./dist-dc4E1u01.mjs";import{o as i}from"./chunk-XLADBZ7F-BXKOjWbx.mjs";import{h as a,s as o,v as s}from"./oauth-D4bkeMAw.mjs";import{n as c}from"./request-headers-Dnbzv6RZ.mjs";const l=3e4,u=e.Default;function d(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function f(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function p(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function m(e,t,n){if(!(n==null||n===``)){if(Array.isArray(n)){for(let r of n)m(e,t,r);return}e.append(t,String(n))}}function h(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))m(t,n,r);return t.toString()}function g(e,t,n){let r=new URL(t.endsWith(`/`)?t:`${t}/`),i=new URL(e.startsWith(`/`)?e.slice(1):e,r);if(i.origin!==r.origin)throw Error(`Refusing to send an authenticated request to ${i.origin} (expected ${r.origin})`);let a=h(n??{});return a&&(i.search=a),i.toString()}const _=new WeakMap;async function v(e,n,r,i={}){let a=g(r,_.get(e)??u,i.query),o={...i.headers},s;i.body!==void 0&&(d(i.body)||typeof i.body==`string`&&f(o)?s=i.body:(o[`Content-Type`]??=`application/json`,s=JSON.stringify(i.body)));let c;try{c=await e.fetch(a,{method:n,headers:o,body:s,signal:i.signal},{timeoutInSeconds:i.timeout?i.timeout/1e3:void 0,abortSignal:i.signal})}catch(e){throw i.signal?.aborted?Error(`Request aborted`):e instanceof Error&&e.name===`AbortError`?Error(`Request timed out after ${i.timeout??3e4}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!c.ok)throw new t({statusCode:c.status,body:await p(c),rawResponse:{status:c.status,statusText:c.statusText,url:c.url||a,headers:c.headers,redirected:c.redirected,type:c.type}});if(c.status===204)return null;let l=c.headers.get(`content-type`)??``;if(!l.includes(`application/json`)&&i.preserveNonJsonBytes)return Buffer.from(await c.arrayBuffer());let m=await c.text();if(m===``)return null;if(!l.includes(`application/json`))return m;let h=JSON.parse(m);if(h.success===!1)throw new t({message:`API error: ${h.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`}`,statusCode:c.status,body:h});return`result`in h?h.result:h}function y(e){let t=e.baseURL??u,r=new n({baseUrl:t,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??3e4)/1e3,maxRetries:0,fetch:e.fetch??globalThis.fetch});return _.set(r,t),r}async function b(){let e=i({allowGlobalAuthKey:!1});if(e&&`apiToken`in e)return e.apiToken;let t=await o();if(t)return t;throw Error(`No authentication token found.
|
|
3
|
+
|
|
4
|
+
Please set one of the following:
|
|
5
|
+
1. Set the CLOUDFLARE_API_TOKEN environment variable
|
|
6
|
+
2. Run 'cf auth login' to authenticate via OAuth
|
|
7
|
+
|
|
8
|
+
For API tokens, visit: https://dash.cloudflare.com/profile/api-tokens`)}async function x(e){let t=await s();if(t)return t;try{let t=await b(),n=r({compliance_region:await a()}),i=e-Date.now();if(i<=0)return;let o=y({apiToken:t,baseURL:n,defaultHeaders:c()}),s={timeoutInSeconds:i/1e3,maxRetries:0},[l,u]=await Promise.allSettled([o.accounts.list({per_page:50},s),o.user.memberships.list({per_page:50},s)]);if(l.status===`rejected`)return;let d=l.value;if((d.result_info?.total_count??d.result.length)>d.result.length)return;let f=d.result;if(u.status===`fulfilled`){let e=u.value.result??[];if((u.value.result_info?.total_count??e.length)>e.length)return;let t=new Set(e.map(e=>e.account?.id).filter(e=>e!==void 0));f=f.filter(e=>t.has(e.id))}return f.length===1?f[0]?.id:void 0}catch{return}}async function S(e){let t=r({compliance_region:await a()});if(e.local){let{createLocalFetch:n}=await import(`./local-BrfySqnx.mjs`);return y({apiToken:`cf-local-mode-no-auth`,baseURL:t,defaultHeaders:c(),fetch:n({persistTo:e.persistTo,apiBaseUrl:t})})}return y({apiToken:await b(),baseURL:t,defaultHeaders:c()})}export{v as a,b as i,y as n,x as o,S as r,l as t};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{n as f}from"./prompt-Bx2PB-tt.mjs";function p(e){return e.usage(`$0 billing addresses validate
|
|
3
|
+
|
|
4
|
+
Validates a billing address and returns validated address suggestions. Authentication is not enforced to support pre-signup address validation flows, so credentials are accepted but not required.`).option(`address`,{type:`string`,description:`Address line 1.`}).option(`address2`,{type:`string`,description:`Address line 2.`}).option(`city`,{type:`string`,description:`City.`}).option(`country`,{type:`string`,description:`Country code.`}).option(`state`,{type:`string`,description:`State or province.`}).option(`zipcode`,{type:`string`,description:`Postal or zip code.`}).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:`validate`,describe:`Validate Billing Address`,builder:p,handler:async e=>s({command:`billing addresses validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf billing addresses validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/billing/address-validation`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({address:d(e.address,`address`,`text`),address2:d(e.address2,`address2`,`text`),city:d(e.city,`city`,`text`),country:d(e.country,`country`,`text`),state:d(e.state,`state`,`text`),zipcode:d(e.zipcode,`zipcode`,`text`)}):c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.billing.addresses.validate({...n})),{successLabel:`Created`});return}let n=u({address:d(e.address,`address`,`text`),address2:d(e.address2,`address2`,`text`),city:d(e.city,`city`,`text`),country:d(e.country,`country`,`text`),state:d(e.state,`state`,`text`),zipcode:d(e.zipcode,`zipcode`,`text`)});i(await o(`Creating`,async()=>t.billing.addresses.validate({...n})),{successLabel:`Created`})})},h={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 billing profiles create
|
|
5
|
+
|
|
6
|
+
Creates a billing profile for an account.`).option(`address`,{type:`string`,description:`Street address line 1.`}).option(`address2`,{type:`string`,description:`Street address line 2 (apt, suite, etc.).`}).option(`billing-email`,{type:`string`,description:`Primary billing email address.`}).option(`buying-rate-plan`,{type:`string`,description:`Rate plan being purchased right after profile setup.`}).option(`captcha-challenge-jwt`,{type:`string`,description:`Captcha challenge JWT issued during onboarding.`}).option(`cf-turnstile-response`,{type:`string`,description:`Cloudflare Turnstile response.`}).option(`city`,{type:`string`,description:`City on the billing profile.`}).option(`company`,{type:`string`,description:`Company name on the billing profile.`}).option(`country`,{type:`string`,description:`ISO 3166-1 alpha-2 country code.`}).option(`first-name`,{type:`string`,description:`First name on the billing profile.`}).option(`h-captcha-response`,{type:`string`,description:`hCaptcha response.`}).option(`last-name`,{type:`string`,description:`Last name on the billing profile.`}).option(`preferred-locale`,{type:`string`,description:`Preferred locale for invoice rendering (BCP 47).`}).option(`secondary-billing-email`,{type:`string`,description:`Secondary billing email address for CC on invoices.`}).option(`state`,{type:`string`,description:`State or region on the billing profile.`}).option(`tax-id-type`,{type:`string`,description:`Type of tax ID provided.`}).option(`telephone`,{type:`string`,description:`Contact phone number.`}).option(`vat`,{type:`string`,description:`VAT identifier.`}).option(`zipcode`,{type:`string`,description:`ZIP or postal code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a billing profile.`})}const _={command:`create`,describe:`Create Billing Profile`,builder:g,handler:async l=>s({command:`billing profiles create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf billing profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({address:d(l.address,`address`,`text`),address2:d(l.address2,`address2`,`text`),billing_email:d(l[`billing-email`],`billing-email`,`text`),buying_rate_plan:d(l[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:d(l[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:d(l[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:d(l.city,`city`,`text`),company:d(l.company,`company`,`text`),country:d(l.country,`country`,`text`),first_name:d(l[`first-name`],`first-name`,`text`),h_captcha_response:d(l[`h-captcha-response`],`h-captcha-response`,`text`),last_name:d(l[`last-name`],`last-name`,`text`),preferred_locale:d(l[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:d(l[`secondary-billing-email`],`secondary-billing-email`,`text`),state:d(l.state,`state`,`text`),tax_id_type:d(l[`tax-id-type`],`tax-id-type`,`text`),telephone:d(l.telephone,`telephone`,`text`),vat:d(l.vat,`vat`,`text`),zipcode:d(l.zipcode,`zipcode`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.billing.profiles.create({body:e,account_id:f})),{successLabel:`Created`});return}let p=u({address:d(l.address,`address`,`text`),address2:d(l.address2,`address2`,`text`),billing_email:d(l[`billing-email`],`billing-email`,`text`),buying_rate_plan:d(l[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:d(l[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:d(l[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:d(l.city,`city`,`text`),company:d(l.company,`company`,`text`),country:d(l.country,`country`,`text`),first_name:d(l[`first-name`],`first-name`,`text`),h_captcha_response:d(l[`h-captcha-response`],`h-captcha-response`,`text`),last_name:d(l[`last-name`],`last-name`,`text`),preferred_locale:d(l[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:d(l[`secondary-billing-email`],`secondary-billing-email`,`text`),state:d(l.state,`state`,`text`),tax_id_type:d(l[`tax-id-type`],`tax-id-type`,`text`),telephone:d(l.telephone,`telephone`,`text`),vat:d(l.vat,`vat`,`text`),zipcode:d(l.zipcode,`zipcode`,`text`)});i(await o(`Creating`,async()=>s.billing.profiles.create({body:p,account_id:f})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 billing profiles createPaymentIntent
|
|
7
|
+
|
|
8
|
+
Creates a Stripe payment intent for adding or updating a payment method on the account's billing profile. Returns a client secret for frontend payment method collection.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`createPaymentIntent`,describe:`Create Payment Intent for Billing Profile`,builder:v,handler:async c=>s({command:`billing profiles createPaymentIntent`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf billing profiles createPaymentIntent`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billing/profile/payment-method`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.billing.profiles.createPaymentIntent({account_id:l})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 billing profiles delete
|
|
9
|
+
|
|
10
|
+
Deletes the billing profile for an account.`).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 x={command:`delete`,describe:`Delete Billing Profile`,builder:b,handler:async c=>s({command:`billing profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf billing profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
11
|
+
`);return}i(await o(`Deleting`,async()=>s.billing.profiles.delete({account_id:l})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 billing profiles get
|
|
12
|
+
|
|
13
|
+
Gets the current billing profile for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get`,describe:`Get Billing Profile`,builder:S,handler:async c=>s({command:`billing profiles get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf billing profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.billing.profiles.get({account_id:l})),{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 billing profiles update
|
|
14
|
+
|
|
15
|
+
Updates the billing profile for an account.`).option(`address`,{type:`string`,description:`Street address line 1.`}).option(`address2`,{type:`string`,description:`Street address line 2 (apt, suite, etc.).`}).option(`billing-email`,{type:`string`,description:`Primary billing email address.`}).option(`buying-rate-plan`,{type:`string`,description:`Rate plan being purchased right after profile setup.`}).option(`captcha-challenge-jwt`,{type:`string`,description:`Captcha challenge JWT issued during onboarding.`}).option(`cf-turnstile-response`,{type:`string`,description:`Cloudflare Turnstile response.`}).option(`city`,{type:`string`,description:`City on the billing profile.`}).option(`company`,{type:`string`,description:`Company name on the billing profile.`}).option(`country`,{type:`string`,description:`ISO 3166-1 alpha-2 country code.`}).option(`first-name`,{type:`string`,description:`First name on the billing profile.`}).option(`h-captcha-response`,{type:`string`,description:`hCaptcha response.`}).option(`last-name`,{type:`string`,description:`Last name on the billing profile.`}).option(`preferred-locale`,{type:`string`,description:`Preferred locale for invoice rendering (BCP 47).`}).option(`secondary-billing-email`,{type:`string`,description:`Secondary billing email address for CC on invoices.`}).option(`state`,{type:`string`,description:`State or region on the billing profile.`}).option(`tax-id-type`,{type:`string`,description:`Type of tax ID provided.`}).option(`telephone`,{type:`string`,description:`Contact phone number.`}).option(`vat`,{type:`string`,description:`VAT identifier.`}).option(`zipcode`,{type:`string`,description:`ZIP or postal code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a billing profile.`})}const T={command:`update`,describe:`Update Billing Profile`,builder:w,handler:async l=>s({command:`billing profiles update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf billing profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({address:d(l.address,`address`,`text`),address2:d(l.address2,`address2`,`text`),billing_email:d(l[`billing-email`],`billing-email`,`text`),buying_rate_plan:d(l[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:d(l[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:d(l[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:d(l.city,`city`,`text`),company:d(l.company,`company`,`text`),country:d(l.country,`country`,`text`),first_name:d(l[`first-name`],`first-name`,`text`),h_captcha_response:d(l[`h-captcha-response`],`h-captcha-response`,`text`),last_name:d(l[`last-name`],`last-name`,`text`),preferred_locale:d(l[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:d(l[`secondary-billing-email`],`secondary-billing-email`,`text`),state:d(l.state,`state`,`text`),tax_id_type:d(l[`tax-id-type`],`tax-id-type`,`text`),telephone:d(l.telephone,`telephone`,`text`),vat:d(l.vat,`vat`,`text`),zipcode:d(l.zipcode,`zipcode`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.billing.profiles.update({body:e,account_id:f})),{successLabel:`Updated`});return}let p=u({address:d(l.address,`address`,`text`),address2:d(l.address2,`address2`,`text`),billing_email:d(l[`billing-email`],`billing-email`,`text`),buying_rate_plan:d(l[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:d(l[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:d(l[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:d(l.city,`city`,`text`),company:d(l.company,`company`,`text`),country:d(l.country,`country`,`text`),first_name:d(l[`first-name`],`first-name`,`text`),h_captcha_response:d(l[`h-captcha-response`],`h-captcha-response`,`text`),last_name:d(l[`last-name`],`last-name`,`text`),preferred_locale:d(l[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:d(l[`secondary-billing-email`],`secondary-billing-email`,`text`),state:d(l.state,`state`,`text`),tax_id_type:d(l[`tax-id-type`],`tax-id-type`,`text`),telephone:d(l.telephone,`telephone`,`text`),vat:d(l.vat,`vat`,`text`),zipcode:d(l.zipcode,`zipcode`,`text`)});i(await o(`Updating`,async()=>s.billing.profiles.update({body:p,account_id:f})),{successLabel:`Updated`})})};function E(e){return e.usage(`$0 billing profiles updateEmail
|
|
16
|
+
|
|
17
|
+
Updates the billing email addresses and preferred locale for an account.`).option(`billing-email`,{type:`string`,description:`The billing_email field`}).option(`preferred-locale`,{type:`string`,description:`The preferred_locale field`}).option(`secondary-billing-email`,{type:`string`,description:`The secondary_billing_email field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const D={command:`updateEmail`,describe:`Update Billing Email`,builder:E,handler:async l=>s({command:`billing profiles updateEmail`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf billing profiles updateEmail`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({billing_email:d(l[`billing-email`],`billing-email`,`text`),preferred_locale:d(l[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:d(l[`secondary-billing-email`],`secondary-billing-email`,`text`)}):c(l.body)});return}let s=await r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.billing.profiles.updateEmail({...e,account_id:f})),{successLabel:`Updated`});return}let p=u({billing_email:d(l[`billing-email`],`billing-email`,`text`),preferred_locale:d(l[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:d(l[`secondary-billing-email`],`secondary-billing-email`,`text`)});i(await o(`Updating`,async()=>s.billing.profiles.updateEmail({...p,account_id:f})),{successLabel:`Updated`})})},O={command:`profiles`,describe:`Billing profile with payment method, address, and invoice preferences`,builder:e=>e.command(_).command(y).command(x).command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.usage(`$0 billing rate-plans get <public-key>
|
|
18
|
+
|
|
19
|
+
Gets a rate plan's details by its public key (e.g., 'teams_free', 'cf_pro_20_20'). This is a public catalog endpoint, so authentication is not enforced and credentials are accepted but not required.`).positional(`public-key`,{type:`string`,description:`The public key identifier for the rate plan.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <public-key>`,describe:`Get Rate Plan by Public Key`,builder:k,handler:async e=>s({command:`billing rate-plans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf billing rate-plans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/billing/rate_plans/${e[`public-key`]==null?`<public-key>`:encodeURIComponent(String(e[`public-key`]))}`,pathParams:{"public-key":String(e[`public-key`]??``)},bodyKind:`none`});return}let t=await r(e);i(await o(`Loading`,async()=>t.billing.ratePlans.get({public_key:e[`public-key`]})),{successLabel:`Loaded`})})},j={command:`rate-plans`,describe:`Operations for rate-plans`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage("$0 billing usage get-account-billable-metrics\n\nLists billable metrics available to the account through contracts and subscriptions that overlap the requested period. Results are deduplicated and ordered. If no qualifying contract exists, the result is an empty array. When `from` and `to` are omitted, the period defaults to the start of the current month through today. The maximum date range is 31 days.").option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get-account-billable-metrics`,describe:`List Account Billable Metrics (Version 2, Alpha, Restricted)`,builder:M,handler:async c=>s({command:`billing usage get-account-billable-metrics`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={from:c.from,to:c.to};if(c.dryRun){a({command:`cf billing usage get-account-billable-metrics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billable/usage/billable-metrics`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.billing.usage.getAccountBillableMetrics({account_id:u,...s})),{successLabel:`Loaded`})})};function P(e){return e.usage("$0 billing usage get-account-usage-v2\n\nReturns cost and usage data for a single Cloudflare account, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. **Note:** Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days.").option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get-account-usage-v2`,describe:`Get Account Usage (Version 2, Alpha, Restricted)`,builder:P,handler:async c=>s({command:`billing usage get-account-usage-v2`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={from:c.from,to:c.to};if(c.dryRun){a({command:`cf billing usage get-account-usage-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billable/usage`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.billing.usage.getAccountUsageV2({account_id:u,...s})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 billing usage get-info-v1
|
|
20
|
+
|
|
21
|
+
Returns high-level usage information for the account, including coverage, and subscription metadata.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get-info-v1`,describe:`Get Account Billable Usage Info (Version 1, Alpha)`,builder:I,handler:async c=>s({command:`billing usage get-info-v1`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf billing usage get-info-v1`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billable-usage/info`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.billing.usage.getInfoV1({account_id:l})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 billing usage get-v1
|
|
22
|
+
|
|
23
|
+
Returns billable usage data for the account. When no query parameters are provided, returns usage for the current billing period.`).option(`from`,{type:`string`,description:`Start date for the usage query (ISO 8601). The provided time range must include the subscription billing cycle anchor day, otherwise no usage data is returned. Use the info endpoint to retrieve the subscription anchor day.`}).option(`to`,{type:`string`,description:`End date for the usage query (ISO 8601).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get-v1`,describe:`Get Account Billable Usage (Version 1, Alpha)`,builder:R,handler:async c=>s({command:`billing usage get-v1`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={from:c.from,to:c.to};if(c.dryRun){a({command:`cf billing usage get-v1`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billable-usage`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.billing.usage.getV1({account_id:u,...s})),{successLabel:`Loaded`})})};function B(e){return e.usage("$0 billing usage query\n\nReturns cost and usage data for a single Cloudflare account, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. This is the filterable counterpart to `GET` on the same path. It is a read-only operation and requires only the `#billing:read` permission; `POST` is used so that filter criteria can be supplied in a request body rather than in the query string. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. **Note:** Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete. The request body is optional. When it is omitted, or when `TimePeriod` is omitted, the range defaults to the start of the current month through today. The maximum date range is 31 days. Filters of different kinds are combined with AND. Values within one tag filter are combined with OR. Filter values that do not match usage produce an empty result set. Results can be grouped by up to two groups, in any combination of dimension keys and resource-tag keys. Tag groups are returned in the `Tags` field. Usage without a requested tag remains in an untagged group, with that key omitted from `Tags`. Requests that use tag filtering or tag grouping return HTTP 400 when the underlying usage data source does not support tags. Requests that use dimension grouping return HTTP 400 when the underlying usage data source does not support dimensions.").option(`filter-by-metric-ids`,{type:`string`,array:!0,description:"Restrict results to rows whose `x_BillableMetricId` matches one of these billable metric ids (e.g. `workers_standard_requests`). Values must be unique."}).option(`filter-by-product-family-ids`,{type:`string`,array:!0,description:`Restrict results to billable metrics belonging to these product families. Values must be unique UUIDs.`}).option(`group-by`,{type:`string`,description:`Grouping definitions used to split result rows. At most two unique keys may be supplied. Provide as a JSON array of objects or @path/to/file.json.`}).option(`time-period-from`,{type:`string`,description:"Start of the range (ISO 8601). Required if `To` is set."}).option(`time-period-to`,{type:`string`,description:"End of the range (ISO 8601). Required if `From` is set. Must be after `From` and no more than 31 days after it."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter criteria for a usage query. Every field is optional; an empty object is equivalent to omitting the body entirely. Unknown fields are rejected.`})}const V={command:`query`,describe:`Query Account Usage (Version 2, Alpha, Restricted)`,builder:B,handler:async f=>s({command:`billing usage query`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf billing usage query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/billable/usage`,pathParams:{},bodyKind:`json`,body:f.body===void 0?u({FilterBy:{MetricIds:f[`filter-by-metric-ids`],ProductFamilyIds:f[`filter-by-product-family-ids`]},GroupBy:l(f[`group-by`],`group-by`),TimePeriod:{From:d(f[`time-period-from`],`time-period-from`,`text`),To:d(f[`time-period-to`],`time-period-to`,`text`)}}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Loading`,async()=>s.billing.usage.query({...e,account_id:p})),{successLabel:`Loaded`});return}let m=u({FilterBy:{MetricIds:f[`filter-by-metric-ids`],ProductFamilyIds:f[`filter-by-product-family-ids`]},GroupBy:l(f[`group-by`],`group-by`),TimePeriod:{From:d(f[`time-period-from`],`time-period-from`,`text`),To:d(f[`time-period-to`],`time-period-to`,`text`)}});i(await o(`Loading`,async()=>s.billing.usage.query({...m,account_id:p})),{successLabel:`Loaded`})})},H={command:`usage`,describe:`Metered usage data for billed services — requests, bandwidth, and feature consumption`,builder:e=>e.command(N).command(F).command(L).command(z).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},U={command:`billing`,describe:`Account billing profiles and usage data for Cloudflare subscriptions and add-on services`,builder:e=>e.command(h).command(O).command(j).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{U as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{_ as e}from"./oauth-D4bkeMAw.mjs";import{r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,i as u}from"./prompt-Bx2PB-tt.mjs";function d(e){return e.usage("$0 bot-management feedback create\n\nSubmit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.").option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`Wirefilter expression describing the traffic being reported.`}).option(`first-request-seen-at`,{type:`string`,description:`The first_request_seen_at field`}).option(`last-request-seen-at`,{type:`string`,description:`The last_request_seen_at field`}).option(`requests`,{type:`number`,description:`The requests field`}).option(`subtype`,{type:`string`,description:`The subtype field`}).option(`type`,{type:`string`,description:`Type of feedback report.`,choices:[`false_positive`,`false_negative`]}).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 f={command:`create`,describe:`Submit a feedback report`,builder:d,handler:async d=>a({command:`bot-management feedback create`,classification:{safeFlags:[`type`,`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf bot-management feedback create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?s({description:c(d.description,`description`,`text`),expression:c(d.expression,`expression`,`text`),first_request_seen_at:c(d[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:c(d[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:d.requests,subtype:c(d.subtype,`subtype`,`text`),type:c(d.type,`type`,`text`)}):o(d.body)});return}let a=await t(d),f=await e({zone:d.zone},a,{quiet:d.quiet});if(d.zoneId=f,d.body){let e=o(d.body);n(await i(`Creating`,async()=>a.botManagement.feedback.create({body:e,zone_id:f})),{successLabel:`Created`});return}if(d.description===void 0&&(d.description=await l(`description`,`The description field`)),d.expression===void 0&&(d.expression=await l(`expression`,`Wirefilter expression describing the traffic being reported.`)),d[`first-request-seen-at`]===void 0&&(d[`first-request-seen-at`]=await l(`first-request-seen-at`,`The first_request_seen_at field`)),d[`last-request-seen-at`]===void 0&&(d[`last-request-seen-at`]=await l(`last-request-seen-at`,`The last_request_seen_at field`)),d.requests===void 0)throw Error(`--requests is required (or pass --body with this field set).`);d.type===void 0&&(d.type=await u(`type`,`Type of feedback report.`,[`false_positive`,`false_negative`]));let p=s({description:c(d.description,`description`,`text`),expression:c(d.expression,`expression`,`text`),first_request_seen_at:c(d[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:c(d[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:d.requests,subtype:c(d.subtype,`subtype`,`text`),type:c(d.type,`type`,`text`)});n(await i(`Creating`,async()=>a.botManagement.feedback.create({body:p,zone_id:f})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 bot-management feedback list
|
|
3
|
+
|
|
4
|
+
Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List zone feedback reports`,builder:p,handler:async o=>a({command:`bot-management feedback list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf bot-management feedback list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.botManagement.feedback.list({zone_id:s})),{successLabel:`Loaded`})})},h={command:`feedback`,describe:`Operations for feedback`,builder:e=>e.command(f).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 bot-management get
|
|
5
|
+
|
|
6
|
+
Retrieve a zone's Bot Management Config`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get`,describe:`Get Zone Bot Management Config`,builder:g,handler:async o=>a({command:`bot-management get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf bot-management get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/bot_management`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.botManagement.get({zone_id:s})),{successLabel:`Loaded`})})};function v(e){return e.usage('$0 bot-management update\n\nUpdates the Bot Management configuration for a zone. This API is used to update: - **Bot Fight Mode** - **Super Bot Fight Mode** - **Bot Management for Enterprise** See [Bot Plans](https://developers.cloudflare.com/bots/plans/) for more information on the different plans \\ If you recently upgraded or downgraded your plan, refer to the following examples to clean up old configurations. Copy and paste the example body to remove old zone configurations based on your current plan. #### Clean up configuration for Bot Fight Mode plan ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "suppress_session_score": false } ``` #### Clean up configuration for SBFM Pro plan ```json { "sbfm_likely_automated": "allow", "fight_mode": false } ``` #### Clean up configuration for SBFM Biz plan ```json { "fight_mode": false } ``` #### Clean up configuration for BM Enterprise Subscription plan It is strongly recommended that you ensure you have [custom rules](https://developers.cloudflare.com/waf/custom-rules/) in place to protect your zone before disabling the SBFM rules. Without these protections, your zone is vulnerable to attacks. ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "fight_mode": false } ```').option(`ai-bots-migration-opt-out`,{type:`boolean`,description:`Temporary migration flag tracking zones opted out of AI bots managed-rule updates.`}).option(`ai-bots-protection`,{type:`string`,description:`Enable rule to block AI Scrapers and Crawlers.`,choices:[`block`,`disabled`,`only_on_ad_pages`]}).option(`ai-search`,{type:`string`,description:`Configure robots.txt policy for AI search bots.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).option(`ai-training`,{type:`string`,description:`Configure robots.txt policy for AI model training bots.`,choices:[`disabled`,`disallow`,`block`,`only_on_ad_pages`]}).option(`ai-user`,{type:`string`,description:`Configure robots.txt policy for AI assistant and agent bots.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).option(`bot-preference-sync-enabled`,{type:`boolean`,description:`Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone's AI Search, AI User, and AI Training preferences.`}).option(`cf-robots-variant`,{type:`string`,description:`Specifies the Robots Access Control License variant to use.`,choices:[`off`,`policy_only`]}).option(`content-bots-protection`,{type:`string`,description:`Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.`,choices:[`block`,`disabled`]}).option(`crawler-protection`,{type:`string`,description:`Enable rule to punish AI Scrapers and Crawlers via a link maze.`,choices:[`enabled`,`disabled`]}).option(`enable-js`,{type:`boolean`,description:`Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).`}).option(`is-robots-txt-managed`,{type:`boolean`,description:`Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.`}).option(`jsd-api-results-enabled`,{type:`boolean`,description:`Whether to use JavaScript Detection results submitted through the API for this zone.`}).option(`fight-mode`,{type:`boolean`,description:`Whether to enable Bot Fight Mode.`}).option(`stale-zone-configuration-optimize-wordpress`,{type:`boolean`,description:`Indicates that the zone's wordpress optimization for SBFM is turned on.`}).option(`stale-zone-configuration-sbfm-definitely-automated`,{type:`string`,description:`Indicates that the zone's definitely automated requests are being blocked or challenged.`}).option(`stale-zone-configuration-sbfm-likely-automated`,{type:`string`,description:`Indicates that the zone's likely automated requests are being blocked or challenged.`}).option(`stale-zone-configuration-sbfm-static-resource-protection`,{type:`string`,description:`Indicates that the zone's static resource protection is turned on.`}).option(`stale-zone-configuration-sbfm-verified-bots`,{type:`string`,description:`Indicates that the zone's verified bot requests are being blocked.`}).option(`stale-zone-configuration-suppress-session-score`,{type:`boolean`,description:`Indicates that the zone's session score tracking is disabled.`}).option(`stale-zone-configuration-fight-mode`,{type:`boolean`,description:`Indicates that the zone's Bot Fight Mode is turned on.`}).option(`optimize-wordpress`,{type:`boolean`,description:`Whether to optimize Super Bot Fight Mode protections for Wordpress.`}).option(`sbfm-definitely-automated`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on definitely automated requests.`,choices:[`allow`,`block`,`managed_challenge`]}).option(`sbfm-static-resource-protection`,{type:`boolean`,description:`Super Bot Fight Mode (SBFM) to enable static resource protection.
|
|
7
|
+
Enable if static resources on your application need bot protection.
|
|
8
|
+
Note: Static resource protection can also result in legitimate traffic being blocked.
|
|
9
|
+
`}).option(`sbfm-verified-bots`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on verified bots requests.`,choices:[`allow`,`block`]}).option(`sbfm-likely-automated`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on likely automated requests.`,choices:[`allow`,`block`,`managed_challenge`]}).option(`auto-update-model`,{type:`boolean`,description:`Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)`}).option(`bm-cookie-enabled`,{type:`boolean`,description:`Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true`}).option(`suppress-session-score`,{type:`boolean`,description:`Whether to disable tracking the highest bot score for a session in the Bot Management cookie.`}).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 y={command:`update`,describe:`Update Zone Bot Management Config`,builder:v,handler:async l=>a({command:`bot-management update`,classification:{safeFlags:[`ai-bots-migration-opt-out`,`ai-bots-protection`,`ai-search`,`ai-training`,`ai-user`,`bot-preference-sync-enabled`,`cf-robots-variant`,`content-bots-protection`,`crawler-protection`,`enable-js`,`is-robots-txt-managed`,`jsd-api-results-enabled`,`fight-mode`,`stale-zone-configuration-optimize-wordpress`,`stale-zone-configuration-suppress-session-score`,`stale-zone-configuration-fight-mode`,`optimize-wordpress`,`sbfm-definitely-automated`,`sbfm-static-resource-protection`,`sbfm-verified-bots`,`sbfm-likely-automated`,`auto-update-model`,`bm-cookie-enabled`,`suppress-session-score`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf bot-management update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/bot_management`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({ai_bots_migration_opt_out:l[`ai-bots-migration-opt-out`],ai_bots_protection:c(l[`ai-bots-protection`],`ai-bots-protection`,`text`),ai_search:c(l[`ai-search`],`ai-search`,`text`),ai_training:c(l[`ai-training`],`ai-training`,`text`),ai_user:c(l[`ai-user`],`ai-user`,`text`),bot_preference_sync_enabled:l[`bot-preference-sync-enabled`],cf_robots_variant:c(l[`cf-robots-variant`],`cf-robots-variant`,`text`),content_bots_protection:c(l[`content-bots-protection`],`content-bots-protection`,`text`),crawler_protection:c(l[`crawler-protection`],`crawler-protection`,`text`),enable_js:l[`enable-js`],is_robots_txt_managed:l[`is-robots-txt-managed`],jsd_api_results_enabled:l[`jsd-api-results-enabled`],fight_mode:l[`fight-mode`],stale_zone_configuration:{optimize_wordpress:l[`stale-zone-configuration-optimize-wordpress`],sbfm_definitely_automated:c(l[`stale-zone-configuration-sbfm-definitely-automated`],`stale-zone-configuration-sbfm-definitely-automated`,`text`),sbfm_likely_automated:c(l[`stale-zone-configuration-sbfm-likely-automated`],`stale-zone-configuration-sbfm-likely-automated`,`text`),sbfm_static_resource_protection:c(l[`stale-zone-configuration-sbfm-static-resource-protection`],`stale-zone-configuration-sbfm-static-resource-protection`,`text`),sbfm_verified_bots:c(l[`stale-zone-configuration-sbfm-verified-bots`],`stale-zone-configuration-sbfm-verified-bots`,`text`),suppress_session_score:l[`stale-zone-configuration-suppress-session-score`],fight_mode:l[`stale-zone-configuration-fight-mode`]},optimize_wordpress:l[`optimize-wordpress`],sbfm_definitely_automated:c(l[`sbfm-definitely-automated`],`sbfm-definitely-automated`,`text`),sbfm_static_resource_protection:l[`sbfm-static-resource-protection`],sbfm_verified_bots:c(l[`sbfm-verified-bots`],`sbfm-verified-bots`,`text`),sbfm_likely_automated:c(l[`sbfm-likely-automated`],`sbfm-likely-automated`,`text`),auto_update_model:l[`auto-update-model`],bm_cookie_enabled:l[`bm-cookie-enabled`],suppress_session_score:l[`suppress-session-score`]}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.botManagement.update({body:e,zone_id:u})),{successLabel:`Updated`});return}let d=s({ai_bots_migration_opt_out:l[`ai-bots-migration-opt-out`],ai_bots_protection:c(l[`ai-bots-protection`],`ai-bots-protection`,`text`),ai_search:c(l[`ai-search`],`ai-search`,`text`),ai_training:c(l[`ai-training`],`ai-training`,`text`),ai_user:c(l[`ai-user`],`ai-user`,`text`),bot_preference_sync_enabled:l[`bot-preference-sync-enabled`],cf_robots_variant:c(l[`cf-robots-variant`],`cf-robots-variant`,`text`),content_bots_protection:c(l[`content-bots-protection`],`content-bots-protection`,`text`),crawler_protection:c(l[`crawler-protection`],`crawler-protection`,`text`),enable_js:l[`enable-js`],is_robots_txt_managed:l[`is-robots-txt-managed`],jsd_api_results_enabled:l[`jsd-api-results-enabled`],fight_mode:l[`fight-mode`],stale_zone_configuration:{optimize_wordpress:l[`stale-zone-configuration-optimize-wordpress`],sbfm_definitely_automated:c(l[`stale-zone-configuration-sbfm-definitely-automated`],`stale-zone-configuration-sbfm-definitely-automated`,`text`),sbfm_likely_automated:c(l[`stale-zone-configuration-sbfm-likely-automated`],`stale-zone-configuration-sbfm-likely-automated`,`text`),sbfm_static_resource_protection:c(l[`stale-zone-configuration-sbfm-static-resource-protection`],`stale-zone-configuration-sbfm-static-resource-protection`,`text`),sbfm_verified_bots:c(l[`stale-zone-configuration-sbfm-verified-bots`],`stale-zone-configuration-sbfm-verified-bots`,`text`),suppress_session_score:l[`stale-zone-configuration-suppress-session-score`],fight_mode:l[`stale-zone-configuration-fight-mode`]},optimize_wordpress:l[`optimize-wordpress`],sbfm_definitely_automated:c(l[`sbfm-definitely-automated`],`sbfm-definitely-automated`,`text`),sbfm_static_resource_protection:l[`sbfm-static-resource-protection`],sbfm_verified_bots:c(l[`sbfm-verified-bots`],`sbfm-verified-bots`,`text`),sbfm_likely_automated:c(l[`sbfm-likely-automated`],`sbfm-likely-automated`,`text`),auto_update_model:l[`auto-update-model`],bm_cookie_enabled:l[`bm-cookie-enabled`],suppress_session_score:l[`suppress-session-score`]});n(await i(`Updating`,async()=>a.botManagement.update({body:d,zone_id:u})),{successLabel:`Updated`})})},b={command:`bot-management`,describe:`bot-management`,builder:e=>e.command(_).command(y).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c}from"./prompt-Bx2PB-tt.mjs";function l(e){return e.usage(`$0 botnet-feed asn day-report <asn-id>
|
|
3
|
+
|
|
4
|
+
Gets all the data the botnet tracking database has for a given ASN registered to user account for given date. If no date is given, it will return results for the previous day.`).positional(`asn-id`,{type:`string`,description:`Asn ID`,demandOption:!0}).option(`date`,{type:`string`,description:`Date`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`day-report <asn-id>`,describe:`Get daily report`,builder:l,handler:async c=>s({command:`botnet-feed asn day-report`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={date:c.date};if(c.dryRun){a({command:`cf botnet-feed asn day-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/botnet_feed/asn/${c[`asn-id`]==null?`<asn-id>`:encodeURIComponent(String(c[`asn-id`]))}/day_report`,pathParams:{"asn-id":String(c[`asn-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.botnetFeed.asn.dayReport({account_id:u,asn_id:c[`asn-id`],...s})),{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 botnet-feed asn full-report <asn-id>
|
|
5
|
+
|
|
6
|
+
Gets all the data the botnet threat feed tracking database has for a given ASN registered to user account.`).positional(`asn-id`,{type:`string`,description:`Asn ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`full-report <asn-id>`,describe:`Get full report`,builder:d,handler:async c=>s({command:`botnet-feed asn full-report`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf botnet-feed asn full-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/botnet_feed/asn/${c[`asn-id`]==null?`<asn-id>`:encodeURIComponent(String(c[`asn-id`]))}/full_report`,pathParams:{"asn-id":String(c[`asn-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.botnetFeed.asn.fullReport({account_id:l,asn_id:c[`asn-id`]})),{successLabel:`Loaded`})})},p={command:`asn`,describe:`ASN-level botnet activity data showing networks with known C2 infrastructure`,builder:e=>e.command(u).command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.usage(`$0 botnet-feed configs asn delete <asn-id>
|
|
7
|
+
|
|
8
|
+
Delete an ASN from botnet threat feed for a given user.`).positional(`asn-id`,{type:`string`,description:`Asn 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 <asn-id>`,describe:`Delete an ASN`,builder:m,handler:async l=>s({command:`botnet-feed configs asn delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){a({command:`cf botnet-feed configs asn delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/botnet_feed/configs/asn/${l[`asn-id`]==null?`<asn-id>`:encodeURIComponent(String(l[`asn-id`]))}`,pathParams:{"asn-id":String(l[`asn-id`]??``)},bodyKind:`none`});return}let s=await r(l),u=l.local?e:await t();if(l.accountId=u,!await c({force:!!l.force})){process.stderr.write(`Aborted.
|
|
9
|
+
`);return}i(await o(`Deleting`,async()=>s.botnetFeed.configs.asn.delete({account_id:u,asn_id:l[`asn-id`]})),{successLabel:`Deleted`})})};function g(e){return e.usage(`$0 botnet-feed configs asn get
|
|
10
|
+
|
|
11
|
+
Gets a list of all ASNs registered for a user for the DDoS Botnet Feed API.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get`,describe:`Get list of ASNs`,builder:g,handler:async c=>s({command:`botnet-feed configs asn get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf botnet-feed configs asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/botnet_feed/configs/asn`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.botnetFeed.configs.asn.get({account_id:l})),{successLabel:`Loaded`})})},v={command:`asn`,describe:`Operations for configs.asn`,builder:e=>e.command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`configs`,describe:`Botnet feed subscription configuration and notification preferences`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},b={command:`botnet-feed`,describe:`Botnet threat intelligence feeds — IP and ASN-level data on known command-and-control infrastructure`,builder:e=>e.command(p).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-Bx2PB-tt.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function g(e){return e.usage(`$0 brand-protection logo-matches get
|
|
3
|
+
|
|
4
|
+
Get paginated list of logo matches for a specific brand protection logo query`).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`download`,{type:`string`,description:`Download`}).option(`order-by`,{type:`string`,description:`Column to sort by. Options: 'matchedAt', 'domain', 'similarityScore', or 'registrar'`,choices:[`matchedAt`,`domain`,`similarityScore`,`registrar`]}).option(`order`,{type:`string`,description:`Sort order. Options: 'asc' (ascending) or 'desc' (descending)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get`,describe:`List logo matches`,builder:h(g),handler:async c=>s({command:`brand-protection logo-matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},c,async()=>{let s={offset:c.offset,limit:c.limit,query_id:c[`query-id`],download:c.download,orderBy:c[`order-by`],order:c.order};if(c.dryRun){a({command:`cf brand-protection logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/matches`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.brandProtection.logoMatches.get({account_id:u,...s})),{successLabel:`Loaded`})})},v={command:`logo-matches`,describe:`Operations for logo-matches`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 brand-protection logos create
|
|
5
|
+
|
|
6
|
+
Create a new saved brand protection logo query for visual similarity matching`).option(`image-data`,{type:`string`,description:`Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.`}).option(`search-lookback`,{type:`boolean`,description:`If true, search historic scanned images for matches above the similarity threshold`,default:!0}).option(`similarity-threshold`,{type:`number`,description:`Minimum similarity score (0-1) required for visual matches`}).option(`tag`,{type:`string`,description:`Unique identifier for the logo query`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create`,describe:`Insert logo query`,builder:y,handler:async l=>s({command:`brand-protection logos create`,classification:{safeFlags:[`search-lookback`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf brand-protection logos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/queries`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({image_data:d(l[`image-data`],`image-data`,`text`),search_lookback:l[`search-lookback`],similarity_threshold:l[`similarity-threshold`],tag:d(l.tag,`tag`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.brandProtection.logos.create({...e,account_id:p})),{successLabel:`Created`});return}if(l[`image-data`]===void 0&&(l[`image-data`]=await f(`image-data`,`Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.`)),l[`similarity-threshold`]===void 0)throw Error(`--similarity-threshold is required (or pass --body with this field set).`);l.tag===void 0&&(l.tag=await f(`tag`,`Unique identifier for the logo query`));let m=u({image_data:d(l[`image-data`],`image-data`,`text`),search_lookback:l[`search-lookback`],similarity_threshold:l[`similarity-threshold`],tag:d(l.tag,`tag`,`text`)});i(await o(`Creating`,async()=>s.brandProtection.logos.create({...m,account_id:p})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 brand-protection logos delete <query-id>
|
|
7
|
+
|
|
8
|
+
Delete a saved brand protection logo query. Returns 404 if the query ID doesn't exist.`).positional(`query-id`,{type:`string`,description:`Query 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 S={command:`delete <query-id>`,describe:`Delete logo query`,builder:x,handler:async c=>s({command:`brand-protection logos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf brand-protection logos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/queries/${c[`query-id`]==null?`<query-id>`:encodeURIComponent(String(c[`query-id`]))}`,pathParams:{"query-id":String(c[`query-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
9
|
+
`);return}i(await o(`Deleting`,async()=>s.brandProtection.logos.delete({account_id:l,query_id:c[`query-id`]})),{successLabel:`Deleted`})})};function C(e){return e.usage(`$0 brand-protection logos get
|
|
10
|
+
|
|
11
|
+
Get all saved brand protection logo queries for an account. Optionally specify id to get a single query. Set download=true to include base64-encoded image data.`).option(`id`,{type:`string`,description:`Optional query ID to retrieve a specific logo query`}).option(`download`,{type:`string`,description:`If true, include base64-encoded image data in the response`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get`,describe:`Get logo queries`,builder:C,handler:async c=>s({command:`brand-protection logos get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={id:c.id,download:c.download};if(c.dryRun){a({command:`cf brand-protection logos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/queries`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.brandProtection.logos.get({account_id:u,...s})),{successLabel:`Loaded`})})},T={command:`logos`,describe:`Operations for logos`,builder:e=>e.command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 brand-protection matches bulk-dismiss
|
|
12
|
+
|
|
13
|
+
Dismiss or undismiss multiple matches in a single request. Accepts either the new format (matches: [{query_id, domain_id}]) for per-query control, or the legacy format (match_ids: [number]) which dismisses for all queries sharing each match's hash. Returns per-item success/error results.`).option(`action`,{type:`string`,description:`The action field`,choices:[`dismiss`,`undismiss`]}).option(`match-ids`,{type:`string`,array:!0,description:`The match_ids field`}).option(`matches`,{type:`string`,description:`The matches field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const D={command:`bulk-dismiss`,describe:`Bulk dismiss or undismiss matches`,builder:E,handler:async f=>s({command:`brand-protection matches bulk-dismiss`,classification:{safeFlags:[`action`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf brand-protection matches bulk-dismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/matches/bulk-dismiss`,pathParams:{},bodyKind:`json`,body:f.body===void 0?u({action:d(f.action,`action`,`text`),match_ids:f[`match-ids`],matches:l(f.matches,`matches`)}):c(f.body)});return}let s=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.brandProtection.matches.bulkDismiss({...e,account_id:m})),{successLabel:`Created`});return}f.action===void 0&&(f.action=await p(`action`,`The action field`,[`dismiss`,`undismiss`]));let h=u({action:d(f.action,`action`,`text`),match_ids:f[`match-ids`],matches:l(f.matches,`matches`)});i(await o(`Creating`,async()=>s.brandProtection.matches.bulkDismiss({...h,account_id:m})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 brand-protection matches get
|
|
14
|
+
|
|
15
|
+
Get paginated list of domain matches for one or more brand protection queries. When multiple query_ids are provided (comma-separated), matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and individual dismissed state.`).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`query-id`,{type:`string`,description:`Query ID or comma-separated list of Query IDs. When multiple IDs are provided, matches are deduplicated across queries and each match includes a match_details array with per-match query metadata and dismissed state.`,demandOption:!0}).option(`include-domain-id`,{type:`string`,description:`Include domain ID`}).option(`include-dismissed`,{type:`string`,description:`Include dismissed`}).option(`domain-search`,{type:`string`,description:`Filter matches by domain name (substring match)`}).option(`order-by`,{type:`string`,description:`Column to sort by. Options: 'domain', 'first_seen', or 'registrar'`,choices:[`domain`,`first_seen`,`registrar`]}).option(`order`,{type:`string`,description:`Sort order. Options: 'asc' (ascending) or 'desc' (descending)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`List saved query matches`,builder:h(O),handler:async c=>s({command:`brand-protection matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},c,async()=>{let s={offset:c.offset,limit:c.limit,query_id:c[`query-id`],include_domain_id:c[`include-domain-id`],include_dismissed:c[`include-dismissed`],domain_search:c[`domain-search`],orderBy:c[`order-by`],order:c.order};if(c.dryRun){a({command:`cf brand-protection matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/matches`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.brandProtection.matches.get({account_id:u,...s})),{successLabel:`Loaded`})})},A={command:`matches`,describe:`Operations for matches`,builder:e=>e.command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 brand-protection queries dismiss <domain-id>
|
|
16
|
+
|
|
17
|
+
Mark a specific domain as dismissed for a given query. Dismissals are per-query — dismissing a domain in one query does not affect other queries.`).positional(`domain-id`,{type:`string`,description:`Domain ID`,demandOption:!0}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`dismiss <domain-id>`,describe:`Dismiss a match`,builder:j,handler:async c=>s({command:`brand-protection queries dismiss`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf brand-protection queries dismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/queries/${c[`query-id`]==null?`<query-id>`:encodeURIComponent(String(c[`query-id`]))}/matches/${c[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(c[`domain-id`]))}/dismiss`,pathParams:{"query-id":String(c[`query-id`]??``),"domain-id":String(c[`domain-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.brandProtection.queries.dismiss({account_id:l,query_id:c[`query-id`],domain_id:c[`domain-id`]})),{successLabel:`Created`})})};function N(e){return e.usage(`$0 brand-protection queries get
|
|
18
|
+
|
|
19
|
+
Get all saved brand protection queries for an account`).option(`id`,{type:`string`,description:`ID`}).option(`page`,{type:`number`,description:`Optional page number for paginated list requests. Defaults to 1 when only per_page is supplied. Omit page and per_page to preserve the legacy full-list response.`}).option(`per-page`,{type:`number`,description:`Optional number of queries per page for paginated list requests. Defaults to 100 when only page is supplied. Maximum 100. Omit page and per_page to preserve the legacy full-list response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get`,describe:`Get queries`,builder:N,handler:async c=>s({command:`brand-protection queries get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={id:c.id,page:c.page,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf brand-protection queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/queries`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.brandProtection.queries.get({account_id:u,...s})),{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 brand-protection queries undismiss <domain-id>
|
|
20
|
+
|
|
21
|
+
Remove the dismissed status from a specific domain for a given query. Undismissals are per-query — undismissing a domain in one query does not affect other queries.`).positional(`domain-id`,{type:`string`,description:`Domain ID`,demandOption:!0}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`undismiss <domain-id>`,describe:`Undismiss a match`,builder:F,handler:async c=>s({command:`brand-protection queries undismiss`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf brand-protection queries undismiss`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/queries/${c[`query-id`]==null?`<query-id>`:encodeURIComponent(String(c[`query-id`]))}/matches/${c[`domain-id`]==null?`<domain-id>`:encodeURIComponent(String(c[`domain-id`]))}/undismiss`,pathParams:{"query-id":String(c[`query-id`]??``),"domain-id":String(c[`domain-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.brandProtection.queries.undismiss({account_id:l,query_id:c[`query-id`],domain_id:c[`domain-id`]})),{successLabel:`Created`})})},L={command:`queries`,describe:`Operations for queries`,builder:e=>e.command(M).command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 brand-protection submit
|
|
22
|
+
|
|
23
|
+
Submit an image and find the n closest matches from the scanned images index without creating any match records. Returns similarity scores and metadata for each match.`).option(`show-historic`,{type:`string`,description:`Include scanned images without domain metadata (historic data). Default: false (only show images with domain)`}).option(`download`,{type:`string`,description:`If true, include base64-encoded image data in the response`}).option(`image-data`,{type:`string`,description:`Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.`}).option(`score-threshold`,{type:`number`,description:`Minimum similarity score threshold for matches (0-1, default: 0)`,default:0}).option(`top-k`,{type:`number`,description:`Number of closest matches to return (1-100, default: 10)`,default:10}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`submit`,describe:`Search scanned images`,builder:R,handler:async l=>s({command:`brand-protection submit`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let s={showHistoric:l[`show-historic`],download:l.download};if(l.dryRun){a({command:`cf brand-protection submit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/search`,pathParams:{},query:s,bodyKind:`json`,body:l.body===void 0?u({image_data:d(l[`image-data`],`image-data`,`text`),score_threshold:l[`score-threshold`],top_k:l[`top-k`]}):c(l.body)});return}let p=await r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i(await o(`Creating`,async()=>p.brandProtection.submit({...e,account_id:m,...s})),{successLabel:`Created`});return}l[`image-data`]===void 0&&(l[`image-data`]=await f(`image-data`,`Base64 encoded image data. Can include data URI prefix (e.g., 'data:image/png;base64,...') or just the base64 string.`));let h=u({image_data:d(l[`image-data`],`image-data`,`text`),score_threshold:l[`score-threshold`],top_k:l[`top-k`]});new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i(await o(`Creating`,async()=>p.brandProtection.submit({...h,account_id:m,...s})),{successLabel:`Created`})})};function B(e){return e.usage(`$0 brand-protection trial create
|
|
24
|
+
|
|
25
|
+
Uses AI to scan all domains in the lookback table and identify potential phishing or impersonation attempts against the given brand string.`).option(`brand`,{type:`string`,description:`The brand field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const V={command:`create`,describe:`Analyze domains for brand impersonation`,builder:B,handler:async l=>s({command:`brand-protection trial create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf brand-protection trial create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/domain/trial`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({brand:d(l.brand,`brand`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.brandProtection.trial.create({...e,account_id:p})),{successLabel:`Created`});return}l.brand===void 0&&(l.brand=await f(`brand`,`The brand field`));let m=u({brand:d(l.brand,`brand`,`text`)});i(await o(`Creating`,async()=>s.brandProtection.trial.create({...m,account_id:p})),{successLabel:`Created`})})},H={command:`trial`,describe:`Operations for trial`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(e){return e.usage(`$0 brand-protection url-info
|
|
26
|
+
|
|
27
|
+
Get the total number of saved brand protection queries (domain + logo) for an account`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`url-info`,describe:`Get total queries`,builder:U,handler:async c=>s({command:`brand-protection url-info`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf brand-protection url-info`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/total-queries`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.brandProtection.urlInfo({account_id:l})),{successLabel:`Loaded`})})},G={command:`brand-protection`,describe:`brand-protection`,builder:e=>e.command(z).command(W).command(v).command(T).command(A).command(L).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-Bx2PB-tt.mjs";function m(e){return e.usage(`$0 browser-extension config create
|
|
3
|
+
|
|
4
|
+
Creates the browser extension configuration for an account.`).option(`config-min-extension-version`,{type:`string`,description:`Minimum required browser extension version.`}).option(`config-team-name`,{type:`string`,description:"Access team name. The service derives `team_domain` as `<team_name>.cloudflareaccess.com`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create browser extension configuration`,builder:m,handler:async l=>s({command:`browser-extension config create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf browser-extension config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/browser-extension/config`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({config:{min_extension_version:d(l[`config-min-extension-version`],`config-min-extension-version`,`text`),team_name:d(l[`config-team-name`],`config-team-name`,`text`)}}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.browserExtension.config.create({...e,account_id:p})),{successLabel:`Created`});return}l[`config-team-name`]===void 0&&(l[`config-team-name`]=await f(`config-team-name`,"Access team name. The service derives `team_domain` as `<team_name>.cloudflareaccess.com`."));let m=u({config:{min_extension_version:d(l[`config-min-extension-version`],`config-min-extension-version`,`text`),team_name:d(l[`config-team-name`],`config-team-name`,`text`)}});i(await o(`Creating`,async()=>s.browserExtension.config.create({...m,account_id:p})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 browser-extension config delete
|
|
5
|
+
|
|
6
|
+
Deletes the browser extension configuration for an account. The shard mapping is preserved and not deleted.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete`,describe:`Delete browser extension configuration`,builder:g,handler:async c=>s({command:`browser-extension config delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf browser-extension config delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/browser-extension/config`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}i(await o(`Deleting`,async()=>s.browserExtension.config.delete({account_id:l})),{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 browser-extension config get
|
|
8
|
+
|
|
9
|
+
Returns the browser extension configuration for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get`,describe:`Get browser extension configuration`,builder:v,handler:async c=>s({command:`browser-extension config get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf browser-extension config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/browser-extension/config`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.browserExtension.config.get({account_id:l})),{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 browser-extension config logs extension-events search
|
|
10
|
+
|
|
11
|
+
Searches browser extension event logs for an account. The request accepts only supported fields and filters; raw SQL is not accepted.`).option(`fields`,{type:`string`,array:!0,description:`The fields field`}).option(`filters`,{type:`string`,description:`The filters field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`from`,{type:`string`,description:`The from field`}).option(`include-total`,{type:`boolean`,description:`The includeTotal field`,default:!1}).option(`limit`,{type:`number`,description:`The limit field`,default:50}).option(`page`,{type:`number`,description:`The page field`,default:1}).option(`to`,{type:`string`,description:`The to field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`search`,describe:`Search browser extension event logs`,builder:b,handler:async p=>s({command:`browser-extension config logs extension-events search`,classification:{safeFlags:[`include-total`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf browser-extension config logs extension-events search`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/browser-extension/config/logs/extension-events/search`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({fields:p.fields,filters:l(p.filters,`filters`),from:d(p.from,`from`,`text`),includeTotal:p[`include-total`],limit:p.limit,page:p.page,to:d(p.to,`to`,`text`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await t();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Loading`,async()=>s.browserExtension.config.logs.extensionEvents.search({...e,account_id:m})),{successLabel:`Loaded`});return}p.from===void 0&&(p.from=await f(`from`,`The from field`)),p.to===void 0&&(p.to=await f(`to`,`The to field`));let h=u({fields:p.fields,filters:l(p.filters,`filters`),from:d(p.from,`from`,`text`),includeTotal:p[`include-total`],limit:p.limit,page:p.page,to:d(p.to,`to`,`text`)});i(await o(`Loading`,async()=>s.browserExtension.config.logs.extensionEvents.search({...h,account_id:m})),{successLabel:`Loaded`})})},S={command:`extension-events`,describe:`Operations for config.logs.extension-events`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},C={command:`logs`,describe:`Operations for config.logs`,builder:e=>e.command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 browser-extension config update
|
|
12
|
+
|
|
13
|
+
Replaces the browser extension configuration for an account. The configuration must already exist. The shard mapping is immutable.`).option(`config-min-extension-version`,{type:`string`,description:`Minimum required browser extension version.`}).option(`config-team-name`,{type:`string`,description:"Access team name. The service derives `team_domain` as `<team_name>.cloudflareaccess.com`."}).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 T={command:`update`,describe:`Update browser extension configuration`,builder:w,handler:async l=>s({command:`browser-extension config update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf browser-extension config update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/browser-extension/config`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({config:{min_extension_version:d(l[`config-min-extension-version`],`config-min-extension-version`,`text`),team_name:d(l[`config-team-name`],`config-team-name`,`text`)}}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.browserExtension.config.update({...e,account_id:p})),{successLabel:`Updated`});return}l[`config-team-name`]===void 0&&(l[`config-team-name`]=await f(`config-team-name`,"Access team name. The service derives `team_domain` as `<team_name>.cloudflareaccess.com`."));let m=u({config:{min_extension_version:d(l[`config-min-extension-version`],`config-min-extension-version`,`text`),team_name:d(l[`config-team-name`],`config-team-name`,`text`)}});i(await o(`Updating`,async()=>s.browserExtension.config.update({...m,account_id:p})),{successLabel:`Updated`})})},E={command:`config`,describe:`Operations for config`,builder:e=>e.command(h).command(_).command(y).command(T).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function D(e){return e.usage(`$0 browser-extension inventories get <registration-id>
|
|
14
|
+
|
|
15
|
+
Returns the installed extension inventory for a single registered browser extension device.`).positional(`registration-id`,{type:`string`,description:`Browser extension registration ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <registration-id>`,describe:`Get a single browser extension inventory`,builder:D,handler:async c=>s({command:`browser-extension inventories get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf browser-extension inventories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/browser-extension/config/inventories/${c[`registration-id`]==null?`<registration-id>`:encodeURIComponent(String(c[`registration-id`]))}`,pathParams:{"registration-id":String(c[`registration-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.browserExtension.inventories.get({account_id:l,registration_id:c[`registration-id`]})),{successLabel:`Loaded`})})};function k(e){return e.usage("$0 browser-extension inventories list\n\nReturns the installed extension inventory for each registered browser extension device in the account. Each device reports its inventory periodically; this endpoint returns the latest known snapshot per device. Results are paginated by cursor. Pass the `cursor` from a previous response to fetch the next page. `per_page` controls page size (default 50, max 200).").option(`cursor`,{type:`string`,description:`Opaque cursor from a previous response to fetch the next page.`}).option(`per-page`,{type:`number`,description:`Number of results per page (default 50, max 200).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List browser extension inventories`,builder:k,handler:async c=>s({command:`browser-extension inventories list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor,per_page:c[`per-page`]};if(c.dryRun){a({command:`cf browser-extension inventories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/browser-extension/config/inventories`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.browserExtension.inventories.list({account_id:u,...s})),{successLabel:`Loaded`})})},j={command:`inventories`,describe:`Operations for inventories`,builder:e=>e.command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`browser-extension`,describe:`browser-extension`,builder:e=>e.command(E).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
|