cf 1.0.0-beta.20 → 1.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_meta/commands.json +911 -751
- package/dist/_meta/schemas.json +401 -382
- package/dist/{abuse-reports-mKv00yPh.mjs → abuse-reports-CbUAnJxd.mjs} +1 -1
- package/dist/{access-CyRjTbhh.mjs → access-C-78DlxL.mjs} +1 -1
- package/dist/{accounts-BmF_YKvG.mjs → accounts-DEqQPxCz.mjs} +8 -15
- package/dist/{acm-BcIFiAb8.mjs → acm-jmhCq3Yh.mjs} +2 -3
- package/dist/{addressing-D6xVD7MM.mjs → addressing-BeYFpQvC.mjs} +12 -23
- package/dist/{agent-memory-Blldunhv.mjs → agent-memory-Chlovb7j.mjs} +5 -9
- package/dist/{ai-CU8tdTfC.mjs → ai-BndH3HYN.mjs} +2 -3
- package/dist/{ai-audit-Id3hq5pV.mjs → ai-audit-BUJ-70O_.mjs} +1 -1
- package/dist/{ai-gateway-BKeZ28CQ.mjs → ai-gateway-CCk7VKhL.mjs} +9 -15
- package/dist/{ai-search-DOiZEmn7.mjs → ai-search-BexET_wp.mjs} +6 -11
- package/dist/{ai-security-CioADDZi.mjs → ai-security-D4MxRlxX.mjs} +3 -5
- package/dist/{alerting-BzN1N3Se.mjs → alerting-rw8Oi3x7.mjs} +5 -9
- package/dist/{analytics-engine-CugCQfDe.mjs → analytics-engine-Bk7dQLcm.mjs} +1 -1
- package/dist/{analytics-Cte-DrzH.mjs → analytics-q-guNEOK.mjs} +1 -1
- package/dist/{api-security-CCs0g510.mjs → api-security-BDc6gkf1.mjs} +9 -17
- package/dist/{argo-BHBFZnmO.mjs → argo-CnLIqm0i.mjs} +1 -1
- package/dist/args-BAOHroBC.mjs +2 -0
- package/dist/{artifacts-BzAwvrCD.mjs → artifacts-Cil33dzV.mjs} +4 -7
- package/dist/{audit-logs-jWivEKCy.mjs → audit-logs--E2Eclb7.mjs} +1 -1
- package/dist/auth-B0lEsD_1.mjs +2 -0
- package/dist/{auth-BUQscD5b.mjs → auth-BcNLQji1.mjs} +1 -1
- package/dist/auth-BtZmY6sE.mjs +2 -0
- package/dist/{auth-token-T0aqYgl9.mjs → auth-token-aF5AVLlH.mjs} +1 -1
- package/dist/{autoconfig-CBdcYYf4.mjs → autoconfig-Dbp6J25P.mjs} +88 -88
- package/dist/{basin-catalog-_8w_4599.mjs → basin-catalog-dnVyzopm.mjs} +3 -5
- package/dist/{billing-Ce0WN0yw.mjs → billing-Fqp3jB2V.mjs} +2 -3
- package/dist/{blocks-CFAm0Ma3.mjs → blocks-BOQH-Won.mjs} +1 -1
- package/dist/{bot-management-DskcSr4B.mjs → bot-management-SEDgo1Xg.mjs} +1 -1
- package/dist/{botnet-feed-CmBm13-D.mjs → botnet-feed-DPqR4M0Y.mjs} +2 -3
- package/dist/{brand-protection-DTuFrsN0.mjs → brand-protection-B8vwKfM9.mjs} +2 -3
- package/dist/{browser-run-CXdzSOHa.mjs → browser-run-BybYDq3I.mjs} +3 -5
- package/dist/build-BqGmiORA.mjs +2 -0
- package/dist/build-CWlpWVBf.mjs +2 -0
- package/dist/{builds-_1u5Nx6f.mjs → builds-CvtOG-Gk.mjs} +8 -15
- package/dist/cache-Bme_d2Wx.mjs +36 -0
- package/dist/cf-fIBhEAxU.mjs +18 -0
- package/dist/chunk-DSGVRFIS-DHC6NOIj.mjs +2 -0
- package/dist/{chunk-2K52M2W5-iYNzknM1.mjs → chunk-XVBBSNW2-DfMyGS-l.mjs} +8 -8
- package/dist/{cli-DyhOdzMo.mjs → cli-CIKDqm-u.mjs} +3 -3
- package/dist/{client-side-security-DnnYaRsd.mjs → client-side-security-ZQeRoo1t.mjs} +2 -3
- package/dist/{cloud-connector-Ct6b6pz8.mjs → cloud-connector-BeunZlNV.mjs} +1 -1
- package/dist/{cloudflared-CHLpWU35.mjs → cloudflared-DbzoIouQ.mjs} +1 -1
- package/dist/{cloudforce-one-Rl6nCCm0.mjs → cloudforce-one-D20t9ojD.mjs} +26 -51
- package/dist/{command-BwgvUpNx.mjs → command-B3uWlw57.mjs} +1 -1
- package/dist/{command-DuLxEkGq.mjs → command-BGRucANI.mjs} +1 -1
- package/dist/{command-BONLLcyz.mjs → command-C6kE7BU0.mjs} +1 -1
- package/dist/{command-DOpykk8X.mjs → command-C9CNvZi_.mjs} +1 -1
- package/dist/{command-BRpBIju7.mjs → command-CQ5qHE7n.mjs} +1 -1
- package/dist/{command-CHGc-KZ7.mjs → command-CkZkTjIj.mjs} +1 -1
- package/dist/{command-BRXOUAGD.mjs → command-CqKRlHGv.mjs} +1 -1
- package/dist/{command-BwlIi3Bv.mjs → command-CtlD6MEi.mjs} +1 -1
- package/dist/{command-CXzje7qc.mjs → command-CzWWQv8j.mjs} +1 -1
- package/dist/{command-BMYi_gS-.mjs → command-DWWuXQV8.mjs} +1 -1
- package/dist/{command-CPDQPdss.mjs → command-DkwmylF2.mjs} +1 -1
- package/dist/{command-CMa807gY.mjs → command-MxFFWqMg.mjs} +1 -1
- package/dist/{command-BVO9UOuU.mjs → command-orlUsdgf.mjs} +1 -1
- package/dist/{command-CVoDyQnL.mjs → command-prWMAJbg.mjs} +1 -1
- package/dist/{command-0WS5I_JW.mjs → command-rUCxlpQI.mjs} +1 -1
- package/dist/command-resolution-DAQ4PWUt.mjs +2 -0
- package/dist/{completions-DMwrvK_S.mjs → completions-2Otv0HMd.mjs} +1 -1
- package/dist/{connector-interrupts-DyWilINb.mjs → connector-interrupts-Dfhxupmg.mjs} +1 -1
- package/dist/{connector-telemetry-events-BUW9qTOs.mjs → connector-telemetry-events-CLVpDTIa.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-Djs5QssR.mjs → connector-telemetry-snapshots-E_1tmNmQ.mjs} +1 -1
- package/dist/{connectors-e_cpzDEm.mjs → connectors-ChJpQFSl.mjs} +2 -3
- package/dist/{containers-CEH15JUu.mjs → containers-Cj5-9nUg.mjs} +6 -9
- package/dist/containers-CzAZfmnj.mjs +380 -0
- package/dist/{content-scan-B6Ahw9JA.mjs → content-scan-CIA_9PV8.mjs} +3 -5
- package/dist/{context-Sgba0fZP.mjs → context-DVh8Wyfs.mjs} +2 -2
- package/dist/{cps-uDD0SSJ-.mjs → cps-hJkqdsHx.mjs} +1 -1
- package/dist/{csam-scanner-BSUl7jGn.mjs → csam-scanner-cCVO3lNF.mjs} +1 -1
- package/dist/{custom-csrs-BDcXggph.mjs → custom-csrs-BrTWUZ0c.mjs} +2 -3
- package/dist/{custom-hostnames-UmIlwkwt.mjs → custom-hostnames-C4ft77oC.mjs} +4 -7
- package/dist/{custom-nameservers-D7kU6d--.mjs → custom-nameservers-BWfrZhD1.mjs} +2 -3
- package/dist/{custom-pages-CkhIQCfM.mjs → custom-pages-DqTMKtRc.mjs} +2 -3
- package/dist/{d1-myRLEAGs.mjs → d1-B58AA9PA.mjs} +3 -6
- package/dist/delegate-D7yYckA4.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BJqCpycz.mjs → deploy-CEROLAdh.mjs} +1 -1
- package/dist/deploy-context-Do89WayB.mjs +56 -0
- package/dist/{deploy-input-v2DryyLP.mjs → deploy-input-DyMuMsi5.mjs} +1 -1
- package/dist/{dev-S1PJi83q.mjs → dev-BaFS7kOM.mjs} +2 -2
- package/dist/{diagnostics-q65rcNIk.mjs → diagnostics-4gfYj7Pf.mjs} +2 -3
- package/dist/dialog-D5lus4M4.mjs +2 -0
- package/dist/discover-6kAmVMPp.mjs +2 -0
- package/dist/discover-C06Syc2B.mjs +2 -0
- package/dist/dist-BtzWfAjU.mjs +453 -0
- package/dist/dls-ClWVxTBg.mjs +16 -0
- package/dist/{dns-DhARjFQs.mjs → dns-CML-wxIt.mjs} +68 -68
- package/dist/{dns-firewall-BP6r9QG6.mjs → dns-firewall-CL0b3dJ1.mjs} +2 -3
- package/dist/{docs-CReGWDrw.mjs → docs-BeYBHwUN.mjs} +1 -1
- package/dist/{dotenv-Ck-6V1hm.mjs → dotenv-CmPRiXmU.mjs} +1 -1
- package/dist/{dry-run-BBjUQUhR.mjs → dry-run-gy0Hl9xo.mjs} +1 -1
- package/dist/{durable-objects-tOJy-5te.mjs → durable-objects-uZECeq_f.mjs} +1 -1
- package/dist/{email-auth-Bq9sq_2j.mjs → email-auth-CCNW798I.mjs} +1 -1
- package/dist/email-domains-1rD1d84O.mjs +12 -0
- package/dist/{email-routing-CYo4dp50.mjs → email-routing-CYv-LrbV.mjs} +4 -7
- package/dist/{email-security-CNtWET2d.mjs → email-security-CWEUYPYo.mjs} +16 -31
- package/dist/{email-sending-BvagNLRr.mjs → email-sending-DHSzCfJx.mjs} +3 -5
- package/dist/{errors-DpbAQQv8.mjs → errors-ol9sMqSe.mjs} +8 -8
- package/dist/{field-extractors-C9R3Qivh.mjs → field-extractors-CuBM_uO4.mjs} +2 -3
- package/dist/{firewall-DsgUY-Qv.mjs → firewall-SMIUSypF.mjs} +4 -7
- package/dist/flagship-D3v6iDdw.mjs +24 -0
- package/dist/{fraud-24l8dKyk.mjs → fraud-B2f7O15X.mjs} +1 -1
- package/dist/{google-tag-gateway-CAkudP5W.mjs → google-tag-gateway-BwOc62Gy.mjs} +1 -1
- package/dist/{gt-D6YemCLh.mjs → gt-BQkaDQDq.mjs} +1 -1
- package/dist/{healthchecks-CEGMe3lO.mjs → healthchecks-BQXHnihB.mjs} +3 -5
- package/dist/{hyperdrive-DLDaOU2O.mjs → hyperdrive-Bd6Yfje3.mjs} +2 -3
- package/dist/{iam-ChldOMSL.mjs → iam-qJPI1_aZ.mjs} +5 -9
- package/dist/{images-Ba9tS5wT.mjs → images-goHZJOxy.mjs} +6 -11
- package/dist/index.mjs +1 -1
- package/dist/init-CVx0Ya1E.mjs +43 -0
- package/dist/{intel-DbLRah4Y.mjs → intel-CwiqwJI9.mjs} +18 -21
- package/dist/interactive-CHcvofEp.mjs +2 -0
- package/dist/{interactive-d_lFnSev.mjs → interactive-D4E8PdaW.mjs} +31 -31
- package/dist/interactive-wQM7Blhm.mjs +2 -0
- package/dist/internal-5cnlw9mH.mjs +4 -0
- package/dist/{ips-BGyzyQLL.mjs → ips-KBxmXhvO.mjs} +1 -1
- package/dist/{k2-BVQ3MqEl.mjs → k2-KhIP5NFT.mjs} +2 -3
- package/dist/kv-CCem2sEY.mjs +12 -0
- package/dist/{lazy-command-D0I6itZs.mjs → lazy-command-BMhD5ffF.mjs} +1 -1
- package/dist/{leaked-credential-checks-Dga83Qy3.mjs → leaked-credential-checks-BkPZiwE2.mjs} +3 -5
- package/dist/live-BhHzxFna.mjs +4 -0
- package/dist/{load-balancers-D9cB6of8.mjs → load-balancers-17GBXdju.mjs} +5 -9
- package/dist/local-CAs8RWYW.mjs +2 -0
- package/dist/{local-B7ZJ78al.mjs → local-CSH3UMpD.mjs} +1 -1
- package/dist/{local-runtime-DB545Gqq.mjs → local-runtime-KOFLRZeZ.mjs} +1 -1
- package/dist/log-BWdaOGOW.mjs +66 -0
- package/dist/log-DZfik9Jk.mjs +2 -0
- package/dist/login-BTiflOun.mjs +2 -0
- package/dist/login-Buhvx6Fi.mjs +5 -0
- package/dist/{logpush-Ccmr0Y_I.mjs → logpush-BCCUxa4J.mjs} +3 -5
- package/dist/{logs-CZBMuuBC.mjs → logs-4CwupKRG.mjs} +2 -3
- package/dist/{magic-cloud-networking-BwOxZVql.mjs → magic-cloud-networking-Xy6SC-V-.mjs} +4 -7
- package/dist/{magic-network-monitoring-Cx5kKdbk.mjs → magic-network-monitoring-B8pRZp2g.mjs} +3 -5
- package/dist/{magic-transit-BJwg3sVK.mjs → magic-transit-CwfO3OOX.mjs} +36 -67
- package/dist/managed-defense-CtFLuvuB.mjs +18 -0
- package/dist/{managed-transforms-C-HMtesC.mjs → managed-transforms-Hto8OCBS.mjs} +2 -3
- package/dist/{mcp-bGKgzz6F.mjs → mcp-SQ0MAVUJ.mjs} +3 -5
- package/dist/{mesh-DeQIll19.mjs → mesh-C8A6tVqA.mjs} +3 -5
- package/dist/{migrate-B6HsPeFh.mjs → migrate-Dufxsb_F.mjs} +1 -1
- package/dist/{monetization-B-TIrpA5.mjs → monetization-CYVaCAe9.mjs} +3 -5
- package/dist/{network-BrjykU-I.mjs → network-CJBTdEM3.mjs} +5 -9
- package/dist/{network-interconnects-I06kbxIl.mjs → network-interconnects-CKlNFj3i.mjs} +3 -5
- package/dist/{o11y-Ba0Fa98_.mjs → o11y-5x2Q8CWm.mjs} +8 -15
- package/dist/{oauth-BH-uQd3C.mjs → oauth-BN6_FpYp.mjs} +1 -1
- package/dist/oauth-D_A8AcIS.mjs +4 -0
- package/dist/{oauth-clients-Dd5gvDqf.mjs → oauth-clients-qKXg8ZH3.mjs} +3 -5
- package/dist/{oauth-scopes-CXpH3Syj.mjs → oauth-scopes-Ct1jDyC5.mjs} +1 -1
- package/dist/{organization-DKPqwe3j.mjs → organization-lBQSeqS1.mjs} +3 -5
- package/dist/{organizations-Cq4iy-Yr.mjs → organizations-DEX8Er3g.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DSB1sbYV.mjs → origin-post-quantum-encryption-DUsxVGCs.mjs} +1 -1
- package/dist/output-BJEgbI0G.mjs +2 -0
- package/dist/package-BqSbnt6u.mjs +2 -0
- package/dist/{page-rules-CDWTYaf7.mjs → page-rules-BMt6nt03.mjs} +2 -3
- package/dist/{pages-Dgtm51Uj.mjs → pages-Jxa92ECz.mjs} +7 -13
- package/dist/{pay-per-crawl-CHenxdhv.mjs → pay-per-crawl-Cv0044CZ.mjs} +3 -5
- package/dist/{pay-per-use-Bd5l0hBi.mjs → pay-per-use-DGEeG-dC.mjs} +2 -3
- package/dist/{pipelines-GsyD6nUM.mjs → pipelines-CEC78A3w.mjs} +5 -9
- package/dist/{precursor-mO-Zua09.mjs → precursor-Ba0Ejhzt.mjs} +1 -1
- package/dist/previews-DnZbUTym.mjs +6 -0
- package/dist/progress-CtGsPOpV.mjs +2 -0
- package/dist/prompt-YrI7ltMa.mjs +4 -0
- package/dist/{queues-D8cAr2lB.mjs → queues-Chq997uj.mjs} +6 -11
- package/dist/{r2-CJiJbG6b.mjs → r2-BFgZDs-F.mjs} +17 -33
- package/dist/{radar-PUZ_PCZ8.mjs → radar-DJdDzLJw.mjs} +1 -1
- package/dist/{raw-fetch-DSdFjojI.mjs → raw-fetch-BE3QgdTE.mjs} +1 -1
- package/dist/ready-Cok0aqke.mjs +4 -0
- package/dist/{realtime-X6uQsldp.mjs → realtime-BHWWCiKp.mjs} +10 -19
- package/dist/{registrar-BqZdUTss.mjs → registrar-9Y-1IQ0n.mjs} +1 -1
- package/dist/{registrar-sandbox-CmM3e1QN.mjs → registrar-sandbox-DTS1kRnb.mjs} +1 -1
- package/dist/{registry-D0tMkLv6.mjs → registry-Bm-GgDC3.mjs} +1 -1
- package/dist/{reporting-DFVz98Xg.mjs → reporting-D5RbKQJf.mjs} +1 -1
- package/dist/request-headers-KhW_hy36.mjs +2 -0
- package/dist/{request-tracers-BC1u2WDU.mjs → request-tracers-wxWCjmHo.mjs} +1 -1
- package/dist/{resource-sharing-CdEn5Iex.mjs → resource-sharing-BGoaVvJa.mjs} +5 -9
- package/dist/rolldown-runtime-BNtqjh-B.mjs +2 -0
- package/dist/{rules-B663VetJ.mjs → rules-Cd3EjhdF.mjs} +3 -5
- package/dist/{rulesets-p4EijVr6.mjs → rulesets-Bnz3rSBT.mjs} +4 -7
- package/dist/{rum-CHHXe4KK.mjs → rum-CK9HEe3O.mjs} +3 -5
- package/dist/run-Be6Js7D6.mjs +2 -0
- package/dist/run-DnZGQbq_.mjs +2 -0
- package/dist/sanitization-DkVWMHkc.mjs +2 -0
- package/dist/{schema-B38ojvsS.mjs → schema-DuLIZRhA.mjs} +1 -1
- package/dist/{schema-flags-z7yn0JZ_.mjs → schema-flags-BrDlFwLv.mjs} +1 -1
- package/dist/{scim-BMnUa4Oz.mjs → scim-UdqaWnOu.mjs} +3 -5
- package/dist/{secrets-store-EYrhEzVG.mjs → secrets-store-Bf5v96LC.mjs} +3 -5
- package/dist/{security-insights-C-AwDwXb.mjs → security-insights-BAGySlGu.mjs} +1 -1
- package/dist/{security-txt-CQMe8TD3.mjs → security-txt-D0fMmjHs.mjs} +2 -3
- package/dist/session-6xqrJWXy.mjs +2 -0
- package/dist/shared-DYRRG9A-.mjs +2 -0
- package/dist/signed-url-Ce0muRem.mjs +4 -0
- package/dist/{smart-shield-CHSuitaH.mjs → smart-shield-CCy7_M3j.mjs} +3 -5
- package/dist/{snippets-DGSBz4lg.mjs → snippets-Bc8m3HSV.mjs} +3 -5
- package/dist/spawn-BAEdy9kS.mjs +5 -0
- package/dist/{spectrum-59LhYG1t.mjs → spectrum-DtNX8WBX.mjs} +2 -3
- package/dist/{speed-CMCfoG3s.mjs → speed-TbkeWV_x.mjs} +3 -5
- package/dist/{sql-MxWaTDdj.mjs → sql-DI319y25.mjs} +1 -1
- package/dist/src-COwxoocl.mjs +2 -0
- package/dist/{src-J3Yss3VM.mjs → src-Dc6ojwUW.mjs} +5 -5
- package/dist/{ssl-DTTFZR9x.mjs → ssl-D0MIzFl2.mjs} +9 -17
- package/dist/startup-profile-CZYtQziF.mjs +2 -0
- package/dist/{startup-profile-bp348qmf.mjs → startup-profile-DlWrt4Fm.mjs} +5 -5
- package/dist/state-B3Uy1jPX.mjs +2 -0
- package/dist/{state-CqAtTENS.mjs → state-DazGSbRx.mjs} +1 -1
- package/dist/{stream-gVG_7si-.mjs → stream-4Mrb8HEo.mjs} +14 -27
- package/dist/tags-BP25qydR.mjs +22 -0
- package/dist/telemetry-CvZean4s.mjs +2 -0
- package/dist/telemetry-DKSJSLtq.mjs +2 -0
- package/dist/{tenant-custom-nameservers-DBmmUcxn.mjs → tenant-custom-nameservers-BzVP85Tq.mjs} +2 -3
- package/dist/{tenant-Qv_PC8gW.mjs → tenant-jmfZqEZ4.mjs} +1 -1
- package/dist/{tools-B1ajcUAF.mjs → tools-C-vmgYSv.mjs} +1 -1
- package/dist/{tunnels-CHNKPYRV.mjs → tunnels-BNswR1Dj.mjs} +4 -6
- package/dist/{turnstile-C60RxPo2.mjs → turnstile-BgsTP2fz.mjs} +2 -3
- package/dist/ui-Bo6DCvbS.mjs +2 -0
- package/dist/{update-check-BHarE3V9.mjs → update-check-BOF1hn_I.mjs} +1 -1
- package/dist/update-check-C7mfEeQ7.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-3t6Xpafi.mjs → url-normalization-Bqrs4-2F.mjs} +2 -3
- package/dist/{url-scanner-DNG__DiK.mjs → url-scanner-Dm4Fps5T.mjs} +1 -1
- package/dist/{user-B4i7OIFK.mjs → user-u_LxzLM4.mjs} +8 -15
- package/dist/{vectorize-y3PCQDDf.mjs → vectorize-DLGiOyd4.mjs} +3 -5
- package/dist/version-DmTuWNZ5.mjs +2 -0
- package/dist/{waiting-rooms-xkZLvPkT.mjs → waiting-rooms-DmgJgJXb.mjs} +4 -7
- package/dist/{web-assets-BlqHZywy.mjs → web-assets-rNhZWP-6.mjs} +7 -13
- package/dist/{web3-DGAJMcLv.mjs → web3-BVBdFt8E.mjs} +3 -5
- package/dist/{workers-cCNBx0Bc.mjs → workers-CjUKJvH8.mjs} +18 -22
- package/dist/{workers-builds-COKp3NfU.mjs → workers-builds-D3Q97l7X.mjs} +1 -1
- package/dist/{workers-for-platforms-CAtiWI_G.mjs → workers-for-platforms-C_fcw30y.mjs} +5 -9
- package/dist/{workers-vpc-ChBfXwPy.mjs → workers-vpc-CnRO3Stc.mjs} +2 -3
- package/dist/{workflows-BYhgJvyR.mjs → workflows-cpHFe5v6.mjs} +5 -9
- package/dist/{wrangler-migration-B12OR2bu.mjs → wrangler-migration-DQehjmoh.mjs} +74 -74
- package/dist/{zaraz-BW0kvRCK.mjs → zaraz-BRj0J7vK.mjs} +1 -1
- package/dist/{zero-trust-DSeWXkNV.mjs → zero-trust-CVZKDLCB.mjs} +75 -149
- package/dist/{zone-B-YJG2UA.mjs → zone-N6ccK70C.mjs} +1 -1
- package/dist/{zones-B8pqPHu8.mjs → zones-C4S_kpGz.mjs} +49 -52
- package/package.json +12 -12
- package/dist/auth-CdEGiJ5Y.mjs +0 -2
- package/dist/auth-DF_ml7rE.mjs +0 -2
- package/dist/build-BJHRK6qE.mjs +0 -2
- package/dist/build-D7s3a8zW.mjs +0 -2
- package/dist/cache-CDPUUv_O.mjs +0 -45
- package/dist/cf-3vj8dGYz.mjs +0 -18
- package/dist/chunk-DSGVRFIS-RUG6Dtqz.mjs +0 -2
- package/dist/containers-CcZHRM9g.mjs +0 -376
- package/dist/delegate-Tgfxa-MZ.mjs +0 -2
- package/dist/deploy-context-DIAl408H.mjs +0 -56
- package/dist/dialog-BnIgdgWi.mjs +0 -2
- package/dist/discover-DEjUARkU.mjs +0 -2
- package/dist/discover-P20XeGBF.mjs +0 -2
- package/dist/dist-CX6dDtzj.mjs +0 -449
- package/dist/dist-DAeCUX-u.mjs +0 -60
- package/dist/dls-CMTrCDjZ.mjs +0 -17
- package/dist/flagship-geGDHp9H.mjs +0 -28
- package/dist/init-C08hBFYn.mjs +0 -43
- package/dist/interactive-pjVqirHx.mjs +0 -2
- package/dist/kv-Cd8vbPWK.mjs +0 -15
- package/dist/local-CFZtOOxg.mjs +0 -2
- package/dist/log-CRbgNbDp.mjs +0 -3
- package/dist/login-C3Bahro9.mjs +0 -5
- package/dist/login-DvsRxI3E.mjs +0 -2
- package/dist/logo-matches-jeNkUxAq.mjs +0 -6
- package/dist/logos-pxN5aumY.mjs +0 -7
- package/dist/managed-defense-C_KLy4oB.mjs +0 -18
- package/dist/matches-DnjBnG-Y.mjs +0 -6
- package/dist/oauth-Cf3-g-kk.mjs +0 -4
- package/dist/output-CpiIVa7Q.mjs +0 -2
- package/dist/previews-oHUiD54J.mjs +0 -7
- package/dist/progress-B1dpmxCT.mjs +0 -2
- package/dist/prompt-Y5OBwDVE.mjs +0 -4
- package/dist/queries-CS0sYfte.mjs +0 -9
- package/dist/request-headers-Bg8_Idw3.mjs +0 -2
- package/dist/run-0EozpORq.mjs +0 -2
- package/dist/run-DKg70Sqf.mjs +0 -2
- package/dist/session-3DgztoAI.mjs +0 -2
- package/dist/shared-o8saqcSK.mjs +0 -2
- package/dist/source-AlTrHNem.mjs +0 -6
- package/dist/spawn-BZd__5sj.mjs +0 -10
- package/dist/startup-profile-DJsOtbVN.mjs +0 -2
- package/dist/state-Dvzl3aSj.mjs +0 -2
- package/dist/submit-wJYcQB8d.mjs +0 -4
- package/dist/tags-BwFKjaOr.mjs +0 -23
- package/dist/telemetry-BczXOpQn.mjs +0 -2
- package/dist/telemetry-CE15pfOU.mjs +0 -2
- package/dist/ui-CBhKUPys.mjs +0 -2
- package/dist/update-check-C3RhhXja.mjs +0 -2
- package/dist/url-info-By6VD20A.mjs +0 -4
- package/dist/version-izjB0Yrl.mjs +0 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h}from"./prompt-YrI7ltMa.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
|
|
3
|
+
|
|
4
|
+
Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:_,handler:async e=>l({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"repo-id":String(e[`repo-id`]??``),"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(g,{account_id:l,repo_id:e[`repo-id`],scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})},y={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/token`,errors:{404:`NotFoundError`}};function x(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create-token <repo-id>
|
|
5
|
+
|
|
6
|
+
Creates a one-hour write token for an existing upload repository. Worker-imported repositories are system-managed and cannot receive upload tokens.`).positional(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`create-token <repo-id>`,describe:`Create upload token`,builder:x,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories create-token`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories create-token`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/token`,pathParams:{"repo-id":String(e[`repo-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(b,{account_id:l,repo_id:e[`repo-id`]}));o(u,{successLabel:`Created`})})};function C(e){return e.usage("$0 managed-defense vulnerability-discovery repositories create\n\nCreates an upload repository or reserves an asynchronous deployed Worker import by name. Worker imports require Idempotency-Key. Push upload source to `main` or specify the `branch` to scan in the scan request.").option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`name`,{type:`string`,description:`The name field`}).option(`worker-script-name`,{type:`string`,description:`The worker_script_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create`,describe:`Create repository`,builder:C,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),worker_script_name:m(e[`worker-script-name`],`worker-script-name`,`text`)}):d(e.body)});return}let u=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`The name field`));let _={};e.name!==void 0&&f(_,[`name`],m(e.name,`name`,`text`)),e[`worker-script-name`]!==void 0&&f(_,[`worker_script_name`],m(e[`worker-script-name`],`worker-script-name`,`text`));let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var T={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}`,query:[`scan_limit`,`scan_cursor`],errors:{404:`NotFoundError`}};function E(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories get <repo-id>
|
|
7
|
+
|
|
8
|
+
Gets repository metadata, source readiness, and customer scan history.`).positional(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`scan-limit`,{type:`number`,description:`Scan limit`}).option(`scan-cursor`,{type:`string`,description:`Scan cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <repo-id>`,describe:`Get repository`,builder:E,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={scan_limit:e[`scan-limit`],scan_cursor:e[`scan-cursor`]};if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}`,pathParams:{"repo-id":String(e[`repo-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(T,{account_id:u,repo_id:e[`repo-id`],...n}));o(d,{successLabel:`Loaded`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos`,query:[`limit`,`cursor`],errors:{404:`NotFoundError`}};function k(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories list
|
|
9
|
+
|
|
10
|
+
Lists repositories available for vulnerability discovery in an account.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List repositories`,builder:k,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf managed-defense vulnerability-discovery repositories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(O,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},j={command:`repositories`,describe:`Operations for vulnerability-discovery.repositories`,builder:e=>e.command(w).command(S).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 managed-defense vulnerability-discovery scans create
|
|
11
|
+
|
|
12
|
+
Submits repository intent for operator review. This endpoint does not immediately start execution. Worker-imported repositories must be ready; explicit repository host scopes must be authorized and explicit branch selections must exist before the request is persisted.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`repos`,{type:`string`,description:`Repository names must be unique within a request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`telemetry-window-end`,{type:`string`,description:`The telemetry_window.end field`}).option(`telemetry-window-start`,{type:`string`,description:`The telemetry_window.start field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`telemetry-window-end`,`telemetry-window-start`].some(t=>e[t]!==void 0)){let t=[`telemetry-window-end`,`telemetry-window-start`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --telemetry_window-* flag is set`)}return!0})}const N={command:`create`,describe:`Create scan`,builder:M,handler:async e=>l({command:`managed-defense vulnerability-discovery scans create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({repos:u(e.repos,`repos`),telemetry_window:{end:m(e[`telemetry-window-end`],`telemetry-window-end`,`text`),start:m(e[`telemetry-window-start`],`telemetry-window-start`,`text`)}}):d(e.body)});return}let h=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/scans`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}if(e.repos===void 0)throw Error(`--repos is required (or pass --body with this field set).`);let _={};e.repos!==void 0&&f(_,[`repos`],u(e.repos,`repos`)),e[`telemetry-window-end`]!==void 0&&f(_,[`telemetry_window`,`end`],m(e[`telemetry-window-end`],`telemetry-window-end`,`text`)),e[`telemetry-window-start`]!==void 0&&f(_,[`telemetry_window`,`start`],m(e[`telemetry-window-start`],`telemetry-window-start`,`text`));let v=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/scans`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function F(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get-report <scan-id>
|
|
13
|
+
|
|
14
|
+
Gets the active operator-reviewed scan report. Repository metadata records report readiness even when no publication is available.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get-report <scan-id>`,describe:`Get reviewed vulnerability report`,builder:F,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get-report`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans get-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(P,{account_id:l,scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}`,errors:{404:`NotFoundError`}};function R(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get <scan-id>
|
|
15
|
+
|
|
16
|
+
Gets one customer-requested scan across its review and execution lifecycle.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <scan-id>`,describe:`Get scan`,builder:R,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(L,{account_id:l,scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans`,query:[`limit`,`cursor`,`status`,`repo`],errors:{404:`NotFoundError`}};function V(e){return e.usage(`$0 managed-defense vulnerability-discovery scans list
|
|
17
|
+
|
|
18
|
+
Lists customer-requested scans across review and execution lifecycle states.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`status`,{type:`string`,description:`Repeat parameter or provide comma-separated values.`}).option(`repo`,{type:`string`,description:`Repo`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List scans`,builder:V,handler:async e=>l({command:`managed-defense vulnerability-discovery scans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor,status:e.status,repo:e.repo};if(e.dryRun){let e=await i();s({command:`cf managed-defense vulnerability-discovery scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(B,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},U={command:`scans`,describe:`Operations for vulnerability-discovery.scans`,builder:e=>e.command(N).command(z).command(I).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},W={command:`vulnerability-discovery`,describe:`Operations for vulnerability-discovery`,builder:e=>e.command(y).command(j).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`managed-defense`,describe:`managed-defense`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BcNLQji1.mjs";import{i as n}from"./context-DVh8Wyfs.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-CtGsPOpV.mjs";import{t as o}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as s,n as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./prompt-YrI7ltMa.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
|
|
3
3
|
|
|
4
|
-
Disables all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const p={command:`delete`,describe:`Delete Managed Transforms`,builder:f,handler:async e=>o({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force})){
|
|
5
|
-
`);return}let c=await a(`Deleting`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/managed_headers`};function h(e){return e.usage(`$0 managed-transforms list
|
|
4
|
+
Disables all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const p={command:`delete`,describe:`Delete Managed Transforms`,builder:f,handler:async e=>o({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force}))return;let c=await a(`Deleting`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/managed_headers`};function h(e){return e.usage(`$0 managed-transforms list
|
|
6
5
|
|
|
7
6
|
Fetches a list of all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`List Managed Transforms`,builder:h,handler:async e=>o({command:`managed-transforms list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf managed-transforms list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var _={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/managed_headers`,body:`json`};function v(e){return e.usage(`$0 managed-transforms update
|
|
8
7
|
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-YrI7ltMa.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function _(e){return e.usage(`$0 mcp portals account-tool-call-analytics
|
|
3
3
|
|
|
4
4
|
Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:_,handler:async e=>c({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let e=await r();o({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,body:`json`,errors:{400:`BadRequestError`}};function b(e){return e.usage(`$0 mcp portals create
|
|
5
5
|
|
|
6
6
|
Creates a new MCP portal for managing AI tool access through Cloudflare Access.`).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).coerce(`code-mode`,e=>f(e,`code-mode`,`text`)).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`,default:!1}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create`,describe:`Create a new MCP Portal`,builder:b,handler:async e=>c({command:`mcp portals create`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}):u(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(y,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await p(`hostname`,`Hostname where the MCP portal is available.`)),e.id===void 0&&(e.id=await p(`id`,`Unique identifier for the MCP portal.`)),e.name===void 0&&(e.name=await p(`name`,`Display name for the MCP portal.`));let h=d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}),g=await s(`Creating`,async()=>c.send(y,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,errors:{404:`NotFoundError`}};function S(e){return e.usage(`$0 mcp portals delete <id>
|
|
7
7
|
|
|
8
|
-
Deletes an MCP portal from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <id>`,describe:`Delete an MCP Portal`,builder:S,handler:async e=>c({command:`mcp portals delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the MCP portal.`})){
|
|
9
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(ee,{account_id:l,id:e.id}));a(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,query:[`page`,`per_page`,`search`],errors:{400:`BadRequestError`}};function T(e){return e.usage(`$0 mcp portals list
|
|
8
|
+
Deletes an MCP portal from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <id>`,describe:`Delete an MCP Portal`,builder:S,handler:async e=>c({command:`mcp portals delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the MCP portal.`}))return;let u=await s(`Deleting`,async()=>c.send(ee,{account_id:l,id:e.id}));a(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,query:[`page`,`per_page`,`search`],errors:{400:`BadRequestError`}};function T(e){return e.usage(`$0 mcp portals list
|
|
10
9
|
|
|
11
10
|
Lists all MCP portals configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name, hostname`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List MCP Portals`,builder:T,handler:async e=>c({command:`mcp portals list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search};if(e.dryRun){let e=await r();o({command:`cf mcp portals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(w,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,errors:{404:`NotFoundError`}};function O(e){return e.usage(`$0 mcp portals read <id>
|
|
12
11
|
|
|
@@ -18,8 +17,7 @@ Updates an MCP portal configuration.`).positional(`id`,{type:`string`,descriptio
|
|
|
18
17
|
|
|
19
18
|
Creates a new MCP server for connecting to an upstream MCP endpoint.`).option(`auth-credentials`,{type:`string`,description:'Credential configuration for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`). For auth_type "oauth" with a pre-registered client, send a JSON-encoded object containing `auth_mode:"manual"`, `config.authorization_endpoint`, `config.token_endpoint`, and `registration_info.client_id`. Also provide `registration_info.redirect_uris` unless `is_shared_oauth_callback_enabled` is true. Optional fields include `config.issuer`, `config.revocation_endpoint`, `registration_info.scope`, and `registration_info.token_endpoint_auth_method`. Send the client secret in the separate `client_secret` field. Omit `auth_credentials` on update to preserve the existing configuration.'}).option(`auth-type`,{type:`string`,description:`Authentication method used to connect to the upstream MCP server.`,choices:[`oauth`,`bearer`,`unauthenticated`]}).coerce(`auth-type`,e=>f(e,`auth-type`,`text`)).option(`client-secret`,{type:`string`,description:`Pre-registered OAuth client_secret. Write-only - accepted on create/update when auth_credentials.auth_mode is 'manual'. Required when creating a manual OAuth server or converting an existing server to manual mode. Omit it on update to preserve the existing secret; provide it to rotate the secret. Stored AES-GCM-encrypted in server_oauth_secrets; never returned by read endpoints.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`hostname`,{type:`string`,description:`URL of the upstream MCP endpoint.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, the gateway worker uses the shared Cloudflare-owned OAuth callback endpoint as the redirect_uri for upstream on-behalf OAuth, instead of the customer portal hostname. Defaults to false (off); opt in per server by setting true.`,default:!1}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`,default:!1}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`create`,describe:`Create a new MCP Server`,builder:te,handler:async e=>c({command:`mcp servers create`,classification:{safeFlags:[`auth-type`,`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),auth_type:e[`auth-type`],client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}):u(e.body),sensitiveBodyPaths:[[`auth_credentials`],[`client_secret`]]});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(L,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}e[`auth-type`]===void 0&&(e[`auth-type`]=await m(`auth-type`,`Authentication method used to connect to the upstream MCP server.`,[`oauth`,`bearer`,`unauthenticated`])),e.hostname===void 0&&(e.hostname=await p(`hostname`,`URL of the upstream MCP endpoint.`)),e.id===void 0&&(e.id=await p(`id`,`Unique identifier for the MCP server.`)),e.name===void 0&&(e.name=await p(`name`,`Display name for the MCP server.`));let g=d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),auth_type:e[`auth-type`],client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}),_=await s(`Creating`,async()=>c.send(L,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var z={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,errors:{404:`NotFoundError`}};function B(e){return e.usage(`$0 mcp servers delete <id>
|
|
20
19
|
|
|
21
|
-
Deletes an MCP server from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <id>`,describe:`Delete an MCP Server`,builder:B,handler:async e=>c({command:`mcp servers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the MCP server, removes it from every portal, and deletes its stored OAuth secrets.`})){
|
|
22
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(z,{account_id:l,id:e.id}));a(u,{successLabel:`Deleted`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers`,query:[`page`,`per_page`,`search`],errors:{400:`BadRequestError`}};function U(e){return e.usage(`$0 mcp servers list
|
|
20
|
+
Deletes an MCP server from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <id>`,describe:`Delete an MCP Server`,builder:B,handler:async e=>c({command:`mcp servers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the MCP server, removes it from every portal, and deletes its stored OAuth secrets.`}))return;let u=await s(`Deleting`,async()=>c.send(z,{account_id:l,id:e.id}));a(u,{successLabel:`Deleted`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers`,query:[`page`,`per_page`,`search`],errors:{400:`BadRequestError`}};function U(e){return e.usage(`$0 mcp servers list
|
|
23
21
|
|
|
24
22
|
Lists all MCP servers configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List MCP Servers`,builder:U,handler:async e=>c({command:`mcp servers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search};if(e.dryRun){let e=await r();o({command:`cf mcp servers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(H,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,errors:{404:`NotFoundError`}};function K(e){return e.usage(`$0 mcp servers read <id>
|
|
25
23
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{i as n,n as r}from"./auth-BcNLQji1.mjs";import{a as i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-YrI7ltMa.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`};function y(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
|
|
3
3
|
|
|
4
4
|
Gets the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <tunnel-id>`,describe:`Get Mesh node HA configuration`,builder:y,handler:async e=>l({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(v,{account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Loaded`})})};var x={method:`PUT`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`,body:`json`};function S(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
|
|
5
5
|
|
|
@@ -11,13 +11,11 @@ Fetches connector and connection details for a Mesh node.`).positional(`connecto
|
|
|
11
11
|
|
|
12
12
|
Creates a new Mesh node in an account.`).option(`ha`,{type:`boolean`,description:`Indicates that the tunnel will be created to be highly available. If omitted, defaults to false.`,default:!1}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`create`,describe:`Create a Mesh node`,builder:M,handler:async e=>l({command:`mesh nodes create`,classification:{safeFlags:[`ha`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({ha:e.ha,name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(j,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`A user-friendly name for a tunnel.`));let u=p({ha:e.ha,name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(j,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};function P(e){return e.usage(`$0 mesh nodes delete <node-id>
|
|
13
13
|
|
|
14
|
-
Deletes a Mesh node from an account.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const F={command:`delete <node-id>`,describe:`Delete a Mesh node`,builder:P,handler:async e=>l({command:`mesh nodes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation permanently deletes a Mesh node.`})){
|
|
15
|
-
`);return}let d=await c(`Deleting`,async()=>n(l,`DELETE`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 mesh nodes edit <node-id>
|
|
14
|
+
Deletes a Mesh node from an account.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const F={command:`delete <node-id>`,describe:`Delete a Mesh node`,builder:P,handler:async e=>l({command:`mesh nodes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation permanently deletes a Mesh node.`}))return;let d=await c(`Deleting`,async()=>n(l,`DELETE`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 mesh nodes edit <node-id>
|
|
16
15
|
|
|
17
16
|
Updates an existing Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`edit <node-id>`,describe:`Update a Mesh node`,builder:I,handler:async e=>l({command:`mesh nodes edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),tunnel_secret:m(e[`tunnel-secret`],`tunnel-secret`,`text`)}):d(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:t}));o(r,{successLabel:`Updated`});return}let h={};e.name!==void 0&&f(h,[`name`],m(e.name,`name`,`text`)),e[`tunnel-secret`]!==void 0&&f(h,[`tunnel_secret`],m(e[`tunnel-secret`],`tunnel-secret`,`text`));let g=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:h}));o(g,{successLabel:`Updated`})})};function R(e){return e.usage(`$0 mesh nodes failover <node-id>
|
|
18
17
|
|
|
19
|
-
Triggers a manual failover for a specific Mesh node, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`failover <node-id>`,describe:`Trigger a manual failover for a Mesh node`,builder:R,handler:async e=>l({command:`mesh nodes failover`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes failover`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/failover`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({client_id:m(e[`connector-id`],`connector-id`,`text`)}):d(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation triggers a manual failover, changing the active connector for a Mesh node.`})){
|
|
20
|
-
`);return}if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:t}));o(r,{successLabel:`Deleted`});return}e[`connector-id`]===void 0&&(e[`connector-id`]=await h(`connector-id`,`UUID of the Cloudflare Tunnel connector.`));let g={};e[`connector-id`]!==void 0&&f(g,[`client_id`],m(e[`connector-id`],`connector-id`,`text`));let v=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:g}));o(v,{successLabel:`Deleted`})})};function B(e){return e.usage(`$0 mesh nodes get <node-id>
|
|
18
|
+
Triggers a manual failover for a specific Mesh node, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`failover <node-id>`,describe:`Trigger a manual failover for a Mesh node`,builder:R,handler:async e=>l({command:`mesh nodes failover`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes failover`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/failover`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({client_id:m(e[`connector-id`],`connector-id`,`text`)}):d(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation triggers a manual failover, changing the active connector for a Mesh node.`}))return;if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:t}));o(r,{successLabel:`Deleted`});return}e[`connector-id`]===void 0&&(e[`connector-id`]=await h(`connector-id`,`UUID of the Cloudflare Tunnel connector.`));let g={};e[`connector-id`]!==void 0&&f(g,[`client_id`],m(e[`connector-id`],`connector-id`,`text`));let v=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:g}));o(v,{successLabel:`Deleted`})})};function B(e){return e.usage(`$0 mesh nodes get <node-id>
|
|
21
19
|
|
|
22
20
|
Fetches a single Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <node-id>`,describe:`Get a Mesh node`,builder:B,handler:async e=>l({command:`mesh nodes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector`,query:[`name`,`is_deleted`,`existed_at`,`uuid`,`was_active_at`,`was_inactive_at`,`include_prefix`,`exclude_prefix`,`status`,`per_page`,`page`]};function U(e){return e.usage(`$0 mesh nodes list
|
|
23
21
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-Bo6DCvbS.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-DQehjmoh.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.error(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,i,t as a}from"./context-DVh8Wyfs.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-CtGsPOpV.mjs";import{t as l}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{a as u,n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{n as m}from"./prompt-YrI7ltMa.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,body:`json`,constants:{acceptedTermsOfService:!0}};function g(e){return e.usage(`$0 monetization account-eligibility check
|
|
3
3
|
|
|
4
4
|
Checks the account or zone for Monetization Gateway eligibility and returns its pending, approved, or rejected decision.`).option(`accepted-terms-of-service`,{type:`boolean`,description:`Confirms acceptance of the Monetization Gateway terms of service.`}).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:`check`,describe:`Check account or zone monetization eligibility`,builder:g,handler:async e=>l({command:`monetization account-eligibility check`,classification:{safeFlags:[`accepted-terms-of-service`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf monetization account-eligibility check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/monetization`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({acceptedTermsOfService:e[`accepted-terms-of-service`]}):d(e.body)});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,p=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=p:e.accountId=p,e.body){let t=d(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:u,account_or_zone_id:p}));o(n,{successLabel:`Created`});return}if(e[`accepted-terms-of-service`]===void 0)throw Error(`--accepted-terms-of-service is required (or pass --body with this field set).`);let m=f({acceptedTermsOfService:e[`accepted-terms-of-service`]}),g=await c(`Creating`,async()=>l.send(h,{body:m,account_or_zone:u,account_or_zone_id:p}));o(g,{successLabel:`Created`})})};var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,errors:{404:`NotFoundError`}};function y(e){return e.usage(`$0 monetization account-eligibility get
|
|
5
5
|
|
|
6
6
|
Returns the account or zone's latest stored monetization eligibility result.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Get account or zone monetization eligibility`,builder:y,handler:async e=>l({command:`monetization account-eligibility get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf monetization account-eligibility get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/monetization`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(v,{account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Loaded`})})},x={command:`account-eligibility`,describe:`Operations for account-eligibility`,builder:e=>e.command(_).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/monetization/rules`};function C(e){return e.usage(`$0 monetization rules delete-all
|
|
7
7
|
|
|
8
|
-
Removes every Payment Required rule from the zone. Any rules the service does not own are preserved. Deleting a zone with no payment rules is a no-op. Returns the resulting (empty) rule collection.`).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 w={command:`delete-all`,describe:`Delete all payment rules`,builder:C,handler:async e=>l({command:`monetization rules delete-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules delete-all`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await m({force:!!e.force,message:`This operation deletes every Monetization Gateway rule for the zone.`})){
|
|
9
|
-
`);return}let a=await c(`Deleting`,async()=>t.send(S,{zone_id:r}));o(a,{successLabel:`Deleted`})})};var T={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/monetization/rules/${t.rule_id}`,errors:{404:`NotFoundError`}};function E(e){return e.usage(`$0 monetization rules delete <rule-id>
|
|
8
|
+
Removes every Payment Required rule from the zone. Any rules the service does not own are preserved. Deleting a zone with no payment rules is a no-op. Returns the resulting (empty) rule collection.`).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 w={command:`delete-all`,describe:`Delete all payment rules`,builder:C,handler:async e=>l({command:`monetization rules delete-all`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules delete-all`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await m({force:!!e.force,message:`This operation deletes every Monetization Gateway rule for the zone.`}))return;let a=await c(`Deleting`,async()=>t.send(S,{zone_id:r}));o(a,{successLabel:`Deleted`})})};var T={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/monetization/rules/${t.rule_id}`,errors:{404:`NotFoundError`}};function E(e){return e.usage(`$0 monetization rules delete <rule-id>
|
|
10
9
|
|
|
11
|
-
Removes a single Payment Required rule identified by its ID. Every other rule is preserved. Returns the resulting rule collection.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the payment rule.`,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 <rule-id>`,describe:`Delete a payment rule`,builder:E,handler:async e=>l({command:`monetization rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await m({force:!!e.force,message:`This operation deletes the selected Monetization Gateway rule.`})){
|
|
12
|
-
`);return}let a=await c(`Deleting`,async()=>t.send(T,{zone_id:r,rule_id:e[`rule-id`]}));o(a,{successLabel:`Deleted`})})};var O={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/monetization/rules/${t.rule_id}`,body:`json`,errors:{403:`ForbiddenError`,404:`NotFoundError`}};function k(e){return e.usage(`$0 monetization rules edit <rule-id>
|
|
10
|
+
Removes a single Payment Required rule identified by its ID. Every other rule is preserved. Returns the resulting rule collection.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the payment rule.`,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 <rule-id>`,describe:`Delete a payment rule`,builder:E,handler:async e=>l({command:`monetization rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await m({force:!!e.force,message:`This operation deletes the selected Monetization Gateway rule.`}))return;let a=await c(`Deleting`,async()=>t.send(T,{zone_id:r,rule_id:e[`rule-id`]}));o(a,{successLabel:`Deleted`})})};var O={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/monetization/rules/${t.rule_id}`,body:`json`,errors:{403:`ForbiddenError`,404:`NotFoundError`}};function k(e){return e.usage(`$0 monetization rules edit <rule-id>
|
|
13
11
|
|
|
14
12
|
Applies a partial update to a single Payment Required rule. Only the fields present in the request body are changed; omitted fields keep their current values. Returns the full resulting rule collection.`).positional(`rule-id`,{type:`string`,description:`The unique ID of the payment rule.`,demandOption:!0}).option(`address`,{type:`string`,description:`0x-prefixed 20-byte hexadecimal Ethereum address. Mixed-case addresses must carry a valid EIP-55 checksum; all-lowercase or all-uppercase addresses are also accepted. The effective address must pass wallet screening whenever the rule is patched.`}).option(`description`,{type:`string`,description:`The description field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`expression`,{type:`string`,description:`Wirefilter expression identifying the requests that require payment. Forwarded verbatim to the Rulesets API, which validates its syntax.`}).option(`price`,{type:`string`,description:`Price in the smallest indivisible unit of the configured payment token, encoded as a decimal string. Must be a canonical decimal integer in [1000, 100000000]: no leading zeros, and a bare JSON number is rejected. The price is required for the fixed-price schemes ("exact" and "upto") and must be at least 1000, the smallest amount the payment facilitator can settle ($0.001 for a 6-decimal token such as USDC), and at most 100000000 ($100 for a 6-decimal token). When the scheme is "origin_controlled" the origin server sets pricing dynamically and the rule carries no price: the field must be omitted — any provided value, including "0", is rejected because it would not be enforced. Responses always encode this as a string and omit it for "origin_controlled" rules; the pattern matches exactly the set of values the server accepts.`}).option(`scheme`,{type:`string`,description:`X402 payment scheme. "exact" requires the specified payment amount; "upto" permits a payment up to the specified amount; "origin_controlled" lets the origin server set pricing dynamically, in which case the rule carries no price and the price field must be omitted.`,choices:[`exact`,`upto`,`origin_controlled`]}).coerce(`scheme`,e=>p(e,`scheme`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Partial update to a single payment rule. Only the fields present are modified; omitted fields keep their existing values.`})}const A={command:`edit <rule-id>`,describe:`Update a payment rule`,builder:k,handler:async e=>l({command:`monetization rules edit`,classification:{safeFlags:[`enabled`,`scheme`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf monetization rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/monetization/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({address:p(e.address,`address`,`text`),description:p(e.description,`description`,`text`),enabled:e.enabled,expression:p(e.expression,`expression`,`text`),price:p(e.price,`price`,`text`),scheme:e.scheme}):d(e.body)});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=d(e.body),i=await c(`Updating`,async()=>t.send(O,{body:n,zone_id:r,rule_id:e[`rule-id`]}));o(i,{successLabel:`Updated`});return}let a=f({address:p(e.address,`address`,`text`),description:p(e.description,`description`,`text`),enabled:e.enabled,expression:p(e.expression,`expression`,`text`),price:p(e.price,`price`,`text`),scheme:e.scheme}),l=await c(`Updating`,async()=>t.send(O,{body:a,zone_id:r,rule_id:e[`rule-id`]}));o(l,{successLabel:`Updated`})})};var j={method:`GET`,path:t=>e`/zones/${t.zone_id}/monetization/rules/${t.rule_id}`,errors:{404:`NotFoundError`}};function M(e){return e.usage(`$0 monetization rules get <rule-id>
|
|
15
13
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-YrI7ltMa.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/teamnet/routes`,body:`json`};function h(e){return e.usage(`$0 network routes cidr create
|
|
3
3
|
|
|
4
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 g={command:`create`,describe:`Create a tunnel route`,builder:h,handler:async e=>c({command:`network routes cidr create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes cidr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),network:d(e.network,`network`,`text`),virtual_network_id:d(e[`virtual-network-id`],`virtual-network-id`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.network===void 0&&(e.network=await f(`network`,`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`));let h=u({comment:d(e.comment,`comment`,`text`),network:d(e.network,`network`,`text`),virtual_network_id:d(e[`virtual-network-id`],`virtual-network-id`,`text`)}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p}));a(g,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/teamnet/routes/${t.route_id}`};function v(e){return e.usage(`$0 network routes cidr delete <route-id>
|
|
5
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 y={command:`delete <route-id>`,describe:`Delete a tunnel route`,builder:v,handler:async e=>c({command:`network routes cidr delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes cidr delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation permanently deletes a private network route.`})){
|
|
7
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,route_id:e[`route-id`]}));a(u,{successLabel:`Deleted`})})};var b={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/teamnet/routes/${t.route_id}`,body:`json`};function ee(e){return e.usage(`$0 network routes cidr edit <route-id>
|
|
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 y={command:`delete <route-id>`,describe:`Delete a tunnel route`,builder:v,handler:async e=>c({command:`network routes cidr delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes cidr delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation permanently deletes a private network route.`}))return;let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,route_id:e[`route-id`]}));a(u,{successLabel:`Deleted`})})};var b={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/teamnet/routes/${t.route_id}`,body:`json`};function ee(e){return e.usage(`$0 network routes cidr edit <route-id>
|
|
8
7
|
|
|
9
8
|
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 te={command:`edit <route-id>`,describe:`Update a tunnel route`,builder:ee,handler:async e=>c({command:`network routes cidr edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes cidr edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/routes/${e[`route-id`]==null?`<route-id>`:encodeURIComponent(String(e[`route-id`]))}`,pathParams:{"route-id":String(e[`route-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),network:d(e.network,`network`,`text`),virtual_network_id:d(e[`virtual-network-id`],`virtual-network-id`,`text`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(b,{body:t,account_id:f,route_id:e[`route-id`]}));a(n,{successLabel:`Updated`});return}let p=u({comment:d(e.comment,`comment`,`text`),network:d(e.network,`network`,`text`),virtual_network_id:d(e[`virtual-network-id`],`virtual-network-id`,`text`)}),m=await s(`Updating`,async()=>c.send(b,{body:p,account_id:f,route_id:e[`route-id`]}));a(m,{successLabel:`Updated`})})};var ne={method:`GET`,path:t=>e`/accounts/${t.account_id}/teamnet/routes/${t.route_id}`};function re(e){return e.usage(`$0 network routes cidr get <route-id>
|
|
10
9
|
|
|
@@ -14,8 +13,7 @@ Lists and filters private network routes in an account.`).option(`comment`,{type
|
|
|
14
13
|
|
|
15
14
|
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 e=>c({command:`network routes hostname create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes hostname create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/routes/hostname`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),hostname:d(e.hostname,`hostname`,`text`),tunnel_id:d(e[`tunnel-id`],`tunnel-id`,`text`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(C,{body:t,account_id:f}));a(n,{successLabel:`Created`});return}let p=u({comment:d(e.comment,`comment`,`text`),hostname:d(e.hostname,`hostname`,`text`),tunnel_id:d(e[`tunnel-id`],`tunnel-id`,`text`)}),m=await s(`Creating`,async()=>c.send(C,{body:p,account_id:f}));a(m,{successLabel:`Created`})})};var E={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/zerotrust/routes/hostname/${t.hostname_route_id}`};function D(e){return e.usage(`$0 network routes hostname delete <hostname-route-id>
|
|
16
15
|
|
|
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 O={command:`delete <hostname-route-id>`,describe:`Delete hostname route`,builder:D,handler:async e=>c({command:`network routes hostname delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes hostname delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/routes/hostname/${e[`hostname-route-id`]==null?`<hostname-route-id>`:encodeURIComponent(String(e[`hostname-route-id`]))}`,pathParams:{"hostname-route-id":String(e[`hostname-route-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation permanently deletes a hostname route.`})){
|
|
18
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(E,{account_id:l,hostname_route_id:e[`hostname-route-id`]}));a(u,{successLabel:`Deleted`})})};var k={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/zerotrust/routes/hostname/${t.hostname_route_id}`,body:`json`};function A(e){return e.usage(`$0 network routes hostname edit <hostname-route-id>
|
|
16
|
+
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 O={command:`delete <hostname-route-id>`,describe:`Delete hostname route`,builder:D,handler:async e=>c({command:`network routes hostname delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes hostname delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/routes/hostname/${e[`hostname-route-id`]==null?`<hostname-route-id>`:encodeURIComponent(String(e[`hostname-route-id`]))}`,pathParams:{"hostname-route-id":String(e[`hostname-route-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation permanently deletes a hostname route.`}))return;let u=await s(`Deleting`,async()=>c.send(E,{account_id:l,hostname_route_id:e[`hostname-route-id`]}));a(u,{successLabel:`Deleted`})})};var k={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/zerotrust/routes/hostname/${t.hostname_route_id}`,body:`json`};function A(e){return e.usage(`$0 network routes hostname edit <hostname-route-id>
|
|
19
17
|
|
|
20
18
|
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 j={command:`edit <hostname-route-id>`,describe:`Update hostname route`,builder:A,handler:async e=>c({command:`network routes hostname edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes hostname edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/routes/hostname/${e[`hostname-route-id`]==null?`<hostname-route-id>`:encodeURIComponent(String(e[`hostname-route-id`]))}`,pathParams:{"hostname-route-id":String(e[`hostname-route-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),hostname:d(e.hostname,`hostname`,`text`),tunnel_id:d(e[`tunnel-id`],`tunnel-id`,`text`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(k,{body:t,account_id:f,hostname_route_id:e[`hostname-route-id`]}));a(n,{successLabel:`Updated`});return}let p=u({comment:d(e.comment,`comment`,`text`),hostname:d(e.hostname,`hostname`,`text`),tunnel_id:d(e[`tunnel-id`],`tunnel-id`,`text`)}),m=await s(`Updating`,async()=>c.send(k,{body:p,account_id:f,hostname_route_id:e[`hostname-route-id`]}));a(m,{successLabel:`Updated`})})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/zerotrust/routes/hostname/${t.hostname_route_id}`};function N(e){return e.usage(`$0 network routes hostname get <hostname-route-id>
|
|
21
19
|
|
|
@@ -35,15 +33,13 @@ Returns the account's default Initial Resolved IP Subnet for the given address f
|
|
|
35
33
|
|
|
36
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 _e={command:`list`,describe:`List Subnets`,builder:ge,handler:async e=>c({command:`network subnets list`,classification:{safeFlags:[`address-family`,`is-default-network`,`is-deleted`,`sort-order`,`subnet-types`,`dry-run`]}},e,async()=>{let c={name:e.name,comment:e.comment,network:e.network,existed_at:e[`existed-at`],address_family:e[`address-family`],is_default_network:e[`is-default-network`],is_deleted:e[`is-deleted`],sort_order:e[`sort-order`],subnet_types:e[`subnet-types`],per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await r();o({command:`cf network subnets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/zerotrust/subnets`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(he,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/zerotrust/subnets/warp`,body:`json`};function ve(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 ye={command:`create`,describe:`Create WARP IP subnet`,builder:ve,handler:async e=>c({command:`network subnets warp create`,classification:{safeFlags:[`is-default-network`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network subnets warp create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/subnets/warp`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),is_default_network:e[`is-default-network`],name:d(e.name,`name`,`text`),network:d(e.network,`network`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Y,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`A user-friendly name for the subnet.`)),e.network===void 0&&(e.network=await f(`network`,`The private IPv4 or IPv6 range defining the subnet, in CIDR notation.`));let m=u({comment:d(e.comment,`comment`,`text`),is_default_network:e[`is-default-network`],name:d(e.name,`name`,`text`),network:d(e.network,`network`,`text`)}),h=await s(`Creating`,async()=>c.send(Y,{body:m,account_id:p}));a(h,{successLabel:`Created`})})};var be={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/zerotrust/subnets/warp/${t.subnet_id}`};function xe(e){return e.usage(`$0 network subnets warp delete <subnet-id>
|
|
37
35
|
|
|
38
|
-
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 Se={command:`delete <subnet-id>`,describe:`Delete WARP IP subnet`,builder:xe,handler:async e=>c({command:`network subnets warp delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network subnets warp delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/subnets/warp/${e[`subnet-id`]==null?`<subnet-id>`:encodeURIComponent(String(e[`subnet-id`]))}`,pathParams:{"subnet-id":String(e[`subnet-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation permanently deletes a WARP IP subnet.`})){
|
|
39
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(be,{account_id:l,subnet_id:e[`subnet-id`]}));a(u,{successLabel:`Deleted`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/zerotrust/subnets/warp/${t.subnet_id}`,body:`json`};function Ce(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 we={command:`edit <subnet-id>`,describe:`Update WARP IP subnet`,builder:Ce,handler:async e=>c({command:`network subnets warp edit`,classification:{safeFlags:[`is-default-network`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network subnets warp edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/subnets/warp/${e[`subnet-id`]==null?`<subnet-id>`:encodeURIComponent(String(e[`subnet-id`]))}`,pathParams:{"subnet-id":String(e[`subnet-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),is_default_network:e[`is-default-network`],name:d(e.name,`name`,`text`),network:d(e.network,`network`,`text`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(X,{body:t,account_id:f,subnet_id:e[`subnet-id`]}));a(n,{successLabel:`Updated`});return}let p=u({comment:d(e.comment,`comment`,`text`),is_default_network:e[`is-default-network`],name:d(e.name,`name`,`text`),network:d(e.network,`network`,`text`)}),m=await s(`Updating`,async()=>c.send(X,{body:p,account_id:f,subnet_id:e[`subnet-id`]}));a(m,{successLabel:`Updated`})})};var Te={method:`GET`,path:t=>e`/accounts/${t.account_id}/zerotrust/subnets/warp/${t.subnet_id}`};function Ee(e){return e.usage(`$0 network subnets warp get <subnet-id>
|
|
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 Se={command:`delete <subnet-id>`,describe:`Delete WARP IP subnet`,builder:xe,handler:async e=>c({command:`network subnets warp delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network subnets warp delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/subnets/warp/${e[`subnet-id`]==null?`<subnet-id>`:encodeURIComponent(String(e[`subnet-id`]))}`,pathParams:{"subnet-id":String(e[`subnet-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation permanently deletes a WARP IP subnet.`}))return;let u=await s(`Deleting`,async()=>c.send(be,{account_id:l,subnet_id:e[`subnet-id`]}));a(u,{successLabel:`Deleted`})})};var X={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/zerotrust/subnets/warp/${t.subnet_id}`,body:`json`};function Ce(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 we={command:`edit <subnet-id>`,describe:`Update WARP IP subnet`,builder:Ce,handler:async e=>c({command:`network subnets warp edit`,classification:{safeFlags:[`is-default-network`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network subnets warp edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/subnets/warp/${e[`subnet-id`]==null?`<subnet-id>`:encodeURIComponent(String(e[`subnet-id`]))}`,pathParams:{"subnet-id":String(e[`subnet-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),is_default_network:e[`is-default-network`],name:d(e.name,`name`,`text`),network:d(e.network,`network`,`text`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(X,{body:t,account_id:f,subnet_id:e[`subnet-id`]}));a(n,{successLabel:`Updated`});return}let p=u({comment:d(e.comment,`comment`,`text`),is_default_network:e[`is-default-network`],name:d(e.name,`name`,`text`),network:d(e.network,`network`,`text`)}),m=await s(`Updating`,async()=>c.send(X,{body:p,account_id:f,subnet_id:e[`subnet-id`]}));a(m,{successLabel:`Updated`})})};var Te={method:`GET`,path:t=>e`/accounts/${t.account_id}/zerotrust/subnets/warp/${t.subnet_id}`};function Ee(e){return e.usage(`$0 network subnets warp get <subnet-id>
|
|
40
37
|
|
|
41
38
|
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 De={command:`get <subnet-id>`,describe:`Get WARP IP subnet`,builder:Ee,handler:async e=>c({command:`network subnets warp get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network subnets warp get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/zerotrust/subnets/warp/${e[`subnet-id`]==null?`<subnet-id>`:encodeURIComponent(String(e[`subnet-id`]))}`,pathParams:{"subnet-id":String(e[`subnet-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Te,{account_id:l,subnet_id:e[`subnet-id`]}));a(u,{successLabel:`Loaded`})})},Oe={command:`warp`,describe:`Operations for subnets.warp`,builder:e=>e.command(ye).command(Se).command(we).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ke={command:`subnets`,describe:`Operations for subnets`,builder:e=>e.command(_e).command(ce).command(me).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/teamnet/virtual_networks`,body:`json`};function Ae(e){return e.usage(`$0 network virtual-networks create
|
|
42
39
|
|
|
43
40
|
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 je={command:`create`,describe:`Create a virtual network`,builder:Ae,handler:async e=>c({command:`network virtual-networks create`,classification:{safeFlags:[`is-default`,`is-default-network`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network virtual-networks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/virtual_networks`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),is_default:e[`is-default`],is_default_network:e[`is-default-network`],name:d(e.name,`name`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Z,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`A user-friendly name for the virtual network.`));let m=u({comment:d(e.comment,`comment`,`text`),is_default:e[`is-default`],is_default_network:e[`is-default-network`],name:d(e.name,`name`,`text`)}),h=await s(`Creating`,async()=>c.send(Z,{body:m,account_id:p}));a(h,{successLabel:`Created`})})};var Me={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/teamnet/virtual_networks/${t.virtual_network_id}`};function Ne(e){return e.usage(`$0 network virtual-networks delete <virtual-network-id>
|
|
44
41
|
|
|
45
|
-
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 Pe={command:`delete <virtual-network-id>`,describe:`Delete a virtual network`,builder:Ne,handler:async e=>c({command:`network virtual-networks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network virtual-networks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/virtual_networks/${e[`virtual-network-id`]==null?`<virtual-network-id>`:encodeURIComponent(String(e[`virtual-network-id`]))}`,pathParams:{"virtual-network-id":String(e[`virtual-network-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation permanently deletes a virtual network.`})){
|
|
46
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(Me,{account_id:l,virtual_network_id:e[`virtual-network-id`]}));a(u,{successLabel:`Deleted`})})};var Q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/teamnet/virtual_networks/${t.virtual_network_id}`,body:`json`};function $(e){return e.usage(`$0 network virtual-networks edit <virtual-network-id>
|
|
42
|
+
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 Pe={command:`delete <virtual-network-id>`,describe:`Delete a virtual network`,builder:Ne,handler:async e=>c({command:`network virtual-networks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network virtual-networks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/virtual_networks/${e[`virtual-network-id`]==null?`<virtual-network-id>`:encodeURIComponent(String(e[`virtual-network-id`]))}`,pathParams:{"virtual-network-id":String(e[`virtual-network-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation permanently deletes a virtual network.`}))return;let u=await s(`Deleting`,async()=>c.send(Me,{account_id:l,virtual_network_id:e[`virtual-network-id`]}));a(u,{successLabel:`Deleted`})})};var Q={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/teamnet/virtual_networks/${t.virtual_network_id}`,body:`json`};function $(e){return e.usage(`$0 network virtual-networks edit <virtual-network-id>
|
|
47
43
|
|
|
48
44
|
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 Fe={command:`edit <virtual-network-id>`,describe:`Update a virtual network`,builder:$,handler:async e=>c({command:`network virtual-networks edit`,classification:{safeFlags:[`is-default-network`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network virtual-networks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/virtual_networks/${e[`virtual-network-id`]==null?`<virtual-network-id>`:encodeURIComponent(String(e[`virtual-network-id`]))}`,pathParams:{"virtual-network-id":String(e[`virtual-network-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),is_default_network:e[`is-default-network`],name:d(e.name,`name`,`text`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(Q,{body:t,account_id:f,virtual_network_id:e[`virtual-network-id`]}));a(n,{successLabel:`Updated`});return}let p=u({comment:d(e.comment,`comment`,`text`),is_default_network:e[`is-default-network`],name:d(e.name,`name`,`text`)}),m=await s(`Updating`,async()=>c.send(Q,{body:p,account_id:f,virtual_network_id:e[`virtual-network-id`]}));a(m,{successLabel:`Updated`})})};var Ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/teamnet/virtual_networks/${t.virtual_network_id}`};function Le(e){return e.usage(`$0 network virtual-networks get <virtual-network-id>
|
|
49
45
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CSH3UMpD.mjs";import{n}from"./auth-BcNLQji1.mjs";import{a as r,t as i}from"./context-DVh8Wyfs.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-CtGsPOpV.mjs";import{t as c}from"./run-DnZGQbq_.mjs";import"./telemetry-CvZean4s.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-YrI7ltMa.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/cni/cnis`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,500:`InternalServerError`}};function h(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
|
|
5
5
|
Prefixes containing host bits will be normalized to contain network bits only.
|
|
@@ -20,8 +20,7 @@ In other words, MD5 keys may contain any printable ASCII character aside from ne
|
|
|
20
20
|
form feed (0x0C), and the question mark (\`?\`). Requests specifying an MD5 key with one
|
|
21
21
|
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 g={command:`create`,describe:`Create a new CNI object`,builder:h,handler:async e=>c({command:`network-interconnects cnis create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects cnis create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/cnis`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({account:d(e.account,`account`,`text`),bgp:{customer_asn:e[`bgp-customer-asn`],extra_prefixes:e[`bgp-extra-prefixes`],md5_key:d(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},interconnect:d(e.interconnect,`interconnect`,`text`),magic:{conduit_name:d(e[`magic-conduit-name`],`magic-conduit-name`,`text`),description:d(e[`magic-description`],`magic-description`,`text`),mtu:e[`magic-mtu`]}}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}if(e.account===void 0&&(e.account=await f(`account`,`Customer account tag`)),e.interconnect===void 0&&(e.interconnect=await f(`interconnect`,`The interconnect field`)),e[`magic-conduit-name`]===void 0&&(e[`magic-conduit-name`]=await f(`magic-conduit-name`,`The magic.conduit_name field`)),e[`magic-description`]===void 0&&(e[`magic-description`]=await f(`magic-description`,`The magic.description field`)),e[`magic-mtu`]===void 0)throw Error(`--magic-mtu is required (or pass --body with this field set).`);let h=u({account:d(e.account,`account`,`text`),bgp:{customer_asn:e[`bgp-customer-asn`],extra_prefixes:e[`bgp-extra-prefixes`],md5_key:d(e[`bgp-md5-key`],`bgp-md5-key`,`text`)},interconnect:d(e.interconnect,`interconnect`,`text`),magic:{conduit_name:d(e[`magic-conduit-name`],`magic-conduit-name`,`text`),description:d(e[`magic-description`],`magic-description`,`text`),mtu:e[`magic-mtu`]}}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p}));a(g,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cni/cnis/${t.cni}`,response:!1,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 network-interconnects cnis delete <cni>
|
|
22
22
|
|
|
23
|
-
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 ee={command:`delete <cni>`,describe:`Delete a specified CNI object`,builder:v,handler:async e=>c({command:`network-interconnects cnis delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects cnis delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/cnis/${e.cni==null?`<cni>`:encodeURIComponent(String(e.cni))}`,pathParams:{cni:String(e.cni??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force})){
|
|
24
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,cni:e.cni}));a(u,{successLabel:`Deleted`})})};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/cni/cnis/${t.cni}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function y(e){return e.usage(`$0 network-interconnects cnis get <cni>
|
|
23
|
+
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 ee={command:`delete <cni>`,describe:`Delete a specified CNI object`,builder:v,handler:async e=>c({command:`network-interconnects cnis delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects cnis delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/cnis/${e.cni==null?`<cni>`:encodeURIComponent(String(e.cni))}`,pathParams:{cni:String(e.cni??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,cni:e.cni}));a(u,{successLabel:`Deleted`})})};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/cni/cnis/${t.cni}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function y(e){return e.usage(`$0 network-interconnects cnis get <cni>
|
|
25
24
|
|
|
26
25
|
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 b={command:`get <cni>`,describe:`Get information about a CNI object`,builder:y,handler:async e=>c({command:`network-interconnects cnis get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects cnis get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/cnis/${e.cni==null?`<cni>`:encodeURIComponent(String(e.cni))}`,pathParams:{cni:String(e.cni??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(te,{account_id:l,cni:e.cni}));a(u,{successLabel:`Loaded`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/cni/cnis`,query:[`slot`,`tunnel_id`,`cursor`,`limit`],errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 network-interconnects cnis list
|
|
27
26
|
|
|
@@ -50,8 +49,7 @@ This should always be inside the same prefix as \`p2p_ip\`.`}).option(`id`,{type
|
|
|
50
49
|
|
|
51
50
|
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`]}).coerce(`bandwidth`,e=>d(e,`bandwidth`,`text`)).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 A={command:`create`,describe:`Create a new interconnect`,builder:k,handler:async e=>c({command:`network-interconnects interconnects create`,classification:{safeFlags:[`bandwidth`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects interconnects create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/interconnects`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({account:d(e.account,`account`,`text`),type:d(e.type,`type`,`text`),slot_id:d(e[`slot-id`],`slot-id`,`text`),speed:d(e.speed,`speed`,`text`),bandwidth:e.bandwidth,pairing_key:d(e[`pairing-key`],`pairing-key`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(O,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.account===void 0&&(e.account=await f(`account`,`The account field`)),e.type===void 0&&(e.type=await f(`type`,`The type field`));let m=u({account:d(e.account,`account`,`text`),type:d(e.type,`type`,`text`),slot_id:d(e[`slot-id`],`slot-id`,`text`),speed:d(e.speed,`speed`,`text`),bandwidth:e.bandwidth,pairing_key:d(e[`pairing-key`],`pairing-key`,`text`)}),h=await s(`Creating`,async()=>c.send(O,{body:m,account_id:p}));a(h,{successLabel:`Created`})})};var j={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/cni/interconnects/${t.icon}`,response:!1,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function M(e){return e.usage(`$0 network-interconnects interconnects delete <icon>
|
|
52
51
|
|
|
53
|
-
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 N={command:`delete <icon>`,describe:`Delete an interconnect object`,builder:M,handler:async e=>c({command:`network-interconnects interconnects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects interconnects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/interconnects/${e.icon==null?`<icon>`:encodeURIComponent(String(e.icon))}`,pathParams:{icon:String(e.icon??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force})){
|
|
54
|
-
`);return}let u=await s(`Deleting`,async()=>c.send(j,{account_id:l,icon:e.icon}));a(u,{successLabel:`Deleted`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/cni/interconnects/${t.icon}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function F(e){return e.usage(`$0 network-interconnects interconnects get <icon>
|
|
52
|
+
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 N={command:`delete <icon>`,describe:`Delete an interconnect object`,builder:M,handler:async e=>c({command:`network-interconnects interconnects delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects interconnects delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/interconnects/${e.icon==null?`<icon>`:encodeURIComponent(String(e.icon))}`,pathParams:{icon:String(e.icon??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(j,{account_id:l,icon:e.icon}));a(u,{successLabel:`Deleted`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/cni/interconnects/${t.icon}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function F(e){return e.usage(`$0 network-interconnects interconnects get <icon>
|
|
55
53
|
|
|
56
54
|
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 I={command:`get <icon>`,describe:`Get information about an interconnect object`,builder:F,handler:async e=>c({command:`network-interconnects interconnects get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects interconnects get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/interconnects/${e.icon==null?`<icon>`:encodeURIComponent(String(e.icon))}`,pathParams:{icon:String(e.icon??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(P,{account_id:l,icon:e.icon}));a(u,{successLabel:`Loaded`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/cni/interconnects`,query:[`site`,`type`,`cursor`,`limit`],errors:{400:`BadRequestError`,500:`InternalServerError`}};function R(e){return e.usage(`$0 network-interconnects interconnects list
|
|
57
55
|
|