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,18 @@
|
|
|
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{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{i as l,n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p}from"./prompt-Bx2PB-tt.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
|
|
3
|
+
|
|
4
|
+
Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:h,handler:async r=>c({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${r[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(r[`repo-id`]))}/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}/report`,pathParams:{"repo-id":String(r[`repo-id`]??``),"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.reports.get({account_id:l,repo_id:r[`repo-id`],scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})},_={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create
|
|
5
|
+
|
|
6
|
+
Creates an upload repository or reserves an asynchronous deployed Worker import by name. Worker imports require Idempotency-Key.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`name`,{type:`string`,description:`The name field`}).option(`worker-script-name`,{type:`string`,description:`The worker_script_name 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 y={command:`create`,describe:`Create repository`,builder:v,handler:async m=>c({command:`managed-defense vulnerability-discovery repositories create`,classification:{safeFlags:[`dry-run`]}},m,async()=>{let c={};if(m[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(m[`idempotency-key`])),m.dryRun){o({command:`cf managed-defense vulnerability-discovery repositories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},bodyKind:`json`,body:m.body===void 0?d({name:f(m.name,`name`,`text`),worker_script_name:f(m[`worker-script-name`],`worker-script-name`,`text`)}):u(m.body)});return}let h=await i(m),g=m.local?e:await t();if(m.accountId=g,m.body){let e=u(m.body);a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}m.name===void 0&&(m.name=await p(`name`,`The name field`));let _={};m.name!==void 0&&l(_,[`name`],f(m.name,`name`,`text`)),m[`worker-script-name`]!==void 0&&l(_,[`worker_script_name`],f(m[`worker-script-name`],`worker-script-name`,`text`)),a(await s(`Creating`,async()=>r(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:Object.keys(_).length>0?_:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories get <repo-id>
|
|
7
|
+
|
|
8
|
+
Gets repository metadata, source readiness, and customer scan history.`).positional(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`scan-limit`,{type:`number`,description:`Scan limit`}).option(`scan-cursor`,{type:`string`,description:`Scan cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <repo-id>`,describe:`Get repository`,builder:b,handler:async r=>c({command:`managed-defense vulnerability-discovery repositories get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={scan_limit:r[`scan-limit`],scan_cursor:r[`scan-cursor`]};if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery repositories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${r[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(r[`repo-id`]))}`,pathParams:{"repo-id":String(r[`repo-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.managedDefense.vulnerabilityDiscovery.repositories.get({account_id:u,repo_id:r[`repo-id`],...c})),{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories list
|
|
9
|
+
|
|
10
|
+
Lists repositories available for vulnerability discovery in 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 C={command:`list`,describe:`List repositories`,builder:S,handler:async r=>c({command:`managed-defense vulnerability-discovery repositories list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,cursor:r.cursor};if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery repositories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.managedDefense.vulnerabilityDiscovery.repositories.list({account_id:u,...c})),{successLabel:`Loaded`})})},w={command:`repositories`,describe:`Operations for vulnerability-discovery.repositories`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 managed-defense vulnerability-discovery scans create
|
|
11
|
+
|
|
12
|
+
Submits repository intent for operator review. This endpoint does not immediately start execution. Worker-imported repositories must be ready; explicit \`repo_hosts\` must be authorized before the request is persisted.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`repos`,{type:`string`,array:!0,description:`The repos field`}).option(`telemetry-window-end`,{type:`string`,description:`The telemetry_window.end field`}).option(`telemetry-window-start`,{type:`string`,description:`The telemetry_window.start 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)`}).check(e=>{if([`telemetry-window-end`,`telemetry-window-start`].some(t=>e[t]!==void 0)){let t=[`telemetry-window-end`,`telemetry-window-start`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --telemetry_window-* flag is set`)}return!0})}const E={command:`create`,describe:`Create scan`,builder:T,handler:async p=>c({command:`managed-defense vulnerability-discovery scans create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{let c={};if(p[`idempotency-key`]!==void 0&&(c[`Idempotency-Key`]=String(p[`idempotency-key`])),p.dryRun){o({command:`cf managed-defense vulnerability-discovery scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},bodyKind:`json`,body:p.body===void 0?d({repos:p.repos,telemetry_window:{end:f(p[`telemetry-window-end`],`telemetry-window-end`,`text`),start:f(p[`telemetry-window-start`],`telemetry-window-start`,`text`)}}):u(p.body)});return}let m=await i(p),h=p.local?e:await t();if(p.accountId=h,p.body){let e=u(p.body);a(await s(`Creating`,async()=>r(m,`POST`,`/accounts/${h}/managed-defense/vulnerability-discovery/scans`,{body:e,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`});return}if(p.repos===void 0)throw Error(`--repos is required (or pass --body with this field set).`);let g={};p.repos!==void 0&&l(g,[`repos`],p.repos),p[`telemetry-window-end`]!==void 0&&l(g,[`telemetry_window`,`end`],f(p[`telemetry-window-end`],`telemetry-window-end`,`text`)),p[`telemetry-window-start`]!==void 0&&l(g,[`telemetry_window`,`start`],f(p[`telemetry-window-start`],`telemetry-window-start`,`text`)),a(await s(`Creating`,async()=>r(m,`POST`,`/accounts/${h}/managed-defense/vulnerability-discovery/scans`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Created`})})};function D(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get <scan-id>
|
|
13
|
+
|
|
14
|
+
Gets one customer-requested scan across its review and execution lifecycle.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <scan-id>`,describe:`Get scan`,builder:D,handler:async r=>c({command:`managed-defense vulnerability-discovery scans get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}`,pathParams:{"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.scans.get({account_id:l,scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 managed-defense vulnerability-discovery scans getReport <scan-id>
|
|
15
|
+
|
|
16
|
+
Gets the active operator-reviewed scan report. Repository metadata records report readiness even when no publication is available.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`getReport <scan-id>`,describe:`Get reviewed vulnerability report`,builder:k,handler:async r=>c({command:`managed-defense vulnerability-discovery scans getReport`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery scans getReport`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${r[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(r[`scan-id`]))}/report`,pathParams:{"scan-id":String(r[`scan-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.managedDefense.vulnerabilityDiscovery.scans.getReport({account_id:l,scan_id:r[`scan-id`]})),{successLabel:`Loaded`})})};function j(e){return e.usage(`$0 managed-defense vulnerability-discovery scans list
|
|
17
|
+
|
|
18
|
+
Lists customer-requested scans across review and execution lifecycle states.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`status`,{type:`string`,description:`Repeat parameter or provide comma-separated values.`}).option(`repo`,{type:`string`,description:`Repo`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List scans`,builder:m(j),handler:async r=>c({command:`managed-defense vulnerability-discovery scans list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,cursor:r.cursor,status:r.status,repo:r.repo};if(r.dryRun){o({command:`cf managed-defense vulnerability-discovery scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.managedDefense.vulnerabilityDiscovery.scans.list({account_id:u,...c})),{successLabel:`Loaded`})})},N={command:`scans`,describe:`Operations for vulnerability-discovery.scans`,builder:e=>e.command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`vulnerability-discovery`,describe:`Operations for vulnerability-discovery`,builder:e=>e.command(_).command(w).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},F={command:`managed-defense`,describe:`managed-defense`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{F 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,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./prompt-Bx2PB-tt.mjs";function u(e){return e.usage(`$0 managed-transforms delete
|
|
3
|
+
|
|
4
|
+
Disables all Managed Transforms.`).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 d={command:`delete`,describe:`Delete Managed Transforms`,builder:u,handler:async o=>a({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/managed_headers`,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});if(o.zoneId=s,!await l({force:!!o.force})){process.stderr.write(`Aborted.
|
|
5
|
+
`);return}n(await i(`Deleting`,async()=>a.managedTransforms.delete({zone_id:s})),{successLabel:`Deleted`})})};function f(e){return e.usage(`$0 managed-transforms list
|
|
6
|
+
|
|
7
|
+
Fetches a list of all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`list`,describe:`List Managed Transforms`,builder:f,handler:async o=>a({command:`managed-transforms list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf managed-transforms list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/managed_headers`,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.managedTransforms.list({zone_id:s})),{successLabel:`Loaded`})})};function m(e){return e.usage(`$0 managed-transforms update
|
|
8
|
+
|
|
9
|
+
Updates the status of one or more Managed Transforms.`).option(`managed-request-headers`,{type:`string`,description:`The list of Managed Request Transforms. Provide as a JSON array of objects or @path/to/file.json.`}).option(`managed-response-headers`,{type:`string`,description:`The list of Managed Response Transforms. 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:`A Managed Transforms patch object. Both fields are optional; only the sections provided will be updated.`})}const h={command:`update`,describe:`Update Managed Transforms`,builder:m,handler:async l=>a({command:`managed-transforms update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf managed-transforms update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?c({managed_request_headers:s(l[`managed-request-headers`],`managed-request-headers`),managed_response_headers:s(l[`managed-response-headers`],`managed-response-headers`)}):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.managedTransforms.update({...e,zone_id:u})),{successLabel:`Updated`});return}let d=c({managed_request_headers:s(l[`managed-request-headers`],`managed-request-headers`),managed_response_headers:s(l[`managed-response-headers`],`managed-response-headers`)});n(await i(`Updating`,async()=>a.managedTransforms.update({...d,zone_id:u})),{successLabel:`Updated`})})},g={command:`managed-transforms`,describe:`managed-transforms`,builder:e=>e.command(d).command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
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";function c(e){return e.usage(`$0 matches download get
|
|
3
|
+
|
|
4
|
+
Return matches as CSV for string queries based on ID`).option(`id`,{type:`string`,description:`ID`}).option(`offset`,{type:`number`,description:`Offset`}).option(`limit`,{type:`number`,description:`Limit`}).option(`include-domain-id`,{type:`boolean`,description:`Include domain ID`}).option(`include-dismissed`,{type:`boolean`,description:`Include dismissed`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get`,describe:`Download matches for string queries by ID`,builder:c,handler:async c=>s({command:`matches download get`,classification:{safeFlags:[`include-domain-id`,`include-dismissed`,`dry-run`]}},c,async()=>{let s={id:c.id,offset:c.offset,limit:c.limit,include_domain_id:c[`include-domain-id`],include_dismissed:c[`include-dismissed`]};if(c.dryRun){a({command:`cf matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/matches/download`,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.matches.download.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 matches get
|
|
5
|
+
|
|
6
|
+
Return matches for string queries based on ID`).option(`id`,{type:`string`,description:`ID`}).option(`offset`,{type:`number`,description:`Offset`}).option(`limit`,{type:`number`,description:`Limit`}).option(`include-domain-id`,{type:`boolean`,description:`Include domain ID`}).option(`include-dismissed`,{type:`boolean`,description:`Include dismissed`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`get`,describe:`Read matches for string queries by ID`,builder:d,handler:async c=>s({command:`matches get`,classification:{safeFlags:[`include-domain-id`,`include-dismissed`,`dry-run`]}},c,async()=>{let s={id:c.id,offset:c.offset,limit:c.limit,include_domain_id:c[`include-domain-id`],include_dismissed:c[`include-dismissed`]};if(c.dryRun){a({command:`cf matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/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.matches.get({account_id:u,...s})),{successLabel:`Loaded`})})},p={command:`matches`,describe:`matches`,builder:e=>e.command(f).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 mcp portals account-tool-call-analytics
|
|
3
|
+
|
|
4
|
+
Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:h(g),handler:async c=>s({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,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.mcp.portals.accountToolCallAnalytics({account_id:u,...s})),{successLabel:`Loaded`})})};function v(e){return e.usage(`$0 mcp portals create
|
|
5
|
+
|
|
6
|
+
Creates a new MCP portal for managing AI tool access through Cloudflare Access.`).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`,default:!1}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. 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 y={command:`create`,describe:`Create a new MCP Portal`,builder:v,handler:async p=>s({command:`mcp portals create`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf mcp portals create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},bodyKind:`json`,body:p.body===void 0?u({allow_code_mode:p[`allow-code-mode`],code_mode:d(p[`code-mode`],`code-mode`,`text`),description:d(p.description,`description`,`text`),hostname:d(p.hostname,`hostname`,`text`),id:d(p.id,`id`,`text`),name:d(p.name,`name`,`text`),secure_web_gateway:p[`secure-web-gateway`],servers:l(p.servers,`servers`)}):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(`Creating`,async()=>s.mcp.portals.create({...e,account_id:m})),{successLabel:`Created`});return}p.hostname===void 0&&(p.hostname=await f(`hostname`,`Hostname where the MCP portal is available.`)),p.id===void 0&&(p.id=await f(`id`,`Unique identifier for the MCP portal.`)),p.name===void 0&&(p.name=await f(`name`,`Display name for the MCP portal.`));let h=u({allow_code_mode:p[`allow-code-mode`],code_mode:d(p[`code-mode`],`code-mode`,`text`),description:d(p.description,`description`,`text`),hostname:d(p.hostname,`hostname`,`text`),id:d(p.id,`id`,`text`),name:d(p.name,`name`,`text`),secure_web_gateway:p[`secure-web-gateway`],servers:l(p.servers,`servers`)});i(await o(`Creating`,async()=>s.mcp.portals.create({...h,account_id:m})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 mcp portals delete <id>
|
|
7
|
+
|
|
8
|
+
Deletes an MCP portal from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,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 x={command:`delete <id>`,describe:`Delete an MCP Portal`,builder:b,handler:async c=>s({command:`mcp portals delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mcp portals delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/portals/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`This operation permanently deletes the MCP portal.`})){process.stderr.write(`Aborted.
|
|
9
|
+
`);return}i(await o(`Deleting`,async()=>s.mcp.portals.delete({account_id:l,id:c.id})),{successLabel:`Deleted`})})};function S(e){return e.usage(`$0 mcp portals list
|
|
10
|
+
|
|
11
|
+
Lists all MCP portals configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name, hostname`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List MCP Portals`,builder:S,handler:async c=>s({command:`mcp portals list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search};if(c.dryRun){a({command:`cf mcp portals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/portals`,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.mcp.portals.list({account_id:u,...s})),{successLabel:`Loaded`})})};function w(e){return e.usage(`$0 mcp portals read <id>
|
|
12
|
+
|
|
13
|
+
Read the details of a single MCP Portal, including its configured servers.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`read <id>`,describe:`Read details of an MCP Portal`,builder:w,handler:async c=>s({command:`mcp portals read`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mcp portals read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/portals/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mcp.portals.read({account_id:l,id:c.id})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 mcp portals tool-call-analytics <portal-id>
|
|
14
|
+
|
|
15
|
+
Returns daily or monthly tool-call counts for a portal.`).positional(`portal-id`,{type:`string`,description:`Portal ID`,demandOption:!0}).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`tool-call-analytics <portal-id>`,describe:`Per-portal MCP tool-call timeseries`,builder:h(E),handler:async c=>s({command:`mcp portals tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp portals tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/analytics/portals/${c[`portal-id`]==null?`<portal-id>`:encodeURIComponent(String(c[`portal-id`]))}/tool-calls/timeseries`,pathParams:{"portal-id":String(c[`portal-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.mcp.portals.toolCallAnalytics({account_id:u,portal_id:c[`portal-id`],...s})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 mcp portals update <id>
|
|
16
|
+
|
|
17
|
+
Updates an MCP portal configuration.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. 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 k={command:`update <id>`,describe:`Update an MCP Portal`,builder:O,handler:async f=>s({command:`mcp portals update`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mcp portals update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/portals/${f.id==null?`<id>`:encodeURIComponent(String(f.id))}`,pathParams:{id:String(f.id??``)},bodyKind:`json`,body:f.body===void 0?u({allow_code_mode:f[`allow-code-mode`],code_mode:d(f[`code-mode`],`code-mode`,`text`),description:d(f.description,`description`,`text`),hostname:d(f.hostname,`hostname`,`text`),name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],servers:l(f.servers,`servers`)}):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(`Updating`,async()=>s.mcp.portals.update({...e,account_id:p,id:f.id})),{successLabel:`Updated`});return}let m=u({allow_code_mode:f[`allow-code-mode`],code_mode:d(f[`code-mode`],`code-mode`,`text`),description:d(f.description,`description`,`text`),hostname:d(f.hostname,`hostname`,`text`),name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],servers:l(f.servers,`servers`)});i(await o(`Updating`,async()=>s.mcp.portals.update({...m,account_id:p,id:f.id})),{successLabel:`Updated`})})},A={command:`portals`,describe:`Manage MCP portals, attached servers, and Code Mode settings`,builder:e=>e.command(_).command(y).command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 mcp servers create
|
|
18
|
+
|
|
19
|
+
Creates a new MCP server for connecting to an upstream MCP endpoint.`).option(`auth-credentials`,{type:`string`,description:'Static credential for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`).'}).option(`auth-type`,{type:`string`,description:`Authentication method used to connect to the upstream MCP server.`,choices:[`oauth`,`bearer`,`unauthenticated`]}).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. Stored AES-GCM-encrypted in server_oauth_secrets; never returned by read endpoints.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`hostname`,{type:`string`,description:`URL of the upstream MCP endpoint.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, the gateway worker uses the shared Cloudflare-owned OAuth callback endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the customer portal hostname. Defaults to false (off); opt in per server by setting true.`,default:!1}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`,default:!1}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. 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 M={command:`create`,describe:`Create a new MCP Server`,builder:j,handler:async m=>s({command:`mcp servers create`,classification:{safeFlags:[`auth-type`,`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},m,async()=>{if(m.dryRun){a({command:`cf mcp servers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},bodyKind:`json`,body:m.body===void 0?u({auth_credentials:d(m[`auth-credentials`],`auth-credentials`,`text`),auth_type:d(m[`auth-type`],`auth-type`,`text`),client_secret:d(m[`client-secret`],`client-secret`,`text`),description:d(m.description,`description`,`text`),hostname:d(m.hostname,`hostname`,`text`),id:d(m.id,`id`,`text`),is_shared_oauth_callback_enabled:m[`is-shared-oauth-callback-enabled`],name:d(m.name,`name`,`text`),secure_web_gateway:m[`secure-web-gateway`],updated_prompts:l(m[`updated-prompts`],`updated-prompts`),updated_tools:l(m[`updated-tools`],`updated-tools`)}):c(m.body)});return}let s=await r(m),h=m.local?e:await t();if(m.accountId=h,m.body){let e=c(m.body);i(await o(`Creating`,async()=>s.mcp.servers.create({...e,account_id:h})),{successLabel:`Created`});return}m[`auth-type`]===void 0&&(m[`auth-type`]=await p(`auth-type`,`Authentication method used to connect to the upstream MCP server.`,[`oauth`,`bearer`,`unauthenticated`])),m.hostname===void 0&&(m.hostname=await f(`hostname`,`URL of the upstream MCP endpoint.`)),m.id===void 0&&(m.id=await f(`id`,`Unique identifier for the MCP server.`)),m.name===void 0&&(m.name=await f(`name`,`Display name for the MCP server.`));let g=u({auth_credentials:d(m[`auth-credentials`],`auth-credentials`,`text`),auth_type:d(m[`auth-type`],`auth-type`,`text`),client_secret:d(m[`client-secret`],`client-secret`,`text`),description:d(m.description,`description`,`text`),hostname:d(m.hostname,`hostname`,`text`),id:d(m.id,`id`,`text`),is_shared_oauth_callback_enabled:m[`is-shared-oauth-callback-enabled`],name:d(m.name,`name`,`text`),secure_web_gateway:m[`secure-web-gateway`],updated_prompts:l(m[`updated-prompts`],`updated-prompts`),updated_tools:l(m[`updated-tools`],`updated-tools`)});i(await o(`Creating`,async()=>s.mcp.servers.create({...g,account_id:h})),{successLabel:`Created`})})};function N(e){return e.usage(`$0 mcp servers delete <id>
|
|
20
|
+
|
|
21
|
+
Deletes an MCP server from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const P={command:`delete <id>`,describe:`Delete an MCP Server`,builder:N,handler:async c=>s({command:`mcp servers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mcp servers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force,message:`This operation permanently deletes the MCP server, removes it from every portal, and deletes its stored OAuth secrets.`})){process.stderr.write(`Aborted.
|
|
22
|
+
`);return}i(await o(`Deleting`,async()=>s.mcp.servers.delete({account_id:l,id:c.id})),{successLabel:`Deleted`})})};function F(e){return e.usage(`$0 mcp servers list
|
|
23
|
+
|
|
24
|
+
Lists all MCP servers configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List MCP Servers`,builder:F,handler:async c=>s({command:`mcp servers list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],search:c.search};if(c.dryRun){a({command:`cf mcp servers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers`,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.mcp.servers.list({account_id:u,...s})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 mcp servers read <id>
|
|
25
|
+
|
|
26
|
+
Retrieves an MCP server's configuration and capability sync state.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`read <id>`,describe:`Read the details of an MCP Server`,builder:L,handler:async c=>s({command:`mcp servers read`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mcp servers read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mcp.servers.read({account_id:l,id:c.id})),{successLabel:`Loaded`})})};function z(e){return e.usage(`$0 mcp servers sync <id>
|
|
27
|
+
|
|
28
|
+
Syncs an MCP server's capabilities and returns the updated server state, including any connection errors.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`sync <id>`,describe:`Sync MCP Server Capabilities`,builder:z,handler:async c=>s({command:`mcp servers sync`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mcp servers sync`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers/${c.id==null?`<id>`:encodeURIComponent(String(c.id))}/sync`,pathParams:{id:String(c.id??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.mcp.servers.sync({account_id:l,id:c.id})),{successLabel:`Created`})})};function V(e){return e.usage(`$0 mcp servers tool-call-analytics <server-id>
|
|
29
|
+
|
|
30
|
+
Returns daily or monthly tool-call counts for a server.`).positional(`server-id`,{type:`string`,description:`Server ID`,demandOption:!0}).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`tool-call-analytics <server-id>`,describe:`Per-server MCP tool-call timeseries`,builder:h(V),handler:async c=>s({command:`mcp servers tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`dry-run`]}},c,async()=>{let s={granularity:c.granularity,aggregate:c.aggregate,tz:c.tz,days:c.days};if(c.dryRun){a({command:`cf mcp servers tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/analytics/servers/${c[`server-id`]==null?`<server-id>`:encodeURIComponent(String(c[`server-id`]))}/tool-calls/timeseries`,pathParams:{"server-id":String(c[`server-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.mcp.servers.toolCallAnalytics({account_id:u,server_id:c[`server-id`],...s})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 mcp servers update <id>
|
|
31
|
+
|
|
32
|
+
Updates an MCP server's configuration and credentials.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`auth-credentials`,{type:`string`,description:'Static credential for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`).'}).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. Stored AES-GCM-encrypted in server_oauth_secrets; never returned by read endpoints.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, the gateway worker uses the shared Cloudflare-owned OAuth callback endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the customer portal hostname. Defaults to false (off); opt in per server by setting true.`}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. 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 W={command:`update <id>`,describe:`Update an MCP Server`,builder:U,handler:async f=>s({command:`mcp servers update`,classification:{safeFlags:[`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mcp servers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/access/ai-controls/mcp/servers/${f.id==null?`<id>`:encodeURIComponent(String(f.id))}`,pathParams:{id:String(f.id??``)},bodyKind:`json`,body:f.body===void 0?u({auth_credentials:d(f[`auth-credentials`],`auth-credentials`,`text`),client_secret:d(f[`client-secret`],`client-secret`,`text`),description:d(f.description,`description`,`text`),is_shared_oauth_callback_enabled:f[`is-shared-oauth-callback-enabled`],name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],updated_prompts:l(f[`updated-prompts`],`updated-prompts`),updated_tools:l(f[`updated-tools`],`updated-tools`)}):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(`Updating`,async()=>s.mcp.servers.update({...e,account_id:p,id:f.id})),{successLabel:`Updated`});return}let m=u({auth_credentials:d(f[`auth-credentials`],`auth-credentials`,`text`),client_secret:d(f[`client-secret`],`client-secret`,`text`),description:d(f.description,`description`,`text`),is_shared_oauth_callback_enabled:f[`is-shared-oauth-callback-enabled`],name:d(f.name,`name`,`text`),secure_web_gateway:f[`secure-web-gateway`],updated_prompts:l(f[`updated-prompts`],`updated-prompts`),updated_tools:l(f[`updated-tools`],`updated-tools`)});i(await o(`Updating`,async()=>s.mcp.servers.update({...m,account_id:p,id:f.id})),{successLabel:`Updated`})})},G={command:`servers`,describe:`Manage upstream MCP servers, credentials, capabilities, and sync state`,builder:e=>e.command(M).command(P).command(I).command(R).command(B).command(H).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},K={command:`mcp`,describe:`mcp`,builder:e=>e.command(A).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
|
|
@@ -0,0 +1,26 @@
|
|
|
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,i as f,n as p}from"./prompt-Bx2PB-tt.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
|
|
3
|
+
|
|
4
|
+
Gets the high-availability configuration for a WARP Connector tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <tunnel-id>`,describe:`Get WARP Connector HA configuration`,builder:h,handler:async c=>s({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.configurations.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
|
|
5
|
+
|
|
6
|
+
Adds or updates the high-availability configuration for a WARP Connector tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`config-fnr-id`,{type:`string`,description:`Floating Network Resource ID — the secondary ENI that is moved between nodes on failover.`}).option(`ha-mode`,{type:`string`,description:"High-availability mode for the WARP Connector tunnel. `none` means HA is enabled but no provider is configured yet (newly created tunnels default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",choices:[`none`,`disabled`,`aws`,`local`]}).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:`update <tunnel-id>`,describe:`Update WARP Connector HA configuration`,builder:_,handler:async d=>s({command:`mesh nodes configurations update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf mesh nodes configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${d[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(d[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(d[`tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({config:{fnr_id:u(d[`config-fnr-id`],`config-fnr-id`,`text`)},ha_mode:u(d[`ha-mode`],`ha-mode`,`text`)}):c(d.body)});return}let s=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=c(d.body);i(await o(`Updating`,async()=>s.mesh.nodes.configurations.update({...e,account_id:p,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`});return}d[`ha-mode`]===void 0&&(d[`ha-mode`]=await f(`ha-mode`,"High-availability mode for the WARP Connector tunnel. `none` means HA is enabled but no provider is configured yet (newly created tunnels default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",[`none`,`disabled`,`aws`,`local`]));let m=l({config:{fnr_id:u(d[`config-fnr-id`],`config-fnr-id`,`text`)},ha_mode:u(d[`ha-mode`],`ha-mode`,`text`)});i(await o(`Updating`,async()=>s.mesh.nodes.configurations.update({...m,account_id:p,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`})})},y={command:`configurations`,describe:`Operations for nodes.configurations`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 mesh nodes connections list
|
|
7
|
+
|
|
8
|
+
Fetches connection details for a WARP Connector Tunnel.`).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`List WARP Connector Tunnel connections`,builder:b,handler:async c=>s({command:`mesh nodes connections list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/connections`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.connections.list({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})},S={command:`connections`,describe:`Operations for nodes.connections`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.usage(`$0 mesh nodes connectors get <connector-id>
|
|
9
|
+
|
|
10
|
+
Fetches connector and connection details for a WARP Connector Tunnel.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <connector-id>`,describe:`Get WARP Connector Tunnel connector`,builder:C,handler:async c=>s({command:`mesh nodes connectors get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``),"connector-id":String(c[`connector-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.connectors.get({account_id:l,tunnel_id:c[`tunnel-id`],connector_id:c[`connector-id`]})),{successLabel:`Loaded`})})},T={command:`connectors`,describe:`Operations for nodes.connectors`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 mesh nodes create
|
|
11
|
+
|
|
12
|
+
Creates a new Warp Connector Tunnel in an account.`).option(`ha`,{type:`boolean`,description:`Indicates that the tunnel will be created to be highly available. If omitted, defaults to false.`,default:!1}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).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:`create`,describe:`Create a Warp Connector Tunnel`,builder:E,handler:async f=>s({command:`mesh nodes create`,classification:{safeFlags:[`ha`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mesh nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({ha:f.ha,name:u(f.name,`name`,`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.mesh.nodes.create({...e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`A user-friendly name for a tunnel.`));let m=l({ha:f.ha,name:u(f.name,`name`,`text`)});i(await o(`Creating`,async()=>s.mesh.nodes.create({...m,account_id:p})),{successLabel:`Created`})})};function O(e){return e.usage(`$0 mesh nodes delete <tunnel-id>
|
|
13
|
+
|
|
14
|
+
Deletes a Warp Connector Tunnel from an account.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const k={command:`delete <tunnel-id>`,describe:`Delete a Warp Connector Tunnel`,builder:O,handler:async c=>s({command:`mesh nodes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await p({force:!!c.force,message:`This operation permanently deletes a Mesh node (Warp Connector Tunnel).`})){process.stderr.write(`Aborted.
|
|
15
|
+
`);return}i(await o(`Deleting`,async()=>s.mesh.nodes.delete({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Deleted`})})};function A(e){return e.usage(`$0 mesh nodes edit <tunnel-id>
|
|
16
|
+
|
|
17
|
+
Updates an existing Warp Connector Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`edit <tunnel-id>`,describe:`Update a Warp Connector Tunnel`,builder:A,handler:async d=>s({command:`mesh nodes edit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf mesh nodes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${d[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(d[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(d[`tunnel-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({name:u(d.name,`name`,`text`),tunnel_secret:u(d[`tunnel-secret`],`tunnel-secret`,`text`)}):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(`Updating`,async()=>s.mesh.nodes.edit({...e,account_id:f,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`});return}let p=l({name:u(d.name,`name`,`text`),tunnel_secret:u(d[`tunnel-secret`],`tunnel-secret`,`text`)});i(await o(`Updating`,async()=>s.mesh.nodes.edit({...p,account_id:f,tunnel_id:d[`tunnel-id`]})),{successLabel:`Updated`})})};function M(e){return e.usage(`$0 mesh nodes failover <tunnel-id>
|
|
18
|
+
|
|
19
|
+
Triggers a manual failover for a specific WARP Connector Tunnel, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`client-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`failover <tunnel-id>`,describe:`Trigger a manual failover for a WARP Connector Tunnel`,builder:M,handler:async f=>s({command:`mesh nodes failover`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},f,async()=>{if(f.dryRun){a({command:`cf mesh nodes failover`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${f[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(f[`tunnel-id`]))}/failover`,pathParams:{"tunnel-id":String(f[`tunnel-id`]??``)},bodyKind:`json`,body:f.body===void 0?l({client_id:u(f[`client-id`],`client-id`,`text`)}):c(f.body)});return}let s=await r(f),m=f.local?e:await t();if(f.accountId=m,!await p({force:!!f.force,message:`This operation triggers a manual failover, changing the active connector for a Mesh node.`})){process.stderr.write(`Aborted.
|
|
20
|
+
`);return}if(f.body){let e=c(f.body);i(await o(`Deleting`,async()=>s.mesh.nodes.failover({...e,account_id:m,tunnel_id:f[`tunnel-id`]})),{successLabel:`Deleted`});return}f[`client-id`]===void 0&&(f[`client-id`]=await d(`client-id`,`UUID of the Cloudflare Tunnel connector.`));let h=l({client_id:u(f[`client-id`],`client-id`,`text`)});i(await o(`Deleting`,async()=>s.mesh.nodes.failover({...h,account_id:m,tunnel_id:f[`tunnel-id`]})),{successLabel:`Deleted`})})};function P(e){return e.usage(`$0 mesh nodes get <tunnel-id>
|
|
21
|
+
|
|
22
|
+
Fetches a single Warp Connector Tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <tunnel-id>`,describe:`Get a Warp Connector Tunnel`,builder:P,handler:async c=>s({command:`mesh nodes get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 mesh nodes list
|
|
23
|
+
|
|
24
|
+
Lists and filters Warp Connector Tunnels in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List Warp Connector Tunnels`,builder:m(I),handler:async c=>s({command:`mesh nodes list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},c,async()=>{let s={name:c.name,is_deleted:c[`is-deleted`],existed_at:c[`existed-at`],uuid:c.uuid,was_active_at:c[`was-active-at`],was_inactive_at:c[`was-inactive-at`],include_prefix:c[`include-prefix`],exclude_prefix:c[`exclude-prefix`],status:c.status,per_page:c[`per-page`],page:c.page};if(c.dryRun){a({command:`cf mesh nodes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector`,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.mesh.nodes.list({account_id:u,...s})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 mesh nodes token get <tunnel-id>
|
|
25
|
+
|
|
26
|
+
Gets the token used to associate warp device with a specific Warp Connector tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <tunnel-id>`,describe:`Get a Warp Connector Tunnel token`,builder:R,handler:async c=>s({command:`mesh nodes token get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/token`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.token.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})},B={command:`token`,describe:`Operations for nodes.token`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},V={command:`nodes`,describe:`Operations for nodes`,builder:e=>e.command(D).command(k).command(j).command(N).command(F).command(L).command(y).command(S).command(T).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`mesh`,describe:`mesh`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{H as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
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";function m(e){return e.usage(`$0 mtls-certificates associations get <mtls-certificate-id>
|
|
3
|
+
|
|
4
|
+
Lists all active associations between the certificate and Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <mtls-certificate-id>`,describe:`List mTLS certificate associations`,builder:m,handler:async c=>s({command:`mtls-certificates associations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}/associations`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mtlsCertificates.associations.get({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Loaded`})})},g={command:`associations`,describe:`Operations for associations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 mtls-certificates create
|
|
5
|
+
|
|
6
|
+
Upload a certificate that you want to use with mTLS-enabled Cloudflare services, such as Bring Your Own CA (BYO-CA) for mTLS. To create certificates issued by the Cloudflare managed CA, use the [Create Client Certificate endpoint](/api/resources/client_certificates/methods/create/).`).option(`ca`,{type:`boolean`,description:`Indicates whether the certificate is a CA or leaf certificate.`}).option(`certificates`,{type:`string`,description:`The uploaded root CA certificate.`}).option(`name`,{type:`string`,description:`Optional unique name for the certificate. Only used for human readability.`}).option(`private-key`,{type:`string`,description:`The private key for the certificate. This field is only needed for specific use cases such as using a custom certificate with Zero Trust's block page.`}).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:`Upload mTLS certificate`,builder:_,handler:async f=>s({command:`mtls-certificates create`,classification:{safeFlags:[`ca`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf mtls-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({ca:f.ca,certificates:u(f.certificates,`certificates`,`text`),name:u(f.name,`name`,`text`),private_key:u(f[`private-key`],`private-key`,`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.mtlsCertificates.create({...e,account_id:p})),{successLabel:`Created`});return}if(f.ca===void 0)throw Error(`--ca is required (or pass --body with this field set).`);f.certificates===void 0&&(f.certificates=await d(`certificates`,`The uploaded root CA certificate.`));let m=l({ca:f.ca,certificates:u(f.certificates,`certificates`,`text`),name:u(f.name,`name`,`text`),private_key:u(f[`private-key`],`private-key`,`text`)});i(await o(`Creating`,async()=>s.mtlsCertificates.create({...m,account_id:p})),{successLabel:`Created`})})};function y(e){return e.usage(`$0 mtls-certificates delete <mtls-certificate-id>
|
|
7
|
+
|
|
8
|
+
Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`delete <mtls-certificate-id>`,describe:`Delete mTLS certificate`,builder:y,handler:async c=>s({command:`mtls-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-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.
|
|
9
|
+
`);return}i(await o(`Deleting`,async()=>s.mtlsCertificates.delete({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 mtls-certificates get <mtls-certificate-id>
|
|
10
|
+
|
|
11
|
+
Fetches a single mTLS certificate uploaded to your account. To get a certificate issued by the Cloudflare managed CA, use the [Client Certificate Details endpoint](/api/resources/client_certificates/methods/get/).`).positional(`mtls-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <mtls-certificate-id>`,describe:`Get mTLS certificate`,builder:x,handler:async c=>s({command:`mtls-certificates get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mtlsCertificates.get({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 mtls-certificates list
|
|
12
|
+
|
|
13
|
+
Lists all mTLS certificates uploaded to your account, such as Bring Your Own CA (BYO-CA) for mTLS. To list certificates issued by the Cloudflare managed CA, use the [List Client Certificates endpoint](/api/resources/client_certificates/methods/list/).`).option(`type`,{type:`string`,description:`Filters results by certificate type. Multiple types can be comma-separated.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`List mTLS certificates`,builder:p(C),handler:async c=>s({command:`mtls-certificates list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={type:c.type};if(c.dryRun){a({command:`cf mtls-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates`,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.mtlsCertificates.list({account_id:u,...s})),{successLabel:`Loaded`})})},T={command:`mtls-certificates`,describe:`mtls-certificates`,builder:e=>e.command(v).command(b).command(S).command(w).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};
|
|
@@ -0,0 +1,50 @@
|
|
|
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";function m(e){return e.usage(`$0 network routes cidr create
|
|
3
|
+
|
|
4
|
+
Routes a private network through a Cloudflare Tunnel.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`,default:``}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).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 ee={command:`create`,describe:`Create a tunnel route`,builder:m,handler:async f=>s({command:`network routes cidr create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf network routes cidr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/routes`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({comment:u(f.comment,`comment`,`text`),network:u(f.network,`network`,`text`),virtual_network_id:u(f[`virtual-network-id`],`virtual-network-id`,`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.network.routes.cidr.create({...e,account_id:p})),{successLabel:`Created`});return}f.network===void 0&&(f.network=await d(`network`,`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`));let m=l({comment:u(f.comment,`comment`,`text`),network:u(f.network,`network`,`text`),virtual_network_id:u(f[`virtual-network-id`],`virtual-network-id`,`text`)});i(await o(`Creating`,async()=>s.network.routes.cidr.create({...m,account_id:p})),{successLabel:`Created`})})};function h(e){return e.usage(`$0 network routes cidr delete <route-id>
|
|
5
|
+
|
|
6
|
+
Deletes a private network route from an account.`).positional(`route-id`,{type:`string`,description:`UUID of the route.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <route-id>`,describe:`Delete a tunnel route`,builder:h,handler:async c=>s({command:`network routes cidr delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf network routes cidr delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/routes/${c[`route-id`]==null?`<route-id>`:encodeURIComponent(String(c[`route-id`]))}`,pathParams:{"route-id":String(c[`route-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force,message:`This operation permanently deletes a private network route.`})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}i(await o(`Deleting`,async()=>s.network.routes.cidr.delete({account_id:l,route_id:c[`route-id`]})),{successLabel:`Deleted`})})};function _(e){return e.usage(`$0 network routes cidr edit <route-id>
|
|
8
|
+
|
|
9
|
+
Updates an existing private network route in an account. The fields that are meant to be updated should be provided in the body of the request.`).positional(`route-id`,{type:`string`,description:`UUID of the route.`,demandOption:!0}).option(`comment`,{type:`string`,description:`Optional remark describing the route.`}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).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:`edit <route-id>`,describe:`Update a tunnel route`,builder:_,handler:async d=>s({command:`network routes cidr edit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf network routes cidr edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/routes/${d[`route-id`]==null?`<route-id>`:encodeURIComponent(String(d[`route-id`]))}`,pathParams:{"route-id":String(d[`route-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({comment:u(d.comment,`comment`,`text`),network:u(d.network,`network`,`text`),virtual_network_id:u(d[`virtual-network-id`],`virtual-network-id`,`text`)}):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(`Updating`,async()=>s.network.routes.cidr.edit({...e,account_id:f,route_id:d[`route-id`]})),{successLabel:`Updated`});return}let p=l({comment:u(d.comment,`comment`,`text`),network:u(d.network,`network`,`text`),virtual_network_id:u(d[`virtual-network-id`],`virtual-network-id`,`text`)});i(await o(`Updating`,async()=>s.network.routes.cidr.edit({...p,account_id:f,route_id:d[`route-id`]})),{successLabel:`Updated`})})};function y(e){return e.usage(`$0 network routes cidr get <route-id>
|
|
10
|
+
|
|
11
|
+
Get a private network route in an account.`).positional(`route-id`,{type:`string`,description:`UUID of the route.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <route-id>`,describe:`Get tunnel route`,builder:y,handler:async c=>s({command:`network routes cidr get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network routes cidr get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/routes/${c[`route-id`]==null?`<route-id>`:encodeURIComponent(String(c[`route-id`]))}`,pathParams:{"route-id":String(c[`route-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.network.routes.cidr.get({account_id:l,route_id:c[`route-id`]})),{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 network routes cidr list
|
|
12
|
+
|
|
13
|
+
Lists and filters private network routes in an account.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted routes. If `false`, exclude deleted routes. If empty, all routes will be included."}).option(`network-subset`,{type:`string`,description:`If set, only list routes that are contained within this IP range.`}).option(`network-superset`,{type:`string`,description:`If set, only list routes that contain this IP range.`}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`}).option(`route-id`,{type:`string`,description:`UUID of the route.`}).option(`tun-types`,{type:`string`,description:`The types of tunnels to filter by, separated by commas.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List tunnel routes`,builder:p(x),handler:async c=>s({command:`network routes cidr list`,classification:{safeFlags:[`is-deleted`,`dry-run`]}},c,async()=>{let s={comment:c.comment,is_deleted:c[`is-deleted`],network_subset:c[`network-subset`],network_superset:c[`network-superset`],existed_at:c[`existed-at`],tunnel_id:c[`tunnel-id`],route_id:c[`route-id`],tun_types:c[`tun-types`],virtual_network_id:c[`virtual-network-id`],per_page:c[`per-page`],page:c.page};if(c.dryRun){a({command:`cf network routes cidr list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/routes`,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.network.routes.cidr.list({account_id:u,...s})),{successLabel:`Loaded`})})},C={command:`cidr`,describe:`Operations for routes.cidr`,builder:e=>e.command(ee).command(g).command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 network routes hostname create
|
|
14
|
+
|
|
15
|
+
Create a hostname route.`).option(`comment`,{type:`string`,description:`An optional description of the hostname route.`}).option(`hostname`,{type:`string`,description:`The hostname of the route.`}).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`}).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:`create`,describe:`Create hostname route`,builder:w,handler:async d=>s({command:`network routes hostname create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf network routes hostname create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/routes/hostname`,pathParams:{},bodyKind:`json`,body:d.body===void 0?l({comment:u(d.comment,`comment`,`text`),hostname:u(d.hostname,`hostname`,`text`),tunnel_id:u(d[`tunnel-id`],`tunnel-id`,`text`)}):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.network.routes.hostname.create({...e,account_id:f})),{successLabel:`Created`});return}let p=l({comment:u(d.comment,`comment`,`text`),hostname:u(d.hostname,`hostname`,`text`),tunnel_id:u(d[`tunnel-id`],`tunnel-id`,`text`)});i(await o(`Creating`,async()=>s.network.routes.hostname.create({...p,account_id:f})),{successLabel:`Created`})})};function E(e){return e.usage(`$0 network routes hostname delete <hostname-route-id>
|
|
16
|
+
|
|
17
|
+
Delete a hostname route.`).positional(`hostname-route-id`,{type:`string`,description:`The hostname route 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 D={command:`delete <hostname-route-id>`,describe:`Delete hostname route`,builder:E,handler:async c=>s({command:`network routes hostname delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf network routes hostname delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/routes/hostname/${c[`hostname-route-id`]==null?`<hostname-route-id>`:encodeURIComponent(String(c[`hostname-route-id`]))}`,pathParams:{"hostname-route-id":String(c[`hostname-route-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force,message:`This operation permanently deletes a hostname route.`})){process.stderr.write(`Aborted.
|
|
18
|
+
`);return}i(await o(`Deleting`,async()=>s.network.routes.hostname.delete({account_id:l,hostname_route_id:c[`hostname-route-id`]})),{successLabel:`Deleted`})})};function O(e){return e.usage(`$0 network routes hostname edit <hostname-route-id>
|
|
19
|
+
|
|
20
|
+
Updates a hostname route.`).positional(`hostname-route-id`,{type:`string`,description:`The hostname route ID.`,demandOption:!0}).option(`comment`,{type:`string`,description:`An optional description of the hostname route.`}).option(`hostname`,{type:`string`,description:`The hostname of the route.`}).option(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`edit <hostname-route-id>`,describe:`Update hostname route`,builder:O,handler:async d=>s({command:`network routes hostname edit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf network routes hostname edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/routes/hostname/${d[`hostname-route-id`]==null?`<hostname-route-id>`:encodeURIComponent(String(d[`hostname-route-id`]))}`,pathParams:{"hostname-route-id":String(d[`hostname-route-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({comment:u(d.comment,`comment`,`text`),hostname:u(d.hostname,`hostname`,`text`),tunnel_id:u(d[`tunnel-id`],`tunnel-id`,`text`)}):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(`Updating`,async()=>s.network.routes.hostname.edit({...e,account_id:f,hostname_route_id:d[`hostname-route-id`]})),{successLabel:`Updated`});return}let p=l({comment:u(d.comment,`comment`,`text`),hostname:u(d.hostname,`hostname`,`text`),tunnel_id:u(d[`tunnel-id`],`tunnel-id`,`text`)});i(await o(`Updating`,async()=>s.network.routes.hostname.edit({...p,account_id:f,hostname_route_id:d[`hostname-route-id`]})),{successLabel:`Updated`})})};function A(e){return e.usage(`$0 network routes hostname get <hostname-route-id>
|
|
21
|
+
|
|
22
|
+
Get a hostname route.`).positional(`hostname-route-id`,{type:`string`,description:`The hostname route ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get <hostname-route-id>`,describe:`Get hostname route`,builder:A,handler:async c=>s({command:`network routes hostname get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network routes hostname get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/routes/hostname/${c[`hostname-route-id`]==null?`<hostname-route-id>`:encodeURIComponent(String(c[`hostname-route-id`]))}`,pathParams:{"hostname-route-id":String(c[`hostname-route-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.network.routes.hostname.get({account_id:l,hostname_route_id:c[`hostname-route-id`]})),{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 network routes hostname list
|
|
23
|
+
|
|
24
|
+
Lists and filters hostname routes in an account.`).option(`id`,{type:`string`,description:`The hostname route ID.`}).option(`hostname`,{type:`string`,description:`If set, only list hostname routes that contain a substring of the given value, the filter is case-insensitive.`}).option(`tunnel-id`,{type:`string`,description:`If set, only list hostname routes that point to a specific tunnel.`}).option(`comment`,{type:`string`,description:`If set, only list hostname routes with the given comment.`}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only return deleted hostname routes. If `false`, exclude deleted hostname routes."}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List hostname routes`,builder:M,handler:async c=>s({command:`network routes hostname list`,classification:{safeFlags:[`is-deleted`,`dry-run`]}},c,async()=>{let s={id:c.id,hostname:c.hostname,tunnel_id:c[`tunnel-id`],comment:c.comment,existed_at:c[`existed-at`],is_deleted:c[`is-deleted`],per_page:c[`per-page`],page:c.page};if(c.dryRun){a({command:`cf network routes hostname list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/routes/hostname`,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.network.routes.hostname.list({account_id:u,...s})),{successLabel:`Loaded`})})},P={command:`hostname`,describe:`Operations for routes.hostname`,builder:e=>e.command(T).command(D).command(k).command(j).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 network routes resolve <ip>
|
|
25
|
+
|
|
26
|
+
Fetches routes that contain the given IP address.`).positional(`ip`,{type:`string`,description:`Ip`,demandOption:!0}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).option(`default-virtual-network-fallback`,{type:`boolean`,description:`When the virtual_network_id parameter is not provided the request filter will default search routes that are in the default virtual network for the account. If this parameter is set to false, the search will include routes that do not have a virtual network.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`resolve <ip>`,describe:`Get tunnel route by IP`,builder:F,handler:async c=>s({command:`network routes resolve`,classification:{safeFlags:[`default-virtual-network-fallback`,`dry-run`]}},c,async()=>{let s={virtual_network_id:c[`virtual-network-id`],default_virtual_network_fallback:c[`default-virtual-network-fallback`]};if(c.dryRun){a({command:`cf network routes resolve`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/routes/ip/${c.ip==null?`<ip>`:encodeURIComponent(String(c.ip))}`,pathParams:{ip:String(c.ip??``)},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.network.routes.resolve({account_id:u,ip:c.ip,...s})),{successLabel:`Loaded`})})},L={command:`routes`,describe:`Operations for routes`,builder:e=>e.command(I).command(C).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 network subnets cloudflare-source edit <address-family>
|
|
27
|
+
|
|
28
|
+
Updates the Cloudflare Source subnet of the given address family`).positional(`address-family`,{type:`string`,description:"IP address family, either `v4` (IPv4) or `v6` (IPv6)",demandOption:!0}).option(`comment`,{type:`string`,description:`An optional description of the subnet.`}).option(`name`,{type:`string`,description:`A user-friendly name for the subnet.`}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range defining the subnet, in CIDR notation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`edit <address-family>`,describe:`Update Cloudflare Source Subnet`,builder:R,handler:async d=>s({command:`network subnets cloudflare-source edit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf network subnets cloudflare-source edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/subnets/cloudflare_source/${d[`address-family`]==null?`<address-family>`:encodeURIComponent(String(d[`address-family`]))}`,pathParams:{"address-family":String(d[`address-family`]??``)},bodyKind:`json`,body:d.body===void 0?l({comment:u(d.comment,`comment`,`text`),name:u(d.name,`name`,`text`),network:u(d.network,`network`,`text`)}):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(`Updating`,async()=>s.network.subnets.cloudflareSource.edit({...e,account_id:f,address_family:d[`address-family`]})),{successLabel:`Updated`});return}let p=l({comment:u(d.comment,`comment`,`text`),name:u(d.name,`name`,`text`),network:u(d.network,`network`,`text`)});i(await o(`Updating`,async()=>s.network.subnets.cloudflareSource.edit({...p,account_id:f,address_family:d[`address-family`]})),{successLabel:`Updated`})})},z={command:`cloudflare-source`,describe:`Operations for subnets.cloudflare-source`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.usage(`$0 network subnets initial-resolved-ip edit <address-family>
|
|
29
|
+
|
|
30
|
+
Updates the CIDR for the account's default Initial Resolved IP Subnet of the given address family. The new CIDR must not conflict with existing private routes in the account.`).positional(`address-family`,{type:`string`,description:"IP address family, either `v4` (IPv4) or `v6` (IPv6)",demandOption:!0}).option(`comment`,{type:`string`,description:`An optional description of the subnet.`}).option(`name`,{type:`string`,description:`A user-friendly name for the subnet.`}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range defining the subnet, in CIDR notation.`}).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:`edit <address-family>`,describe:`Update Initial Resolved IP Subnet`,builder:B,handler:async d=>s({command:`network subnets initial-resolved-ip edit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf network subnets initial-resolved-ip edit`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/subnets/initial_resolved_ip/${d[`address-family`]==null?`<address-family>`:encodeURIComponent(String(d[`address-family`]))}`,pathParams:{"address-family":String(d[`address-family`]??``)},bodyKind:`json`,body:d.body===void 0?l({comment:u(d.comment,`comment`,`text`),name:u(d.name,`name`,`text`),network:u(d.network,`network`,`text`)}):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(`Updating`,async()=>s.network.subnets.initialResolvedIp.edit({...e,account_id:f,address_family:d[`address-family`]})),{successLabel:`Updated`});return}let p=l({comment:u(d.comment,`comment`,`text`),name:u(d.name,`name`,`text`),network:u(d.network,`network`,`text`)});i(await o(`Updating`,async()=>s.network.subnets.initialResolvedIp.edit({...p,account_id:f,address_family:d[`address-family`]})),{successLabel:`Updated`})})};function H(e){return e.usage(`$0 network subnets initial-resolved-ip get <address-family>
|
|
31
|
+
|
|
32
|
+
Returns the account's default Initial Resolved IP Subnet for the given address family.`).positional(`address-family`,{type:`string`,description:"IP address family, either `v4` (IPv4) or `v6` (IPv6)",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <address-family>`,describe:`Get Initial Resolved IP Subnet`,builder:H,handler:async c=>s({command:`network subnets initial-resolved-ip get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network subnets initial-resolved-ip get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/subnets/initial_resolved_ip/${c[`address-family`]==null?`<address-family>`:encodeURIComponent(String(c[`address-family`]))}`,pathParams:{"address-family":String(c[`address-family`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.network.subnets.initialResolvedIp.get({account_id:l,address_family:c[`address-family`]})),{successLabel:`Loaded`})})},W={command:`initial-resolved-ip`,describe:`Operations for subnets.initial-resolved-ip`,builder:e=>e.command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 network subnets list
|
|
33
|
+
|
|
34
|
+
Lists and filters subnets in an account.`).option(`name`,{type:`string`,description:`If set, only list subnets with the given name`}).option(`comment`,{type:`string`,description:`If set, only list subnets with the given comment.`}).option(`network`,{type:`string`,description:`If set, only list the subnet whose network exactly matches the given CIDR.`}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`address-family`,{type:`string`,description:"If set, only include subnets in the given address family - `v4` or `v6`",choices:[`v4`,`v6`]}).option(`is-default-network`,{type:`boolean`,description:"If `true`, only include default subnets. If `false`, exclude default subnets subnets. If not set, all subnets will be included."}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted subnets. If `false`, exclude deleted subnets. If not set, all subnets will be included."}).option(`sort-order`,{type:`string`,description:"Sort order of the results. `asc` means oldest to newest, `desc` means newest to oldest. If not set, they will not be in any particular order.",choices:[`asc`,`desc`]}).option(`subnet-types`,{type:`string`,description:`If set, the types of subnets to include, separated by comma.`,choices:[`cloudflare_source`,`initial_resolved_ip`,`warp`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`list`,describe:`List Subnets`,builder:p(G),handler:async c=>s({command:`network subnets list`,classification:{safeFlags:[`address-family`,`is-default-network`,`is-deleted`,`sort-order`,`subnet-types`,`dry-run`]}},c,async()=>{let s={name:c.name,comment:c.comment,network:c.network,existed_at:c[`existed-at`],address_family:c[`address-family`],is_default_network:c[`is-default-network`],is_deleted:c[`is-deleted`],sort_order:c[`sort-order`],subnet_types:c[`subnet-types`],per_page:c[`per-page`],page:c.page};if(c.dryRun){a({command:`cf network subnets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/subnets`,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.network.subnets.list({account_id:u,...s})),{successLabel:`Loaded`})})};function q(e){return e.usage("$0 network subnets warp create\n\nCreate a WARP IP assignment subnet. Currently, only IPv4 subnets can be created. **Network constraints:** - The network must be within one of the following private IP ranges: - `10.0.0.0/8` (RFC 1918) - `172.16.0.0/12` (RFC 1918) - `192.168.0.0/16` (RFC 1918) - `100.64.0.0/10` (RFC 6598 - CGNAT) - The subnet must have a prefix length of `/24` or larger (e.g., `/16`, `/20`, `/24` are valid; `/25`, `/28` are not)").option(`comment`,{type:`string`,description:`An optional description of the subnet.`,default:``}).option(`is-default-network`,{type:`boolean`,description:"If `true`, this is the default subnet for the account. There can only be one default subnet per account.",default:!1}).option(`name`,{type:`string`,description:`A user-friendly name for the subnet.`}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range defining the subnet, in CIDR notation.`}).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 J={command:`create`,describe:`Create WARP IP subnet`,builder:q,handler:async f=>s({command:`network subnets warp create`,classification:{safeFlags:[`is-default-network`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf network subnets warp create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/subnets/warp`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({comment:u(f.comment,`comment`,`text`),is_default_network:f[`is-default-network`],name:u(f.name,`name`,`text`),network:u(f.network,`network`,`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.network.subnets.warp.create({...e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`A user-friendly name for the subnet.`)),f.network===void 0&&(f.network=await d(`network`,`The private IPv4 or IPv6 range defining the subnet, in CIDR notation.`));let m=l({comment:u(f.comment,`comment`,`text`),is_default_network:f[`is-default-network`],name:u(f.name,`name`,`text`),network:u(f.network,`network`,`text`)});i(await o(`Creating`,async()=>s.network.subnets.warp.create({...m,account_id:p})),{successLabel:`Created`})})};function Y(e){return e.usage(`$0 network subnets warp delete <subnet-id>
|
|
35
|
+
|
|
36
|
+
Delete a WARP IP assignment subnet. This operation is idempotent - deleting an already-deleted or non-existent subnet will return success with a null result.`).positional(`subnet-id`,{type:`string`,description:`The UUID of the subnet.`,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 X={command:`delete <subnet-id>`,describe:`Delete WARP IP subnet`,builder:Y,handler:async c=>s({command:`network subnets warp delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf network subnets warp delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/subnets/warp/${c[`subnet-id`]==null?`<subnet-id>`:encodeURIComponent(String(c[`subnet-id`]))}`,pathParams:{"subnet-id":String(c[`subnet-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force,message:`This operation permanently deletes a WARP IP subnet.`})){process.stderr.write(`Aborted.
|
|
37
|
+
`);return}i(await o(`Deleting`,async()=>s.network.subnets.warp.delete({account_id:l,subnet_id:c[`subnet-id`]})),{successLabel:`Deleted`})})};function Z(e){return e.usage("$0 network subnets warp edit <subnet-id>\n\nUpdates a WARP IP assignment subnet. **Update constraints:** - The `network` field cannot be modified for WARP subnets. Only `name`, `comment`, and `is_default_network` can be updated. - IPv6 subnets cannot be updated").positional(`subnet-id`,{type:`string`,description:`The UUID of the subnet.`,demandOption:!0}).option(`comment`,{type:`string`,description:`An optional description of the subnet.`}).option(`is-default-network`,{type:`boolean`,description:"If `true`, this is the default subnet for the account. There can only be one default subnet per account."}).option(`name`,{type:`string`,description:`A user-friendly name for the subnet.`}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range defining the subnet, in CIDR notation.`}).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 Q={command:`edit <subnet-id>`,describe:`Update WARP IP subnet`,builder:Z,handler:async d=>s({command:`network subnets warp edit`,classification:{safeFlags:[`is-default-network`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf network subnets warp edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/subnets/warp/${d[`subnet-id`]==null?`<subnet-id>`:encodeURIComponent(String(d[`subnet-id`]))}`,pathParams:{"subnet-id":String(d[`subnet-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({comment:u(d.comment,`comment`,`text`),is_default_network:d[`is-default-network`],name:u(d.name,`name`,`text`),network:u(d.network,`network`,`text`)}):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(`Updating`,async()=>s.network.subnets.warp.edit({...e,account_id:f,subnet_id:d[`subnet-id`]})),{successLabel:`Updated`});return}let p=l({comment:u(d.comment,`comment`,`text`),is_default_network:d[`is-default-network`],name:u(d.name,`name`,`text`),network:u(d.network,`network`,`text`)});i(await o(`Updating`,async()=>s.network.subnets.warp.edit({...p,account_id:f,subnet_id:d[`subnet-id`]})),{successLabel:`Updated`})})};function ne(e){return e.usage(`$0 network subnets warp get <subnet-id>
|
|
38
|
+
|
|
39
|
+
Get a WARP IP assignment subnet.`).positional(`subnet-id`,{type:`string`,description:`The UUID of the subnet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <subnet-id>`,describe:`Get WARP IP subnet`,builder:ne,handler:async c=>s({command:`network subnets warp get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network subnets warp get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/zerotrust/subnets/warp/${c[`subnet-id`]==null?`<subnet-id>`:encodeURIComponent(String(c[`subnet-id`]))}`,pathParams:{"subnet-id":String(c[`subnet-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.network.subnets.warp.get({account_id:l,subnet_id:c[`subnet-id`]})),{successLabel:`Loaded`})})},ie={command:`warp`,describe:`Operations for subnets.warp`,builder:e=>e.command(J).command(X).command(Q).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ae={command:`subnets`,describe:`Operations for subnets`,builder:e=>e.command(K).command(z).command(W).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.usage(`$0 network virtual-networks create
|
|
40
|
+
|
|
41
|
+
Adds a new virtual network to an account.`).option(`comment`,{type:`string`,description:`Optional remark describing the virtual network.`,default:``}).option(`is-default`,{type:`boolean`,description:"If `true`, this virtual network is the default for the account."}).option(`is-default-network`,{type:`boolean`,description:"If `true`, this virtual network is the default for the account.",default:!1}).option(`name`,{type:`string`,description:`A user-friendly name for the virtual network.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $={command:`create`,describe:`Create a virtual network`,builder:oe,handler:async f=>s({command:`network virtual-networks create`,classification:{safeFlags:[`is-default`,`is-default-network`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf network virtual-networks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/virtual_networks`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({comment:u(f.comment,`comment`,`text`),is_default:f[`is-default`],is_default_network:f[`is-default-network`],name:u(f.name,`name`,`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.network.virtualNetworks.create({...e,account_id:p})),{successLabel:`Created`});return}f.name===void 0&&(f.name=await d(`name`,`A user-friendly name for the virtual network.`));let m=l({comment:u(f.comment,`comment`,`text`),is_default:f[`is-default`],is_default_network:f[`is-default-network`],name:u(f.name,`name`,`text`)});i(await o(`Creating`,async()=>s.network.virtualNetworks.create({...m,account_id:p})),{successLabel:`Created`})})};function se(e){return e.usage(`$0 network virtual-networks delete <virtual-network-id>
|
|
42
|
+
|
|
43
|
+
Deletes an existing virtual network.`).positional(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`,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 ce={command:`delete <virtual-network-id>`,describe:`Delete a virtual network`,builder:se,handler:async c=>s({command:`network virtual-networks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf network virtual-networks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/virtual_networks/${c[`virtual-network-id`]==null?`<virtual-network-id>`:encodeURIComponent(String(c[`virtual-network-id`]))}`,pathParams:{"virtual-network-id":String(c[`virtual-network-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force,message:`This operation permanently deletes a virtual network.`})){process.stderr.write(`Aborted.
|
|
44
|
+
`);return}i(await o(`Deleting`,async()=>s.network.virtualNetworks.delete({account_id:l,virtual_network_id:c[`virtual-network-id`]})),{successLabel:`Deleted`})})};function le(e){return e.usage(`$0 network virtual-networks edit <virtual-network-id>
|
|
45
|
+
|
|
46
|
+
Updates an existing virtual network.`).positional(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`,demandOption:!0}).option(`comment`,{type:`string`,description:`Optional remark describing the virtual network.`}).option(`is-default-network`,{type:`boolean`,description:"If `true`, this virtual network is the default for the account."}).option(`name`,{type:`string`,description:`A user-friendly name for the virtual network.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ue={command:`edit <virtual-network-id>`,describe:`Update a virtual network`,builder:le,handler:async d=>s({command:`network virtual-networks edit`,classification:{safeFlags:[`is-default-network`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf network virtual-networks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/virtual_networks/${d[`virtual-network-id`]==null?`<virtual-network-id>`:encodeURIComponent(String(d[`virtual-network-id`]))}`,pathParams:{"virtual-network-id":String(d[`virtual-network-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({comment:u(d.comment,`comment`,`text`),is_default_network:d[`is-default-network`],name:u(d.name,`name`,`text`)}):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(`Updating`,async()=>s.network.virtualNetworks.edit({...e,account_id:f,virtual_network_id:d[`virtual-network-id`]})),{successLabel:`Updated`});return}let p=l({comment:u(d.comment,`comment`,`text`),is_default_network:d[`is-default-network`],name:u(d.name,`name`,`text`)});i(await o(`Updating`,async()=>s.network.virtualNetworks.edit({...p,account_id:f,virtual_network_id:d[`virtual-network-id`]})),{successLabel:`Updated`})})};function de(e){return e.usage(`$0 network virtual-networks get <virtual-network-id>
|
|
47
|
+
|
|
48
|
+
Get a virtual network.`).positional(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`,demandOption:!0}).option(`comment`,{type:`string`,description:`Optional remark describing the virtual network.`,default:``}).option(`is-default-network`,{type:`boolean`,description:"If `true`, this virtual network is the default for the account."}).option(`name`,{type:`string`,description:`A user-friendly name for the virtual network.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`get <virtual-network-id>`,describe:`Get a virtual network`,builder:de,handler:async c=>s({command:`network virtual-networks get`,classification:{safeFlags:[`is-default-network`,`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network virtual-networks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/virtual_networks/${c[`virtual-network-id`]==null?`<virtual-network-id>`:encodeURIComponent(String(c[`virtual-network-id`]))}`,pathParams:{"virtual-network-id":String(c[`virtual-network-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.network.virtualNetworks.get({account_id:l,virtual_network_id:c[`virtual-network-id`]})),{successLabel:`Loaded`})})};function pe(e){return e.usage(`$0 network virtual-networks list
|
|
49
|
+
|
|
50
|
+
Lists and filters virtual networks in an account.`).option(`id`,{type:`string`,description:`UUID of the virtual network.`}).option(`name`,{type:`string`,description:`A user-friendly name for the virtual network.`}).option(`is-default`,{type:`boolean`,description:"If `true`, only include the default virtual network. If `false`, exclude the default virtual network. If empty, all virtual networks will be included."}).option(`is-default-network`,{type:`boolean`,description:"If `true`, only include the default virtual network. If `false`, exclude the default virtual network. If empty, all virtual networks will be included."}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted virtual networks. If `false`, exclude deleted virtual networks. If empty, all virtual networks will be included."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`list`,describe:`List virtual networks`,builder:pe,handler:async c=>s({command:`network virtual-networks list`,classification:{safeFlags:[`is-default`,`is-default-network`,`is-deleted`,`dry-run`]}},c,async()=>{let s={id:c.id,name:c.name,is_default:c[`is-default`],is_default_network:c[`is-default-network`],is_deleted:c[`is-deleted`]};if(c.dryRun){a({command:`cf network virtual-networks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/virtual_networks`,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.network.virtualNetworks.list({account_id:u,...s})),{successLabel:`Loaded`})})},he={command:`virtual-networks`,describe:`Operations for virtual-networks`,builder:e=>e.command($).command(ce).command(ue).command(fe).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ge={command:`network`,describe:`network`,builder:e=>e.command(L).command(ae).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ge as default};
|
|
@@ -0,0 +1,73 @@
|
|
|
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";function p(e){return e.usage(`$0 network-interconnects cnis create
|
|
3
|
+
|
|
4
|
+
Creates a new Cloud Network Interconnect (CNI) for private network connectivity between Cloudflare and your infrastructure. CNIs enable dedicated, high-performance network links.`).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
|
|
5
|
+
|
|
6
|
+
Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the
|
|
7
|
+
key is not treated as a secret value. This is *only* supported for preventing
|
|
8
|
+
misconfiguration, not for defending against malicious attacks.
|
|
9
|
+
|
|
10
|
+
The MD5 key, if set, must be of non-zero length and consist only of the following types of
|
|
11
|
+
character:
|
|
12
|
+
|
|
13
|
+
* ASCII alphanumerics: \`[a-zA-Z0-9]\`
|
|
14
|
+
* Special characters in the set \`'!@#$%^&*()+[]{}<>/.,;:_-~\`= \\|\`
|
|
15
|
+
|
|
16
|
+
In other words, MD5 keys may contain any printable ASCII character aside from newline
|
|
17
|
+
(0x0A), quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09),
|
|
18
|
+
form feed (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one
|
|
19
|
+
or more of these disallowed characters will be rejected.`}).option(`interconnect`,{type:`string`,description:`The interconnect field`}).option(`magic-conduit-name`,{type:`string`,description:`The magic.conduit_name field`}).option(`magic-description`,{type:`string`,description:`The magic.description field`}).option(`magic-mtu`,{type:`number`,description:`The magic.mtu 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)`}).check(e=>{if([`bgp-customer-asn`,`bgp-extra-prefixes`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`,`bgp-extra-prefixes`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const m={command:`create`,describe:`Create a new CNI object`,builder:p,handler:async f=>s({command:`network-interconnects cnis create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf network-interconnects cnis create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/cnis`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({account:u(f.account,`account`,`text`),bgp:{customer_asn:f[`bgp-customer-asn`],extra_prefixes:f[`bgp-extra-prefixes`],md5_key:u(f[`bgp-md5-key`],`bgp-md5-key`,`text`)},interconnect:u(f.interconnect,`interconnect`,`text`),magic:{conduit_name:u(f[`magic-conduit-name`],`magic-conduit-name`,`text`),description:u(f[`magic-description`],`magic-description`,`text`),mtu:f[`magic-mtu`]}}):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.networkInterconnects.cnis.create({...e,account_id:p})),{successLabel:`Created`});return}if(f.account===void 0&&(f.account=await d(`account`,`Customer account tag`)),f.interconnect===void 0&&(f.interconnect=await d(`interconnect`,`The interconnect field`)),f[`magic-conduit-name`]===void 0&&(f[`magic-conduit-name`]=await d(`magic-conduit-name`,`The magic.conduit_name field`)),f[`magic-description`]===void 0&&(f[`magic-description`]=await d(`magic-description`,`The magic.description field`)),f[`magic-mtu`]===void 0)throw Error(`--magic-mtu is required (or pass --body with this field set).`);let m=l({account:u(f.account,`account`,`text`),bgp:{customer_asn:f[`bgp-customer-asn`],extra_prefixes:f[`bgp-extra-prefixes`],md5_key:u(f[`bgp-md5-key`],`bgp-md5-key`,`text`)},interconnect:u(f.interconnect,`interconnect`,`text`),magic:{conduit_name:u(f[`magic-conduit-name`],`magic-conduit-name`,`text`),description:u(f[`magic-description`],`magic-description`,`text`),mtu:f[`magic-mtu`]}});i(await o(`Creating`,async()=>s.networkInterconnects.cnis.create({...m,account_id:p})),{successLabel:`Created`})})};function h(e){return e.usage(`$0 network-interconnects cnis delete <cni>
|
|
20
|
+
|
|
21
|
+
Permanently removes a Cloud Network Interconnect (CNI) configuration. The private network connection will be terminated.`).positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const g={command:`delete <cni>`,describe:`Delete a specified CNI object`,builder:h,handler:async c=>s({command:`network-interconnects cnis delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf network-interconnects cnis delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/cnis/${c.cni==null?`<cni>`:encodeURIComponent(String(c.cni))}`,pathParams:{cni:String(c.cni??``)},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.
|
|
22
|
+
`);return}i(await o(`Deleting`,async()=>s.networkInterconnects.cnis.delete({account_id:l,cni:c.cni})),{successLabel:`Deleted`})})};function _(e){return e.usage(`$0 network-interconnects cnis get <cni>
|
|
23
|
+
|
|
24
|
+
Retrieves configuration details for a specific Cloud Network Interconnect (CNI), including connection status and parameters.`).positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <cni>`,describe:`Get information about a CNI object`,builder:_,handler:async c=>s({command:`network-interconnects cnis get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network-interconnects cnis get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/cnis/${c.cni==null?`<cni>`:encodeURIComponent(String(c.cni))}`,pathParams:{cni:String(c.cni??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.networkInterconnects.cnis.get({account_id:l,cni:c.cni})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 network-interconnects cnis list
|
|
25
|
+
|
|
26
|
+
Lists all Cloud Network Interconnects (CNIs) configured for the account, showing connection status and parameters.`).option(`slot`,{type:`string`,description:`If specified, only show CNIs associated with the specified slot`}).option(`tunnel-id`,{type:`string`,description:`If specified, only show cnis associated with the specified tunnel id`}).option(`cursor`,{type:`number`,description:`Cursor`}).option(`limit`,{type:`number`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List existing CNI objects`,builder:y,handler:async c=>s({command:`network-interconnects cnis list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={slot:c.slot,tunnel_id:c[`tunnel-id`],cursor:c.cursor,limit:c.limit};if(c.dryRun){a({command:`cf network-interconnects cnis list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/cnis`,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.networkInterconnects.cnis.list({account_id:u,...s})),{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 network-interconnects cnis update <cni>
|
|
27
|
+
|
|
28
|
+
Updates the configuration of an existing Cloud Network Interconnect (CNI), including connection parameters and routing settings.`).positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,demandOption:!0}).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
|
|
29
|
+
|
|
30
|
+
Note that *this is not a security measure*. MD5 is not a valid security mechanism, and the
|
|
31
|
+
key is not treated as a secret value. This is *only* supported for preventing
|
|
32
|
+
misconfiguration, not for defending against malicious attacks.
|
|
33
|
+
|
|
34
|
+
The MD5 key, if set, must be of non-zero length and consist only of the following types of
|
|
35
|
+
character:
|
|
36
|
+
|
|
37
|
+
* ASCII alphanumerics: \`[a-zA-Z0-9]\`
|
|
38
|
+
* Special characters in the set \`'!@#$%^&*()+[]{}<>/.,;:_-~\`= \\|\`
|
|
39
|
+
|
|
40
|
+
In other words, MD5 keys may contain any printable ASCII character aside from newline
|
|
41
|
+
(0x0A), quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09),
|
|
42
|
+
form feed (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one
|
|
43
|
+
or more of these disallowed characters will be rejected.`}).option(`bgp-mode`,{type:`string`,description:`The BGP mode for a CNI.
|
|
44
|
+
|
|
45
|
+
Controls the customer-facing data path:
|
|
46
|
+
* \`DynamicRouteExchange\` — Full BGP: routes flow through to conduit via CRE / bgp-bridge /
|
|
47
|
+
bgp-bridge-receiver.
|
|
48
|
+
* \`AdvertiseOnly\` — static advertisement via taserver, no routes exchanged with Conduit`,choices:[`dynamic_route_exchange`,`advertise_only`]}).option(`cust-ip`,{type:`string`,description:`Customer end of the point-to-point link
|
|
49
|
+
|
|
50
|
+
This should always be inside the same prefix as \`p2p_ip\`.`}).option(`id`,{type:`string`,description:`The id field`}).option(`interconnect`,{type:`string`,description:`Interconnect identifier hosting this CNI`}).option(`magic-conduit-name`,{type:`string`,description:`The magic.conduit_name field`}).option(`magic-description`,{type:`string`,description:`The magic.description field`}).option(`magic-mtu`,{type:`number`,description:`The magic.mtu field`}).option(`p2p-ip`,{type:`string`,description:`Cloudflare end of the point-to-point link`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`bgp-customer-asn`,`bgp-extra-prefixes`,`bgp-md5-key`].some(t=>e[t]!==void 0)){let t=[`bgp-customer-asn`,`bgp-extra-prefixes`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --bgp-* flag is set`)}return!0})}const S={command:`update <cni>`,describe:`Modify stored information about a CNI object`,builder:x,handler:async f=>s({command:`network-interconnects cnis update`,classification:{safeFlags:[`bgp-mode`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf network-interconnects cnis update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/cnis/${f.cni==null?`<cni>`:encodeURIComponent(String(f.cni))}`,pathParams:{cni:String(f.cni??``)},bodyKind:`json`,body:f.body===void 0?l({account:u(f.account,`account`,`text`),bgp:{customer_asn:f[`bgp-customer-asn`],extra_prefixes:f[`bgp-extra-prefixes`],md5_key:u(f[`bgp-md5-key`],`bgp-md5-key`,`text`)},bgp_mode:u(f[`bgp-mode`],`bgp-mode`,`text`),cust_ip:u(f[`cust-ip`],`cust-ip`,`text`),id:u(f.id,`id`,`text`),interconnect:u(f.interconnect,`interconnect`,`text`),magic:{conduit_name:u(f[`magic-conduit-name`],`magic-conduit-name`,`text`),description:u(f[`magic-description`],`magic-description`,`text`),mtu:f[`magic-mtu`]},p2p_ip:u(f[`p2p-ip`],`p2p-ip`,`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(`Updating`,async()=>s.networkInterconnects.cnis.update({body:e,account_id:p,cni:f.cni})),{successLabel:`Updated`});return}if(f.account===void 0&&(f.account=await d(`account`,`Customer account tag`)),f[`cust-ip`]===void 0&&(f[`cust-ip`]=await d(`cust-ip`,"Customer end of the point-to-point link This should always be inside the same prefix as `p2p_ip`.")),f.id===void 0&&(f.id=await d(`id`,`The id field`)),f.interconnect===void 0&&(f.interconnect=await d(`interconnect`,`Interconnect identifier hosting this CNI`)),f[`magic-conduit-name`]===void 0&&(f[`magic-conduit-name`]=await d(`magic-conduit-name`,`The magic.conduit_name field`)),f[`magic-description`]===void 0&&(f[`magic-description`]=await d(`magic-description`,`The magic.description field`)),f[`magic-mtu`]===void 0)throw Error(`--magic-mtu is required (or pass --body with this field set).`);f[`p2p-ip`]===void 0&&(f[`p2p-ip`]=await d(`p2p-ip`,`Cloudflare end of the point-to-point link`));let m=l({account:u(f.account,`account`,`text`),bgp:{customer_asn:f[`bgp-customer-asn`],extra_prefixes:f[`bgp-extra-prefixes`],md5_key:u(f[`bgp-md5-key`],`bgp-md5-key`,`text`)},bgp_mode:u(f[`bgp-mode`],`bgp-mode`,`text`),cust_ip:u(f[`cust-ip`],`cust-ip`,`text`),id:u(f.id,`id`,`text`),interconnect:u(f.interconnect,`interconnect`,`text`),magic:{conduit_name:u(f[`magic-conduit-name`],`magic-conduit-name`,`text`),description:u(f[`magic-description`],`magic-description`,`text`),mtu:f[`magic-mtu`]},p2p_ip:u(f[`p2p-ip`],`p2p-ip`,`text`)});i(await o(`Updating`,async()=>s.networkInterconnects.cnis.update({body:m,account_id:p,cni:f.cni})),{successLabel:`Updated`})})},C={command:`cnis`,describe:`Cloud Network Interconnect (CNI) connections — private links from cloud providers to Cloudflare`,builder:e=>e.command(m).command(g).command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 network-interconnects interconnects create
|
|
51
|
+
|
|
52
|
+
Creates a new network interconnect for connecting Cloudflare's network to external networks. Interconnects provide dedicated bandwidth and reduced latency for traffic exchange.`).option(`account`,{type:`string`,description:`The account field`}).option(`type`,{type:`string`,description:`The type field`}).option(`slot-id`,{type:`string`,description:`The slot_id field`}).option(`speed`,{type:`string`,description:`The speed field`}).option(`bandwidth`,{type:`string`,description:`Bandwidth structure as visible through the customer-facing API.`,choices:[`50M`,`100M`,`200M`,`300M`,`400M`,`500M`,`1G`,`2G`,`5G`,`10G`,`20G`,`50G`]}).option(`pairing-key`,{type:`string`,description:`Pairing key provided by GCP`}).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)`}).conflicts(`slot-id`,[`bandwidth`,`pairing-key`]).conflicts(`speed`,[`bandwidth`,`pairing-key`]).conflicts(`bandwidth`,[`slot-id`,`speed`]).implies(`bandwidth`,[`pairing-key`]).conflicts(`pairing-key`,[`slot-id`,`speed`]).implies(`pairing-key`,[`bandwidth`])}const T={command:`create`,describe:`Create a new interconnect`,builder:w,handler:async f=>s({command:`network-interconnects interconnects create`,classification:{safeFlags:[`bandwidth`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf network-interconnects interconnects create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/interconnects`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({account:u(f.account,`account`,`text`),type:u(f.type,`type`,`text`),slot_id:u(f[`slot-id`],`slot-id`,`text`),speed:u(f.speed,`speed`,`text`),bandwidth:u(f.bandwidth,`bandwidth`,`text`),pairing_key:u(f[`pairing-key`],`pairing-key`,`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.networkInterconnects.interconnects.create({body:e,account_id:p})),{successLabel:`Created`});return}f.account===void 0&&(f.account=await d(`account`,`The account field`)),f.type===void 0&&(f.type=await d(`type`,`The type field`));let m=l({account:u(f.account,`account`,`text`),type:u(f.type,`type`,`text`),slot_id:u(f[`slot-id`],`slot-id`,`text`),speed:u(f.speed,`speed`,`text`),bandwidth:u(f.bandwidth,`bandwidth`,`text`),pairing_key:u(f[`pairing-key`],`pairing-key`,`text`)});i(await o(`Creating`,async()=>s.networkInterconnects.interconnects.create({body:m,account_id:p})),{successLabel:`Created`})})};function E(e){return e.usage(`$0 network-interconnects interconnects delete <icon>
|
|
53
|
+
|
|
54
|
+
Permanently removes a network interconnect configuration. The physical or virtual connection will be terminated.`).positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,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 D={command:`delete <icon>`,describe:`Delete an interconnect object`,builder:E,handler:async c=>s({command:`network-interconnects interconnects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf network-interconnects interconnects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}`,pathParams:{icon:String(c.icon??``)},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.
|
|
55
|
+
`);return}i(await o(`Deleting`,async()=>s.networkInterconnects.interconnects.delete({account_id:l,icon:c.icon})),{successLabel:`Deleted`})})};function O(e){return e.usage(`$0 network-interconnects interconnects get <icon>
|
|
56
|
+
|
|
57
|
+
Retrieves configuration and status details for a specific network interconnect.`).positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <icon>`,describe:`Get information about an interconnect object`,builder:O,handler:async c=>s({command:`network-interconnects interconnects get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network-interconnects interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}`,pathParams:{icon:String(c.icon??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.networkInterconnects.interconnects.get({account_id:l,icon:c.icon})),{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 network-interconnects interconnects list
|
|
58
|
+
|
|
59
|
+
Lists all network interconnects configured for the account, including physical and virtual connections.`).option(`site`,{type:`string`,description:`If specified, only show interconnects located at the given site`}).option(`type`,{type:`string`,description:`If specified, only show interconnects of the given type`}).option(`cursor`,{type:`number`,description:`Cursor`}).option(`limit`,{type:`number`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List existing interconnects`,builder:A,handler:async c=>s({command:`network-interconnects interconnects list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={site:c.site,type:c.type,cursor:c.cursor,limit:c.limit};if(c.dryRun){a({command:`cf network-interconnects interconnects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/interconnects`,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.networkInterconnects.interconnects.list({account_id:u,...s})),{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 network-interconnects interconnects loa-default-name <icon>
|
|
60
|
+
|
|
61
|
+
Retrieves the default customer name that will be used in the LOA if no name is provided to the \`/accounts/{account_id}/cni/interconnects/{icon}/loa\` endpoint.`).positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`loa-default-name <icon>`,describe:`Get the default customer name for LOA generation`,builder:M,handler:async c=>s({command:`network-interconnects interconnects loa-default-name`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network-interconnects interconnects loa-default-name`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}/loa/default`,pathParams:{icon:String(c.icon??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.networkInterconnects.interconnects.loaDefaultName({account_id:l,icon:c.icon})),{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 network-interconnects interconnects loa <icon>
|
|
62
|
+
|
|
63
|
+
Downloads the Letter of Authorization (LOA) for a network interconnect, required for physical cross-connect provisioning.`).positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`name`,{type:`string`,description:`Custom name to use in the LOA instead of the account name (200 Character limit)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`loa <icon>`,describe:`Generate the Letter of Authorization (LOA) for a given interconnect`,builder:P,handler:async c=>s({command:`network-interconnects interconnects loa`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={name:c.name};if(c.dryRun){a({command:`cf network-interconnects interconnects loa`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}/loa`,pathParams:{icon:String(c.icon??``)},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.networkInterconnects.interconnects.loa({account_id:u,icon:c.icon,...s})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 network-interconnects interconnects status <icon>
|
|
64
|
+
|
|
65
|
+
Gets the current operational status of a network interconnect, including link state and traffic metrics.`).positional(`icon`,{type:`string`,description:`Interconnect name to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`status <icon>`,describe:`Get the current status of an interconnect object`,builder:I,handler:async c=>s({command:`network-interconnects interconnects status`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network-interconnects interconnects status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}/status`,pathParams:{icon:String(c.icon??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.networkInterconnects.interconnects.status({account_id:l,icon:c.icon})),{successLabel:`Loaded`})})},R={command:`interconnects`,describe:`Physical cross-connect and partner interconnect sessions with LOA and status tracking`,builder:e=>e.command(T).command(D).command(k).command(j).command(F).command(N).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 network-interconnects settings get
|
|
66
|
+
|
|
67
|
+
Retrieves current settings configuration for the specified resource or service.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get`,describe:`Get the current settings for the active account`,builder:z,handler:async c=>s({command:`network-interconnects settings get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network-interconnects settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/settings`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.networkInterconnects.settings.get({account_id:l})),{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 network-interconnects settings update
|
|
68
|
+
|
|
69
|
+
Updates configuration settings for the specified resource or service.`).option(`default-asn`,{type:`number`,description:`The default_asn 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 H={command:`update`,describe:`Update the current settings for the active account`,builder:V,handler:async u=>s({command:`network-interconnects settings update`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){a({command:`cf network-interconnects settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/settings`,pathParams:{},bodyKind:`json`,body:u.body===void 0?l({default_asn:u[`default-asn`]}):c(u.body)});return}let s=await r(u),d=u.local?e:await t();if(u.accountId=d,u.body){let e=c(u.body);i(await o(`Updating`,async()=>s.networkInterconnects.settings.update({...e,account_id:d})),{successLabel:`Updated`});return}let f=l({default_asn:u[`default-asn`]});i(await o(`Updating`,async()=>s.networkInterconnects.settings.update({...f,account_id:d})),{successLabel:`Updated`})})},U={command:`settings`,describe:`Account-level interconnect settings and default configurations`,builder:e=>e.command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 network-interconnects slots get <slot>
|
|
70
|
+
|
|
71
|
+
Gets information about a specific infrastructure slot allocation.`).positional(`slot`,{type:`string`,description:`Slot`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <slot>`,describe:`Get information about the specified slot`,builder:W,handler:async c=>s({command:`network-interconnects slots get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf network-interconnects slots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/slots/${c.slot==null?`<slot>`:encodeURIComponent(String(c.slot))}`,pathParams:{slot:String(c.slot??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.networkInterconnects.slots.get({account_id:l,slot:c.slot})),{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 network-interconnects slots list
|
|
72
|
+
|
|
73
|
+
Lists all available infrastructure slots for the account, showing allocation status and capacity.`).option(`address-contains`,{type:`string`,description:`If specified, only show slots with the given text in their address field`}).option(`site`,{type:`string`,description:`If specified, only show slots located at the given site`}).option(`speed`,{type:`string`,description:`If specified, only show slots that support the given speed`}).option(`occupied`,{type:`boolean`,description:`If specified, only show slots with a specific occupied/unoccupied state`}).option(`cursor`,{type:`number`,description:`Cursor`}).option(`limit`,{type:`number`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`list`,describe:`Retrieve a list of all slots matching the specified parameters`,builder:K,handler:async c=>s({command:`network-interconnects slots list`,classification:{safeFlags:[`occupied`,`dry-run`]}},c,async()=>{let s={address_contains:c[`address-contains`],site:c.site,speed:c.speed,occupied:c.occupied,cursor:c.cursor,limit:c.limit};if(c.dryRun){a({command:`cf network-interconnects slots list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cni/slots`,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.networkInterconnects.slots.list({account_id:u,...s})),{successLabel:`Loaded`})})},J={command:`slots`,describe:`Available interconnect facility slots showing port capacity at Cloudflare data centers`,builder:e=>e.command(G).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`network-interconnects`,describe:`Physical and virtual private interconnects between your infrastructure and Cloudflare's network`,builder:e=>e.command(C).command(R).command(U).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Y as default};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as e,t}from"./src-B3h6tKMt.mjs";import{n,t as r}from"./version-W6_TN_kN.mjs";import{i,r as a}from"./project-settings-DSXevRvj.mjs";import{a as o,n as s,t as c}from"./cf-oadujOtC.mjs";import{n as l}from"./resolve-CUDKxUrW.mjs";import{M as u,n as d}from"./interactive-B6woOLo-.mjs";import{i as f,o as p}from"./dist-BpadEMNY.mjs";function m(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function h(e={}){let t=process.env.CLOUDFLARE_ACCOUNT_ID;if(t)return{value:t,source:`env`};let n=a(void 0,e),r=n===void 0?await i(void 0,e):n;if(r?.settings?.accountId)return{value:r.settings.accountId,source:`settings`,path:r.path}}async function g(){let e=await h();if(e)return e.value;let{getActiveAccountId:t}=await import(`./oauth-DouM-qz0.mjs`);try{return t()}catch{return}}async function _(e){let t=await h(e);t&&v(t.value,D(t,`accountId`));let{getOrSelectAccountId:n}=await import(`./oauth-DouM-qz0.mjs`);return n(t?.value,e)}function v(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function y(e,t,n){if(e?.zoneId)return b(e.zoneId,t);let r=m(`CLOUDFLARE_ZONE_ID`,e?.zone);if(r){if(!n?.quiet&&r.source!==`flag`){let e=D(r);console.error(`Using zone: ${r.value} (from ${e})`)}return b(r.value,t)}throw Error(`No zone specified.
|
|
3
|
+
|
|
4
|
+
Please provide one of the following:
|
|
5
|
+
1. Zone as a positional argument: cf dns records list <zone>
|
|
6
|
+
2. --zone flag (or -z): cf dns records list --zone example.com
|
|
7
|
+
3. CLOUDFLARE_ZONE_ID environment variable`)}async function b(e,t){if(l(e)||!t)return e;let{resolveZoneId:n}=await import(`./resolve-BXemCSyA.mjs`);return n(t,await _(),e)}function x(e){if(e?.scriptName)return e.scriptName;throw Error("Required Worker name missing. Please specify the Worker name with `--worker <name>`.")}const S=[`public`,`fedramp_high`];let C=!1;async function w(e={}){let t=a(void 0,e),n=(t===void 0?await i(void 0,e):t)?.settings?.complianceRegion,r=E(n,`cloudflare.config.ts`),o=process.env.CLOUDFLARE_COMPLIANCE_REGION,s=E(o,`CLOUDFLARE_COMPLIANCE_REGION`);return s?(r&&r!==s&&!C&&(C=!0,console.warn(`The compliance region was resolved to "${o}" from the \`CLOUDFLARE_COMPLIANCE_REGION\` environment variable, which takes precedence over the configured value "${n}" in \`cloudflare.config.ts\`.`)),s):r}async function T(e){return await w(e)??`public`}function E(e,t){switch(e){case`fedramp-high`:return`fedramp_high`;case`fedramp_high`:case`public`:case void 0:return e;default:throw Error(`Invalid compliance region "${e}" from ${t}. Valid values are: ${S.join(`, `)}`)}}function D(e,t=`zone`){switch(e.source){case`flag`:return t===`zone`?`--zone flag`:`(flag)`;case`env`:return{accountId:`CLOUDFLARE_ACCOUNT_ID`,zone:`CLOUDFLARE_ZONE_ID`,complianceRegion:`CLOUDFLARE_COMPLIANCE_REGION`}[t];case`settings`:return`cloudflare.config.ts`}}const O={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var k=class extends Error{};async function A(r){if(d())throw new k;e(n);let i=await p({message:r});if(u(i)||typeof i!=`string`)throw new t(130,{cancelled:!0});return i}async function j(r,i){if(d())throw new k;e(n);let a=await f({message:r,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(u(a)||typeof a!=`string`)throw new t(130,{cancelled:!0});return O.log(`To have cf automatically use this account for future commands in this project, you can update your \`cloudflare.config.ts\`:
|
|
8
|
+
|
|
9
|
+
import { defineConfig } from "cf/config";
|
|
10
|
+
|
|
11
|
+
export default defineConfig({
|
|
12
|
+
accountId: "${a}",
|
|
13
|
+
});
|
|
14
|
+
`),a}const M=c({logger:O,userAgent:r,prompt:A,select:j,isNoDefaultValueProvidedError:e=>e instanceof k});async function N(e,t){return M.getOrSelectAccountId({account_id:e,compliance_region:await T(t)})}function P(){return M.getActiveAccountId({})}async function F(){return M.fetchAllAccounts({compliance_region:await T()},{throwOnEmpty:!1})}async function I(e){if(e?.scopes&&!o(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return M.login({compliance_region:await T()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function L(e){return M.logout(e)}function R(e){M.setProfile(e)}function z(){return M.getActiveProfile()}function B(){return s({logger:O})}function V(e,t=process.cwd()){let n=B().resolve({profile:e,cwd:t});return R(n),n}function H(){return M.getOAuthTokenFromLocalState()}function U(){return M.readAuthCredentials()?.oauth_token!==void 0}function W(){return M.readAuthCredentials()}function G(){return M.getCredentialStore().path()}export{y as _,N as a,U as c,W as d,V as f,x as g,T as h,G as i,I as l,_ as m,P as n,B as o,R as p,z as r,H as s,F as t,L as u,g as v};
|