cf 1.0.0-beta.10 → 1.0.0-beta.12
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/bin/cf +1 -1
- package/dist/abuse-reports-Cy9RcWPu.mjs +24 -0
- package/dist/{access-D4DN4XZF.mjs → access-DwJm1qet.mjs} +1 -1
- package/dist/account-tags-d0RkEw6s.mjs +15 -0
- package/dist/accounts-BSd4b-1j.mjs +138 -0
- package/dist/{acm-OQqE8FMc.mjs → acm-BfI0p2sX.mjs} +8 -8
- package/dist/addressing-lfeJf7YB.mjs +93 -0
- package/dist/agent-context-DFEgYjEQ.mjs +2 -0
- package/dist/agent-memory-CP1qpn-y.mjs +34 -0
- package/dist/ai-audit-B_tSl78A.mjs +6 -0
- package/dist/ai-gateway-CJaUlfGc.mjs +82 -0
- package/dist/ai-jFzFBANM.mjs +29 -0
- package/dist/ai-search-PTlpY1T9.mjs +79 -0
- package/dist/ai-security-CKGE547U.mjs +10 -0
- package/dist/alerting-CuxoqG3S.mjs +56 -0
- package/dist/analytics-NPND7aHB.mjs +20 -0
- package/dist/analytics_engine-BoapM9wd.mjs +4 -0
- package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
- package/dist/{api-security-CSuYMpMO.mjs → api-security-Nk_bg-Kg.mjs} +61 -61
- package/dist/{argo-DMfNmOV4.mjs → argo-DYfLQhd2.mjs} +5 -5
- package/dist/artifacts-BS6cEqCB.mjs +43 -0
- package/dist/{audit-logs-BrjNuiLx.mjs → audit-logs-x5tLqeX2.mjs} +2 -2
- package/dist/auth-AobvBmz4.mjs +2 -0
- package/dist/auth-CBtzZ3Sw.mjs +2 -0
- package/dist/auth-CKotxfap.mjs +2 -0
- package/dist/auth-token-CtguMdmF.mjs +8 -0
- package/dist/autoconfig-PfnbLuEO.mjs +532 -0
- package/dist/{banner-ClclgnBn.mjs → banner-D03JEqRs.mjs} +1 -1
- package/dist/basin-catalog-Ddi-t3q9.mjs +46 -0
- package/dist/billing-CDMc4tvX.mjs +23 -0
- package/dist/bot-management-UrCM3P8K.mjs +9 -0
- package/dist/botnet-feed-CVwRm42k.mjs +11 -0
- package/dist/brand-protection-DfNf5REj.mjs +27 -0
- package/dist/browser-run-DVaiBLYX.mjs +46 -0
- package/dist/build-BKPVP5ip.mjs +2 -0
- package/dist/build-C4giET85.mjs +2 -0
- package/dist/builds-BG5DHqU3.mjs +71 -0
- package/dist/cache-C05hHXUp.mjs +45 -0
- package/dist/{certificate-authorities-D_uAJH9B.mjs → certificate-authorities-DyCFmZwR.mjs} +3 -3
- package/dist/cf-B9aqZZKD.mjs +18 -0
- package/dist/chunk-AUSY7DKT-BJX6Fdc4.mjs +312 -0
- package/dist/chunk-FT2NMTJB-DQ7s3x7Q.mjs +361 -0
- package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +2 -0
- package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
- package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
- package/dist/{cli-BeXSqJAj.mjs → cli-D9qlPB-6.mjs} +1 -1
- package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
- package/dist/{client-certificates-DqFcK_s1.mjs → client-certificates-B-m8rfM9.mjs} +7 -7
- package/dist/{client-side-security-DJXZ1XAu.mjs → client-side-security-M4oIUqID.mjs} +15 -15
- package/dist/cloud-connector-B63Dwn6n.mjs +6 -0
- package/dist/cloudflared-B48cfu95.mjs +2 -0
- package/dist/cloudforce-one-Dlc1GNFy.mjs +447 -0
- package/dist/{command-xU78ACNA.mjs → command-BQpXcGKV.mjs} +1 -1
- package/dist/{command-DUafPVUr.mjs → command-BWlpCtHe.mjs} +1 -1
- package/dist/{command-BOLlvEan.mjs → command-BlGILcTA.mjs} +1 -1
- package/dist/{command-K1-DZFJS.mjs → command-CKQlxypn.mjs} +1 -1
- package/dist/{command-C__qB2mo.mjs → command-CRl00uA2.mjs} +1 -1
- package/dist/{command-DZookrfw.mjs → command-CUkXxZsc.mjs} +1 -1
- package/dist/command-CXxh5Hce.mjs +2 -0
- package/dist/{command-BCag-xjk.mjs → command-CzvlHvov.mjs} +1 -1
- package/dist/{command-DxSJy_ym.mjs → command-DBaNgfA4.mjs} +1 -1
- package/dist/command-DEQSv-S1.mjs +2 -0
- package/dist/{command-BrHTpaji.mjs → command-DyE8v4sd.mjs} +1 -1
- package/dist/command-Rv2MR-eh.mjs +2 -0
- package/dist/{command-B6DqnUwt.mjs → command-SS1z_t68.mjs} +1 -1
- package/dist/{command-6YTtWltE.mjs → command-VuxpEvmH.mjs} +1 -1
- package/dist/{command-DzHL5LKI.mjs → command-ZBQ1WITj.mjs} +1 -1
- package/dist/{completions-Cm9brGAI.mjs → completions-lf50FBGm.mjs} +2 -2
- package/dist/connector-interrupts-DHN1KtUE.mjs +6 -0
- package/dist/connector-telemetry-events-CHg7FmXh.mjs +6 -0
- package/dist/connector-telemetry-snapshots-CSifYi9r.mjs +6 -0
- package/dist/connectors-0UwPUav-.mjs +15 -0
- package/dist/containers-DRzgE46U.mjs +375 -0
- package/dist/containers-DuIsM7lM.mjs +78 -0
- package/dist/{content-scan-C_ROsbTJ.mjs → content-scan-COyTz0Wb.mjs} +8 -8
- package/dist/{context-CEOHpZgd.mjs → context-Bwkz4Lm_.mjs} +2 -2
- package/dist/{cps-BPQqyL2E.mjs → cps-B7_BJaAU.mjs} +3 -3
- package/dist/{csamScanner-D-oO5cxT.mjs → csamScanner-jez2EYXC.mjs} +3 -3
- package/dist/ct-alerting-CACDrY0E.mjs +5 -0
- package/dist/{custom-certificates-DvnFBZdJ.mjs → custom-certificates-BBd92YlF.mjs} +8 -8
- package/dist/{custom-csrs-BZ8TXbuQ.mjs → custom-csrs-DTwBiNMX.mjs} +6 -6
- package/dist/{custom-hostnames-CTqf-KlT.mjs → custom-hostnames-DIWlqvN9.mjs} +15 -15
- package/dist/custom-nameservers-DISy8v8u.mjs +9 -0
- package/dist/custom-pages-BHXO_NFv.mjs +21 -0
- package/dist/d1-MvAQMvvo.mjs +89 -0
- package/dist/{dcv-delegation-yOtz90qE.mjs → dcv-delegation-Buq0hcm_.mjs} +2 -2
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-C4p6SzLH.mjs → deploy-BS47vZvJ.mjs} +1 -1
- package/dist/deploy-context-Cfushp8j.mjs +56 -0
- package/dist/{deploy-input-DTjBGloL.mjs → deploy-input-BAhS5LYx.mjs} +1 -1
- package/dist/{dev-BML-bpNU.mjs → dev-D8FGPKRt.mjs} +2 -2
- package/dist/diagnostics-ChDfJ-Gv.mjs +15 -0
- package/dist/{dialog-BlUXJKbA.mjs → dialog-CL1Zy4pn.mjs} +1 -1
- package/dist/discover-DIDEGKo3.mjs +2 -0
- package/dist/discover-P20XeGBF.mjs +2 -0
- package/dist/{dist-DW47TUGh.mjs → dist-8rP3V95o.mjs} +5 -5
- package/dist/dist-CYFkGHYv.mjs +487 -0
- package/dist/dls-8D00tqvC.mjs +17 -0
- package/dist/{dns-C9sUPsNt.mjs → dns-C-A5pwf3.mjs} +68 -68
- package/dist/{dns-firewall-EDiT-Zli.mjs → dns-firewall-DIiF4pro.mjs} +9 -9
- package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
- package/dist/dotenv-DpXaxfho.mjs +4 -0
- package/dist/dry-run-DmsbOMF1.mjs +2 -0
- package/dist/durable-objects-CnIqbj84.mjs +6 -0
- package/dist/{email-auth-BgvoEHJk.mjs → email-auth-v97Md32E.mjs} +3 -3
- package/dist/{email-routing-Bggn219w.mjs → email-routing-I29RG4hb.mjs} +24 -24
- package/dist/{email-security-_t7rzrzd.mjs → email-security-BCarmbky.mjs} +86 -86
- package/dist/email-sending-CsHk2HAJ.mjs +47 -0
- package/dist/error-sanitization-BWnGnB73.mjs +2 -0
- package/dist/error-sanitization-C_a2LxOK.mjs +2 -0
- package/dist/errors-_sob7Ihu.mjs +3 -0
- package/dist/fieldExtractors-GIVe9jZa.mjs +9 -0
- package/dist/{firewall-CZEN8iA_.mjs → firewall-DpgFqJr3.mjs} +19 -19
- package/dist/flagship-BVaXXlsX.mjs +28 -0
- package/dist/{fraud-9_9hobAh.mjs → fraud-B5GQdEF2.mjs} +3 -3
- package/dist/{generate-CLqGOlOx.mjs → generate-CeeWW3eX.mjs} +1 -1
- package/dist/generate-D80-1GnZ.mjs +2 -0
- package/dist/{google-tag-gateway-O_N0vHRY.mjs → google-tag-gateway-C4O61lp-.mjs} +3 -3
- package/dist/gt-3bcLGJ7V.mjs +3 -0
- package/dist/{healthchecks-Bt3Gw_JZ.mjs → healthchecks-BwYMnKSF.mjs} +12 -12
- package/dist/{hostnames-DdOube3R.mjs → hostnames-DhrGRFeI.mjs} +6 -6
- package/dist/{hyperdrive-C14NAh9l.mjs → hyperdrive-DAA8Fazg.mjs} +10 -10
- package/dist/iam-sRKDU2Z3.mjs +52 -0
- package/dist/images-DXdekLVs.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/init-j47MT4Qe.mjs +39 -0
- package/dist/intel-CnVeSjIS.mjs +76 -0
- package/dist/interactive-Dqv0RWVU.mjs +42 -0
- package/dist/interactive-Wpd3FcDc.mjs +2 -0
- package/dist/{ips-PT_uQKAf.mjs → ips-COCUG8mk.mjs} +2 -2
- package/dist/k2-CmHkArHL.mjs +13 -0
- package/dist/{keyless-certificates-BHvas2q1.mjs → keyless-certificates-l2_S__h3.mjs} +7 -7
- package/dist/keys-CDZreums.mjs +4 -0
- package/dist/kv-DkpKVimq.mjs +15 -0
- package/dist/{lazy-command-glNW3jzf.mjs → lazy-command-_vZGz6mv.mjs} +1 -1
- package/dist/{leaked-credential-checks-De9hI1rl.mjs → leaked-credential-checks-edbapECI.mjs} +10 -10
- package/dist/lifecycle-oud60haK.mjs +2 -0
- package/dist/{load-balancers-Cs6bUHS1.mjs → load-balancers-C5YMvhXD.mjs} +40 -40
- package/dist/{local-B5oRPTEN.mjs → local-C0lQ9sTg.mjs} +1 -1
- package/dist/local-D5L5Bwju.mjs +2 -0
- package/dist/{local-runtime-CZnegFEM.mjs → local-runtime-DtnWXN0a.mjs} +1 -1
- package/dist/login-BrjOuHKu.mjs +5 -0
- package/dist/login-DeOM4v0L.mjs +2 -0
- package/dist/logo-matches-CF8321pb.mjs +6 -0
- package/dist/logos-Bd8xNRKW.mjs +7 -0
- package/dist/logpush-BYk3qqwY.mjs +46 -0
- package/dist/logs-Jcj2NN8H.mjs +36 -0
- package/dist/magic-cloud-networking-Dgdb9H0f.mjs +71 -0
- package/dist/magic-network-monitoring-CxVU4MZB.mjs +36 -0
- package/dist/magic-transit-KDyfUgTv.mjs +383 -0
- package/dist/managed-defense-CxaDeNUd.mjs +18 -0
- package/dist/{managed-transforms-CCpUz4TY.mjs → managed-transforms-C7rT5E-x.mjs} +5 -5
- package/dist/{matches-BSiYXs99.mjs → matches-BtKqG8T9.mjs} +3 -3
- package/dist/{mcp-CCMiS75R.mjs → mcp-QDd1Iyc0.mjs} +17 -17
- package/dist/mesh-DtrIzl5z.mjs +26 -0
- package/dist/metadata-Df5kCWJv.mjs +2 -0
- package/dist/{migrate-BJ9Go_wP.mjs → migrate-DHlfR_gZ.mjs} +1 -1
- package/dist/{monetization-CFf_lb6x.mjs → monetization-pLalYYMI.mjs} +11 -11
- package/dist/mtls-certificates-DYA9Wu-c.mjs +13 -0
- package/dist/network-DrJxPWXQ.mjs +50 -0
- package/dist/{network-interconnects-YiRUBbjx.mjs → network-interconnects-D73MlYG8.mjs} +19 -19
- package/dist/{oauth-cNZUky3h.mjs → oauth-B08YQ4xq.mjs} +2 -2
- package/dist/{oauth-DxGgIwFc.mjs → oauth-TGbM1Q0V.mjs} +1 -1
- package/dist/oauth-clients-CkPDLFd-.mjs +16 -0
- package/dist/{oauth-scopes-xl-pcWdg.mjs → oauth-scopes-VgliqcQe.mjs} +2 -2
- package/dist/observability-CvN9oxAo.mjs +80 -0
- package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
- package/dist/{organization-Dbom1gTR.mjs → organization-DIwqRBBV.mjs} +16 -16
- package/dist/{organizations-OUMVsuen.mjs → organizations-Dk0D9ukm.mjs} +2 -2
- package/dist/{origin-ca-certificates-B3-T0-Nn.mjs → origin-ca-certificates-BSFqMTn-.mjs} +5 -5
- package/dist/{origin-post-quantum-encryption-CGB6AfPa.mjs → origin-post-quantum-encryption-BOKWKDTY.mjs} +3 -3
- package/dist/{origin-tls-client-auth-CgzzfAWr.mjs → origin-tls-client-auth-BzE3WpcN.mjs} +16 -16
- package/dist/output-BGqhvqe2.mjs +2 -0
- package/dist/{page-rules-B9BQKU4_.mjs → page-rules-BKaU37cM.mjs} +8 -8
- package/dist/pages-2Xg-lrMf.mjs +54 -0
- package/dist/pay-per-crawl-5-KTQXRr.mjs +65 -0
- package/dist/pay-per-use-sGebKzNK.mjs +6 -0
- package/dist/pipelines-BM-T7mMK.mjs +44 -0
- package/dist/precursor-DmQ32-Sp.mjs +4 -0
- package/dist/previews-DDQ9ACDJ.mjs +4 -0
- package/dist/{progress-A61dRbXl.mjs → progress-BYVZuEcG.mjs} +1 -1
- package/dist/{prompt-CGUzvBgY.mjs → prompt-F5wxc8zq.mjs} +1 -1
- package/dist/queries-DPBkVynK.mjs +9 -0
- package/dist/queues-CCXRs98q.mjs +57 -0
- package/dist/r2-BKuBSW8h.mjs +125 -0
- package/dist/{radar-CU4T02Ag.mjs → radar-Gv1yFoRX.mjs} +150 -150
- package/dist/raw-fetch-DyYWa923.mjs +2 -0
- package/dist/realtime-CVl-rvgx.mjs +172 -0
- package/dist/registrar-sandbox-cmOYDnkp.mjs +56 -0
- package/dist/registrar-swlnh22i.mjs +43 -0
- package/dist/{registry-Cg5lP8oo.mjs → registry-C20J1MW0.mjs} +1 -1
- package/dist/reporting-Bgwsvol1.mjs +14 -0
- package/dist/request-headers-CUee83pa.mjs +2 -0
- package/dist/request-tracers-BBiJvVDz.mjs +4 -0
- package/dist/resolve-DvxgnWjL.mjs +2 -0
- package/dist/resolve-qwL1LmKN.mjs +2 -0
- package/dist/resource-sharing-C1JiYLbl.mjs +40 -0
- package/dist/resource-tagging-C9VOSlDR.mjs +4 -0
- package/dist/rules-BDunCGMj.mjs +18 -0
- package/dist/{rulesets-HOOnxHZZ.mjs → rulesets-BMGxrnv9.mjs} +20 -20
- package/dist/rum-B7XiECe9.mjs +30 -0
- package/dist/run-CrZgB8L_.mjs +2 -0
- package/dist/run-nNxXb_Cv.mjs +2 -0
- package/dist/schema-DC0kdqgV.mjs +2 -0
- package/dist/schema-flags-BUZR9SLd.mjs +5 -0
- package/dist/scim-CORcs2wK.mjs +18 -0
- package/dist/secrets-store-BoZQaFey.mjs +24 -0
- package/dist/security-insights-DblK_6sg.mjs +40 -0
- package/dist/{security-txt-Fnl3LdSn.mjs → security-txt-Dl7RPnRb.mjs} +5 -5
- package/dist/{session-CZTuHcbm.mjs → session-BWe9et4K.mjs} +1 -1
- package/dist/shared-0N31BXkY.mjs +2 -0
- package/dist/{smart-shield-DB0E7cZI.mjs → smart-shield-DX0-8ruu.mjs} +13 -13
- package/dist/snippets-BFN-Lg3K.mjs +20 -0
- package/dist/source-mXUcrTVw.mjs +6 -0
- package/dist/spawn-DZ9A-xXb.mjs +10 -0
- package/dist/{spectrum-DtG0jYjE.mjs → spectrum-HYWLWB0X.mjs} +12 -12
- package/dist/{speed-B-RiNHGK.mjs → speed-Dj0YhfRe.mjs} +13 -13
- package/dist/src-CAiZlihY.mjs +117 -0
- package/dist/{ssl-DBVpCZAM.mjs → ssl-BQL1fNtD.mjs} +17 -17
- package/dist/startup-profile-0X5ebbng.mjs +29 -0
- package/dist/startup-profile-CXnsF4c7.mjs +2 -0
- package/dist/state-BA2CanJ_.mjs +2 -0
- package/dist/{state-BaGRaYow.mjs → state-Dy6-rKNd.mjs} +1 -1
- package/dist/stream-DKv2TtZN.mjs +102 -0
- package/dist/submit-Byt2KBGI.mjs +4 -0
- package/dist/{tags--eph7JbN.mjs → tags-BIBsdG68.mjs} +2 -2
- package/dist/telemetry-DBXOMuLh.mjs +2 -0
- package/dist/{telemetry-51etasAu.mjs → telemetry-bu3txnIR.mjs} +1 -1
- package/dist/{tenant-Bj-He2xO.mjs → tenant-Bs4Ac4n3.mjs} +5 -5
- package/dist/{tenant-custom-nameservers-B5IIIwbz.mjs → tenant-custom-nameservers-DcaELeCE.mjs} +4 -4
- package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
- package/dist/{tools-BJZ0DDlL.mjs → tools-BbTX7rlM.mjs} +1 -1
- package/dist/tunnels-DWcrz9Sf.mjs +29 -0
- package/dist/turnstile-2MIGp2ce.mjs +33 -0
- package/dist/{ui-BQxRjahW.mjs → ui-YmjF66Ct.mjs} +1 -1
- package/dist/update-check-B-CvDAUz.mjs +2 -0
- package/dist/update-check-CfB0PNTY.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-B8udoxlx.mjs +4 -0
- package/dist/{url-normalization-BpGDUUQc.mjs → url-normalization-C6AdWtaE.mjs} +5 -5
- package/dist/url-scanner-Dg0c_yVb.mjs +16 -0
- package/dist/{user-B6P5_OjP.mjs → user-BLZ-0Bgv.mjs} +51 -51
- package/dist/values-BUK-m0Jg.mjs +4 -0
- package/dist/vectorize-DEUSEQXY.mjs +32 -0
- package/dist/version-BZNc7Y3t.mjs +2 -0
- package/dist/waiting-rooms-BycGk2Y0.mjs +53 -0
- package/dist/{web-assets-yaKxN4w_.mjs → web-assets-CLZdWOmN.mjs} +35 -35
- package/dist/{web3-Bu9c_QAt.mjs → web3-DjeavuLg.mjs} +15 -15
- package/dist/workers-C_SfyU-v.mjs +38 -0
- package/dist/workers-builds-COn5Ne5G.mjs +14 -0
- package/dist/workers-for-platforms-tchCXwNF.mjs +42 -0
- package/dist/{workers-vpc-C1oUHHqk.mjs → workers-vpc-CKts8Av0.mjs} +7 -7
- package/dist/workflows-BibtWuOx.mjs +43 -0
- package/dist/{wrangler-migration-CJEb9hY3.mjs → wrangler-migration-BpJqCFAa.mjs} +1 -1
- package/dist/zaraz-BvQZB0YY.mjs +22 -0
- package/dist/zero-trust-FStq4uhn.mjs +821 -0
- package/dist/{zone-uJwRLSnn.mjs → zone-tymlghWb.mjs} +2 -2
- package/dist/{zones-Dpofsnth.mjs → zones-Bz6dgT9_.mjs} +47 -47
- package/package.json +25 -21
- package/dist/abuse-reports-BhSTEz7h.mjs +0 -24
- package/dist/account-tags-BWEIZLID.mjs +0 -15
- package/dist/accounts-ZQvIqGJz.mjs +0 -138
- package/dist/addressing-DCFm17JQ.mjs +0 -93
- package/dist/agent-context-GRiQ4zRU.mjs +0 -2
- package/dist/agent-memory-BtfPt2me.mjs +0 -34
- package/dist/ai-B0_sZbmy.mjs +0 -29
- package/dist/ai-audit-DaubuhYF.mjs +0 -6
- package/dist/ai-gateway-CJ-1Dzzr.mjs +0 -82
- package/dist/ai-search-Dywa1kqX.mjs +0 -79
- package/dist/ai-security-2wxMPqKS.mjs +0 -10
- package/dist/alerting-yad9DYRv.mjs +0 -56
- package/dist/analytics-DKNw2fVc.mjs +0 -20
- package/dist/analytics_engine-BA3kF46s.mjs +0 -4
- package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
- package/dist/artifacts-Cb3hwClm.mjs +0 -43
- package/dist/auth-BBlAI8HG.mjs +0 -2
- package/dist/auth-BIr56Mbx.mjs +0 -8
- package/dist/autoconfig-DPUztTL2.mjs +0 -511
- package/dist/basin-catalog-BLsQhJP4.mjs +0 -46
- package/dist/billing-CRwD7oQS.mjs +0 -23
- package/dist/bot-management-CyW8F8Wm.mjs +0 -9
- package/dist/botnet-feed-BBKsxf3Y.mjs +0 -11
- package/dist/brand-protection-DSeD8LXl.mjs +0 -27
- package/dist/browser-run-BAcUTwB4.mjs +0 -46
- package/dist/build-B5UYMEQH.mjs +0 -2
- package/dist/build-DLZ9gBNA.mjs +0 -2
- package/dist/builds-W1HEG7Bv.mjs +0 -71
- package/dist/cache-B7E_PXUp.mjs +0 -45
- package/dist/cf-Bh_fTFIj.mjs +0 -18
- package/dist/chunk-FT2NMTJB-1VFYM1Ro.mjs +0 -97
- package/dist/chunk-KKDV4JPS-DdzLLtnl.mjs +0 -2
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
- package/dist/chunk-WMOON6TZ-D_ToS88f.mjs +0 -2
- package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
- package/dist/cloud-connector-Czg1GdQi.mjs +0 -6
- package/dist/cloudflared-DGuau-lC.mjs +0 -2
- package/dist/cloudforce-one-B1IhIZcp.mjs +0 -447
- package/dist/command-CAtsHc1V.mjs +0 -2
- package/dist/command-DfffeX-k.mjs +0 -2
- package/dist/command-TCklVvOY.mjs +0 -2
- package/dist/connector-interrupts-D93KTMkw.mjs +0 -6
- package/dist/connector-telemetry-events-D6CmKR14.mjs +0 -6
- package/dist/connector-telemetry-snapshots-WO9IUk0e.mjs +0 -6
- package/dist/connectors-DNT6GTW3.mjs +0 -15
- package/dist/containers-Btx7vCDP.mjs +0 -78
- package/dist/containers-Ce7IO-Ia.mjs +0 -239
- package/dist/ct-alerting-CnTRE1Fb.mjs +0 -5
- package/dist/custom-nameservers-B0CpnUVg.mjs +0 -9
- package/dist/custom-pages-DcoSGN56.mjs +0 -21
- package/dist/d1-m7UfzBzl.mjs +0 -41
- package/dist/diagnostics-hOvnx5DT.mjs +0 -15
- package/dist/discover-C5aiI6u0.mjs +0 -2
- package/dist/discover-DwczTkRX.mjs +0 -2
- package/dist/dist-BuCJ_55d.mjs +0 -366
- package/dist/dist-C3s9SXTd.mjs +0 -48
- package/dist/dls-v6DyEWTd.mjs +0 -17
- package/dist/dot-prop-IITUZ2XW-BilKo4kO.mjs +0 -2
- package/dist/dotenv-CcQjGlV0.mjs +0 -4
- package/dist/dry-run-Bq0JAsbX.mjs +0 -2
- package/dist/durable-objects-C01phVwL.mjs +0 -6
- package/dist/email-sending-_dKCs2VF.mjs +0 -47
- package/dist/error-sanitization-CJ5OLJrh.mjs +0 -2
- package/dist/error-sanitization-hmi1CqE5.mjs +0 -2
- package/dist/fieldExtractors-Cm5QnkE0.mjs +0 -9
- package/dist/flagship-B_SAI_ZL.mjs +0 -28
- package/dist/generate-BPqoDbck.mjs +0 -2
- package/dist/gt-DmcMNPX6.mjs +0 -2
- package/dist/iam-DUW7neMx.mjs +0 -52
- package/dist/images-B9dnr1z0.mjs +0 -71
- package/dist/init-BGcAIvV7.mjs +0 -39
- package/dist/intel-BQpZMck3.mjs +0 -76
- package/dist/interactive-C-o16XQs.mjs +0 -32
- package/dist/interactive-SgAjen2z.mjs +0 -2
- package/dist/k2-nPYti7Y0.mjs +0 -13
- package/dist/keys-O5kAW9ox.mjs +0 -4
- package/dist/kv-BUP_ZLM_.mjs +0 -15
- package/dist/lifecycle-C7tAC1Mn.mjs +0 -2
- package/dist/local-Bj-l0TP6.mjs +0 -2
- package/dist/login-C5nSIS-T.mjs +0 -2
- package/dist/login-CUup7w0e.mjs +0 -5
- package/dist/logo-matches-BkQKdu4Z.mjs +0 -6
- package/dist/logos-C_sv-boo.mjs +0 -7
- package/dist/logpush-NUcyMKHi.mjs +0 -46
- package/dist/logs-BZT4PlqZ.mjs +0 -36
- package/dist/magic-cloud-networking-DQnSdmgA.mjs +0 -71
- package/dist/magic-network-monitoring-pHTU6aS8.mjs +0 -36
- package/dist/magic-transit-5302bQNh.mjs +0 -383
- package/dist/managed-defense-8OEfDzuO.mjs +0 -18
- package/dist/mesh-DKBGTlCD.mjs +0 -26
- package/dist/metadata-C33s4rc-.mjs +0 -2
- package/dist/mtls-certificates-DsF3NFNs.mjs +0 -13
- package/dist/network-Bm0qYRqY.mjs +0 -50
- package/dist/oauth-clients-CP6alY0_.mjs +0 -16
- package/dist/observability-Bp71PtlD.mjs +0 -80
- package/dist/open-PCXX3ZDZ-BKRik1gi.mjs +0 -4
- package/dist/output-CvQFJkvi.mjs +0 -2
- package/dist/pages-DZPdyuT4.mjs +0 -54
- package/dist/pay-per-crawl-CnveMVDi.mjs +0 -65
- package/dist/pay-per-use-Bpxe8PHv.mjs +0 -6
- package/dist/pipelines-CHev3o5G.mjs +0 -44
- package/dist/precursor-C9PK9Bue.mjs +0 -4
- package/dist/previews-BIMI1dTz.mjs +0 -4
- package/dist/queries-f-btyefs.mjs +0 -9
- package/dist/queues-kLNdeb3q.mjs +0 -57
- package/dist/r2-D_awYx2p.mjs +0 -125
- package/dist/raw-fetch-CvkmFO23.mjs +0 -2
- package/dist/realtime-C0dvcBBM.mjs +0 -172
- package/dist/registrar-CHc-4vcf.mjs +0 -43
- package/dist/registrar-sandbox-Dq8LV2AI.mjs +0 -56
- package/dist/reporting-4u21g6Dk.mjs +0 -14
- package/dist/request-headers-D31kdxrQ.mjs +0 -2
- package/dist/request-tracers-CupJ_83j.mjs +0 -4
- package/dist/resolve-BCTrtcx7.mjs +0 -2
- package/dist/resolve-PZuJ878-.mjs +0 -2
- package/dist/resource-sharing-CO-Lh-u7.mjs +0 -40
- package/dist/resource-tagging-D0R5SzR6.mjs +0 -4
- package/dist/rules-BsmKzB9H.mjs +0 -18
- package/dist/rum-wcLEvVJl.mjs +0 -30
- package/dist/run-CIJTelJL.mjs +0 -2
- package/dist/run-quhbAvQi.mjs +0 -2
- package/dist/schema-GdBsV4P7.mjs +0 -2
- package/dist/schema-flags-D8vL2oiF.mjs +0 -5
- package/dist/scim-BkdJmAS8.mjs +0 -18
- package/dist/sdk-BCzcRJCi.mjs +0 -3
- package/dist/secrets-store-CHs0oYA0.mjs +0 -24
- package/dist/security-insights-vsl-4xFa.mjs +0 -40
- package/dist/shared-BS30oCf8.mjs +0 -2
- package/dist/snippets-CFaF_NyG.mjs +0 -20
- package/dist/source-38bULAR8.mjs +0 -6
- package/dist/spawn-B0Sl8lUu.mjs +0 -10
- package/dist/src-CM3XaB4p.mjs +0 -109
- package/dist/startup-profile-CLmojOrn.mjs +0 -2
- package/dist/startup-profile-CR7GMuLx.mjs +0 -17
- package/dist/state-CpXhcMdX.mjs +0 -2
- package/dist/stream-cAdBvpS1.mjs +0 -102
- package/dist/submit-Bkd7l2rK.mjs +0 -4
- package/dist/telemetry-Q3_UmwHj.mjs +0 -2
- package/dist/tunnels-CgtuRpcD.mjs +0 -29
- package/dist/turnstile-Bmcnrzw7.mjs +0 -33
- package/dist/update-check-BqSpgzHk.mjs +0 -2
- package/dist/update-check-DC0qP_8z.mjs +0 -2
- package/dist/url-info-DhVehaT8.mjs +0 -4
- package/dist/url-scanner-DiLdqsQk.mjs +0 -16
- package/dist/values-Cxx4Lxrd.mjs +0 -4
- package/dist/vectorize-YyxVpql-.mjs +0 -32
- package/dist/version-C0pInAZ9.mjs +0 -2
- package/dist/waiting-rooms-BdahlCdD.mjs +0 -53
- package/dist/workers-5GgoGA2e.mjs +0 -38
- package/dist/workers-builds-h-1FJjE1.mjs +0 -14
- package/dist/workers-for-platforms-CV9iRrp9.mjs +0 -42
- package/dist/workflows-dtMlkj1-.mjs +0 -43
- package/dist/zaraz-838AbMEX.mjs +0 -22
- package/dist/zero-trust-CYt-eELJ.mjs +0 -821
- /package/dist/{Page-CjJht2qT.mjs → Page-BShsqCXr.mjs} +0 -0
- /package/dist/{alerts-DY_7Nknx.mjs → alerts-BSON-vFh.mjs} +0 -0
- /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
- /package/dist/{autorag-K396-M2S.mjs → autorag-kNrLiqDX.mjs} +0 -0
- /package/dist/{body-parser-hh2avzkz.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
- /package/dist/{brands-DeLbFxSt.mjs → brands-bBJgbbOH.mjs} +0 -0
- /package/dist/{browser-extension-C1zmKFDG.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
- /package/dist/{clear-CRfI7WS7.mjs → clear-BW9vLgI3.mjs} +0 -0
- /package/dist/{cli-types-DoVT5q_M.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-D8p_dR8s.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-COFmzmlk.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
- /package/dist/{delegate-B6LetRpZ.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
- /package/dist/{domain-info-aiwP60Fo.mjs → domain-info-BkcBcyfF.mjs} +0 -0
- /package/dist/{health-Bz33n-_F.mjs → health-CTaCeVyC.mjs} +0 -0
- /package/dist/{input-validation-Dk52b0me.mjs → input-validation-D7z60HJH.mjs} +0 -0
- /package/dist/{internal-BHrJbbdA.mjs → internal-BYS7hO8c.mjs} +0 -0
- /package/dist/{live-MeJQXIei.mjs → live-BJE_YWE1.mjs} +0 -0
- /package/dist/{project-settings-DO6njFg_.mjs → project-settings-nBMEx1f-.mjs} +0 -0
- /package/dist/{r2-data-catalog-2jQrdAdo.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
- /package/dist/{rate-limit-analytics-CU55zqCU.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
- /package/dist/{rate-limits-CZ-qHDPK.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
- /package/dist/{ready-BOpbZ1pN.mjs → ready-B3pLxnjc.mjs} +0 -0
- /package/dist/{recent-submissions-KDqD2HyS.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
- /package/dist/{refute-DkF4XIMw.mjs → refute-Dp3VodMn.mjs} +0 -0
- /package/dist/{scan-logo-DQkf6glG.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
- /package/dist/{scan-page-CMOJ_E0n.mjs → scan-page-CxeudOzj.mjs} +0 -0
- /package/dist/{search-Bre1Zwn3.mjs → search-B_P5ZTQj.mjs} +0 -0
- /package/dist/{signed-url-24ZbX4yV.mjs → signed-url-D5RwvrQq.mjs} +0 -0
- /package/dist/{submission-info-BmkbZVqM.mjs → submission-info-_t78q2OE.mjs} +0 -0
- /package/dist/{total-queries-j8OAF_cE.mjs → total-queries-CPrKEciQ.mjs} +0 -0
- /package/dist/{tracked-domains-fe3EWYmF.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
- /package/dist/{verify-CKgZYvln.mjs → verify-5KcvRk-q.mjs} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-F5wxc8zq.mjs";import{t as p}from"./cli-types-9oYmRTHJ.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 h={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){let e=await n();a({command:`cf network routes cidr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.network.routes.cidr.create({...e,account_id:p}));i(t,{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`)}),h=await o(`Creating`,async()=>s.network.routes.cidr.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function ee(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:ee,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){let e=await n();a({command:`cf network routes cidr delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force,message:`This operation permanently deletes a private network route.`})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let u=await o(`Deleting`,async()=>s.network.routes.cidr.delete({account_id:l,route_id:c[`route-id`]}));i(u,{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){let e=await n();a({command:`cf network routes cidr edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Updating`,async()=>s.network.routes.cidr.edit({...e,account_id:f,route_id:d[`route-id`]}));i(t,{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`)}),m=await o(`Updating`,async()=>s.network.routes.cidr.edit({...p,account_id:f,route_id:d[`route-id`]}));i(m,{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){let e=await n();a({command:`cf network routes cidr get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.network.routes.cidr.get({account_id:l,route_id:c[`route-id`]}));i(u,{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){let e=await n();a({command:`cf network routes cidr list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/teamnet/routes`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.network.routes.cidr.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},C={command:`cidr`,describe:`Operations for routes.cidr`,builder:e=>e.command(h).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){let e=await n();a({command:`cf network routes hostname create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Creating`,async()=>s.network.routes.hostname.create({...e,account_id:f}));i(t,{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`)}),m=await o(`Creating`,async()=>s.network.routes.hostname.create({...p,account_id:f}));i(m,{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){let e=await n();a({command:`cf network routes hostname delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force,message:`This operation permanently deletes a hostname route.`})){process.stderr.write(`Aborted.
|
|
18
|
+
`);return}let u=await o(`Deleting`,async()=>s.network.routes.hostname.delete({account_id:l,hostname_route_id:c[`hostname-route-id`]}));i(u,{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){let e=await n();a({command:`cf network routes hostname edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Updating`,async()=>s.network.routes.hostname.edit({...e,account_id:f,hostname_route_id:d[`hostname-route-id`]}));i(t,{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`)}),m=await o(`Updating`,async()=>s.network.routes.hostname.edit({...p,account_id:f,hostname_route_id:d[`hostname-route-id`]}));i(m,{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){let e=await n();a({command:`cf network routes hostname get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.network.routes.hostname.get({account_id:l,hostname_route_id:c[`hostname-route-id`]}));i(u,{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){let e=await n();a({command:`cf network routes hostname list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/zerotrust/routes/hostname`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.network.routes.hostname.list({account_id:u,...s}));i(d,{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){let e=await n();a({command:`cf network routes resolve`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.network.routes.resolve({account_id:u,ip:c.ip,...s}));i(d,{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 z={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){let e=await n();a({command:`cf network subnets cloudflare-source edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Updating`,async()=>s.network.subnets.cloudflareSource.edit({...e,account_id:f,address_family:d[`address-family`]}));i(t,{successLabel:`Updated`});return}let p=l({comment:u(d.comment,`comment`,`text`),name:u(d.name,`name`,`text`),network:u(d.network,`network`,`text`)}),m=await o(`Updating`,async()=>s.network.subnets.cloudflareSource.edit({...p,account_id:f,address_family:d[`address-family`]}));i(m,{successLabel:`Updated`})})},te={command:`cloudflare-source`,describe:`Operations for subnets.cloudflare-source`,builder:e=>e.command(z).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){let e=await n();a({command:`cf network subnets initial-resolved-ip edit`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Updating`,async()=>s.network.subnets.initialResolvedIp.edit({...e,account_id:f,address_family:d[`address-family`]}));i(t,{successLabel:`Updated`});return}let p=l({comment:u(d.comment,`comment`,`text`),name:u(d.name,`name`,`text`),network:u(d.network,`network`,`text`)}),m=await o(`Updating`,async()=>s.network.subnets.initialResolvedIp.edit({...p,account_id:f,address_family:d[`address-family`]}));i(m,{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){let e=await n();a({command:`cf network subnets initial-resolved-ip get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.network.subnets.initialResolvedIp.get({account_id:l,address_family:c[`address-family`]}));i(u,{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){let e=await n();a({command:`cf network subnets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/zerotrust/subnets`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.network.subnets.list({account_id:u,...s}));i(d,{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){let e=await n();a({command:`cf network subnets warp create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.network.subnets.warp.create({...e,account_id:p}));i(t,{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`)}),h=await o(`Creating`,async()=>s.network.subnets.warp.create({...m,account_id:p}));i(h,{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){let e=await n();a({command:`cf network subnets warp delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force,message:`This operation permanently deletes a WARP IP subnet.`})){process.stderr.write(`Aborted.
|
|
37
|
+
`);return}let u=await o(`Deleting`,async()=>s.network.subnets.warp.delete({account_id:l,subnet_id:c[`subnet-id`]}));i(u,{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){let e=await n();a({command:`cf network subnets warp edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Updating`,async()=>s.network.subnets.warp.edit({...e,account_id:f,subnet_id:d[`subnet-id`]}));i(t,{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`)}),m=await o(`Updating`,async()=>s.network.subnets.warp.edit({...p,account_id:f,subnet_id:d[`subnet-id`]}));i(m,{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){let e=await n();a({command:`cf network subnets warp get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.network.subnets.warp.get({account_id:l,subnet_id:c[`subnet-id`]}));i(u,{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(te).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){let e=await n();a({command:`cf network virtual-networks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.network.virtualNetworks.create({...e,account_id:p}));i(t,{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`)}),h=await o(`Creating`,async()=>s.network.virtualNetworks.create({...m,account_id:p}));i(h,{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){let e=await n();a({command:`cf network virtual-networks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force,message:`This operation permanently deletes a virtual network.`})){process.stderr.write(`Aborted.
|
|
44
|
+
`);return}let u=await o(`Deleting`,async()=>s.network.virtualNetworks.delete({account_id:l,virtual_network_id:c[`virtual-network-id`]}));i(u,{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){let e=await n();a({command:`cf network virtual-networks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Updating`,async()=>s.network.virtualNetworks.edit({...e,account_id:f,virtual_network_id:d[`virtual-network-id`]}));i(t,{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`)}),m=await o(`Updating`,async()=>s.network.virtualNetworks.edit({...p,account_id:f,virtual_network_id:d[`virtual-network-id`]}));i(m,{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){let e=await n();a({command:`cf network virtual-networks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.network.virtualNetworks.get({account_id:l,virtual_network_id:c[`virtual-network-id`]}));i(u,{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){let e=await n();a({command:`cf network virtual-networks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/teamnet/virtual_networks`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.network.virtualNetworks.list({account_id:u,...s}));i(d,{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};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-F5wxc8zq.mjs";function p(e){return e.usage(`$0 network-interconnects cnis create
|
|
3
3
|
|
|
4
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
5
|
|
|
@@ -16,14 +16,14 @@ character:
|
|
|
16
16
|
In other words, MD5 keys may contain any printable ASCII character aside from newline
|
|
17
17
|
(0x0A), quotation mark (\`"\`), vertical tab (0x0B), carriage return (0x0D), tab (0x09),
|
|
18
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects cnis create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.networkInterconnects.cnis.create({...e,account_id:p}));i(t,{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`]}}),h=await o(`Creating`,async()=>s.networkInterconnects.cnis.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function h(e){return e.usage(`$0 network-interconnects cnis delete <cni>
|
|
20
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/${
|
|
22
|
-
`);return}
|
|
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){let e=await n();a({command:`cf network-interconnects cnis delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/cnis/${c.cni==null?`<cni>`:encodeURIComponent(String(c.cni))}`,pathParams:{cni:String(c.cni??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
22
|
+
`);return}let u=await o(`Deleting`,async()=>s.networkInterconnects.cnis.delete({account_id:l,cni:c.cni}));i(u,{successLabel:`Deleted`})})};function _(e){return e.usage(`$0 network-interconnects cnis get <cni>
|
|
23
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects cnis get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/cnis/${c.cni==null?`<cni>`:encodeURIComponent(String(c.cni))}`,pathParams:{cni:String(c.cni??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.cnis.get({account_id:l,cni:c.cni}));i(u,{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 network-interconnects cnis list
|
|
25
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects cnis list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/cnis`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.networkInterconnects.cnis.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 network-interconnects cnis update <cni>
|
|
27
27
|
|
|
28
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
29
|
|
|
@@ -47,27 +47,27 @@ Controls the customer-facing data path:
|
|
|
47
47
|
bgp-bridge-receiver.
|
|
48
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
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects cnis update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Updating`,async()=>s.networkInterconnects.cnis.update({body:e,account_id:p,cni:f.cni}));i(t,{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`)}),h=await o(`Updating`,async()=>s.networkInterconnects.cnis.update({body:m,account_id:p,cni:f.cni}));i(h,{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
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects interconnects create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(f),p=f.local?e:await r();if(f.accountId=p,f.body){let e=c(f.body),t=await o(`Creating`,async()=>s.networkInterconnects.interconnects.create({body:e,account_id:p}));i(t,{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`)}),h=await o(`Creating`,async()=>s.networkInterconnects.interconnects.create({body:m,account_id:p}));i(h,{successLabel:`Created`})})};function E(e){return e.usage(`$0 network-interconnects interconnects delete <icon>
|
|
53
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/${
|
|
55
|
-
`);return}
|
|
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){let e=await n();a({command:`cf network-interconnects interconnects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}`,pathParams:{icon:String(c.icon??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
55
|
+
`);return}let u=await o(`Deleting`,async()=>s.networkInterconnects.interconnects.delete({account_id:l,icon:c.icon}));i(u,{successLabel:`Deleted`})})};function O(e){return e.usage(`$0 network-interconnects interconnects get <icon>
|
|
56
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}`,pathParams:{icon:String(c.icon??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.interconnects.get({account_id:l,icon:c.icon}));i(u,{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 network-interconnects interconnects list
|
|
58
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects interconnects list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.networkInterconnects.interconnects.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 network-interconnects interconnects loa-default-name <icon>
|
|
60
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects interconnects loa-default-name`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.interconnects.loaDefaultName({account_id:l,icon:c.icon}));i(u,{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 network-interconnects interconnects loa <icon>
|
|
62
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects interconnects loa`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.networkInterconnects.interconnects.loa({account_id:u,icon:c.icon,...s}));i(d,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 network-interconnects interconnects status <icon>
|
|
64
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects interconnects status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/interconnects/${c.icon==null?`<icon>`:encodeURIComponent(String(c.icon))}/status`,pathParams:{icon:String(c.icon??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.interconnects.status({account_id:l,icon:c.icon}));i(u,{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
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/settings`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.settings.get({account_id:l}));i(u,{successLabel:`Loaded`})})};function V(e){return e.usage(`$0 network-interconnects settings update
|
|
68
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects settings update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<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 t(u),d=u.local?e:await r();if(u.accountId=d,u.body){let e=c(u.body),t=await o(`Updating`,async()=>s.networkInterconnects.settings.update({...e,account_id:d}));i(t,{successLabel:`Updated`});return}let f=l({default_asn:u[`default-asn`]}),p=await o(`Updating`,async()=>s.networkInterconnects.settings.update({...f,account_id:d}));i(p,{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
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects slots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/slots/${c.slot==null?`<slot>`:encodeURIComponent(String(c.slot))}`,pathParams:{slot:String(c.slot??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.networkInterconnects.slots.get({account_id:l,slot:c.slot}));i(u,{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 network-interconnects slots list
|
|
72
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/${
|
|
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){let e=await n();a({command:`cf network-interconnects slots list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/slots`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.networkInterconnects.slots.list({account_id:u,...s}));i(d,{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};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./cli-exit-
|
|
2
|
+
import{t as e}from"./cli-exit-CstFZ1eJ.mjs";import{n as t,t as n}from"./version-BZNc7Y3t.mjs";import{t as r}from"./session-BWe9et4K.mjs";import{a as i,n as a,t as o}from"./cf-B9aqZZKD.mjs";import{j as s,n as c}from"./interactive-Dqv0RWVU.mjs";import{i as l,o as u}from"./dist-8rP3V95o.mjs";import{n as d}from"./context-Bwkz4Lm_.mjs";const f={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 p=class extends Error{};async function m(n){if(c())throw new p;r(t);let i=await u({message:n});if(s(i)||typeof i!=`string`)throw new e(130,{cancelled:!0});return i}async function h(n,i){if(c())throw new p;r(t);let a=await l({message:n,options:i.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(s(a)||typeof a!=`string`)throw new e(130,{cancelled:!0});return f.log(`To have cf automatically use this account for future commands in this project, you can update your \`cloudflare.config.ts\`:
|
|
3
3
|
|
|
4
4
|
import { defineConfig } from "cf/config";
|
|
5
5
|
|
|
6
6
|
export default defineConfig({
|
|
7
7
|
accountId: "${a}",
|
|
8
8
|
});
|
|
9
|
-
`),a}const g=o({logger:f,userAgent:n,prompt:m,select:h,isNoDefaultValueProvidedError:e=>e instanceof p});async function _(e,t){return g.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await
|
|
9
|
+
`),a}const g=o({logger:f,userAgent:n,prompt:m,select:h,isNoDefaultValueProvidedError:e=>e instanceof p});async function _(e,t){return g.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await d(t)})}function v(){return g.getActiveAccountId({})}async function y(){return g.fetchAllAccounts({compliance_region:await d()},{throwOnEmpty:!1})}async function b(e){if(e?.scopes&&!i(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return g.login({compliance_region:await d()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function x(e){return g.logout(e)}function S(e){g.setProfile(e)}function C(){return g.getActiveProfile()}function w(){return a({logger:f})}function T(e,t=process.cwd()){let n=w().resolve({profile:e,cwd:t});return S(n),n}function E(){return g.getOAuthTokenFromLocalState()}function D(){return g.readAuthCredentials()?.oauth_token!==void 0}function O(){return g.readAuthCredentials()}function k(){return g.getCredentialStore().path()}export{_ as a,D as c,O as d,T as f,k as i,b as l,v as n,w as o,S as p,C as r,E as s,y as t,x as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e,f as t,n}from"./oauth-
|
|
2
|
+
import{a as e,f as t,n}from"./oauth-B08YQ4xq.mjs";export{n as getActiveAccountId,e as getOrSelectAccountId,t as resolveProfile};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,t as l}from"./body-parser-DkHKPkJ7.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f,n as p}from"./prompt-F5wxc8zq.mjs";function m(e){return e.usage(`$0 oauth-clients create
|
|
3
|
+
|
|
4
|
+
Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create OAuth Client`,builder:m,handler:async p=>s({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=await n();a({command:`cf oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)}):c(p.body)});return}let s=await t(p),m=p.local?e:await r();if(p.accountId=m,p.body){let e=c(p.body),t=await o(`Creating`,async()=>s.oauthClients.create({...e,account_id:m}));i(t,{successLabel:`Created`});return}if(p[`client-name`]===void 0&&(p[`client-name`]=await d(`client-name`,`Human-readable name of the OAuth client.`)),p[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(p[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(p[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(p.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);p[`token-endpoint-auth-method`]===void 0&&(p[`token-endpoint-auth-method`]=await f(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let h=l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)}),g=await o(`Creating`,async()=>s.oauthClients.create({...h,account_id:m}));i(g,{successLabel:`Created`})})};function g(e){return e.usage(`$0 oauth-clients delete-rotated-secret <oauth-client-id>
|
|
5
|
+
|
|
6
|
+
Removes the old client secret after a rotation, keeping only the new one. Use this after you have updated your client configuration to use the new secret. The \`has_rotated_secret\` field on the client indicates whether there is an old secret to delete.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,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 _={command:`delete-rotated-secret <oauth-client-id>`,describe:`Delete Rotated OAuth Client Secret`,builder:g,handler:async c=>s({command:`oauth-clients delete-rotated-secret`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf oauth-clients delete-rotated-secret`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients/${c[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(c[`oauth-client-id`]))}/rotate_secret`,pathParams:{"oauth-client-id":String(c[`oauth-client-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let u=await o(`Deleting`,async()=>s.oauthClients.deleteRotatedSecret({account_id:l,oauth_client_id:c[`oauth-client-id`]}));i(u,{successLabel:`Deleted`})})};function v(e){return e.usage(`$0 oauth-clients delete <oauth-client-id>
|
|
8
|
+
|
|
9
|
+
Delete an OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,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 y={command:`delete <oauth-client-id>`,describe:`Delete OAuth Client`,builder:v,handler:async c=>s({command:`oauth-clients delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf oauth-clients delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients/${c[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(c[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(c[`oauth-client-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await p({force:!!c.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
10
|
+
`);return}let u=await o(`Deleting`,async()=>s.oauthClients.delete({account_id:l,oauth_client_id:c[`oauth-client-id`]}));i(u,{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 oauth-clients get <oauth-client-id>
|
|
11
|
+
|
|
12
|
+
Get details of a specific OAuth client.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get <oauth-client-id>`,describe:`OAuth Client Details`,builder:b,handler:async c=>s({command:`oauth-clients get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf oauth-clients get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients/${c[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(c[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(c[`oauth-client-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.oauthClients.get({account_id:l,oauth_client_id:c[`oauth-client-id`]}));i(u,{successLabel:`Loaded`})})};function S(e){return e.usage(`$0 oauth-clients list
|
|
13
|
+
|
|
14
|
+
List all OAuth clients for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List OAuth Clients`,builder:S,handler:async c=>s({command:`oauth-clients list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf oauth-clients list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.oauthClients.list({account_id:l}));i(u,{successLabel:`Loaded`})})};function w(e){return e.usage("$0 oauth-clients rotate-secret <oauth-client-id>\n\nCreates a second client secret so you can update your client configuration before deleting the old one. The `has_rotated_secret` field on the client will be set to `true`.").positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`rotate-secret <oauth-client-id>`,describe:`Rotate OAuth Client Secret`,builder:w,handler:async c=>s({command:`oauth-clients rotate-secret`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf oauth-clients rotate-secret`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients/${c[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(c[`oauth-client-id`]))}/rotate_secret`,pathParams:{"oauth-client-id":String(c[`oauth-client-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Creating`,async()=>s.oauthClients.rotateSecret({account_id:l,oauth_client_id:c[`oauth-client-id`]}));i(u,{successLabel:`Created`})})};function E(e){return e.usage(`$0 oauth-clients update <oauth-client-id>
|
|
15
|
+
|
|
16
|
+
Update an existing OAuth client. Only include fields you want to update.`).positional(`oauth-client-id`,{type:`string`,description:`The unique identifier for an OAuth client.`,demandOption:!0}).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).option(`visibility`,{type:`string`,description:"Promote the OAuth client from private to public visibility. Only `public` is accepted; demotion to `private` is not supported. Promotion requires a non-empty client name, logo URI, verified client URI host, and at least one non-identity scope.",choices:[`public`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update request for an OAuth client. Only include fields you want to update.`})}const D={command:`update <oauth-client-id>`,describe:`Update OAuth Client`,builder:E,handler:async d=>s({command:`oauth-clients update`,classification:{safeFlags:[`token-endpoint-auth-method`,`visibility`,`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf oauth-clients update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/oauth_clients/${d[`oauth-client-id`]==null?`<oauth-client-id>`:encodeURIComponent(String(d[`oauth-client-id`]))}`,pathParams:{"oauth-client-id":String(d[`oauth-client-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({allowed_cors_origins:d[`allowed-cors-origins`],client_name:u(d[`client-name`],`client-name`,`text`),client_uri:u(d[`client-uri`],`client-uri`,`text`),grant_types:d[`grant-types`],logo_uri:u(d[`logo-uri`],`logo-uri`,`text`),optional_scopes:d[`optional-scopes`],policy_uri:u(d[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:d[`post-logout-redirect-uris`],redirect_uris:d[`redirect-uris`],response_types:d[`response-types`],scopes:d.scopes,token_endpoint_auth_method:u(d[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(d[`tos-uri`],`tos-uri`,`text`),visibility:u(d.visibility,`visibility`,`text`)}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Updating`,async()=>s.oauthClients.update({...e,account_id:f,oauth_client_id:d[`oauth-client-id`]}));i(t,{successLabel:`Updated`});return}let p=l({allowed_cors_origins:d[`allowed-cors-origins`],client_name:u(d[`client-name`],`client-name`,`text`),client_uri:u(d[`client-uri`],`client-uri`,`text`),grant_types:d[`grant-types`],logo_uri:u(d[`logo-uri`],`logo-uri`,`text`),optional_scopes:d[`optional-scopes`],policy_uri:u(d[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:d[`post-logout-redirect-uris`],redirect_uris:d[`redirect-uris`],response_types:d[`response-types`],scopes:d.scopes,token_endpoint_auth_method:u(d[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(d[`tos-uri`],`tos-uri`,`text`),visibility:u(d.visibility,`visibility`,`text`)}),m=await o(`Updating`,async()=>s.oauthClients.update({...p,account_id:f,oauth_client_id:d[`oauth-client-id`]}));i(m,{successLabel:`Updated`})})},O={command:`oauth-clients`,describe:`oauth-clients`,builder:e=>e.command(h).command(y).command(_).command(x).command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{O as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{n as e}from"./auth-AobvBmz4.mjs";import{t}from"./output-BGqhvqe2.mjs";import{t as n}from"./dry-run-DmsbOMF1.mjs";import{t as r}from"./progress-BYVZuEcG.mjs";import{t as i}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";function a(e){return e.usage(`$0 oauth-scopes list
|
|
3
3
|
|
|
4
|
-
List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`List OAuth Scopes`,builder:a,handler:async a=>i({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let i=await e(a)
|
|
4
|
+
List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`List OAuth Scopes`,builder:a,handler:async a=>i({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let i=await e(a),o=await r(`Loading`,async()=>i.oauthScopes.list());t(o,{successLabel:`Loaded`})})},s={command:`oauth-scopes`,describe:`oauth-scopes`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
|